@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.
- package/CHANGELOG.md +44 -7
- package/dist/index.d.ts +424 -253
- package/dist/index.js +1450 -41
- package/dist/index.mjs +1363 -0
- package/package.json +27 -75
- package/src/app/app.service.ts +9 -0
- package/src/captions/captions.handler.ts +1 -1
- package/src/category/category.service.ts +3 -3
- package/src/consent_preference/consent_preference.service.ts +4 -4
- package/src/consent_preference/consent_preference.ts +1 -1
- package/src/country/country.service.ts +4 -4
- package/src/index.ts +20 -3
- package/src/label/label.service.ts +3 -3
- package/src/layout/layout.service.ts +5 -2
- package/src/lazy/lazy.ts +26 -0
- package/src/locale/locale.service.ts +13 -3
- package/src/market/market.service.ts +3 -3
- package/src/menu/menu.service.ts +3 -3
- package/src/page/page.service.ts +7 -10
- package/src/province/province.service.ts +4 -4
- package/src/redirect/redirect.service.ts +4 -4
- package/src/region/region.service.ts +4 -4
- package/src/route/route-revalidate.handler.ts +2 -3
- package/src/route/route.interceptor.ts +121 -5
- package/src/route/route.service.ts +49 -11
- package/src/sitemap/sitemap.service.ts +8 -9
- package/src/store/store.ts +2 -1
- package/dist/exports/middleware.d.ts +0 -9
- package/dist/exports/middleware.d.ts.map +0 -1
- package/dist/exports/middleware.js +0 -82
- package/dist/exports/middleware.js.map +0 -1
- package/dist/exports/server.d.ts +0 -178
- package/dist/exports/server.d.ts.map +0 -1
- package/dist/exports/server.js +0 -921
- package/dist/exports/server.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/lazy-JamSYYoh.d.ts +0 -84
- package/dist/lazy-JamSYYoh.d.ts.map +0 -1
- package/dist/page-BLbZbnWg.js +0 -12
- package/dist/page-BLbZbnWg.js.map +0 -1
- package/dist/route-k0W3AKyo.js +0 -53
- package/dist/route-k0W3AKyo.js.map +0 -1
- package/src/exports/middleware.ts +0 -2
- package/src/exports/server.ts +0 -21
- package/src/lazy/lazy.service.ts +0 -31
- package/src/locale/locale.ts +0 -9
- package/src/page/page.ts +0 -9
- package/src/route/route.ts +0 -64
package/dist/index.d.ts
CHANGED
|
@@ -1,329 +1,500 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import * as StructuredData from
|
|
7
|
-
import { ContactPoint, Organization, PostalAddress } from
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
46
|
+
Component: {
|
|
47
|
+
Layout?: FC<{
|
|
48
|
+
children?: ReactNode;
|
|
49
|
+
}>;
|
|
50
|
+
};
|
|
16
51
|
};
|
|
17
52
|
type IApplicationProps = Record<string, any> & {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
30
|
-
|
|
31
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
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
|
-
|
|
38
|
-
|
|
39
|
-
|
|
135
|
+
__NEXT_DATA__?: {
|
|
136
|
+
query?: {
|
|
137
|
+
locale?: string;
|
|
138
|
+
};
|
|
40
139
|
};
|
|
41
|
-
};
|
|
42
140
|
}): string | undefined;
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
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
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
66
|
-
|
|
67
|
-
|
|
167
|
+
url: string;
|
|
168
|
+
secureUrl?: string;
|
|
169
|
+
type?: string;
|
|
68
170
|
}
|
|
69
171
|
interface OpenGraphWebsite extends OpenGraphBase {
|
|
70
|
-
|
|
172
|
+
type: 'website';
|
|
71
173
|
}
|
|
72
174
|
interface OpenGraphArticle extends OpenGraphBase {
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
191
|
+
type: 'profile';
|
|
192
|
+
firstName?: string;
|
|
193
|
+
lastName?: string;
|
|
194
|
+
username?: string;
|
|
195
|
+
gender?: string;
|
|
94
196
|
}
|
|
95
197
|
interface OpenGraphMusic extends OpenGraphBase {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
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
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
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
|
-
|
|
238
|
+
type: 'product.group';
|
|
137
239
|
}
|
|
138
240
|
interface OpenGraphPlace extends OpenGraphBase {
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
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
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
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
|
-
|
|
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
|
-
|
|
189
|
-
//#endregion
|
|
190
|
-
//#region src/meta-data/twitter-card.d.ts
|
|
288
|
+
|
|
191
289
|
interface TwitterCardBase {
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
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
|
-
|
|
301
|
+
card: 'summary';
|
|
204
302
|
}
|
|
205
303
|
interface TwitterCardSummaryLargeImage extends TwitterCardBase {
|
|
206
|
-
|
|
304
|
+
card: 'summary_large_image';
|
|
207
305
|
}
|
|
208
306
|
interface TwitterCardApp extends TwitterCardBase {
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
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
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
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
|
-
|
|
230
|
-
//#endregion
|
|
231
|
-
//#region src/meta-data/meta-data.d.ts
|
|
327
|
+
|
|
232
328
|
type IBrand = {
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
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
|
-
|
|
250
|
-
|
|
251
|
-
|
|
345
|
+
id: string;
|
|
346
|
+
href: string;
|
|
347
|
+
hrefLang: string;
|
|
252
348
|
};
|
|
253
349
|
type IMeta = {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
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
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
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
|
-
|
|
278
|
-
|
|
279
|
-
|
|
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
|
-
|
|
283
|
-
|
|
284
|
-
|
|
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
|
-
|
|
287
|
-
|
|
288
|
-
|
|
422
|
+
params: {
|
|
423
|
+
[key: string]: string;
|
|
424
|
+
};
|
|
289
425
|
};
|
|
290
|
-
declare function
|
|
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
|
-
|
|
445
|
+
splat?: string;
|
|
295
446
|
}): string;
|
|
296
|
-
|
|
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
|
-
|
|
302
|
-
|
|
303
|
-
|
|
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
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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 };
|