@prezly/theme-kit-core 4.3.3 → 4.5.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/build/{cjs/data-fetching → data-fetching}/api/PrezlyApi.d.ts +1 -1
- package/build/{cjs/data-fetching → data-fetching}/api/PrezlyApi.js +24 -24
- package/build/data-fetching/api/PrezlyApi.js.map +1 -0
- package/build/{types/data-fetching → data-fetching}/api/getPrezlyApi.d.ts +1 -1
- package/build/{cjs/data-fetching → data-fetching}/api/getPrezlyApi.js +4 -4
- package/build/data-fetching/api/getPrezlyApi.js.map +1 -0
- package/build/data-fetching/api/index.d.ts +2 -0
- package/build/{cjs/data-fetching → data-fetching}/api/index.js +3 -3
- package/build/data-fetching/api/index.js.map +1 -0
- package/build/data-fetching/api/lib.js.map +1 -0
- package/build/data-fetching/api/queries.js.map +1 -0
- package/build/data-fetching/index.d.ts +3 -0
- package/build/{cjs/data-fetching → data-fetching}/index.js +3 -3
- package/build/data-fetching/index.js.map +1 -0
- package/build/{cjs/data-fetching → data-fetching}/lib/getAlgoliaSettings.js +2 -2
- package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -0
- package/build/data-fetching/lib/getEnvVariables.js.map +1 -0
- package/build/data-fetching/lib/index.d.ts +4 -0
- package/build/data-fetching/lib/index.js +12 -0
- package/build/data-fetching/lib/index.js.map +1 -0
- package/build/data-fetching/lib/isSdkError.js.map +1 -0
- package/build/data-fetching/lib/isUuid.js.map +1 -0
- package/build/{esm/seo → data-fetching}/types.js.map +1 -1
- package/build/index.d.ts +5 -0
- package/build/{cjs/index.js → index.js} +5 -5
- package/build/index.js.map +1 -0
- package/build/{cjs/intl → intl}/getFallbackLocale.d.ts +1 -1
- package/build/{cjs/intl → intl}/getFallbackLocale.js +3 -3
- package/build/intl/getFallbackLocale.js.map +1 -0
- package/build/intl/index.d.ts +5 -0
- package/build/{cjs/intl → intl}/index.js +6 -6
- package/build/intl/index.js.map +1 -0
- package/build/{types/intl → intl}/languages.d.ts +1 -1
- package/build/{cjs/intl → intl}/languages.js +9 -9
- package/build/intl/languages.js.map +1 -0
- package/build/intl/locale.js.map +1 -0
- package/build/{esm/intl/localeConfig.cjs → intl/localeConfig.js} +3 -3
- package/build/intl/localeConfig.js.map +1 -0
- package/build/{esm/intl/localeList.cjs → intl/localeList.js} +2 -2
- package/build/intl/localeList.js.map +1 -0
- package/build/{cjs/intl → intl}/localeObject.js +2 -2
- package/build/intl/localeObject.js.map +1 -0
- package/build/{cjs/seo → seo}/getAlternateLanguageLinks.d.ts +1 -1
- package/build/{cjs/seo → seo}/getAlternateLanguageLinks.js +5 -5
- package/build/seo/getAlternateLanguageLinks.js.map +1 -0
- package/build/seo/index.d.ts +2 -0
- package/build/{cjs/seo → seo}/index.js +2 -2
- package/build/seo/index.js.map +1 -0
- package/build/{cjs → seo}/types.js.map +1 -1
- package/build/{types/seo → seo}/utils/bindLanguagesWithLocales.d.ts +1 -1
- package/build/{cjs/seo → seo}/utils/bindLanguagesWithLocales.js +2 -2
- package/build/seo/utils/bindLanguagesWithLocales.js.map +1 -0
- package/build/seo/utils/createAlternateLanguageLink.js.map +1 -0
- package/build/{cjs/seo → seo}/utils/index.d.ts +2 -2
- package/build/{cjs/seo → seo}/utils/index.js +4 -4
- package/build/seo/utils/index.js.map +1 -0
- package/build/types.js.map +1 -0
- package/build/utils/boilerplate.js.map +1 -0
- package/build/utils/constants.js.map +1 -0
- package/build/{cjs/utils → utils}/getAssetsUrl.js +2 -2
- package/build/utils/getAssetsUrl.js.map +1 -0
- package/build/{cjs/utils → utils}/getDataRequestLink.js +2 -2
- package/build/utils/getDataRequestLink.js.map +1 -0
- package/build/{cjs/utils → utils}/getLocalizedCategoryData.d.ts +1 -1
- package/build/utils/getLocalizedCategoryData.js.map +1 -0
- package/build/utils/getNewsroomLogoUrl.js.map +1 -0
- package/build/{cjs/utils → utils}/getPrivacyPortalUrl.d.ts +1 -1
- package/build/utils/getPrivacyPortalUrl.js.map +1 -0
- package/build/utils/getStoryPublicationDate.js.map +1 -0
- package/build/{cjs/utils → utils}/getUploadcareGroupUrl.js +2 -2
- package/build/utils/getUploadcareGroupUrl.js.map +1 -0
- package/build/utils/index.d.ts +10 -0
- package/build/utils/index.js +27 -0
- package/build/utils/index.js.map +1 -0
- package/build/utils/isEmbargoStory.js.map +1 -0
- package/package.json +8 -34
- package/build/cjs/data-fetching/api/PrezlyApi.js.map +0 -1
- package/build/cjs/data-fetching/api/getPrezlyApi.d.ts +0 -4
- package/build/cjs/data-fetching/api/getPrezlyApi.js.map +0 -1
- package/build/cjs/data-fetching/api/index.d.ts +0 -2
- package/build/cjs/data-fetching/api/index.js.map +0 -1
- package/build/cjs/data-fetching/api/lib.js.map +0 -1
- package/build/cjs/data-fetching/api/queries.js.map +0 -1
- package/build/cjs/data-fetching/index.d.ts +0 -3
- package/build/cjs/data-fetching/index.js.map +0 -1
- package/build/cjs/data-fetching/lib/getAlgoliaSettings.js.map +0 -1
- package/build/cjs/data-fetching/lib/getEnvVariables.js.map +0 -1
- package/build/cjs/data-fetching/lib/index.d.ts +0 -4
- package/build/cjs/data-fetching/lib/index.js +0 -12
- package/build/cjs/data-fetching/lib/index.js.map +0 -1
- package/build/cjs/data-fetching/lib/isSdkError.js.map +0 -1
- package/build/cjs/data-fetching/lib/isUuid.js.map +0 -1
- package/build/cjs/data-fetching/types.js.map +0 -1
- package/build/cjs/index.d.ts +0 -5
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/intl/getFallbackLocale.js.map +0 -1
- package/build/cjs/intl/index.d.ts +0 -5
- package/build/cjs/intl/index.js.map +0 -1
- package/build/cjs/intl/languages.d.ts +0 -44
- package/build/cjs/intl/languages.js.map +0 -1
- package/build/cjs/intl/locale.js.map +0 -1
- package/build/cjs/intl/localeConfig.cjs +0 -21
- package/build/cjs/intl/localeConfig.cjs.map +0 -1
- package/build/cjs/intl/localeList.cjs +0 -113
- package/build/cjs/intl/localeList.cjs.map +0 -1
- package/build/cjs/intl/localeObject.js.map +0 -1
- package/build/cjs/seo/getAlternateLanguageLinks.js.map +0 -1
- package/build/cjs/seo/index.d.ts +0 -2
- package/build/cjs/seo/index.js.map +0 -1
- package/build/cjs/seo/types.js.map +0 -1
- package/build/cjs/seo/utils/bindLanguagesWithLocales.d.ts +0 -11
- package/build/cjs/seo/utils/bindLanguagesWithLocales.js.map +0 -1
- package/build/cjs/seo/utils/createAlternateLanguageLink.js.map +0 -1
- package/build/cjs/seo/utils/index.js.map +0 -1
- package/build/cjs/utils/boilerplate.js.map +0 -1
- package/build/cjs/utils/constants.js.map +0 -1
- package/build/cjs/utils/getAssetsUrl.js.map +0 -1
- package/build/cjs/utils/getDataRequestLink.js.map +0 -1
- package/build/cjs/utils/getLocalizedCategoryData.js.map +0 -1
- package/build/cjs/utils/getNewsroomLogoUrl.js.map +0 -1
- package/build/cjs/utils/getPrivacyPortalUrl.js.map +0 -1
- package/build/cjs/utils/getStoryPublicationDate.js.map +0 -1
- package/build/cjs/utils/getUploadcareGroupUrl.js.map +0 -1
- package/build/cjs/utils/index.d.ts +0 -10
- package/build/cjs/utils/index.js +0 -27
- package/build/cjs/utils/index.js.map +0 -1
- package/build/cjs/utils/isEmbargoStory.js.map +0 -1
- package/build/esm/data-fetching/api/PrezlyApi.js +0 -165
- package/build/esm/data-fetching/api/PrezlyApi.js.map +0 -1
- package/build/esm/data-fetching/api/getPrezlyApi.js +0 -17
- package/build/esm/data-fetching/api/getPrezlyApi.js.map +0 -1
- package/build/esm/data-fetching/api/index.js +0 -3
- package/build/esm/data-fetching/api/index.js.map +0 -1
- package/build/esm/data-fetching/api/lib.js +0 -16
- package/build/esm/data-fetching/api/lib.js.map +0 -1
- package/build/esm/data-fetching/api/queries.js +0 -51
- package/build/esm/data-fetching/api/queries.js.map +0 -1
- package/build/esm/data-fetching/index.js +0 -4
- package/build/esm/data-fetching/index.js.map +0 -1
- package/build/esm/data-fetching/lib/getAlgoliaSettings.js +0 -18
- package/build/esm/data-fetching/lib/getAlgoliaSettings.js.map +0 -1
- package/build/esm/data-fetching/lib/getEnvVariables.js +0 -37
- package/build/esm/data-fetching/lib/getEnvVariables.js.map +0 -1
- package/build/esm/data-fetching/lib/index.js +0 -5
- package/build/esm/data-fetching/lib/index.js.map +0 -1
- package/build/esm/data-fetching/lib/isSdkError.js +0 -4
- package/build/esm/data-fetching/lib/isSdkError.js.map +0 -1
- package/build/esm/data-fetching/lib/isUuid.js +0 -5
- package/build/esm/data-fetching/lib/isUuid.js.map +0 -1
- package/build/esm/data-fetching/types.js +0 -2
- package/build/esm/data-fetching/types.js.map +0 -1
- package/build/esm/index.js +0 -6
- package/build/esm/index.js.map +0 -1
- package/build/esm/intl/getFallbackLocale.js +0 -20
- package/build/esm/intl/getFallbackLocale.js.map +0 -1
- package/build/esm/intl/index.js +0 -6
- package/build/esm/intl/index.js.map +0 -1
- package/build/esm/intl/languages.js +0 -135
- package/build/esm/intl/languages.js.map +0 -1
- package/build/esm/intl/locale.js +0 -89
- package/build/esm/intl/locale.js.map +0 -1
- package/build/esm/intl/localeConfig.cjs.map +0 -1
- package/build/esm/intl/localeList.cjs.map +0 -1
- package/build/esm/intl/localeObject.js +0 -91
- package/build/esm/intl/localeObject.js.map +0 -1
- package/build/esm/seo/getAlternateLanguageLinks.js +0 -79
- package/build/esm/seo/getAlternateLanguageLinks.js.map +0 -1
- package/build/esm/seo/index.js +0 -3
- package/build/esm/seo/index.js.map +0 -1
- package/build/esm/seo/types.js +0 -2
- package/build/esm/seo/utils/bindLanguagesWithLocales.js +0 -19
- package/build/esm/seo/utils/bindLanguagesWithLocales.js.map +0 -1
- package/build/esm/seo/utils/createAlternateLanguageLink.js +0 -11
- package/build/esm/seo/utils/createAlternateLanguageLink.js.map +0 -1
- package/build/esm/seo/utils/index.js +0 -3
- package/build/esm/seo/utils/index.js.map +0 -1
- package/build/esm/types.js +0 -2
- package/build/esm/types.js.map +0 -1
- package/build/esm/utils/boilerplate.js +0 -21
- package/build/esm/utils/boilerplate.js.map +0 -1
- package/build/esm/utils/constants.js +0 -4
- package/build/esm/utils/constants.js.map +0 -1
- package/build/esm/utils/getAssetsUrl.js +0 -9
- package/build/esm/utils/getAssetsUrl.js.map +0 -1
- package/build/esm/utils/getDataRequestLink.js +0 -8
- package/build/esm/utils/getDataRequestLink.js.map +0 -1
- package/build/esm/utils/getLocalizedCategoryData.js +0 -31
- package/build/esm/utils/getLocalizedCategoryData.js.map +0 -1
- package/build/esm/utils/getNewsroomLogoUrl.js +0 -17
- package/build/esm/utils/getNewsroomLogoUrl.js.map +0 -1
- package/build/esm/utils/getPrivacyPortalUrl.js +0 -9
- package/build/esm/utils/getPrivacyPortalUrl.js.map +0 -1
- package/build/esm/utils/getStoryPublicationDate.js +0 -10
- package/build/esm/utils/getStoryPublicationDate.js.map +0 -1
- package/build/esm/utils/getUploadcareGroupUrl.js +0 -13
- package/build/esm/utils/getUploadcareGroupUrl.js.map +0 -1
- package/build/esm/utils/index.js +0 -11
- package/build/esm/utils/index.js.map +0 -1
- package/build/esm/utils/isEmbargoStory.js +0 -4
- package/build/esm/utils/isEmbargoStory.js.map +0 -1
- package/build/tsconfig.cjs.tsbuildinfo +0 -1
- package/build/tsconfig.esm.tsbuildinfo +0 -1
- package/build/types/data-fetching/api/PrezlyApi.d.ts +0 -57
- package/build/types/data-fetching/api/index.d.ts +0 -2
- package/build/types/data-fetching/api/lib.d.ts +0 -11
- package/build/types/data-fetching/api/queries.d.ts +0 -46
- package/build/types/data-fetching/index.d.ts +0 -3
- package/build/types/data-fetching/lib/getAlgoliaSettings.d.ts +0 -4
- package/build/types/data-fetching/lib/getEnvVariables.d.ts +0 -4
- package/build/types/data-fetching/lib/index.d.ts +0 -4
- package/build/types/data-fetching/lib/isSdkError.d.ts +0 -2
- package/build/types/data-fetching/lib/isUuid.d.ts +0 -1
- package/build/types/data-fetching/types.d.ts +0 -13
- package/build/types/index.d.ts +0 -5
- package/build/types/intl/getFallbackLocale.d.ts +0 -10
- package/build/types/intl/index.d.ts +0 -5
- package/build/types/intl/locale.d.ts +0 -11
- package/build/types/intl/localeConfig.d.cts +0 -2
- package/build/types/intl/localeList.d.cts +0 -2
- package/build/types/intl/localeObject.d.ts +0 -50
- package/build/types/seo/getAlternateLanguageLinks.d.ts +0 -4
- package/build/types/seo/index.d.ts +0 -2
- package/build/types/seo/types.d.ts +0 -4
- package/build/types/seo/utils/createAlternateLanguageLink.d.ts +0 -5
- package/build/types/seo/utils/index.d.ts +0 -2
- package/build/types/types.d.ts +0 -29
- package/build/types/utils/boilerplate.d.ts +0 -4
- package/build/types/utils/constants.d.ts +0 -3
- package/build/types/utils/getAssetsUrl.d.ts +0 -5
- package/build/types/utils/getDataRequestLink.d.ts +0 -3
- package/build/types/utils/getLocalizedCategoryData.d.ts +0 -10
- package/build/types/utils/getNewsroomLogoUrl.d.ts +0 -3
- package/build/types/utils/getPrivacyPortalUrl.d.ts +0 -8
- package/build/types/utils/getStoryPublicationDate.d.ts +0 -3
- package/build/types/utils/getUploadcareGroupUrl.d.ts +0 -8
- package/build/types/utils/index.d.ts +0 -10
- package/build/types/utils/isEmbargoStory.d.ts +0 -6
- /package/build/{cjs/data-fetching → data-fetching}/api/lib.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/api/lib.js +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/api/queries.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/api/queries.js +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/lib/getAlgoliaSettings.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/lib/getEnvVariables.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/lib/getEnvVariables.js +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/lib/isSdkError.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/lib/isSdkError.js +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/lib/isUuid.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/lib/isUuid.js +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/types.d.ts +0 -0
- /package/build/{cjs/data-fetching → data-fetching}/types.js +0 -0
- /package/build/{cjs/intl → intl}/locale.d.ts +0 -0
- /package/build/{cjs/intl → intl}/locale.js +0 -0
- /package/build/{cjs/intl/localeConfig.d.cts → intl/localeConfig.d.ts} +0 -0
- /package/build/{cjs/intl/localeList.d.cts → intl/localeList.d.ts} +0 -0
- /package/build/{cjs/intl → intl}/localeObject.d.ts +0 -0
- /package/build/{cjs/seo → seo}/types.d.ts +0 -0
- /package/build/{cjs/seo → seo}/types.js +0 -0
- /package/build/{cjs/seo → seo}/utils/createAlternateLanguageLink.d.ts +0 -0
- /package/build/{cjs/seo → seo}/utils/createAlternateLanguageLink.js +0 -0
- /package/build/{cjs/types.d.ts → types.d.ts} +0 -0
- /package/build/{cjs/types.js → types.js} +0 -0
- /package/build/{cjs/utils → utils}/boilerplate.d.ts +0 -0
- /package/build/{cjs/utils → utils}/boilerplate.js +0 -0
- /package/build/{cjs/utils → utils}/constants.d.ts +0 -0
- /package/build/{cjs/utils → utils}/constants.js +0 -0
- /package/build/{cjs/utils → utils}/getAssetsUrl.d.ts +0 -0
- /package/build/{cjs/utils → utils}/getDataRequestLink.d.ts +0 -0
- /package/build/{cjs/utils → utils}/getLocalizedCategoryData.js +0 -0
- /package/build/{cjs/utils → utils}/getNewsroomLogoUrl.d.ts +0 -0
- /package/build/{cjs/utils → utils}/getNewsroomLogoUrl.js +0 -0
- /package/build/{cjs/utils → utils}/getPrivacyPortalUrl.js +0 -0
- /package/build/{cjs/utils → utils}/getStoryPublicationDate.d.ts +0 -0
- /package/build/{cjs/utils → utils}/getStoryPublicationDate.js +0 -0
- /package/build/{cjs/utils → utils}/getUploadcareGroupUrl.d.ts +0 -0
- /package/build/{cjs/utils → utils}/isEmbargoStory.d.ts +0 -0
- /package/build/{cjs/utils → utils}/isEmbargoStory.js +0 -0
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import { SortOrder } from '@prezly/sdk';
|
|
2
|
-
import type { Category, Newsroom, NewsroomLanguageSettings, PrezlyClient, Stories, Story } from '@prezly/sdk';
|
|
3
|
-
interface GetStoriesOptions {
|
|
4
|
-
page?: number;
|
|
5
|
-
pageSize?: number;
|
|
6
|
-
order?: `${SortOrder.Direction}`;
|
|
7
|
-
pinning?: boolean;
|
|
8
|
-
include?: (keyof Story.ExtraFields)[];
|
|
9
|
-
localeCode?: string;
|
|
10
|
-
/**
|
|
11
|
-
* When set to `true`, the result for the first page will include one extra story to place as highlighted story.
|
|
12
|
-
* This will offset each subsequent page by 1 story to account for that.
|
|
13
|
-
*/
|
|
14
|
-
withHighlightedStory?: boolean;
|
|
15
|
-
/**
|
|
16
|
-
* Additional filter to apply to the story query. Note that it will be inserted into the root `$and` query operator along with default filters.
|
|
17
|
-
*/
|
|
18
|
-
filterQuery?: Object;
|
|
19
|
-
}
|
|
20
|
-
interface GetGalleriesOptions {
|
|
21
|
-
page?: number;
|
|
22
|
-
pageSize?: number;
|
|
23
|
-
}
|
|
24
|
-
export declare class PrezlyApi {
|
|
25
|
-
protected readonly sdk: PrezlyClient;
|
|
26
|
-
protected readonly newsroomUuid: Newsroom['uuid'];
|
|
27
|
-
protected readonly themeUuid: string | undefined;
|
|
28
|
-
constructor(accessToken: string, newsroomUuid: Newsroom['uuid'], themeUuid?: string);
|
|
29
|
-
getStory(uuid: string): Promise<import("@prezly/sdk").ExtendedStory | null | undefined>;
|
|
30
|
-
getNewsroom(): Promise<Newsroom>;
|
|
31
|
-
getNewsroomContacts(): Promise<import("@prezly/sdk").NewsroomContact[]>;
|
|
32
|
-
getNewsroomLanguages(): Promise<NewsroomLanguageSettings[]>;
|
|
33
|
-
/**
|
|
34
|
-
* Note: this method returns ALL stories from the newsroom. It's intended to be used for sitemaps and not to display actual content.
|
|
35
|
-
*/
|
|
36
|
-
getAllStories({ order, pinning, }?: Pick<GetStoriesOptions, 'order' | 'pinning'>): Promise<Story[]>;
|
|
37
|
-
getStories({ page, pageSize, order, pinning, include, localeCode, withHighlightedStory, filterQuery, }?: GetStoriesOptions): Promise<{
|
|
38
|
-
stories: Story[];
|
|
39
|
-
storiesTotal: number;
|
|
40
|
-
}>;
|
|
41
|
-
getStoriesFromCategory(category: Category, { page, pageSize, order, include, localeCode, filterQuery, }?: Omit<GetStoriesOptions, 'pinning' | 'withHighlightedStory'>): Promise<{
|
|
42
|
-
stories: Story[];
|
|
43
|
-
storiesTotal: number;
|
|
44
|
-
}>;
|
|
45
|
-
getStoryBySlug(slug: string): Promise<import("@prezly/sdk").ExtendedStory | null | undefined>;
|
|
46
|
-
getCategories(): Promise<Category[]>;
|
|
47
|
-
getCategoryBySlug(slug: string): Promise<Category | undefined>;
|
|
48
|
-
searchStories: Stories.Client['search'];
|
|
49
|
-
getGalleries({ page, pageSize }: GetGalleriesOptions): Promise<import("@prezly/sdk/dist/endpoints/NewsroomGalleries/types.js").ListResponse>;
|
|
50
|
-
getGallery(uuid: string): Promise<import("@prezly/sdk").NewsroomGallery | null | undefined>;
|
|
51
|
-
/**
|
|
52
|
-
* In order to prevent issues with theme preview, we only load the theme preset for a specified theme, and not the currently active one.
|
|
53
|
-
*/
|
|
54
|
-
getThemePreset(): Promise<import("@prezly/sdk").NewsroomThemePreset | null>;
|
|
55
|
-
getNewsroomDefaultLanguage(): Promise<NewsroomLanguageSettings>;
|
|
56
|
-
}
|
|
57
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { SortOrder } from '@prezly/sdk';
|
|
2
|
-
export declare function getSlugQuery(newsroomUuid: string, slug: string): {
|
|
3
|
-
$and: ({
|
|
4
|
-
lifecycle_status: {
|
|
5
|
-
$in: string[];
|
|
6
|
-
};
|
|
7
|
-
visibility?: undefined;
|
|
8
|
-
} | {
|
|
9
|
-
visibility: {
|
|
10
|
-
$in: string[];
|
|
11
|
-
};
|
|
12
|
-
lifecycle_status?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
'newsroom.uuid': {
|
|
15
|
-
$in: string[];
|
|
16
|
-
};
|
|
17
|
-
slug?: undefined;
|
|
18
|
-
} | {
|
|
19
|
-
slug: {
|
|
20
|
-
$eq: string;
|
|
21
|
-
};
|
|
22
|
-
'newsroom.uuid'?: undefined;
|
|
23
|
-
})[];
|
|
24
|
-
};
|
|
25
|
-
export declare function getStoriesQuery(newsroomUuid: string, categoryId?: number, localeCode?: string, filterQuery?: Object): any;
|
|
26
|
-
export declare function getChronologicalSortOrder(direction: `${SortOrder.Direction}`, pinning?: boolean): SortOrder;
|
|
27
|
-
export declare function getGalleriesQuery(): {
|
|
28
|
-
$and: ({
|
|
29
|
-
status: {
|
|
30
|
-
$eq: string;
|
|
31
|
-
};
|
|
32
|
-
images_number?: undefined;
|
|
33
|
-
} | {
|
|
34
|
-
images_number: {
|
|
35
|
-
$gt: number;
|
|
36
|
-
};
|
|
37
|
-
status?: undefined;
|
|
38
|
-
})[];
|
|
39
|
-
};
|
|
40
|
-
export declare function getContactsQuery(): {
|
|
41
|
-
$and: {
|
|
42
|
-
is_featured: {
|
|
43
|
-
$eq: boolean;
|
|
44
|
-
};
|
|
45
|
-
}[];
|
|
46
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isUuid(input: string): boolean;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export interface AlgoliaSettings {
|
|
2
|
-
ALGOLIA_API_KEY: string;
|
|
3
|
-
ALGOLIA_APP_ID: string;
|
|
4
|
-
ALGOLIA_INDEX: string;
|
|
5
|
-
}
|
|
6
|
-
export interface PrezlyNewsroomEnv {
|
|
7
|
-
PREZLY_ACCESS_TOKEN: string;
|
|
8
|
-
PREZLY_NEWSROOM_UUID: string;
|
|
9
|
-
PREZLY_THEME_UUID?: string;
|
|
10
|
-
PREZLY_MODE?: 'preview';
|
|
11
|
-
}
|
|
12
|
-
export interface PrezlyEnv extends PrezlyNewsroomEnv, AlgoliaSettings {
|
|
13
|
-
}
|
package/build/types/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { LangCode } from './locale';
|
|
2
|
-
import { LocaleObject } from './localeObject.js';
|
|
3
|
-
/**
|
|
4
|
-
* Fallback locales for each region independent locale.
|
|
5
|
-
* For example, a story has en-CA en-AU and en-GB locales. As you can see there is no region independent locale.
|
|
6
|
-
* We will use a list of possible fallbacks to determine region independent locale alias.
|
|
7
|
-
* In the provided example the result will be en-GB since it is defined in the localeFallback list
|
|
8
|
-
* If the list will be en-CA en-AU and en-US then the result will be en-US since it is the first one and hence takes precedence.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getFallbackLocale(langCode: LangCode, availableLocales: LocaleObject[]): LocaleObject | undefined;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { LocaleObject } from './localeObject';
|
|
2
|
-
export declare const DEFAULT_LOCALE = "en";
|
|
3
|
-
export type LangCode = string;
|
|
4
|
-
export type RegionCode = string;
|
|
5
|
-
export type LocaleCode = string;
|
|
6
|
-
/**
|
|
7
|
-
* Use this function to determine which translations file you should load from `@prezly/themes-intl-mesages` package.
|
|
8
|
-
* See https://github.com/prezly/theme-nextjs-bea/blob/main/utils/lang.ts for a usage example.
|
|
9
|
-
*/
|
|
10
|
-
export declare function getSupportedLocaleIsoCode(locale: LocaleObject): string;
|
|
11
|
-
export declare function getLocaleDirection(locale: LocaleObject): 'ltr' | 'rtl';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This class is created to simplify working with locales and transforming between different locale code formats.
|
|
3
|
-
* Prezly API uses underscore-codes, while most frontend application tend to use hyphen-codes or slugs.
|
|
4
|
-
* Note that `fromAnyCode` constructor only accepts locales supported by Prezly backend. See `localeConfig` for reference.
|
|
5
|
-
*/
|
|
6
|
-
export declare class LocaleObject {
|
|
7
|
-
/**
|
|
8
|
-
* Hyphen-separated locale code.
|
|
9
|
-
* Examples: `nl-BE`, `en-US`, `fr`, `fil`
|
|
10
|
-
*/
|
|
11
|
-
private localeCode;
|
|
12
|
-
/**
|
|
13
|
-
* Whether the locale is region independent (without region/culture part).
|
|
14
|
-
* I.E. `en` is region independent, while `en-US` is not.
|
|
15
|
-
*/
|
|
16
|
-
isRegionIndependent: boolean;
|
|
17
|
-
private constructor();
|
|
18
|
-
/**
|
|
19
|
-
* @param localeCode Locale code in any of the formats below.
|
|
20
|
-
* Examples:
|
|
21
|
-
* - Hyphen-codes: `nl-BE`, `en-US`, `fr`, `fil`
|
|
22
|
-
* - Underscore-codes: `nl_BE`, `en_US`, `fr`, `fil`
|
|
23
|
-
* - Slugs: `nl-be`, `en-us`, `fr`, `fil`
|
|
24
|
-
*/
|
|
25
|
-
static fromAnyCode(localeCode: string): LocaleObject;
|
|
26
|
-
/**
|
|
27
|
-
* @returns Code formatted into hyphen format: `nl-BE`, `en-US`, `fr`, `fil`
|
|
28
|
-
*/
|
|
29
|
-
toHyphenCode(): string;
|
|
30
|
-
/**
|
|
31
|
-
* @returns Code formatted into underscore format, as expected by Prezly API: `nl_BE`, `en_US`, `fr`, `fil`
|
|
32
|
-
*/
|
|
33
|
-
toUnderscoreCode(): string;
|
|
34
|
-
/**
|
|
35
|
-
* @returns Code formatted to a URL-friendly lowercase slug format: `nl-be`, `en-us`, `fr`, `fil`
|
|
36
|
-
*/
|
|
37
|
-
toUrlSlug(): string;
|
|
38
|
-
/**
|
|
39
|
-
* @returns Only the language part of the code without culture/region part: `nl`, `en`, `fr`
|
|
40
|
-
*/
|
|
41
|
-
toNeutralLanguageCode(): string;
|
|
42
|
-
/**
|
|
43
|
-
* @returns Only the culture/regtion part without the language part: `be`, `us`, `fr`
|
|
44
|
-
*/
|
|
45
|
-
toRegionCode(): string;
|
|
46
|
-
/**
|
|
47
|
-
* Check if two LocaleObject instances are representing the same locale code.
|
|
48
|
-
*/
|
|
49
|
-
isEqual(anotherLocale: LocaleObject): boolean;
|
|
50
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { NewsroomLanguageSettings } from '@prezly/sdk';
|
|
2
|
-
import type { LocaleObject } from '../intl/index.js';
|
|
3
|
-
import type { AlternateLanguageLink } from './types';
|
|
4
|
-
export declare function getAlternateLanguageLinks(availableLanguages: NewsroomLanguageSettings[], generateTranslationUrl: (locale: LocaleObject) => string | undefined): AlternateLanguageLink[];
|
package/build/types/types.d.ts
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CultureRef, Story } from '@prezly/sdk';
|
|
2
|
-
/**
|
|
3
|
-
* Categories in Algolia index are stored in a simplified format, with `slug` and `name` properties already saved in the correct locale for the story search result.
|
|
4
|
-
*/
|
|
5
|
-
export interface AlgoliaCategoryRef {
|
|
6
|
-
id: number;
|
|
7
|
-
name: string;
|
|
8
|
-
slug: string;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Stories in Algolia index are stored in a simplified format, with only minimal subset of fields.
|
|
12
|
-
*/
|
|
13
|
-
export type AlgoliaStory = Pick<Story, 'uuid' | 'slug' | 'title' | 'subtitle'> & Pick<Story.ExtraFields, 'thumbnail_image'> & {
|
|
14
|
-
content_text: string;
|
|
15
|
-
updated_at: number;
|
|
16
|
-
published_at: number;
|
|
17
|
-
culture: Pick<CultureRef, 'code' | 'name' | 'native_name' | 'language_code'>;
|
|
18
|
-
categories: AlgoliaCategoryRef[];
|
|
19
|
-
};
|
|
20
|
-
export interface SdkError extends Error {
|
|
21
|
-
status: number;
|
|
22
|
-
statusText: string;
|
|
23
|
-
payload: {
|
|
24
|
-
errors: {
|
|
25
|
-
reason: string;
|
|
26
|
-
};
|
|
27
|
-
message: string;
|
|
28
|
-
};
|
|
29
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { NewsroomCompanyInformation } from '@prezly/sdk';
|
|
2
|
-
export declare function hasAnySocialMedia(companyInformation: NewsroomCompanyInformation): boolean;
|
|
3
|
-
export declare function hasAnyAboutInformation(companyInformation: NewsroomCompanyInformation): boolean;
|
|
4
|
-
export declare function hasAnyContactInformation(companyInformation: NewsroomCompanyInformation): boolean;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Category } from '@prezly/sdk';
|
|
2
|
-
import type { LocaleObject } from '../intl/index.js';
|
|
3
|
-
import type { AlgoliaCategoryRef } from '../types';
|
|
4
|
-
export declare function getLocalizedCategoryData(category: Category | AlgoliaCategoryRef, locale: LocaleObject): {
|
|
5
|
-
description: string | null;
|
|
6
|
-
name: string;
|
|
7
|
-
slug: string | null;
|
|
8
|
-
};
|
|
9
|
-
export declare function getCategoryUrl(category: Category | AlgoliaCategoryRef, locale: LocaleObject): string;
|
|
10
|
-
export declare function getCategoryHasTranslation(category: Category, locale: LocaleObject): boolean;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { Newsroom } from '@prezly/sdk';
|
|
2
|
-
import type { LocaleObject } from '../intl/index.js';
|
|
3
|
-
type PrivacyPortalUrlOptions = {
|
|
4
|
-
email?: string;
|
|
5
|
-
action?: 'data-request' | 'subscribe' | 'unsubscribe';
|
|
6
|
-
};
|
|
7
|
-
export declare function getPrivacyPortalUrl(newsroom: Newsroom, locale: LocaleObject, options?: PrivacyPortalUrlOptions): string;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This method constructs a URL to download all images in the Gallery as a single archive.
|
|
3
|
-
*
|
|
4
|
-
* @param uuid Gallery UUID
|
|
5
|
-
* @param title Filename for the saved archive. Usually it is the Gallery title.
|
|
6
|
-
* @returns URL to an archive containing all of the images in the Gallery.
|
|
7
|
-
*/
|
|
8
|
-
export declare function getUploadcareGroupUrl(uuid: string, title: string): string;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './boilerplate.js';
|
|
2
|
-
export * from './constants.js';
|
|
3
|
-
export * from './getAssetsUrl.js';
|
|
4
|
-
export * from './getDataRequestLink.js';
|
|
5
|
-
export * from './getLocalizedCategoryData.js';
|
|
6
|
-
export * from './getNewsroomLogoUrl.js';
|
|
7
|
-
export * from './getPrivacyPortalUrl.js';
|
|
8
|
-
export * from './getStoryPublicationDate.js';
|
|
9
|
-
export * from './getUploadcareGroupUrl.js';
|
|
10
|
-
export * from './isEmbargoStory.js';
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|