@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.
Files changed (276) hide show
  1. package/build/{cjs/data-fetching → data-fetching}/api/PrezlyApi.d.ts +1 -1
  2. package/build/{cjs/data-fetching → data-fetching}/api/PrezlyApi.js +24 -24
  3. package/build/data-fetching/api/PrezlyApi.js.map +1 -0
  4. package/build/{types/data-fetching → data-fetching}/api/getPrezlyApi.d.ts +1 -1
  5. package/build/{cjs/data-fetching → data-fetching}/api/getPrezlyApi.js +4 -4
  6. package/build/data-fetching/api/getPrezlyApi.js.map +1 -0
  7. package/build/data-fetching/api/index.d.ts +2 -0
  8. package/build/{cjs/data-fetching → data-fetching}/api/index.js +3 -3
  9. package/build/data-fetching/api/index.js.map +1 -0
  10. package/build/data-fetching/api/lib.js.map +1 -0
  11. package/build/data-fetching/api/queries.js.map +1 -0
  12. package/build/data-fetching/index.d.ts +3 -0
  13. package/build/{cjs/data-fetching → data-fetching}/index.js +3 -3
  14. package/build/data-fetching/index.js.map +1 -0
  15. package/build/{cjs/data-fetching → data-fetching}/lib/getAlgoliaSettings.js +2 -2
  16. package/build/data-fetching/lib/getAlgoliaSettings.js.map +1 -0
  17. package/build/data-fetching/lib/getEnvVariables.js.map +1 -0
  18. package/build/data-fetching/lib/index.d.ts +4 -0
  19. package/build/data-fetching/lib/index.js +12 -0
  20. package/build/data-fetching/lib/index.js.map +1 -0
  21. package/build/data-fetching/lib/isSdkError.js.map +1 -0
  22. package/build/data-fetching/lib/isUuid.js.map +1 -0
  23. package/build/{esm/seo → data-fetching}/types.js.map +1 -1
  24. package/build/index.d.ts +5 -0
  25. package/build/{cjs/index.js → index.js} +5 -5
  26. package/build/index.js.map +1 -0
  27. package/build/{cjs/intl → intl}/getFallbackLocale.d.ts +1 -1
  28. package/build/{cjs/intl → intl}/getFallbackLocale.js +3 -3
  29. package/build/intl/getFallbackLocale.js.map +1 -0
  30. package/build/intl/index.d.ts +5 -0
  31. package/build/{cjs/intl → intl}/index.js +6 -6
  32. package/build/intl/index.js.map +1 -0
  33. package/build/{types/intl → intl}/languages.d.ts +1 -1
  34. package/build/{cjs/intl → intl}/languages.js +9 -9
  35. package/build/intl/languages.js.map +1 -0
  36. package/build/intl/locale.js.map +1 -0
  37. package/build/{esm/intl/localeConfig.cjs → intl/localeConfig.js} +3 -3
  38. package/build/intl/localeConfig.js.map +1 -0
  39. package/build/{esm/intl/localeList.cjs → intl/localeList.js} +2 -2
  40. package/build/intl/localeList.js.map +1 -0
  41. package/build/{cjs/intl → intl}/localeObject.js +2 -2
  42. package/build/intl/localeObject.js.map +1 -0
  43. package/build/{cjs/seo → seo}/getAlternateLanguageLinks.d.ts +1 -1
  44. package/build/{cjs/seo → seo}/getAlternateLanguageLinks.js +5 -5
  45. package/build/seo/getAlternateLanguageLinks.js.map +1 -0
  46. package/build/seo/index.d.ts +2 -0
  47. package/build/{cjs/seo → seo}/index.js +2 -2
  48. package/build/seo/index.js.map +1 -0
  49. package/build/{cjs → seo}/types.js.map +1 -1
  50. package/build/{types/seo → seo}/utils/bindLanguagesWithLocales.d.ts +1 -1
  51. package/build/{cjs/seo → seo}/utils/bindLanguagesWithLocales.js +2 -2
  52. package/build/seo/utils/bindLanguagesWithLocales.js.map +1 -0
  53. package/build/seo/utils/createAlternateLanguageLink.js.map +1 -0
  54. package/build/{cjs/seo → seo}/utils/index.d.ts +2 -2
  55. package/build/{cjs/seo → seo}/utils/index.js +4 -4
  56. package/build/seo/utils/index.js.map +1 -0
  57. package/build/types.js.map +1 -0
  58. package/build/utils/boilerplate.js.map +1 -0
  59. package/build/utils/constants.js.map +1 -0
  60. package/build/{cjs/utils → utils}/getAssetsUrl.js +2 -2
  61. package/build/utils/getAssetsUrl.js.map +1 -0
  62. package/build/{cjs/utils → utils}/getDataRequestLink.js +2 -2
  63. package/build/utils/getDataRequestLink.js.map +1 -0
  64. package/build/{cjs/utils → utils}/getLocalizedCategoryData.d.ts +1 -1
  65. package/build/utils/getLocalizedCategoryData.js.map +1 -0
  66. package/build/utils/getNewsroomLogoUrl.js.map +1 -0
  67. package/build/{cjs/utils → utils}/getPrivacyPortalUrl.d.ts +1 -1
  68. package/build/utils/getPrivacyPortalUrl.js.map +1 -0
  69. package/build/utils/getStoryPublicationDate.js.map +1 -0
  70. package/build/{cjs/utils → utils}/getUploadcareGroupUrl.js +2 -2
  71. package/build/utils/getUploadcareGroupUrl.js.map +1 -0
  72. package/build/utils/index.d.ts +10 -0
  73. package/build/utils/index.js +27 -0
  74. package/build/utils/index.js.map +1 -0
  75. package/build/utils/isEmbargoStory.js.map +1 -0
  76. package/package.json +8 -34
  77. package/build/cjs/data-fetching/api/PrezlyApi.js.map +0 -1
  78. package/build/cjs/data-fetching/api/getPrezlyApi.d.ts +0 -4
  79. package/build/cjs/data-fetching/api/getPrezlyApi.js.map +0 -1
  80. package/build/cjs/data-fetching/api/index.d.ts +0 -2
  81. package/build/cjs/data-fetching/api/index.js.map +0 -1
  82. package/build/cjs/data-fetching/api/lib.js.map +0 -1
  83. package/build/cjs/data-fetching/api/queries.js.map +0 -1
  84. package/build/cjs/data-fetching/index.d.ts +0 -3
  85. package/build/cjs/data-fetching/index.js.map +0 -1
  86. package/build/cjs/data-fetching/lib/getAlgoliaSettings.js.map +0 -1
  87. package/build/cjs/data-fetching/lib/getEnvVariables.js.map +0 -1
  88. package/build/cjs/data-fetching/lib/index.d.ts +0 -4
  89. package/build/cjs/data-fetching/lib/index.js +0 -12
  90. package/build/cjs/data-fetching/lib/index.js.map +0 -1
  91. package/build/cjs/data-fetching/lib/isSdkError.js.map +0 -1
  92. package/build/cjs/data-fetching/lib/isUuid.js.map +0 -1
  93. package/build/cjs/data-fetching/types.js.map +0 -1
  94. package/build/cjs/index.d.ts +0 -5
  95. package/build/cjs/index.js.map +0 -1
  96. package/build/cjs/intl/getFallbackLocale.js.map +0 -1
  97. package/build/cjs/intl/index.d.ts +0 -5
  98. package/build/cjs/intl/index.js.map +0 -1
  99. package/build/cjs/intl/languages.d.ts +0 -44
  100. package/build/cjs/intl/languages.js.map +0 -1
  101. package/build/cjs/intl/locale.js.map +0 -1
  102. package/build/cjs/intl/localeConfig.cjs +0 -21
  103. package/build/cjs/intl/localeConfig.cjs.map +0 -1
  104. package/build/cjs/intl/localeList.cjs +0 -113
  105. package/build/cjs/intl/localeList.cjs.map +0 -1
  106. package/build/cjs/intl/localeObject.js.map +0 -1
  107. package/build/cjs/seo/getAlternateLanguageLinks.js.map +0 -1
  108. package/build/cjs/seo/index.d.ts +0 -2
  109. package/build/cjs/seo/index.js.map +0 -1
  110. package/build/cjs/seo/types.js.map +0 -1
  111. package/build/cjs/seo/utils/bindLanguagesWithLocales.d.ts +0 -11
  112. package/build/cjs/seo/utils/bindLanguagesWithLocales.js.map +0 -1
  113. package/build/cjs/seo/utils/createAlternateLanguageLink.js.map +0 -1
  114. package/build/cjs/seo/utils/index.js.map +0 -1
  115. package/build/cjs/utils/boilerplate.js.map +0 -1
  116. package/build/cjs/utils/constants.js.map +0 -1
  117. package/build/cjs/utils/getAssetsUrl.js.map +0 -1
  118. package/build/cjs/utils/getDataRequestLink.js.map +0 -1
  119. package/build/cjs/utils/getLocalizedCategoryData.js.map +0 -1
  120. package/build/cjs/utils/getNewsroomLogoUrl.js.map +0 -1
  121. package/build/cjs/utils/getPrivacyPortalUrl.js.map +0 -1
  122. package/build/cjs/utils/getStoryPublicationDate.js.map +0 -1
  123. package/build/cjs/utils/getUploadcareGroupUrl.js.map +0 -1
  124. package/build/cjs/utils/index.d.ts +0 -10
  125. package/build/cjs/utils/index.js +0 -27
  126. package/build/cjs/utils/index.js.map +0 -1
  127. package/build/cjs/utils/isEmbargoStory.js.map +0 -1
  128. package/build/esm/data-fetching/api/PrezlyApi.js +0 -165
  129. package/build/esm/data-fetching/api/PrezlyApi.js.map +0 -1
  130. package/build/esm/data-fetching/api/getPrezlyApi.js +0 -17
  131. package/build/esm/data-fetching/api/getPrezlyApi.js.map +0 -1
  132. package/build/esm/data-fetching/api/index.js +0 -3
  133. package/build/esm/data-fetching/api/index.js.map +0 -1
  134. package/build/esm/data-fetching/api/lib.js +0 -16
  135. package/build/esm/data-fetching/api/lib.js.map +0 -1
  136. package/build/esm/data-fetching/api/queries.js +0 -51
  137. package/build/esm/data-fetching/api/queries.js.map +0 -1
  138. package/build/esm/data-fetching/index.js +0 -4
  139. package/build/esm/data-fetching/index.js.map +0 -1
  140. package/build/esm/data-fetching/lib/getAlgoliaSettings.js +0 -18
  141. package/build/esm/data-fetching/lib/getAlgoliaSettings.js.map +0 -1
  142. package/build/esm/data-fetching/lib/getEnvVariables.js +0 -37
  143. package/build/esm/data-fetching/lib/getEnvVariables.js.map +0 -1
  144. package/build/esm/data-fetching/lib/index.js +0 -5
  145. package/build/esm/data-fetching/lib/index.js.map +0 -1
  146. package/build/esm/data-fetching/lib/isSdkError.js +0 -4
  147. package/build/esm/data-fetching/lib/isSdkError.js.map +0 -1
  148. package/build/esm/data-fetching/lib/isUuid.js +0 -5
  149. package/build/esm/data-fetching/lib/isUuid.js.map +0 -1
  150. package/build/esm/data-fetching/types.js +0 -2
  151. package/build/esm/data-fetching/types.js.map +0 -1
  152. package/build/esm/index.js +0 -6
  153. package/build/esm/index.js.map +0 -1
  154. package/build/esm/intl/getFallbackLocale.js +0 -20
  155. package/build/esm/intl/getFallbackLocale.js.map +0 -1
  156. package/build/esm/intl/index.js +0 -6
  157. package/build/esm/intl/index.js.map +0 -1
  158. package/build/esm/intl/languages.js +0 -135
  159. package/build/esm/intl/languages.js.map +0 -1
  160. package/build/esm/intl/locale.js +0 -89
  161. package/build/esm/intl/locale.js.map +0 -1
  162. package/build/esm/intl/localeConfig.cjs.map +0 -1
  163. package/build/esm/intl/localeList.cjs.map +0 -1
  164. package/build/esm/intl/localeObject.js +0 -91
  165. package/build/esm/intl/localeObject.js.map +0 -1
  166. package/build/esm/seo/getAlternateLanguageLinks.js +0 -79
  167. package/build/esm/seo/getAlternateLanguageLinks.js.map +0 -1
  168. package/build/esm/seo/index.js +0 -3
  169. package/build/esm/seo/index.js.map +0 -1
  170. package/build/esm/seo/types.js +0 -2
  171. package/build/esm/seo/utils/bindLanguagesWithLocales.js +0 -19
  172. package/build/esm/seo/utils/bindLanguagesWithLocales.js.map +0 -1
  173. package/build/esm/seo/utils/createAlternateLanguageLink.js +0 -11
  174. package/build/esm/seo/utils/createAlternateLanguageLink.js.map +0 -1
  175. package/build/esm/seo/utils/index.js +0 -3
  176. package/build/esm/seo/utils/index.js.map +0 -1
  177. package/build/esm/types.js +0 -2
  178. package/build/esm/types.js.map +0 -1
  179. package/build/esm/utils/boilerplate.js +0 -21
  180. package/build/esm/utils/boilerplate.js.map +0 -1
  181. package/build/esm/utils/constants.js +0 -4
  182. package/build/esm/utils/constants.js.map +0 -1
  183. package/build/esm/utils/getAssetsUrl.js +0 -9
  184. package/build/esm/utils/getAssetsUrl.js.map +0 -1
  185. package/build/esm/utils/getDataRequestLink.js +0 -8
  186. package/build/esm/utils/getDataRequestLink.js.map +0 -1
  187. package/build/esm/utils/getLocalizedCategoryData.js +0 -31
  188. package/build/esm/utils/getLocalizedCategoryData.js.map +0 -1
  189. package/build/esm/utils/getNewsroomLogoUrl.js +0 -17
  190. package/build/esm/utils/getNewsroomLogoUrl.js.map +0 -1
  191. package/build/esm/utils/getPrivacyPortalUrl.js +0 -9
  192. package/build/esm/utils/getPrivacyPortalUrl.js.map +0 -1
  193. package/build/esm/utils/getStoryPublicationDate.js +0 -10
  194. package/build/esm/utils/getStoryPublicationDate.js.map +0 -1
  195. package/build/esm/utils/getUploadcareGroupUrl.js +0 -13
  196. package/build/esm/utils/getUploadcareGroupUrl.js.map +0 -1
  197. package/build/esm/utils/index.js +0 -11
  198. package/build/esm/utils/index.js.map +0 -1
  199. package/build/esm/utils/isEmbargoStory.js +0 -4
  200. package/build/esm/utils/isEmbargoStory.js.map +0 -1
  201. package/build/tsconfig.cjs.tsbuildinfo +0 -1
  202. package/build/tsconfig.esm.tsbuildinfo +0 -1
  203. package/build/types/data-fetching/api/PrezlyApi.d.ts +0 -57
  204. package/build/types/data-fetching/api/index.d.ts +0 -2
  205. package/build/types/data-fetching/api/lib.d.ts +0 -11
  206. package/build/types/data-fetching/api/queries.d.ts +0 -46
  207. package/build/types/data-fetching/index.d.ts +0 -3
  208. package/build/types/data-fetching/lib/getAlgoliaSettings.d.ts +0 -4
  209. package/build/types/data-fetching/lib/getEnvVariables.d.ts +0 -4
  210. package/build/types/data-fetching/lib/index.d.ts +0 -4
  211. package/build/types/data-fetching/lib/isSdkError.d.ts +0 -2
  212. package/build/types/data-fetching/lib/isUuid.d.ts +0 -1
  213. package/build/types/data-fetching/types.d.ts +0 -13
  214. package/build/types/index.d.ts +0 -5
  215. package/build/types/intl/getFallbackLocale.d.ts +0 -10
  216. package/build/types/intl/index.d.ts +0 -5
  217. package/build/types/intl/locale.d.ts +0 -11
  218. package/build/types/intl/localeConfig.d.cts +0 -2
  219. package/build/types/intl/localeList.d.cts +0 -2
  220. package/build/types/intl/localeObject.d.ts +0 -50
  221. package/build/types/seo/getAlternateLanguageLinks.d.ts +0 -4
  222. package/build/types/seo/index.d.ts +0 -2
  223. package/build/types/seo/types.d.ts +0 -4
  224. package/build/types/seo/utils/createAlternateLanguageLink.d.ts +0 -5
  225. package/build/types/seo/utils/index.d.ts +0 -2
  226. package/build/types/types.d.ts +0 -29
  227. package/build/types/utils/boilerplate.d.ts +0 -4
  228. package/build/types/utils/constants.d.ts +0 -3
  229. package/build/types/utils/getAssetsUrl.d.ts +0 -5
  230. package/build/types/utils/getDataRequestLink.d.ts +0 -3
  231. package/build/types/utils/getLocalizedCategoryData.d.ts +0 -10
  232. package/build/types/utils/getNewsroomLogoUrl.d.ts +0 -3
  233. package/build/types/utils/getPrivacyPortalUrl.d.ts +0 -8
  234. package/build/types/utils/getStoryPublicationDate.d.ts +0 -3
  235. package/build/types/utils/getUploadcareGroupUrl.d.ts +0 -8
  236. package/build/types/utils/index.d.ts +0 -10
  237. package/build/types/utils/isEmbargoStory.d.ts +0 -6
  238. /package/build/{cjs/data-fetching → data-fetching}/api/lib.d.ts +0 -0
  239. /package/build/{cjs/data-fetching → data-fetching}/api/lib.js +0 -0
  240. /package/build/{cjs/data-fetching → data-fetching}/api/queries.d.ts +0 -0
  241. /package/build/{cjs/data-fetching → data-fetching}/api/queries.js +0 -0
  242. /package/build/{cjs/data-fetching → data-fetching}/lib/getAlgoliaSettings.d.ts +0 -0
  243. /package/build/{cjs/data-fetching → data-fetching}/lib/getEnvVariables.d.ts +0 -0
  244. /package/build/{cjs/data-fetching → data-fetching}/lib/getEnvVariables.js +0 -0
  245. /package/build/{cjs/data-fetching → data-fetching}/lib/isSdkError.d.ts +0 -0
  246. /package/build/{cjs/data-fetching → data-fetching}/lib/isSdkError.js +0 -0
  247. /package/build/{cjs/data-fetching → data-fetching}/lib/isUuid.d.ts +0 -0
  248. /package/build/{cjs/data-fetching → data-fetching}/lib/isUuid.js +0 -0
  249. /package/build/{cjs/data-fetching → data-fetching}/types.d.ts +0 -0
  250. /package/build/{cjs/data-fetching → data-fetching}/types.js +0 -0
  251. /package/build/{cjs/intl → intl}/locale.d.ts +0 -0
  252. /package/build/{cjs/intl → intl}/locale.js +0 -0
  253. /package/build/{cjs/intl/localeConfig.d.cts → intl/localeConfig.d.ts} +0 -0
  254. /package/build/{cjs/intl/localeList.d.cts → intl/localeList.d.ts} +0 -0
  255. /package/build/{cjs/intl → intl}/localeObject.d.ts +0 -0
  256. /package/build/{cjs/seo → seo}/types.d.ts +0 -0
  257. /package/build/{cjs/seo → seo}/types.js +0 -0
  258. /package/build/{cjs/seo → seo}/utils/createAlternateLanguageLink.d.ts +0 -0
  259. /package/build/{cjs/seo → seo}/utils/createAlternateLanguageLink.js +0 -0
  260. /package/build/{cjs/types.d.ts → types.d.ts} +0 -0
  261. /package/build/{cjs/types.js → types.js} +0 -0
  262. /package/build/{cjs/utils → utils}/boilerplate.d.ts +0 -0
  263. /package/build/{cjs/utils → utils}/boilerplate.js +0 -0
  264. /package/build/{cjs/utils → utils}/constants.d.ts +0 -0
  265. /package/build/{cjs/utils → utils}/constants.js +0 -0
  266. /package/build/{cjs/utils → utils}/getAssetsUrl.d.ts +0 -0
  267. /package/build/{cjs/utils → utils}/getDataRequestLink.d.ts +0 -0
  268. /package/build/{cjs/utils → utils}/getLocalizedCategoryData.js +0 -0
  269. /package/build/{cjs/utils → utils}/getNewsroomLogoUrl.d.ts +0 -0
  270. /package/build/{cjs/utils → utils}/getNewsroomLogoUrl.js +0 -0
  271. /package/build/{cjs/utils → utils}/getPrivacyPortalUrl.js +0 -0
  272. /package/build/{cjs/utils → utils}/getStoryPublicationDate.d.ts +0 -0
  273. /package/build/{cjs/utils → utils}/getStoryPublicationDate.js +0 -0
  274. /package/build/{cjs/utils → utils}/getUploadcareGroupUrl.d.ts +0 -0
  275. /package/build/{cjs/utils → utils}/isEmbargoStory.d.ts +0 -0
  276. /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,2 +0,0 @@
