@websolutespa/bom-mixer-models 2.0.1-next.2 → 2.0.2

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 (49) hide show
  1. package/CHANGELOG.md +44 -7
  2. package/dist/index.d.ts +424 -253
  3. package/dist/index.js +1450 -41
  4. package/dist/index.mjs +1363 -0
  5. package/package.json +27 -75
  6. package/src/app/app.service.ts +9 -0
  7. package/src/captions/captions.handler.ts +1 -1
  8. package/src/category/category.service.ts +3 -3
  9. package/src/consent_preference/consent_preference.service.ts +4 -4
  10. package/src/consent_preference/consent_preference.ts +1 -1
  11. package/src/country/country.service.ts +4 -4
  12. package/src/index.ts +20 -3
  13. package/src/label/label.service.ts +3 -3
  14. package/src/layout/layout.service.ts +5 -2
  15. package/src/lazy/lazy.ts +26 -0
  16. package/src/locale/locale.service.ts +13 -3
  17. package/src/market/market.service.ts +3 -3
  18. package/src/menu/menu.service.ts +3 -3
  19. package/src/page/page.service.ts +7 -10
  20. package/src/province/province.service.ts +4 -4
  21. package/src/redirect/redirect.service.ts +4 -4
  22. package/src/region/region.service.ts +4 -4
  23. package/src/route/route-revalidate.handler.ts +2 -3
  24. package/src/route/route.interceptor.ts +121 -5
  25. package/src/route/route.service.ts +49 -11
  26. package/src/sitemap/sitemap.service.ts +8 -9
  27. package/src/store/store.ts +2 -1
  28. package/dist/exports/middleware.d.ts +0 -9
  29. package/dist/exports/middleware.d.ts.map +0 -1
  30. package/dist/exports/middleware.js +0 -82
  31. package/dist/exports/middleware.js.map +0 -1
  32. package/dist/exports/server.d.ts +0 -178
  33. package/dist/exports/server.d.ts.map +0 -1
  34. package/dist/exports/server.js +0 -921
  35. package/dist/exports/server.js.map +0 -1
  36. package/dist/index.d.ts.map +0 -1
  37. package/dist/index.js.map +0 -1
  38. package/dist/lazy-JamSYYoh.d.ts +0 -84
  39. package/dist/lazy-JamSYYoh.d.ts.map +0 -1
  40. package/dist/page-BLbZbnWg.js +0 -12
  41. package/dist/page-BLbZbnWg.js.map +0 -1
  42. package/dist/route-k0W3AKyo.js +0 -53
  43. package/dist/route-k0W3AKyo.js.map +0 -1
  44. package/src/exports/middleware.ts +0 -2
  45. package/src/exports/server.ts +0 -21
  46. package/src/lazy/lazy.service.ts +0 -31
  47. package/src/locale/locale.ts +0 -9
  48. package/src/page/page.ts +0 -9
  49. package/src/route/route.ts +0 -64
package/dist/index.d.ts CHANGED
@@ -1,329 +1,500 @@
1
- import { IAddress, IAddressOptions, ICompanyAddress, IConsentPreference, ILazyComponent, ILazyComponentFunc, ILazyComponentProps, ILazyFuncProps, ILazyModules, ILazyProps, ILazyStaticProps, ILazyStaticPropsFunc, ILazyableProps, ILazyedProps, ILegalNotice, INullableLazyableProps } from "./lazy-JamSYYoh.js";
2
- import { ICategory, IEntity, ILabel, ILayout, ILocale, ILocalized, IMarket, IMenu, INamedEntity, IPage, IQuerable, IRedirect, IRoute, IRouteLink, IRouteParams } from "@websolutespa/bom-core";
3
- import { NextApiRequest } from "next";
4
- import { FC, ReactNode } from "react";
5
- import { AppProps } from "next/app";
6
- import * as StructuredData from "schema-dts";
7
- import { ContactPoint, Organization, PostalAddress } from "schema-dts";
8
-
9
- //#region src/application/application.d.ts
1
+ import { IOption, ILayout, IPage, IRouteParams, QueryParams, ICategory, IEquatable, ICategorized, IEntity, IPaginationResult, INamedEntity, ILabel, IAppExtended, IComponent, PageProps, ILocale, IMarket, IMenu, ILocalized, IRoute, IRedirect, IRouteLink, IQuerable, IApp } from '@websolutespa/bom-core';
2
+ import { AppProps } from 'next/app';
3
+ import { FC, ReactNode, ComponentType } from 'react';
4
+ import { GetServerSideProps, Redirect, NextApiRequest, NextApiResponse } from 'next';
5
+ import { DynamicOptions, Loader } from 'next/dynamic';
6
+ import * as StructuredData from 'schema-dts';
7
+ import { ContactPoint, Organization, PostalAddress } from 'schema-dts';
8
+ import * as _websolutespa_bom_mixer_store from '@websolutespa/bom-mixer-store';
9
+ import { NextRequest, NextFetchEvent, NextResponse } from 'next/server';
10
+ import { IncomingMessage, ServerResponse } from 'http';
11
+ import { IronSession } from 'iron-session';
12
+
13
+ type IAddressOptions = {
14
+ countries: IOption[];
15
+ regions: IOption[];
16
+ provinces: IOption[];
17
+ };
18
+ type IAddress = {
19
+ address: string;
20
+ addressLine2?: string;
21
+ city: string;
22
+ companyName?: string;
23
+ country: IOption;
24
+ email?: string;
25
+ firstName?: string;
26
+ lastName?: string;
27
+ phoneNumber?: string;
28
+ faxNumber?: string;
29
+ province?: IOption;
30
+ region?: IOption;
31
+ streetNumber: string;
32
+ title?: string;
33
+ websiteUrl?: string;
34
+ zipCode: string;
35
+ };
36
+ type ICompanyAddress = IAddress & {
37
+ name: string;
38
+ companyName: string;
39
+ email: string;
40
+ websiteUrl?: string;
41
+ };
42
+
43
+ declare function getAddressOptions(locale: string): Promise<IAddressOptions>;
44
+
10
45
  type IAppProps<T> = AppProps<T> & {
11
- Component: {
12
- Layout?: FC<{
13
- children?: ReactNode;
14
- }>;
15
- };
46
+ Component: {
47
+ Layout?: FC<{
48
+ children?: ReactNode;
49
+ }>;
50
+ };
16
51
  };
