@openrails/contentkit-ui 0.93.1 → 0.95.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -5
- package/dist/client/browser-reader-preferences.d.ts +38 -0
- package/dist/client/browser-reader-preferences.js +172 -0
- package/dist/client/browser-reader-preferences.js.map +1 -0
- package/dist/client/client.d.ts +3 -0
- package/dist/client/client.js +27 -25
- package/dist/client/client.js.map +1 -1
- package/dist/client/discovery.d.ts +14 -1
- package/dist/client/discovery.js +36 -22
- package/dist/client/discovery.js.map +1 -1
- package/dist/client/generated/routes.d.ts +33 -7
- package/dist/client/generated/routes.js +57 -2
- package/dist/client/generated/routes.js.map +1 -1
- package/dist/client/generated/wire.d.ts +15 -0
- package/dist/client/generated/wire.js.map +1 -1
- package/dist/client/http.d.ts +18 -1
- package/dist/client/http.js +67 -26
- package/dist/client/http.js.map +1 -1
- package/dist/client/index.d.ts +3 -1
- package/dist/client/reader-preferences.d.ts +46 -0
- package/dist/client/reader-preferences.js +147 -0
- package/dist/client/reader-preferences.js.map +1 -0
- package/dist/client.js +17 -15
- package/dist/components/content/card.d.ts +21 -5
- package/dist/components/content/card.js +80 -67
- package/dist/components/content/card.js.map +1 -1
- package/dist/components/content/daily-releases.d.ts +15 -0
- package/dist/components/content/daily-releases.js +167 -0
- package/dist/components/content/daily-releases.js.map +1 -0
- package/dist/components/content/filters.d.ts +1 -1
- package/dist/components/content/filters.js +1 -5
- package/dist/components/content/filters.js.map +1 -1
- package/dist/components/content/grid.d.ts +14 -1
- package/dist/components/content/grid.js +58 -32
- package/dist/components/content/grid.js.map +1 -1
- package/dist/components/content/index.d.ts +4 -2
- package/dist/components/content/popular.d.ts +11 -0
- package/dist/components/content/popular.js +49 -0
- package/dist/components/content/popular.js.map +1 -0
- package/dist/components/content/reader-settings.d.ts +1 -1
- package/dist/components/content/reader-settings.js +67 -44
- package/dist/components/content/reader-settings.js.map +1 -1
- package/dist/index.js +22 -20
- package/dist/locales/discovery/de.js +6 -0
- package/dist/locales/discovery/de.js.map +1 -1
- package/dist/locales/discovery/en.d.ts +6 -0
- package/dist/locales/discovery/en.js +6 -0
- package/dist/locales/discovery/en.js.map +1 -1
- package/dist/locales/discovery/es.js +6 -0
- package/dist/locales/discovery/es.js.map +1 -1
- package/dist/locales/discovery/ja.js +6 -0
- package/dist/locales/discovery/ja.js.map +1 -1
- package/dist/locales/discovery/ko.js +6 -0
- package/dist/locales/discovery/ko.js.map +1 -1
- package/dist/locales/discovery/zh.js +6 -0
- package/dist/locales/discovery/zh.js.map +1 -1
- package/dist/locales/en.d.ts +6 -0
- package/dist/react/context.d.ts +1 -1
- package/dist/react/context.js.map +1 -1
- package/dist/react/discovery.d.ts +14 -4
- package/dist/react/discovery.js +196 -149
- package/dist/react/discovery.js.map +1 -1
- package/dist/react/index.d.ts +2 -1
- package/dist/react/provider.d.ts +4 -1
- package/dist/react/provider.js +38 -31
- package/dist/react/provider.js.map +1 -1
- package/dist/react/reader-preferences.d.ts +13 -0
- package/dist/react/reader-preferences.js +15 -0
- package/dist/react/reader-preferences.js.map +1 -0
- package/dist/react/resources.js +11 -11
- package/dist/react/resources.js.map +1 -1
- package/dist/react.js +10 -9
- package/dist/styles.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discovery.js","names":[],"sources":["../../src/client/discovery.ts"],"sourcesContent":["import type {\n ContentFilters,\n ContentFiltersUpdate,\n ContentPage,\n ExposureInput,\n Exposures,\n RecentSearches,\n ReleaseDates,\n SignalInput,\n Signals,\n Typeahead,\n} from \"./generated/wire.js\";\nimport type { Http } from \"./http.js\";\nimport { call } from \"./route.js\";\nimport { browserSearchHistory, type BrowserSearchHistory } from \"./browser-search-history.js\";\n\n/** A popularity period. */\nexport type Period = \"7d\" | \"30d\" | \"90d\" | \"365d\" | \"all\";\n/** A list's order; position orders by the first of `groups` (an ordered group). */\nexport type ListSort = \"newest\" | \"oldest\" | \"title\" | \"popular\" | `popular:${Period}` | \"top_rated\" | `top_rated:${Period}` | \"most_favorited\" | \"most_viewed\" | \"position\" | \"random\";\n/** How locked contents list: marked (lock, the default) or left out (hide). */\nexport type AccessMode = \"lock\" | \"hide\";\n\n/** Which contents a list holds. */\nexport interface ContentFilterQuery {\n kind?: string;\n /** Group ids every listed version is in. */\n groups?: readonly string[];\n /** Group ids no listed version is in. */\n exclude_groups?: readonly string[];\n /** Only contents this group owns: a channel's feed. */\n owner_group?: string;\n /** User ids: only contents one of them is credited on. */\n creators?: readonly string[];\n /** public (anyone opens it now) or the level it stays locked at. */\n access?: readonly (\"public\" | \"tier\" | \"group\" | \"ppv\" | \"group_ppv\")[];\n /** Only contents locked behind one of these tiers. */\n tiers?: readonly string[];\n /** Version traits every listed version has. */\n traits?: readonly string[];\n /** \"name:value\" of the kind's filterable attributes. */\n attribute?: readonly string[];\n /** Published on this day (YYYY-MM-DD) or month (YYYY-MM). */\n released_on?: string;\n /** IANA time zone of released_on and release dates; UTC by default. */\n tz?: string;\n /** The signed-in reader's unseen, in-progress or completed contents. */\n view_status?: \"unseen\" | \"in_progress\" | \"completed\";\n}\n\n/** How a list reads to its reader. */\nexport interface ReaderQuery {\n /** Only content with a live version in this language. */\n language?: string;\n /** Titles, names and paths in this language, and each card's preferred version's; language by default. */\n display_language?: string;\n mode?: AccessMode;\n}\n\n/** The group kinds cards name; every kind with a page by default. */\nexport interface CardQuery {\n card_entities?: readonly string[];\n}\n\nexport interface PageQuery {\n cursor?: string;\n limit?: number;\n}\n\nexport type ContentQuery = ContentFilterQuery & ReaderQuery & CardQuery & PageQuery & { sort?: ListSort };\nexport type SearchQuery = ContentFilterQuery &\n ReaderQuery &\n CardQuery &\n PageQuery & {\n q: string;\n sort?: \"relevance\" | ListSort;\n personalize?: boolean;\n /** Explicit legacy server-side anonymous history. Omit for public search without server history. */\n session?: string;\n };\nexport interface RecentSearchesQuery {\n /** Explicit legacy server-side anonymous history; no anonymous session is created by default. */\n session?: string;\n /** 10 by default, at most 100. */\n limit?: number;\n}\nexport type RailQuery = ContentFilterQuery & ReaderQuery & CardQuery & { limit?: number };\nexport type ReleaseDatesQuery = ContentFilterQuery & ReaderQuery & PageQuery & { by?: \"month\" | \"day\" };\nexport type HistoryQuery = ReaderQuery & CardQuery & PageQuery & { kind?: string; status?: \"seen\" | \"in_progress\" | \"completed\" };\nexport interface TypeaheadQuery extends ReaderQuery {\n q: string;\n /** Only contents of this kind. */\n kind?: string;\n /** The group kinds suggested; every kind with a page by default. */\n entity_kinds?: readonly string[];\n /** Per section: 8 by default, at most 20. */\n limit?: number;\n}\n\n// Comma-joined list parameters; `attribute` repeats instead.\nconst LISTS = new Set([\"groups\", \"exclude_groups\", \"creators\", \"access\", \"tiers\", \"traits\", \"card_entities\", \"entity_kinds\"]);\n\n/** A query with its list parameters comma-joined, as discovery routes read them. */\nexport function query(q: object): Record<string, string | number | boolean | readonly string[] | undefined> {\n const out: Record<string, string | number | boolean | readonly string[] | undefined> = {};\n for (const [k, v] of Object.entries(q)) out[k] = LISTS.has(k) && Array.isArray(v) ? (v.length ? v.join(\",\") : undefined) : v;\n return out;\n}\n\n/**\n * Discovery: lists, search, typeahead, similar and recommended contents,\n * release dates, the reader's content filters and history, signals and exposures.\n */\nexport class DiscoveryClient {\n /** Local anonymous history, isolated from authenticated server history. */\n readonly browserSearches: BrowserSearchHistory;\n\n constructor(private readonly http: Http) {\n this.browserSearches = browserSearchHistory(http.mount(\"discovery\"));\n }\n\n /** Contents as cards, one per content item with the version that fits the reader. */\n list(q: ContentQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/contents\", { query: query(q) as never, signal });\n }\n /** A first page is kept among the reader's recent searches. */\n async search(q: SearchQuery, signal?: AbortSignal): Promise<ContentPage> {\n const emit = q.cursor ? null : this.http.captureChanges();\n const out: ContentPage = await call(this.http, \"GET\", \"/search\", { query: query(q) as never, signal });\n emit?.({ type: \"searches.changed\" });\n return out;\n }\n /** The reader's recent searches, newest first, since they last cleared them. */\n recentSearches(q: RecentSearchesQuery = {}, signal?: AbortSignal): Promise<RecentSearches> {\n return call(this.http, \"GET\", \"/me/searches\", { query: q, signal });\n }\n /** Clears one recent search, or all of them. */\n async clearSearches(o: { query?: string; session?: string } = {}): Promise<void> {\n const emit = this.http.captureChanges();\n await call(this.http, \"DELETE\", \"/me/searches\", { query: o });\n emit({ type: \"searches.changed\" });\n }\n /** Contents and groups while the reader types. */\n typeahead(q: TypeaheadQuery, signal?: AbortSignal): Promise<Typeahead> {\n return call(this.http, \"GET\", \"/typeahead\", { query: query(q) as never, signal });\n }\n /** Contents like one, of its kind unless q.kind names another. */\n similar(id: string, q: RailQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/contents/{id}/similar\", { params: { id }, query: query(q) as never, signal });\n }\n /** For the signed-in reader. */\n recommendations(q: RailQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/recommendations\", { query: query(q) as never, signal });\n }\n /** Per month or day, newest first: how many contents the reader's listing shows released then, and how many are free. */\n releaseDates(q: ReleaseDatesQuery = {}, signal?: AbortSignal): Promise<ReleaseDates> {\n return call(this.http, \"GET\", \"/release-dates\", { query: query(q) as never, signal });\n }\n contentFilters(language?: string, signal?: AbortSignal): Promise<ContentFilters> {\n return call(this.http, \"GET\", \"/me/content-filters\", { query: { language }, signal });\n }\n /** Replaces the reader's filter settings; every read applies them. */\n async setContentFilters(update: ContentFiltersUpdate, language?: string): Promise<ContentFilters> {\n const emit = this.http.captureChanges();\n const out: ContentFilters = await call(this.http, \"PUT\", \"/me/content-filters\", { query: { language }, body: update });\n emit({ type: \"contentFilters.changed\" });\n return out;\n }\n /** What the reader engaged with, most recent first. */\n history(q: HistoryQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/me/history\", { query: query(q) as never, signal });\n }\n /** Erases the reader's history: of one content item, one kind or everything. */\n async forgetHistory(o: { kind?: string; content_id?: string } = {}): Promise<void> {\n const emit = this.http.captureChanges();\n await call(this.http, \"DELETE\", \"/me/history\", { query: o });\n emit({ type: \"history.changed\" });\n }\n /** Views and clicks; signed out, of the session named. */\n signals(signals: SignalInput[], session?: string, o: { keepalive?: boolean } = {}): Promise<void> {\n const body: Signals = { session, signals };\n return call(this.http, \"POST\", \"/signals\", { body, keepalive: o.keepalive });\n }\n /** Result lists served, rendered or shown, for click attribution. */\n exposures(exposures: ExposureInput[], session?: string, o: { keepalive?: boolean } = {}): Promise<void> {\n const body: Exposures = { session, exposures };\n return call(this.http, \"POST\", \"/exposures\", { body, keepalive: o.keepalive });\n }\n}\n"],"mappings":";;;AAoGA,IAAM,oBAAQ,IAAI,IAAI;CAAC;CAAU;CAAkB;CAAY;CAAU;CAAS;CAAU;CAAiB;AAAc,CAAC;AAG5H,SAAgB,EAAM,GAAsF;CAC1G,IAAM,IAAiF,CAAC;CACxF,KAAK,IAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,CAAC,GAAG,EAAI,KAAK,EAAM,IAAI,CAAC,KAAK,MAAM,QAAQ,CAAC,IAAK,EAAE,SAAS,EAAE,KAAK,GAAG,IAAI,KAAA,IAAa;CAC3H,OAAO;AACT;AAMA,IAAa,IAAb,MAA6B;CAIE;CAF7B;CAEA,YAAY,GAA6B;EACvC,AAD2B,KAAA,OAAA,GAC3B,KAAK,kBAAkB,EAAqB,EAAK,MAAM,WAAW,CAAC;CACrE;CAGA,KAAK,IAAkB,CAAC,GAAG,GAA4C;EACrE,OAAO,EAAK,KAAK,MAAM,OAAO,aAAa;GAAE,OAAO,EAAM,CAAC;GAAY;EAAO,CAAC;CACjF;CAEA,MAAM,OAAO,GAAgB,GAA4C;EACvE,IAAM,IAAO,EAAE,SAAS,OAAO,KAAK,KAAK,eAAe,GAClD,IAAmB,MAAM,EAAK,KAAK,MAAM,OAAO,WAAW;GAAE,OAAO,EAAM,CAAC;GAAY;EAAO,CAAC;EAErG,OADA,IA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AC,GAChC;CACT;CAEA,QAAQ,IAAkB,CAAC,GAAG,GAA4C;EACxE,OAAO,EAAK,KAAK,MAAM,OAAO,eAAe;GAAE,OAAO,EAAM,CAAC;GAAY;EAAO,CAAC;CACnF;CAEA,MAAM,cAAc,IAA4C,CAAC,GAAkB;EACjF,IAAM,IAAO,KAAK,KAAK,eAAe;EAEtC,AADA,MAAM,EAAK,KAAK,MAAM,UAAU,eAAe,EAAE,OAAO,EAAE,CAAC,GAC3D,EAAK,EAAE,MAAM,kBAAkB,CAAC;CAClC;CAEA,QAAQ,GAAwB,GAAkB,IAA6B,CAAC,GAAkB;EAChG,IAAM,IAAgB;GAAE;GAAS;EAAQ;EACzC,OAAO,EAAK,KAAK,MAAM,QAAQ,YAAY;GAAE;GAAM,WAAW,EAAE;EAAU,CAAC;CAC7E;CAEA,UAAU,GAA4B,GAAkB,IAA6B,CAAC,GAAkB;EACtG,IAAM,IAAkB;GAAE;GAAS;EAAU;EAC7C,OAAO,EAAK,KAAK,MAAM,QAAQ,cAAc;GAAE;GAAM,WAAW,EAAE;EAAU,CAAC;CAC/E;AACF"}
|
|
1
|
+
{"version":3,"file":"discovery.js","names":[],"sources":["../../src/client/discovery.ts"],"sourcesContent":["import type {\n ContentFilters,\n ContentFiltersUpdate,\n ContentPage,\n DailyReleases,\n ExposureInput,\n Exposures,\n RecentSearches,\n ReleaseDates,\n SignalInput,\n Signals,\n Typeahead,\n} from \"./generated/wire.js\";\nimport type { Http } from \"./http.js\";\nimport { call, routeURL } from \"./route.js\";\nimport { browserSearchHistory, type BrowserSearchHistory } from \"./browser-search-history.js\";\n\n/** A popularity period. */\nexport type Period = \"7d\" | \"30d\" | \"90d\" | \"365d\" | \"all\";\n/** A list's order; position orders by the first of `groups` (an ordered group). */\nexport type ListSort = \"newest\" | \"oldest\" | \"title\" | \"popular\" | `popular:${Period}` | \"top_rated\" | `top_rated:${Period}` | \"most_favorited\" | \"most_viewed\" | \"position\" | \"random\";\n/** How locked contents list: marked (lock, the default) or left out (hide). */\nexport type AccessMode = \"lock\" | \"hide\";\n\n/** Which contents a list holds. */\nexport interface ContentFilterQuery {\n kind?: string;\n /** Group ids every listed version is in. */\n groups?: readonly string[];\n /** Group ids no listed version is in. */\n exclude_groups?: readonly string[];\n /** Only contents this group owns: a channel's feed. */\n owner_group?: string;\n /** User ids: only contents one of them is credited on. */\n creators?: readonly string[];\n /** public (anyone opens it now) or the level it stays locked at. */\n access?: readonly (\"public\" | \"tier\" | \"group\" | \"ppv\" | \"group_ppv\")[];\n /** Only contents locked behind one of these tiers. */\n tiers?: readonly string[];\n /** Version traits every listed version has. */\n traits?: readonly string[];\n /** \"name:value\" of the kind's filterable attributes. */\n attribute?: readonly string[];\n /** Published on this day (YYYY-MM-DD) or month (YYYY-MM). */\n released_on?: string;\n /** Only contents published within this age window; independent of the popularity score window. */\n published_within?: Period;\n /** IANA time zone of released_on and release dates; UTC by default. */\n tz?: string;\n /** The signed-in reader's unseen, in-progress or completed contents. */\n view_status?: \"unseen\" | \"in_progress\" | \"completed\";\n}\n\n/** How a list reads to its reader. */\nexport interface ReaderQuery {\n /** Only content with a live version in this language. */\n language?: string;\n /** Titles, names and paths in this language, and each card's preferred version's; language by default. */\n display_language?: string;\n mode?: AccessMode;\n}\n\n/** The group kinds cards name; every kind with a page by default. */\nexport interface CardQuery {\n card_entities?: readonly string[];\n}\n\nexport interface PageQuery {\n cursor?: string;\n limit?: number;\n}\n\nexport type ContentQuery = ContentFilterQuery & ReaderQuery & CardQuery & PageQuery & { sort?: ListSort };\nexport type PopularPeriod = \"7d\" | \"90d\" | \"365d\" | \"all\";\nexport type PopularQuery = Omit<ContentQuery, \"sort\" | \"published_within\">;\n\n/** Match the popularity score window and publication age window. */\nexport function popularQuery(period: PopularPeriod = \"7d\", filters: PopularQuery = {}): ContentQuery {\n return { ...filters, sort: `popular:${period}`, published_within: period };\n}\n\nexport type SearchQuery = ContentFilterQuery &\n ReaderQuery &\n CardQuery &\n PageQuery & {\n q: string;\n sort?: \"relevance\" | ListSort;\n personalize?: boolean;\n /** Explicit legacy server-side anonymous history. Omit for public search without server history. */\n session?: string;\n };\nexport interface RecentSearchesQuery {\n /** Explicit legacy server-side anonymous history; no anonymous session is created by default. */\n session?: string;\n /** 10 by default, at most 100. */\n limit?: number;\n}\nexport type RailQuery = ContentFilterQuery & ReaderQuery & CardQuery & { limit?: number };\nexport type ReleaseDatesQuery = ContentFilterQuery & ReaderQuery & PageQuery & { by?: \"month\" | \"day\" };\n/** Complete daily metadata for one calendar window, without pagination. */\nexport type DailyReleasesQuery = Omit<ContentFilterQuery, \"released_on\" | \"tz\"> & ReaderQuery & CardQuery & { days?: number; time_zone?: string };\nexport type HistoryQuery = ReaderQuery & CardQuery & PageQuery & { kind?: string; status?: \"seen\" | \"in_progress\" | \"completed\" };\nexport interface TypeaheadQuery extends ReaderQuery {\n q: string;\n /** Only contents of this kind. */\n kind?: string;\n /** The group kinds suggested; every kind with a page by default. */\n entity_kinds?: readonly string[];\n /** Per section: 8 by default, at most 20. */\n limit?: number;\n}\n\n// Comma-joined list parameters; `attribute` repeats instead.\nconst LISTS = new Set([\"groups\", \"exclude_groups\", \"creators\", \"access\", \"tiers\", \"traits\", \"card_entities\", \"entity_kinds\"]);\n\n/** A query with its list parameters comma-joined, as discovery routes read them. */\nexport function query(q: object): Record<string, string | number | boolean | readonly string[] | undefined> {\n const out: Record<string, string | number | boolean | readonly string[] | undefined> = {};\n for (const [k, v] of Object.entries(q)) out[k] = LISTS.has(k) && Array.isArray(v) ? (v.length ? v.join(\",\") : undefined) : v;\n return out;\n}\n\n/**\n * Discovery: lists, search, typeahead, similar and recommended contents,\n * release dates, the reader's content filters and history, signals and exposures.\n */\nexport class DiscoveryClient {\n /** Local anonymous history, isolated from authenticated server history. */\n readonly browserSearches: BrowserSearchHistory;\n\n constructor(private readonly http: Http) {\n this.browserSearches = browserSearchHistory(http.mount(\"discovery\"));\n }\n\n /** Contents as cards, one per content item with the version that fits the reader. */\n list(q: ContentQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/contents\", { query: query(q) as never, signal });\n }\n /** A first page is kept among the reader's recent searches. */\n async search(q: SearchQuery, signal?: AbortSignal): Promise<ContentPage> {\n const emit = q.cursor ? null : this.http.captureChanges();\n const out: ContentPage = await call(this.http, \"GET\", \"/search\", { query: query(q) as never, signal });\n emit?.({ type: \"searches.changed\" });\n return out;\n }\n /** The reader's recent searches, newest first, since they last cleared them. */\n recentSearches(q: RecentSearchesQuery = {}, signal?: AbortSignal): Promise<RecentSearches> {\n return call(this.http, \"GET\", \"/me/searches\", { query: q, signal });\n }\n /** Clears one recent search, or all of them. */\n async clearSearches(o: { query?: string; session?: string } = {}): Promise<void> {\n const emit = this.http.captureChanges();\n await call(this.http, \"DELETE\", \"/me/searches\", { query: o });\n emit({ type: \"searches.changed\" });\n }\n /** Contents and groups while the reader types. */\n typeahead(q: TypeaheadQuery, signal?: AbortSignal): Promise<Typeahead> {\n return call(this.http, \"GET\", \"/typeahead\", { query: query(q) as never, signal });\n }\n /** Contents like one, of its kind unless q.kind names another. */\n similar(id: string, q: RailQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/contents/{id}/similar\", { params: { id }, query: query(q) as never, signal });\n }\n /** For the signed-in reader. */\n recommendations(q: RailQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/recommendations\", { query: query(q) as never, signal });\n }\n /** Per month or day, newest first: how many contents the reader's listing shows released then, and how many are free. */\n releaseDates(q: ReleaseDatesQuery = {}, signal?: AbortSignal): Promise<ReleaseDates> {\n return call(this.http, \"GET\", \"/release-dates\", { query: query(q) as never, signal });\n }\n /** Every visible card in each day; opening or expanding a day needs no further request. */\n releases(q: DailyReleasesQuery = {}, signal?: AbortSignal): Promise<DailyReleases> {\n return call(this.http, \"GET\", \"/releases\", { query: query(q) as never, signal });\n }\n async contentFilters(language?: string, signal?: AbortSignal): Promise<ContentFilters> {\n const result = await this.http.request<ContentFilters>(routeURL(this.http, \"GET\", \"/content-filters\", { query: { language } }), { signal, guestPreferences: false });\n this.http.acceptGuestFilters(result.filters);\n return result;\n }\n /** Replaces the reader's filter settings; every read applies them. */\n async setContentFilters(update: ContentFiltersUpdate, language?: string): Promise<ContentFilters> {\n const emit = this.http.captureChanges();\n const out: ContentFilters = await call(this.http, \"PUT\", \"/me/content-filters\", { query: { language }, body: update });\n emit({ type: \"contentFilters.changed\" });\n return out;\n }\n /** What the reader engaged with, most recent first. */\n history(q: HistoryQuery = {}, signal?: AbortSignal): Promise<ContentPage> {\n return call(this.http, \"GET\", \"/me/history\", { query: query(q) as never, signal });\n }\n /** Erases the reader's history: of one content item, one kind or everything. */\n async forgetHistory(o: { kind?: string; content_id?: string } = {}): Promise<void> {\n const emit = this.http.captureChanges();\n await call(this.http, \"DELETE\", \"/me/history\", { query: o });\n emit({ type: \"history.changed\" });\n }\n /** Views and clicks; signed out, of the session named. */\n signals(signals: SignalInput[], session?: string, o: { keepalive?: boolean } = {}): Promise<void> {\n const body: Signals = { session, signals };\n return call(this.http, \"POST\", \"/signals\", { body, keepalive: o.keepalive });\n }\n /** Result lists served, rendered or shown, for click attribution. */\n exposures(exposures: ExposureInput[], session?: string, o: { keepalive?: boolean } = {}): Promise<void> {\n const body: Exposures = { session, exposures };\n return call(this.http, \"POST\", \"/exposures\", { body, keepalive: o.keepalive });\n }\n}\n"],"mappings":";;;AA6EA,SAAgB,EAAa,IAAwB,MAAM,IAAwB,CAAC,GAAiB;CACnG,OAAO;EAAE,GAAG;EAAS,MAAM,WAAW;EAAU,kBAAkB;CAAO;AAC3E;AAkCA,IAAM,oBAAQ,IAAI,IAAI;CAAC;CAAU;CAAkB;CAAY;CAAU;CAAS;CAAU;CAAiB;AAAc,CAAC;AAG5H,SAAgB,EAAM,GAAsF;CAC1G,IAAM,IAAiF,CAAC;CACxF,KAAK,IAAM,CAAC,GAAG,MAAM,OAAO,QAAQ,CAAC,GAAG,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M,IAAgB;GAAE;GAAS;EAAQ;EACzC,OAAO,EAAK,KAAK,MAAM,QAAQ,YAAY;GAAE;GAAM,WAAW,EAAE;EAAU,CAAC;CAC7E;CAEA,UAAU,GAA4B,GAAkB,IAA6B,CAAC,GAAkB;EACtG,IAAM,IAAkB;GAAE;GAAS;EAAU;EAC7C,OAAO,EAAK,KAAK,MAAM,QAAQ,cAAc;GAAE;GAAM,WAAW,EAAE;EAAU,CAAC;CAC/E;AACF"}
|
|
@@ -1826,13 +1826,26 @@ export declare const CONTENTKIT_ROUTES: readonly [{
|
|
|
1826
1826
|
};
|
|
1827
1827
|
readonly errors: readonly [];
|
|
1828
1828
|
readonly errorSets: readonly ["module:offers", "auth", "request"];
|
|
1829
|
+
}, {
|
|
1830
|
+
readonly method: "GET";
|
|
1831
|
+
readonly module: "discovery";
|
|
1832
|
+
readonly path: "/releases";
|
|
1833
|
+
readonly auth: "public";
|
|
1834
|
+
readonly permission: null;
|
|
1835
|
+
readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "published_within", "view_status", "language", "display_language", "mode", "card_entities", "days", "time_zone"];
|
|
1836
|
+
readonly request: null;
|
|
1837
|
+
readonly responses: {
|
|
1838
|
+
readonly 200: "DailyReleases";
|
|
1839
|
+
};
|
|
1840
|
+
readonly errors: readonly [];
|
|
1841
|
+
readonly errorSets: readonly ["module:discovery", "auth", "request"];
|
|
1829
1842
|
}, {
|
|
1830
1843
|
readonly method: "GET";
|
|
1831
1844
|
readonly module: "discovery";
|
|
1832
1845
|
readonly path: "/contents";
|
|
1833
1846
|
readonly auth: "public";
|
|
1834
1847
|
readonly permission: null;
|
|
1835
|
-
readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "sort", "card_entities", "cursor", "limit"];
|
|
1848
|
+
readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "sort", "card_entities", "cursor", "limit"];
|
|
1836
1849
|
readonly request: null;
|
|
1837
1850
|
readonly responses: {
|
|
1838
1851
|
readonly 200: "ContentPage";
|
|
@@ -1845,7 +1858,7 @@ export declare const CONTENTKIT_ROUTES: readonly [{
|
|
|
1845
1858
|
readonly path: "/search";
|
|
1846
1859
|
readonly auth: "public";
|
|
1847
1860
|
readonly permission: null;
|
|
1848
|
-
readonly query: readonly ["q", "kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "sort", "card_entities", "personalize", "session", "cursor", "limit"];
|
|
1861
|
+
readonly query: readonly ["q", "kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "sort", "card_entities", "personalize", "session", "cursor", "limit"];
|
|
1849
1862
|
readonly request: null;
|
|
1850
1863
|
readonly responses: {
|
|
1851
1864
|
readonly 200: "ContentPage";
|
|
@@ -1871,7 +1884,7 @@ export declare const CONTENTKIT_ROUTES: readonly [{
|
|
|
1871
1884
|
readonly path: "/contents/{id}/similar";
|
|
1872
1885
|
readonly auth: "public";
|
|
1873
1886
|
readonly permission: null;
|
|
1874
|
-
readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "card_entities", "limit"];
|
|
1887
|
+
readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "card_entities", "limit"];
|
|
1875
1888
|
readonly request: null;
|
|
1876
1889
|
readonly responses: {
|
|
1877
1890
|
readonly 200: "ContentPage";
|
|
@@ -1884,7 +1897,7 @@ export declare const CONTENTKIT_ROUTES: readonly [{
|
|
|
1884
1897
|
readonly path: "/recommendations";
|
|
1885
1898
|
readonly auth: "user";
|
|
1886
1899
|
readonly permission: null;
|
|
1887
|
-
readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "card_entities", "limit"];
|
|
1900
|
+
readonly query: readonly ["kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "card_entities", "limit"];
|
|
1888
1901
|
readonly request: null;
|
|
1889
1902
|
readonly responses: {
|
|
1890
1903
|
readonly 200: "ContentPage";
|
|
@@ -1897,7 +1910,7 @@ export declare const CONTENTKIT_ROUTES: readonly [{
|
|
|
1897
1910
|
readonly path: "/release-dates";
|
|
1898
1911
|
readonly auth: "public";
|
|
1899
1912
|
readonly permission: null;
|
|
1900
|
-
readonly query: readonly ["by", "kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "tz", "view_status", "language", "display_language", "mode", "cursor", "limit"];
|
|
1913
|
+
readonly query: readonly ["by", "kind", "groups", "exclude_groups", "owner_group", "creators", "access", "tiers", "traits", "attribute", "released_on", "published_within", "tz", "view_status", "language", "display_language", "mode", "cursor", "limit"];
|
|
1901
1914
|
readonly request: null;
|
|
1902
1915
|
readonly responses: {
|
|
1903
1916
|
readonly 200: "ReleaseDates";
|
|
@@ -1907,8 +1920,8 @@ export declare const CONTENTKIT_ROUTES: readonly [{
|
|
|
1907
1920
|
}, {
|
|
1908
1921
|
readonly method: "GET";
|
|
1909
1922
|
readonly module: "discovery";
|
|
1910
|
-
readonly path: "/
|
|
1911
|
-
readonly auth: "
|
|
1923
|
+
readonly path: "/content-filters";
|
|
1924
|
+
readonly auth: "public";
|
|
1912
1925
|
readonly permission: null;
|
|
1913
1926
|
readonly query: readonly ["language"];
|
|
1914
1927
|
readonly request: null;
|
|
@@ -1930,6 +1943,19 @@ export declare const CONTENTKIT_ROUTES: readonly [{
|
|
|
1930
1943
|
};
|
|
1931
1944
|
readonly errors: readonly [];
|
|
1932
1945
|
readonly errorSets: readonly ["module:discovery", "auth", "request"];
|
|
1946
|
+
}, {
|
|
1947
|
+
readonly method: "POST";
|
|
1948
|
+
readonly module: "discovery";
|
|
1949
|
+
readonly path: "/me/content-filters/initialize";
|
|
1950
|
+
readonly auth: "user";
|
|
1951
|
+
readonly permission: null;
|
|
1952
|
+
readonly query: readonly ["language"];
|
|
1953
|
+
readonly request: "ContentFiltersInitialization";
|
|
1954
|
+
readonly responses: {
|
|
1955
|
+
readonly 200: "ContentFilters";
|
|
1956
|
+
};
|
|
1957
|
+
readonly errors: readonly ["forbidden"];
|
|
1958
|
+
readonly errorSets: readonly ["module:discovery", "auth", "request"];
|
|
1933
1959
|
}, {
|
|
1934
1960
|
readonly method: "GET";
|
|
1935
1961
|
readonly module: "discovery";
|
|
@@ -2529,6 +2529,40 @@ var e = {
|
|
|
2529
2529
|
"request"
|
|
2530
2530
|
]
|
|
2531
2531
|
},
|
|
2532
|
+
{
|
|
2533
|
+
method: "GET",
|
|
2534
|
+
module: "discovery",
|
|
2535
|
+
path: "/releases",
|
|
2536
|
+
auth: "public",
|
|
2537
|
+
permission: null,
|
|
2538
|
+
query: [
|
|
2539
|
+
"kind",
|
|
2540
|
+
"groups",
|
|
2541
|
+
"exclude_groups",
|
|
2542
|
+
"owner_group",
|
|
2543
|
+
"creators",
|
|
2544
|
+
"access",
|
|
2545
|
+
"tiers",
|
|
2546
|
+
"traits",
|
|
2547
|
+
"attribute",
|
|
2548
|
+
"published_within",
|
|
2549
|
+
"view_status",
|
|
2550
|
+
"language",
|
|
2551
|
+
"display_language",
|
|
2552
|
+
"mode",
|
|
2553
|
+
"card_entities",
|
|
2554
|
+
"days",
|
|
2555
|
+
"time_zone"
|
|
2556
|
+
],
|
|
2557
|
+
request: null,
|
|
2558
|
+
responses: { 200: "DailyReleases" },
|
|
2559
|
+
errors: [],
|
|
2560
|
+
errorSets: [
|
|
2561
|
+
"module:discovery",
|
|
2562
|
+
"auth",
|
|
2563
|
+
"request"
|
|
2564
|
+
]
|
|
2565
|
+
},
|
|
2532
2566
|
{
|
|
2533
2567
|
method: "GET",
|
|
2534
2568
|
module: "discovery",
|
|
@@ -2546,6 +2580,7 @@ var e = {
|
|
|
2546
2580
|
"traits",
|
|
2547
2581
|
"attribute",
|
|
2548
2582
|
"released_on",
|
|
2583
|
+
"published_within",
|
|
2549
2584
|
"tz",
|
|
2550
2585
|
"view_status",
|
|
2551
2586
|
"language",
|
|
@@ -2583,6 +2618,7 @@ var e = {
|
|
|
2583
2618
|
"traits",
|
|
2584
2619
|
"attribute",
|
|
2585
2620
|
"released_on",
|
|
2621
|
+
"published_within",
|
|
2586
2622
|
"tz",
|
|
2587
2623
|
"view_status",
|
|
2588
2624
|
"language",
|
|
@@ -2645,6 +2681,7 @@ var e = {
|
|
|
2645
2681
|
"traits",
|
|
2646
2682
|
"attribute",
|
|
2647
2683
|
"released_on",
|
|
2684
|
+
"published_within",
|
|
2648
2685
|
"tz",
|
|
2649
2686
|
"view_status",
|
|
2650
2687
|
"language",
|
|
@@ -2679,6 +2716,7 @@ var e = {
|
|
|
2679
2716
|
"traits",
|
|
2680
2717
|
"attribute",
|
|
2681
2718
|
"released_on",
|
|
2719
|
+
"published_within",
|
|
2682
2720
|
"tz",
|
|
2683
2721
|
"view_status",
|
|
2684
2722
|
"language",
|
|
@@ -2714,6 +2752,7 @@ var e = {
|
|
|
2714
2752
|
"traits",
|
|
2715
2753
|
"attribute",
|
|
2716
2754
|
"released_on",
|
|
2755
|
+
"published_within",
|
|
2717
2756
|
"tz",
|
|
2718
2757
|
"view_status",
|
|
2719
2758
|
"language",
|
|
@@ -2734,8 +2773,8 @@ var e = {
|
|
|
2734
2773
|
{
|
|
2735
2774
|
method: "GET",
|
|
2736
2775
|
module: "discovery",
|
|
2737
|
-
path: "/
|
|
2738
|
-
auth: "
|
|
2776
|
+
path: "/content-filters",
|
|
2777
|
+
auth: "public",
|
|
2739
2778
|
permission: null,
|
|
2740
2779
|
query: ["language"],
|
|
2741
2780
|
request: null,
|
|
@@ -2763,6 +2802,22 @@ var e = {
|
|
|
2763
2802
|
"request"
|
|
2764
2803
|
]
|
|
2765
2804
|
},
|
|
2805
|
+
{
|
|
2806
|
+
method: "POST",
|
|
2807
|
+
module: "discovery",
|
|
2808
|
+
path: "/me/content-filters/initialize",
|
|
2809
|
+
auth: "user",
|
|
2810
|
+
permission: null,
|
|
2811
|
+
query: ["language"],
|
|
2812
|
+
request: "ContentFiltersInitialization",
|
|
2813
|
+
responses: { 200: "ContentFilters" },
|
|
2814
|
+
errors: ["forbidden"],
|
|
2815
|
+
errorSets: [
|
|
2816
|
+
"module:discovery",
|
|
2817
|
+
"auth",
|
|
2818
|
+
"request"
|
|
2819
|
+
]
|
|
2820
|
+
},
|
|
2766
2821
|
{
|
|
2767
2822
|
method: "GET",
|
|
2768
2823
|
module: "discovery",
|