1
- export * from './getPrezlyApi.js';
2
- export { PrezlyApi } from './PrezlyApi.js';
@@ -1,11 +0,0 @@
1
- export declare function toPaginationParams(params: {
2
- page?: number;
3
- pageSize?: number;
4
- withHighlightedStory?: boolean;
5
- }): {
6
- offset: undefined;
7
- limit: undefined;
8
- } | {
9
- offset: number;
10
- limit: number;
11
- };
@@ -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,3 +0,0 @@
1
- export * from './api/index.js';
2
- export * from './lib/index.js';
3
- export * from './types.js';
@@ -1,4 +0,0 @@
1
- /// <reference types="node" />
2
- import type { IncomingMessage } from 'http';
3
- import type { AlgoliaSettings } from '../types';
4
- export declare function getAlgoliaSettings(req?: IncomingMessage): AlgoliaSettings;
@@ -1,4 +0,0 @@
1
- /// <reference types="node" />
2
- import type { IncomingMessage } from 'http';
3
- import type { PrezlyEnv } from '../types';
4
- export declare function getEnvVariables<EnvType extends PrezlyEnv = PrezlyEnv>(req?: IncomingMessage): NodeJS.ProcessEnv & EnvType;
@@ -1,4 +0,0 @@
1
- export { getAlgoliaSettings } from './getAlgoliaSettings.js';
2
- export { getEnvVariables } from './getEnvVariables.js';
3
- export { isSdkError } from './isSdkError.js';
4
- export { isUuid } from './isUuid.js';
@@ -1,2 +0,0 @@
1
- import type { SdkError } from '../../types';
2
- export declare function isSdkError(error: any): error is SdkError;
@@ -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
- }
@@ -1,5 +0,0 @@
1
- export * from './data-fetching/index.js';
2
- export * from './intl/index.js';
3
- export * from './seo/index.js';
4
- export * from './types.js';
5
- export * from './utils/index.js';
@@ -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,5 +0,0 @@
1
- export * from './getFallbackLocale.js';
2
- export * from './languages.js';
3
- export { default as localeConfig } from './localeConfig.cjs';
4
- export * from './locale.js';
5
- export * from './localeObject.js';
@@ -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,2 +0,0 @@
1
- export = lowercaseLocalPermutations;
2
- declare const lowercaseLocalPermutations: string[];
@@ -1,2 +0,0 @@
1
- declare const _exports: string[];
2
- export = _exports;
@@ -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[];
@@ -1,2 +0,0 @@
1
- export * from './getAlternateLanguageLinks.js';
2
- export * from './types.js';
@@ -1,4 +0,0 @@
1
- export type AlternateLanguageLink = {
2
- href: string;
3
- hrefLang: string;
4
- };
@@ -1,5 +0,0 @@
1
- import type { LocaleObject } from '../../intl';
2
- export declare function createAlternateLanguageLink(locale: LocaleObject, generateTranslationUrl: (locale: LocaleObject) => string | undefined): {
3
- hrefLang: string;
4
- href: string;
5
- } | undefined;
@@ -1,2 +0,0 @@
1
- export { bindLanguagesWithLocales } from './bindLanguagesWithLocales.js';
2
- export { createAlternateLanguageLink } from './createAlternateLanguageLink.js';
@@ -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,3 +0,0 @@
1
- export declare const ASSETS_URL = "https://cdn.uc.assets.prezly.com";
2
- export declare const DEFAULT_PAGE_SIZE = 12;
3
- export declare const DEFAULT_GALLERY_PAGE_SIZE = 6;
@@ -1,5 +0,0 @@
1
- /**
2
- * @param uuid UUID of the assets hosted on Uploadcare
3
- * @returns Full asset URL that can be used as a source for <img>, <video> and <a> tags.
4
- */
5
- export declare function getAssetsUrl(uuid: string): string;
@@ -1,3 +0,0 @@
1
- import type { Newsroom } from '@prezly/sdk';
2
- import type { LocaleObject } from '../intl';
3
- export declare function getDataRequestLink(newsroom: Newsroom, currentLocale: LocaleObject): string;
@@ -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,3 +0,0 @@
1
- import type { Newsroom } from '@prezly/sdk';
2
- export declare function getNewsroomLogoUrl(newsroom: Newsroom): string;
3
- export declare function getNewsroomFaviconUrl(newsroom: Newsroom, previewSize?: number): string;
@@ -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,3 +0,0 @@
1
- import type { Story } from '@prezly/sdk';
2
- import type { AlgoliaStory } from '../types';
3
- export declare function getStoryPublicationDate(story: Story | AlgoliaStory): Date | null;
@@ -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';
@@ -1,6 +0,0 @@
1
- import type { Story } from '@prezly/sdk';
2
- export type EmbargoStory = Omit<Story, 'is_embargo' | 'published_at'> & {
3
- is_embargo: true;
4
- published_at: string;
5
- };
6
- export declare function isEmbargoStory(story: Story): story is EmbargoStory;
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