17
52
  type IApplicationProps = Record<string, any> & {
18
- layout: ILayout;
19
- page: IPage;
20
- params: IRouteParams;
53
+ layout: ILayout;
54
+ page: IPage;
55
+ params: IRouteParams;
21
56
  };
22
57
  type IApplication = IAppProps<IApplicationProps>;
23
- //# sourceMappingURL=application.d.ts.map
24
58
 
25
- //#endregion
26
- //#region src/gtm/gtm.service.d.ts
27
- [87, () => Record, sideEffect()];
59
+ declare const getCaptionsVttProps: GetServerSideProps;
60
+
61
+ declare function getCategories(params?: QueryParams): Promise<ICategory[]>;
62
+ declare function getCategory(id: IEquatable, params?: QueryParams): Promise<ICategory | undefined>;
63
+ declare function getSegments(item: ICategorized, params?: QueryParams): Promise<ICategory[]>;
64
+
65
+ type ILegalNotice = IEntity & {
66
+ id: string;
67
+ text: string;
68
+ };
69
+ type IConsentPreference = IEntity & {
70
+ id: string;
71
+ description: string;
72
+ legalNotice: ILegalNotice;
73
+ createdAt?: Date | string;
74
+ updatedAt?: Date | string;
75
+ };
76
+
77
+ declare function getConsentPreference(id: IEquatable, params?: QueryParams): Promise<IConsentPreference | undefined>;
78
+ declare function getConsentPreferences(params?: QueryParams): Promise<IConsentPreference[]>;
79
+ declare function getConsentPreferencesPagination(params?: QueryParams): Promise<IPaginationResult<IConsentPreference>>;
80
+
81
+ declare function getCountries(locale?: string): Promise<INamedEntity[]>;
82
+ declare function getCountry(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
83
+ declare function getCountriesPagination(params?: QueryParams): Promise<IPaginationResult<INamedEntity>>;
84
+
85
+ declare global {
86
+ interface Window {
87
+ dataLayer?: Record<string, any>[];
88
+ }
89
+ }
28
90
  declare function pushDataLayer(record: Record<string, any>): void;
29
- //# sourceMappingURL=gtm.service.d.ts.map
30
- //#endregion
31
- //#region src/link/link.service.d.ts
91
+
92
+ declare function getLabels(params?: QueryParams): Promise<ILabel[]>;
93
+ declare function getLabel(id: IEquatable, params?: QueryParams): Promise<ILabel | undefined>;
94
+ declare function resolveLabel(labels: ILabel[], id: string): string;
95
+
96
+ declare function getLayout<T extends IAppExtended = IAppExtended>(market: string, locale: string): Promise<ILayout<T>>;
97
+
98
+ type ILazyComponent = IComponent;
99
+ type ILazyProps<T> = {
100
+ item: T & ILazyComponent;
101
+ index: number;
102
+ children?: ReactNode;
103
+ };
104
+ type ILazyableProps<T> = {
105
+ item: T & Partial<ILazyComponent>;
106
+ index?: number;
107
+ children?: ReactNode;
108
+ };
109
+ type INullableLazyableProps<T> = {
110
+ item?: T & Partial<ILazyComponent>;
111
+ index?: number;
112
+ children?: ReactNode;
113
+ };
114
+ type ILazyedProps<T> = Omit<ILazyProps<T>, 'children'>;
115
+ type ILazyComponentProps = {
116
+ item: ILazyComponent;
117
+ index: number;
118
+ };
119
+ type ILazyModules = Record<string, ComponentType<ILazyProps<any>>>;
120
+ type ILazyComponentFunc<P = {}> = DynamicOptions<P> | Loader<P>;
121
+ type ILazyFuncProps<T> = PageProps & {
122
+ component: T & ILazyComponent;
123
+ };
124
+ type ILazyStaticPropsFunc<T = any> = (props: ILazyFuncProps<T>) => Promise<T & ILazyComponent>;
125
+ type ILazyStaticProps = Record<string, ILazyStaticPropsFunc>;
126
+ declare const LAZY_PROPS: ILazyStaticProps;
127
+ declare function withLazyProps<T>(key: string, getComponentProps: ILazyStaticPropsFunc<T>): void;
128
+ declare function getDecoratedComponents(props: PageProps, extraComponents?: IComponent[]): Promise<void>;
129
+
32
130
  declare function getLink(category: string, layout: ILayout): string | undefined;
33
- //# sourceMappingURL=link.service.d.ts.map
34
- //#endregion
35
- //#region src/locale/locale.d.ts
131
+
132
+ declare function getLocales(params?: QueryParams): Promise<ILocale[]>;
133
+ declare function getLocale(id: IEquatable, params?: QueryParams): Promise<ILocale | undefined>;
36
134
  declare function getLocaleFromProps(props?: {
37
- __NEXT_DATA__?: {
38
- query?: {
39
- locale?: string;
135
+ __NEXT_DATA__?: {
136
+ query?: {
137
+ locale?: string;
138
+ };
40
139
  };
41
- };
42
140
  }): string | undefined;
43
- //# sourceMappingURL=locale.d.ts.map
44
- //#endregion
45
- //#region src/meta-data/open-graph.d.ts
141
+
142
+ declare function getMarkets(params?: QueryParams): Promise<IMarket[]>;
143
+ declare function getMarket(id: IEquatable, params?: QueryParams): Promise<IMarket | undefined>;
144
+
145
+ declare function getMenus(params?: QueryParams): Promise<IMenu[]>;
146
+ declare function getMenu(id: IEquatable, params?: QueryParams): Promise<IMenu | undefined>;
147
+
46
148
  interface OpenGraphBase {
47
- type: string;
48
- title?: string;
49
- image?: string | OpenGraphImage | OpenGraphImage[];
50
- url?: string;
51
- description?: string;
52
- siteName?: string;
53
- locale?: string;
54
- localeAlternate?: string[];
149
+ type: string;
150
+ title?: string;
151
+ image?: string | OpenGraphImage | OpenGraphImage[];
152
+ url?: string;
153
+ description?: string;
154
+ siteName?: string;
155
+ locale?: string;
156
+ localeAlternate?: string[];
55
157
  }
56
158
  interface OpenGraphImage {
57
- url: string;
58
- secureUrl?: string;
59
- type?: string;
60
- width?: number;
61
- height?: number;
62
- alt?: string;
159
+ url: string;
160
+ secureUrl?: string;
161
+ type?: string;
162
+ width?: number;
163
+ height?: number;
164
+ alt?: string;
63
165
  }
64
166
  interface OpenGraphAudio {
65
- url: string;
66
- secureUrl?: string;
67
- type?: string;
167
+ url: string;
168
+ secureUrl?: string;
169
+ type?: string;
68
170
  }
69
171
  interface OpenGraphWebsite extends OpenGraphBase {
70
- type: 'website';
172
+ type: 'website';
71
173
  }
72
174
  interface OpenGraphArticle extends OpenGraphBase {
73
- type: 'article';
74
- publishedTime?: string;
75
- modifiedTime?: string;
76
- expirationTime?: string;
77
- author?: string | string[];
78
- section?: string;
79
- tag?: string | string[];
175
+ type: 'article';
176
+ publishedTime?: string;
177
+ modifiedTime?: string;
178
+ expirationTime?: string;
179
+ author?: string | string[];
180
+ section?: string;
181
+ tag?: string | string[];
80
182
  }
81
183
  interface OpenGraphBook extends OpenGraphBase {
82
- type: 'book';
83
- author?: string | string[];
84
- isbn?: string;
85
- releaseDate?: string;
86
- tag?: string | string[];
184
+ type: 'book';
185
+ author?: string | string[];
186
+ isbn?: string;
187
+ releaseDate?: string;
188
+ tag?: string | string[];
87
189
  }
88
190
  interface OpenGraphProfile extends OpenGraphBase {
89
- type: 'profile';
90
- firstName?: string;
91
- lastName?: string;
92
- username?: string;
93
- gender?: string;
191
+ type: 'profile';
192
+ firstName?: string;
193
+ lastName?: string;
194
+ username?: string;
195
+ gender?: string;
94
196
  }
95
197
  interface OpenGraphMusic extends OpenGraphBase {
96
- type: 'music.song' | 'music.album' | 'music.playlist' | 'music.radio_station';
97
- duration?: number;
98
- album?: string | string[];
99
- musician?: string | string[];
100
- song?: string | string[];
101
- creator?: string;
198
+ type: 'music.song' | 'music.album' | 'music.playlist' | 'music.radio_station';
199
+ duration?: number;
200
+ album?: string | string[];
201
+ musician?: string | string[];
202
+ song?: string | string[];
203
+ creator?: string;
102
204
  }
103
205
  interface OpenGraphVideo extends Omit<OpenGraphBase, 'type'> {
104
- type: 'video.movie' | 'video.episode' | 'video.tv_show' | 'video.other';
105
- actor?: string | string[];
106
- director?: string | string[];
107
- writer?: string | string[];
108
- duration?: number;
109
- releaseDate?: string;
110
- tag?: string | string[];
111
- series?: string;
112
- url: string;
113
- secureUrl?: string;
114
- width?: number;
115
- height?: number;
206
+ type: 'video.movie' | 'video.episode' | 'video.tv_show' | 'video.other';
207
+ actor?: string | string[];
208
+ director?: string | string[];
209
+ writer?: string | string[];
210
+ duration?: number;
211
+ releaseDate?: string;
212
+ tag?: string | string[];
213
+ series?: string;
214
+ url: string;
215
+ secureUrl?: string;
216
+ width?: number;
217
+ height?: number;
116
218
  }
117
219
  interface OpenGraphProduct extends OpenGraphBase {
118
- type: 'product';
119
- price?: {
120
- amount: number;
121
- currency: string;
122
- };
123
- availability?: 'instock' | 'oos' | 'pending';
124
- condition?: 'new' | 'refurbished' | 'used';
125
- priceAmount?: number;
126
- priceCurrency?: string;
127
- retailerItemId?: string;
128
- brand?: string;
129
- category?: string;
130
- color?: string;
131
- material?: string;
132
- pattern?: string;
133
- size?: string;
220
+ type: 'product';
221
+ price?: {
222
+ amount: number;
223
+ currency: string;
224
+ };
225
+ availability?: 'instock' | 'oos' | 'pending';
226
+ condition?: 'new' | 'refurbished' | 'used';
227
+ priceAmount?: number;
228
+ priceCurrency?: string;
229
+ retailerItemId?: string;
230
+ brand?: string;
231
+ category?: string;
232
+ color?: string;
233
+ material?: string;
234
+ pattern?: string;
235
+ size?: string;
134
236
  }
135
237
  interface OpenGraphProductGroup extends OpenGraphBase {
136
- type: 'product.group';
238
+ type: 'product.group';
137
239
  }
138
240
  interface OpenGraphPlace extends OpenGraphBase {
139
- type: 'place';
140
- latitude?: number;
141
- longitude?: number;
142
- streetAddress?: string;
143
- locality?: string;
144
- region?: string;
145
- postalCode?: string;
146
- countryName?: string;
147
- }
148
- interface OpenGraphRestaurant extends Omit<OpenGraphPlace, 'type'> {
149
- type: 'restaurant.restaurant';
150
- contactData?: {
241
+ type: 'place';
242
+ latitude?: number;
243
+ longitude?: number;
151
244
  streetAddress?: string;
152
245
  locality?: string;
153
246
  region?: string;
154
247
  postalCode?: string;
155
248
  countryName?: string;
156
- email?: string;
157
- phoneNumber?: string;
158
- faxNumber?: string;
159
- };
160
- menu?: string;
161
- section?: string;
162
- priceRange?: string;
249
+ }
250
+ interface OpenGraphRestaurant extends Omit<OpenGraphPlace, 'type'> {
251
+ type: 'restaurant.restaurant';
252
+ contactData?: {
253
+ streetAddress?: string;
254
+ locality?: string;
255
+ region?: string;
256
+ postalCode?: string;
257
+ countryName?: string;
258
+ email?: string;
259
+ phoneNumber?: string;
260
+ faxNumber?: string;
261
+ };
262
+ menu?: string;
263
+ section?: string;
264
+ priceRange?: string;
163
265
  }
164
266
  interface OpenGraphBusiness extends OpenGraphBase {
165
- type: 'business.business';
166
- contactData?: {
167
- streetAddress?: string;
168
- locality?: string;
169
- region?: string;
170
- postalCode?: string;
171
- countryName?: string;
172
- email?: string;
173
- phoneNumber?: string;
174
- faxNumber?: string;
175
- website?: string;
176
- };
177
- hours?: {
178
- day: string;
179
- start: string;
180
- end: string;
181
- }[];
267
+ type: 'business.business';
268
+ contactData?: {
269
+ streetAddress?: string;
270
+ locality?: string;
271
+ region?: string;
272
+ postalCode?: string;
273
+ countryName?: string;
274
+ email?: string;
275
+ phoneNumber?: string;
276
+ faxNumber?: string;
277
+ website?: string;
278
+ };
279
+ hours?: {
280
+ day: string;
281
+ start: string;
282
+ end: string;
283
+ }[];
182
284
  }
183
285
  type OpenGraphType = OpenGraphArticle | OpenGraphBook | OpenGraphBusiness | OpenGraphMusic | OpenGraphPlace | OpenGraphProduct | OpenGraphProductGroup | OpenGraphProfile | OpenGraphRestaurant | OpenGraphVideo | OpenGraphWebsite;
184
- //# sourceMappingURL=open-graph.d.ts.map
185
- //#endregion
186
- //#region src/meta-data/structured-data.d.ts
286
+
187
287
  type StructuredDataType = StructuredData.Article | StructuredData.AudioObject | StructuredData.BlogPosting | StructuredData.BreadcrumbList | StructuredData.Course | StructuredData.Event | StructuredData.FAQPage | StructuredData.HowTo | StructuredData.ItemList | StructuredData.JobPosting | StructuredData.ListItem | StructuredData.LocalBusiness | StructuredData.NewsArticle | StructuredData.Organization | StructuredData.Person | StructuredData.Place | StructuredData.Product | StructuredData.Recipe | StructuredData.VideoObject | StructuredData.WebPage | StructuredData.WebSite;
188
- //# sourceMappingURL=structured-data.d.ts.map
189
- //#endregion
190
- //#region src/meta-data/twitter-card.d.ts
288
+
191
289
  interface TwitterCardBase {
192
- card: 'summary' | 'summary_large_image' | 'app' | 'player';
193
- site?: string;
194
- siteId?: string;
195
- creator?: string;
196
- creatorId?: string;
197
- title?: string;
198
- description?: string;
199
- image?: string;
200
- imageAlt?: string;
290
+ card: 'summary' | 'summary_large_image' | 'app' | 'player';
291
+ site?: string;
292
+ siteId?: string;
293
+ creator?: string;
294
+ creatorId?: string;
295
+ title?: string;
296
+ description?: string;
297
+ image?: string;
298
+ imageAlt?: string;
201
299
  }
202
300
  interface TwitterCardSummary extends TwitterCardBase {
203
- card: 'summary';
301
+ card: 'summary';
204
302
  }
205
303
  interface TwitterCardSummaryLargeImage extends TwitterCardBase {
206
- card: 'summary_large_image';
304
+ card: 'summary_large_image';
207
305
  }
208
306
  interface TwitterCardApp extends TwitterCardBase {
209
- card: 'app';
210
- appNameIphone?: string;
211
- appIdIphone?: string;
212
- appUrlIphone?: string;
213
- appNameIpad?: string;
214
- appIdIpad?: string;
215
- appUrlIpad?: string;
216
- appNameGoogleplay?: string;
217
- appIdGoogleplay?: string;
218
- appUrlGoogleplay?: string;
219
- appCountry?: string;
307
+ card: 'app';
308
+ appNameIphone?: string;
309
+ appIdIphone?: string;
310
+ appUrlIphone?: string;
311
+ appNameIpad?: string;
312
+ appIdIpad?: string;
313
+ appUrlIpad?: string;
314
+ appNameGoogleplay?: string;
315
+ appIdGoogleplay?: string;
316
+ appUrlGoogleplay?: string;
317
+ appCountry?: string;
220
318
  }
221
319
  interface TwitterCardPlayer extends TwitterCardBase {
222
- card: 'player';
223
- player: string;
224
- playerWidth: number;
225
- playerHeight: number;
226
- playerStream?: string;
320
+ card: 'player';
321
+ player: string;
322
+ playerWidth: number;
323
+ playerHeight: number;
324
+ playerStream?: string;
227
325
  }
228
326
  type TwitterCardType = TwitterCardApp | TwitterCardPlayer | TwitterCardSummary | TwitterCardSummaryLargeImage;
229
- //# sourceMappingURL=twitter-card.d.ts.map
230
- //#endregion
231
- //#region src/meta-data/meta-data.d.ts
327
+
232
328
  type IBrand = {
233
- name: string;
234
- businessName: string;
235
- appName: string;
236
- logo: string;
237
- url: string;
238
- email?: string;
239
- telephone?: string;
240
- address?: string;
241
- city?: string;
242
- zipCode?: string;
243
- provinceCode?: string;
244
- countryCode?: string;
245
- twitterName?: string;
246
- social?: Record<string, string>;
329
+ name: string;
330
+ businessName: string;
331
+ appName: string;
332
+ logo: string;
333
+ url: string;
334
+ email?: string;
335
+ telephone?: string;
336
+ address?: string;
337
+ city?: string;
338
+ zipCode?: string;
339
+ provinceCode?: string;
340
+ countryCode?: string;
341
+ twitterName?: string;
342
+ social?: Record<string, string>;
247
343
  };
248
344
  type IAlternate = {
249
- id: string;
250
- href: string;
251
- hrefLang: string;
345
+ id: string;
346
+ href: string;
347
+ hrefLang: string;
252
348
  };
253
349
  type IMeta = {
254
- title: string;
255
- description?: string;
256
- image: string;
257
- slug: string;
258
- url: string;
259
- canonical: string;
260
- alternates: IAlternate[];
261
- xDefault?: IAlternate;
262
- keywords?: string;
263
- robots?: string;
350
+ title: string;
351
+ description?: string;
352
+ image: string;
353
+ slug: string;
354
+ url: string;
355
+ canonical: string;
356
+ alternates: IAlternate[];
357
+ xDefault?: IAlternate;
358
+ keywords?: string;
359
+ robots?: string;
264
360
  };
265
361
  type IMetaData = {
266
- layout: ILayout;
267
- page: ILocalized<IPage>;
268
- brand: IBrand;
269
- contactPoint: ContactPoint;
270
- meta: IMeta;
271
- openGraph: OpenGraphType;
272
- organization: Organization;
273
- postalAddress: PostalAddress;
274
- structuredData: StructuredDataType;
275
- twitterCard?: TwitterCardType;
362
+ layout: ILayout;
363
+ page: ILocalized<IPage>;
364
+ brand: IBrand;
365
+ contactPoint: ContactPoint;
366
+ meta: IMeta;
367
+ openGraph: OpenGraphType;
368
+ organization: Organization;
369
+ postalAddress: PostalAddress;
370
+ structuredData: StructuredDataType;
371
+ twitterCard?: TwitterCardType;
276
372
  };
277
- //# sourceMappingURL=meta-data.d.ts.map
278
- //#endregion
279
- //#region src/page/page.d.ts
373
+
374
+ declare function findOnePage<T extends ICategorized = ICategorized>(schema: string, id: IEquatable, params?: QueryParams): Promise<T | undefined>;
375
+ declare function findManyPages<T extends ICategorized = ICategorized>(schema: string, params?: QueryParams): Promise<T[]>;
376
+ declare function getPage<T extends ICategorized = ICategorized>(schema: string, id: IEquatable, market?: string, locale?: string, options?: {
377
+ depth?: number;
378
+ draftMode?: boolean;
379
+ preview?: boolean;
380
+ previewData?: any;
381
+ }): Promise<IPage<T> | undefined>;
382
+ declare function NotFound(market: string, locale: string): Promise<{
383
+ redirect: Redirect;
384
+ } | void>;
385
+ declare function getPageRoutes(schema: string, id: IEquatable): Promise<IRoute[]>;
386
+ declare function getPageCategory<T extends ICategorized>(schema: string, page?: IPage, market?: string, locale?: string): Promise<T | undefined>;
387
+ declare function getErrorPageLayout(): Promise<{
388
+ layout: ILayout;
389
+ page: IPage;
390
+ }>;
391
+ type PartialPageProps<T extends ICategorized, B> = Omit<PageProps<T>, 'page'> & Partial<Pick<PageProps<T>, 'page'>> & B;
392
+ declare function getPageProps<T extends ICategorized, B = any>(props: PartialPageProps<T, B>, extraComponents?: IComponent[]): Promise<PageProps<T> & B>;
280
393
  declare function getPublicUrl(): string;
281
- declare function resolveHref(href?: string): string;
282
- //# sourceMappingURL=page.d.ts.map
283
- //#endregion
284
- //#region src/route/route.d.ts
394
+ declare function resolveHref(href?: string | null): string;
395
+
396
+ declare function getProvinces(locale?: string): Promise<INamedEntity[]>;
397
+ declare function getProvince(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
398
+ declare function getProvincesPagination(params?: QueryParams): Promise<IPaginationResult<INamedEntity>>;
399
+
400
+ declare function getRedirects(locale?: string): Promise<IRedirect[]>;
401
+ declare function getRedirect(id: IEquatable, params?: QueryParams): Promise<IRedirect | undefined>;
402
+ declare function getRedirectsPagination(params?: QueryParams): Promise<IPaginationResult<IRedirect>>;
403
+ declare function redirectTo(layout: ILayout, key?: string): {
404
+ redirect: {
405
+ permanent: boolean;
406
+ destination: string;
407
+ };
408
+ };
409
+
410
+ declare function getRegions(locale?: string): Promise<INamedEntity[]>;
411
+ declare function getRegion(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
412
+ declare function getRegionsPagination(params?: QueryParams): Promise<IPaginationResult<INamedEntity>>;
413
+
414
+ declare function routeRevalidateHandler(): _websolutespa_bom_mixer_store.IHandler<any>;
415
+
416
+ declare function detectLocale(request: NextRequest, defaultLocale?: string): Promise<string>;
417
+ declare function detectCountry(request: NextRequest, defaultMarket?: string): Promise<string | undefined>;
418
+ declare function routeAutoDetection(request: NextRequest, next: NextFetchEvent): Promise<string | undefined>;
419
+ declare function routeInterceptor(request: NextRequest, next: NextFetchEvent): Promise<NextResponse<unknown> | undefined>;
420
+
285
421
  type StaticPath = {
286
- params: {
287
- [key: string]: string;
288
- };
422
+ params: {
423
+ [key: string]: string;
424
+ };
289
425
  };
290
- declare function categoryToRouteLink(routes: IRoute[], categories: ICategory[], category: ICategory, locale: string): IRouteLink | undefined;
426
+ declare function getRoutes(params?: QueryParams): Promise<IRoute[]>;
427
+ declare function getRoute(id: string): Promise<IRoute | undefined>;
428
+ declare function getRoutesForSchemas(schemas: string[], market?: string, locale?: string): Promise<{
429
+ [key: string]: string;
430
+ }>;
431
+ declare function getRoutesForTemplates(templates: string[], market?: string, locale?: string): Promise<{
432
+ [key: string]: string;
433
+ }>;
434
+ declare function getStaticPathsForSchema(schema: string, template?: string): Promise<StaticPath[]>;
435
+ declare function getStaticPathsForSchemaAndFallback(schema: string, fallback?: 'blocking' | true | false, template?: string): Promise<{
436
+ paths: StaticPath[];
437
+ fallback: boolean | "blocking";
438
+ }>;
439
+ declare function getBreadcrumbFromSegments(segments: ICategory[], route: IRoute): Promise<IRouteLink[]>;
440
+ declare function getRouteLinkTree(market: string, locale: string): Promise<IRouteLink | undefined>;
441
+ declare function getRouteLinkCategory(locale: string, routes: IRoute[], categories: ICategory[], rootCategory: ICategory, category: ICategory): IRouteLink | IRouteLink[] | undefined;
291
442
  declare function newRouteLink(category: ICategory, route: IRoute | undefined, locale: string): IRouteLink;
292
443
  declare function routeToRouteLink(route: IRoute): IRouteLink;
293
444
  declare function resolveRoute(route: IRoute & {
294
- splat?: string;
445
+ splat?: string;
295
446
  }): string;
296
- //# sourceMappingURL=route.d.ts.map
297
- //#endregion
298
- //#region src/seo/seo.service.d.ts
447
+
299
448
  type SeoWeight = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
300
449
  declare const getSeoWeight: (index?: number, seoWeight?: SeoWeight) => (subIndex?: number) => SeoWeight;
301
- //# sourceMappingURL=seo.service.d.ts.map
302
- //#endregion
303
- //#region src/store/store.d.ts
450
+
451
+ declare function getSession<T extends object = Record<string, any>>(request: NextRequest | NextApiRequest | (IncomingMessage & {
452
+ cookies: Partial<{
453
+ [key: string]: string;
454
+ }>;
455
+ }), response: NextResponse | NextApiResponse | ServerResponse<IncomingMessage>): Promise<IronSession<T>>;
456
+ type SessionWithToken<T extends object = Record<string, any>> = T & Partial<{
457
+ token: string;
458
+ exp: number;
459
+ }>;
460
+ declare function getSessionToken<T extends SessionWithToken>(request: NextRequest | NextApiRequest | (IncomingMessage & {
461
+ cookies: Partial<{
462
+ [key: string]: string;
463
+ }>;
464
+ }), response: NextResponse | NextApiResponse | ServerResponse<IncomingMessage>): Promise<string | undefined>;
465
+
466
+ declare const getSiteMapIndexProps: GetServerSideProps;
467
+ declare const getSiteMapXMLProps: GetServerSideProps;
468
+ declare const getSiteMapXSLProps: GetServerSideProps;
469
+
470
+ type ISiteMap = {
471
+ id: string;
472
+ updatedAt?: Date;
473
+ };
474
+ declare function getSiteMapIndex(origin: string): Promise<string>;
475
+ declare function escapeHtml(string: string): string;
476
+ declare function getSiteMapXML(origin: string, marketId?: string, localeId?: string): Promise<string>;
477
+ declare function getSiteMapXSL(localeId?: string): Promise<string>;
478
+
304
479
  type IModelStore = {
305
- category: IQuerable<ICategory>;
306
- label: IQuerable<ILabel>;
307
- locale: IQuerable<ILocale>;
308
- market: IQuerable<IMarket>;
309
- menu: IQuerable<IMenu>;
310
- redirect: IQuerable<IRedirect>;
311
- route: IQuerable<IRoute>;
312
- i18n_continent: IQuerable<INamedEntity>;
313
- i18n_country: IQuerable<INamedEntity>;
314
- i18n_country_zone: IQuerable<INamedEntity>;
315
- i18n_language: IQuerable<INamedEntity>;
316
- i18n_province: IQuerable<INamedEntity>;
317
- i18n_region: IQuerable<INamedEntity>;
318
- i18n_sub_continent: IQuerable<INamedEntity>;
319
- [key: string]: IQuerable<IEntity>;
480
+ app: IQuerable<IApp>;
481
+ category: IQuerable<ICategory>;
482
+ label: IQuerable<ILabel>;
483
+ locale: IQuerable<ILocale>;
484
+ market: IQuerable<IMarket>;
485
+ menu: IQuerable<IMenu>;
486
+ redirect: IQuerable<IRedirect>;
487
+ route: IQuerable<IRoute>;
488
+ i18n_continent: IQuerable<INamedEntity>;
489
+ i18n_country: IQuerable<INamedEntity>;
490
+ i18n_country_zone: IQuerable<INamedEntity>;
491
+ i18n_language: IQuerable<INamedEntity>;
492
+ i18n_province: IQuerable<INamedEntity>;
493
+ i18n_region: IQuerable<INamedEntity>;
494
+ i18n_sub_continent: IQuerable<INamedEntity>;
495
+ [key: string]: IQuerable<IEntity>;
320
496
  };
321
- //# sourceMappingURL=store.d.ts.map
322
- //#endregion
323
- //#region src/utmz/utmz.service.d.ts
497
+
324
498
  declare function getUtmz(request: NextApiRequest): string;
325
- //# sourceMappingURL=utmz.service.d.ts.map
326
499
 
327
- //#endregion
328
- export { IAddress, IAddressOptions, IAlternate, IAppProps, IApplication, IApplicationProps, IBrand, ICompanyAddress, IConsentPreference, ILazyComponent, ILazyComponentFunc, ILazyComponentProps, ILazyFuncProps, ILazyModules, ILazyProps, ILazyStaticProps, ILazyStaticPropsFunc, ILazyableProps, ILazyedProps, ILegalNotice, IMeta, IMetaData, IModelStore, INullableLazyableProps, OpenGraphArticle, OpenGraphAudio, OpenGraphBase, OpenGraphBook, OpenGraphBusiness, OpenGraphImage, OpenGraphMusic, OpenGraphPlace, OpenGraphProduct, OpenGraphProductGroup, OpenGraphProfile, OpenGraphRestaurant, OpenGraphType, OpenGraphVideo, OpenGraphWebsite, SeoWeight, StaticPath, StructuredDataType, TwitterCardApp, TwitterCardBase, TwitterCardPlayer, TwitterCardSummary, TwitterCardSummaryLargeImage, TwitterCardType, categoryToRouteLink, getLink, getLocaleFromProps, getPublicUrl, getSeoWeight, getUtmz, newRouteLink, pushDataLayer, resolveHref, resolveRoute, routeToRouteLink };
329
- //# sourceMappingURL=index.d.ts.map
500
+ export { IAddress, IAddressOptions, IAlternate, IAppProps, IApplication, IApplicationProps, IBrand, ICompanyAddress, IConsentPreference, ILazyComponent, ILazyComponentFunc, ILazyComponentProps, ILazyFuncProps, ILazyModules, ILazyProps, ILazyStaticProps, ILazyStaticPropsFunc, ILazyableProps, ILazyedProps, ILegalNotice, IMeta, IMetaData, IModelStore, INullableLazyableProps, ISiteMap, LAZY_PROPS, NotFound, OpenGraphArticle, OpenGraphAudio, OpenGraphBase, OpenGraphBook, OpenGraphBusiness, OpenGraphImage, OpenGraphMusic, OpenGraphPlace, OpenGraphProduct, OpenGraphProductGroup, OpenGraphProfile, OpenGraphRestaurant, OpenGraphType, OpenGraphVideo, OpenGraphWebsite, PartialPageProps, SeoWeight, SessionWithToken, StaticPath, StructuredDataType, TwitterCardApp, TwitterCardBase, TwitterCardPlayer, TwitterCardSummary, TwitterCardSummaryLargeImage, TwitterCardType, detectCountry, detectLocale, escapeHtml, findManyPages, findOnePage, getAddressOptions, getBreadcrumbFromSegments, getCaptionsVttProps, getCategories, getCategory, getConsentPreference, getConsentPreferences, getConsentPreferencesPagination, getCountries, getCountriesPagination, getCountry, getDecoratedComponents, getErrorPageLayout, getLabel, getLabels, getLayout, getLink, getLocale, getLocaleFromProps, getLocales, getMarket, getMarkets, getMenu, getMenus, getPage, getPageCategory, getPageProps, getPageRoutes, getProvince, getProvinces, getProvincesPagination, getPublicUrl, getRedirect, getRedirects, getRedirectsPagination, getRegion, getRegions, getRegionsPagination, getRoute, getRouteLinkCategory, getRouteLinkTree, getRoutes, getRoutesForSchemas, getRoutesForTemplates, getSegments, getSeoWeight, getSession, getSessionToken, getSiteMapIndex, getSiteMapIndexProps, getSiteMapXML, getSiteMapXMLProps, getSiteMapXSL, getSiteMapXSLProps, getStaticPathsForSchema, getStaticPathsForSchemaAndFallback, getUtmz, newRouteLink, pushDataLayer, redirectTo, resolveHref, resolveLabel, resolveRoute, routeAutoDetection, routeInterceptor, routeRevalidateHandler, routeToRouteLink, withLazyProps };