- Playlists: a link over a playlist the account does not hold plays alone; the rail's own fallback no longer counts as a pick that gives the player up. - The linked opener opens or clears nothing once the address names another player, and stops looking (and fetching its row) once it settled. - Files: a list the server's cap cut — the sorted or searched one too — keeps the link, with a notice of its own (EN/HU). - History: an in-place view rewrite (search refine, count, channel to channel, sub-view) drops a reloaded entry's overlay marks (replaceView); a landing on a channel opened from a search keeps the search; the Feed press on a search opens the plain feed. - Files/Playlists: an emptied search is written at once. - Client log: plf/cf (column text filters) are typed keys; the shell has none of its own. - Contract: writers outside lib/ take a literal or a lib/ function's result; every URL key is sorted typed or not; the writer regexes are held by a fixture; sub-views named; the bookmark net reads page tags. - Feed defaults in one constant; one live-search queue helper; Scheduler writes through the Activity codec; notRun copy (EN/HU) names Forward and a plain "Search YouTube" button.
95 lines
3.4 KiB
TypeScript
95 lines
3.4 KiB
TypeScript
// The API façade. This file owns NO endpoint logic and NO types of its own — every domain lives in
|
|
// its own api/<domain>.ts module (types + method slice together). This barrel only:
|
|
// 1. re-exports the shared HTTP machinery from api/core,
|
|
// 2. re-exports each domain's TYPES (`export type *`) so consumers import them from "./api"
|
|
// unchanged,
|
|
// 3. spreads each domain's method slice into the single `api` object consumers call.
|
|
// A new endpoint therefore has nowhere to land except a domain module — the interleave that
|
|
// motivated the split cannot re-grow here. (lib/api/facade.test.ts guards that invariant.)
|
|
import { HttpError, refusalReason, setUnauthorizedHandler } from "./api/core";
|
|
|
|
// Re-export the shared HTTP machinery so consumers keep importing these from "./api" unchanged.
|
|
export { HttpError, refusalReason, setUnauthorizedHandler };
|
|
|
|
import { accountApi } from "./api/account";
|
|
export type * from "./api/account";
|
|
import { authApi } from "./api/auth";
|
|
export type * from "./api/auth";
|
|
export { loginBlocked, deadResetLink } from "./api/auth";
|
|
import { setupApi } from "./api/setup";
|
|
export type * from "./api/setup";
|
|
import { feedApi } from "./api/feed";
|
|
export type * from "./api/feed";
|
|
export { FEED_DEFAULT_SHOW, FEED_DEFAULT_SORT, TAKEOUT_JOB } from "./api/feed";
|
|
import { discoverApi } from "./api/discover";
|
|
export type * from "./api/discover";
|
|
export { DISCOVER_BUDGETS, HERO_TIERS, discoverCardKey } from "./api/discover";
|
|
export type * from "./api/tagModes";
|
|
export {
|
|
DEFAULT_TAG_MODES,
|
|
TAG_CATEGORIES,
|
|
NO_TAG_SENTINEL,
|
|
coerceTagModes,
|
|
coerceUntagged,
|
|
} from "./api/tagModes";
|
|
import { channelsApi } from "./api/channels";
|
|
export type * from "./api/channels";
|
|
import { syncApi } from "./api/sync";
|
|
export type * from "./api/sync";
|
|
import { playlistsApi } from "./api/playlists";
|
|
export type * from "./api/playlists";
|
|
import { tagsApi } from "./api/tags";
|
|
export type * from "./api/tags";
|
|
import { notificationsApi } from "./api/notifications";
|
|
export type * from "./api/notifications";
|
|
import { savedViewsApi } from "./api/savedViews";
|
|
export type * from "./api/savedViews";
|
|
import { quotaApi } from "./api/quota";
|
|
export type * from "./api/quota";
|
|
import { adminApi } from "./api/admin";
|
|
export type * from "./api/admin";
|
|
import { plexApi } from "./api/plex";
|
|
export type * from "./api/plex";
|
|
export {
|
|
EMPTY_PLEX_FILTERS,
|
|
plexFilterCount,
|
|
coercePlexFilters,
|
|
plexFiltersSignature,
|
|
plexFiltersToParams,
|
|
parsePlexFilters,
|
|
isIntrinsicReadOnly,
|
|
} from "./api/plex";
|
|
import { downloadsApi } from "./api/downloads";
|
|
export type * from "./api/downloads";
|
|
import { filesApi } from "./api/files";
|
|
export type * from "./api/files";
|
|
export { FILES_LIST_CAP, FILE_SORTS } from "./api/files";
|
|
import { tokensApi } from "./api/tokens";
|
|
export type * from "./api/tokens";
|
|
export { TOKEN_EXPIRY_DAYS, TOKEN_EXPIRY_DEFAULT, TOKEN_RIGHTS } from "./api/tokens";
|
|
import { debugSessionsApi, diagnosticsApi } from "./api/diagnostics";
|
|
export type * from "./api/diagnostics";
|
|
export { DIAGNOSTICS_EVENTS_PATH } from "./api/diagnostics";
|
|
|
|
export const api = {
|
|
...accountApi,
|
|
...authApi,
|
|
...setupApi,
|
|
...feedApi,
|
|
...discoverApi,
|
|
...channelsApi,
|
|
...syncApi,
|
|
...playlistsApi,
|
|
...tagsApi,
|
|
...notificationsApi,
|
|
...savedViewsApi,
|
|
...quotaApi,
|
|
...adminApi,
|
|
...plexApi,
|
|
...downloadsApi,
|
|
...filesApi,
|
|
...tokensApi,
|
|
...diagnosticsApi,
|
|
...debugSessionsApi,
|
|
};
|