@websolutespa/bom-mixer-models 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,10 +1,16 @@
1
1
  # @websolutespa/bom-mixer-models
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Updating: next 13.
8
+
3
9
  ## 1.1.0
4
10
 
5
11
  ### Minor Changes
6
12
 
7
- - Added: storeApi.
13
+ - Added: storeApi.
8
14
  - Modified: SiteMapService.
9
15
 
10
16
  ## 1.0.1
package/dist/index.d.ts CHANGED
@@ -6,304 +6,304 @@ import { RenderPageResult } from 'next/dist/shared/lib/utils';
6
6
  import { NextRequest, NextFetchEvent, NextResponse } from 'next/server';
7
7
  import { GetServerSideProps } from 'next';
8
8
 
9
- type IApplicationProps = Record<string, any> & {
10
- layout: ILayout;
11
- page: IPage;
12
- params: IRouteParams;
13
- };
9
+ type IApplicationProps = Record<string, any> & {
10
+ layout: ILayout;
11
+ page: IPage;
12
+ params: IRouteParams;
13
+ };
14
14
  type IApplication = AppProps<IApplicationProps>;
15
15
 
16
- type ICartItem = ISchema & {
17
- id: IEquatable;
18
- schema: string;
19
- media: IMedia;
20
- title: string;
21
- abstract?: string;
22
- href: string;
23
- price: number;
24
- qty: number;
25
- };
16
+ type ICartItem = ISchema & {
17
+ id: IEquatable;
18
+ schema: string;
19
+ media: IMedia;
20
+ title: string;
21
+ abstract?: string;
22
+ href: string;
23
+ price: number;
24
+ qty: number;
25
+ };
26
26
  type ICartAddItem = Omit<ICartItem, 'qty'>;
27
27
 
28
- declare function getCategories(params?: QueryParams): Promise<ICategory[]>;
29
- declare function getCategory(id: IEquatable, params?: QueryParams): Promise<ICategory | undefined>;
28
+ declare function getCategories(params?: QueryParams): Promise<ICategory[]>;
29
+ declare function getCategory(id: IEquatable, params?: QueryParams): Promise<ICategory | undefined>;
30
30
  declare function getSegments(item: ICategorized, params?: QueryParams): Promise<ICategory[]>;
31
31
 
32
- type IUserLogin = {
33
- email: string;
34
- password: string;
35
- rememberMe: boolean;
36
- };
37
- type IUserRegister = {
38
- firstName: string;
39
- lastName: string;
40
- email: string;
41
- password: string;
42
- confirmPassword: string;
43
- privacy: boolean;
44
- };
45
- type IUserForgot = {
46
- email: string;
47
- };
48
- type IUserChangePassword = {
49
- oldPassword: string;
50
- newPassword: string;
51
- confirmNewPassword: string;
52
- };
53
- type IUser = ISchema & {
54
- id: IEquatable;
55
- firstName: string;
56
- lastName: string;
57
- email: string;
58
- };
59
- type IAddress = {
60
- name: string;
61
- firstName: string;
62
- lastName: string;
63
- address: string;
64
- streetNumber: string;
65
- zipCode: string;
66
- city: string;
67
- country: IOption;
68
- region?: IOption;
69
- province?: IOption;
70
- email: string;
71
- phoneNumber: string;
72
- };
73
- type IAddressOptions = {
74
- countries: IOption[];
75
- regions: IOption[];
76
- provinces: IOption[];
77
- };
78
- type IUserAddress = Omit<IAddress, 'name'>;
32
+ type IUserLogin = {
33
+ email: string;
34
+ password: string;
35
+ rememberMe: boolean;
36
+ };
37
+ type IUserRegister = {
38
+ firstName: string;
39
+ lastName: string;
40
+ email: string;
41
+ password: string;
42
+ confirmPassword: string;
43
+ privacy: boolean;
44
+ };
45
+ type IUserForgot = {
46
+ email: string;
47
+ };
48
+ type IUserChangePassword = {
49
+ oldPassword: string;
50
+ newPassword: string;
51
+ confirmNewPassword: string;
52
+ };
53
+ type IUser = ISchema & {
54
+ id: IEquatable;
55
+ firstName: string;
56
+ lastName: string;
57
+ email: string;
58
+ };
59
+ type IAddress = {
60
+ name: string;
61
+ firstName: string;
62
+ lastName: string;
63
+ address: string;
64
+ streetNumber: string;
65
+ zipCode: string;
66
+ city: string;
67
+ country: IOption;
68
+ region?: IOption;
69
+ province?: IOption;
70
+ email: string;
71
+ phoneNumber: string;
72
+ };
73
+ type IAddressOptions = {
74
+ countries: IOption[];
75
+ regions: IOption[];
76
+ provinces: IOption[];
77
+ };
78
+ type IUserAddress = Omit<IAddress, 'name'>;
79
79
  type ICompanyAddress = Omit<IAddress, 'firstName' | 'lastName'>;
80
80
 
81
- type ICheckout = {
82
- items: ICheckoutItem[];
83
- user?: Partial<IUser>;
84
- shippingAddress: IUserAddress;
85
- hasInvoice?: boolean;
86
- hasBilling?: boolean;
87
- billingAddress?: IUserAddress;
88
- delivery: ICheckoutDelivery;
89
- store: ICheckoutStore;
90
- discounts: ICheckoutDiscount[];
91
- payment: ICheckoutPayment;
92
- subTotal: number;
93
- subTotalFull: number;
94
- taxes: number;
95
- total: number;
96
- };
97
- type ICheckoutPartial = Partial<ICheckout>;
98
- type ICheckoutItem = ICartItem & {
99
- fullPrice: number;
100
- };
101
- type ICheckoutInfo = {
102
- user?: Partial<IUser>;
103
- shippingAddress: IUserAddress;
104
- hasInvoice?: boolean;
105
- hasBilling?: boolean;
106
- billingAddress?: IUserAddress;
107
- };
108
- type ICheckoutDelivery = IOption & {
109
- abstract: string;
110
- price: number;
111
- fullPrice: number;
112
- };
113
- type ICheckoutStore = Partial<ICompanyAddress> & IOption & {
114
- category?: IOption;
115
- timetable?: string[];
116
- position?: {
117
- latitude: number;
118
- longitude: number;
119
- };
120
- distance?: number;
121
- rank?: number;
122
- };
123
- type ICheckoutDiscount = IOption & {
124
- abstract?: string;
125
- price: number;
126
- validFrom: Date | string;
127
- validTo: Date | string;
128
- };
129
- type ICheckoutPayment = IOption & {
130
- abstract?: string;
131
- media?: IMedia;
132
- };
133
- type ICheckoutPaymentRedirect = {
134
- redirectUrl: string;
81
+ type ICheckout = {
82
+ items: ICheckoutItem[];
83
+ user?: Partial<IUser>;
84
+ shippingAddress: IUserAddress;
85
+ hasInvoice?: boolean;
86
+ hasBilling?: boolean;
87
+ billingAddress?: IUserAddress;
88
+ delivery: ICheckoutDelivery;
89
+ store: ICheckoutStore;
90
+ discounts: ICheckoutDiscount[];
91
+ payment: ICheckoutPayment;
92
+ subTotal: number;
93
+ subTotalFull: number;
94
+ taxes: number;
95
+ total: number;
96
+ };
97
+ type ICheckoutPartial = Partial<ICheckout>;
98
+ type ICheckoutItem = ICartItem & {
99
+ fullPrice: number;
100
+ };
101
+ type ICheckoutInfo = {
102
+ user?: Partial<IUser>;
103
+ shippingAddress: IUserAddress;
104
+ hasInvoice?: boolean;
105
+ hasBilling?: boolean;
106
+ billingAddress?: IUserAddress;
107
+ };
108
+ type ICheckoutDelivery = IOption & {
109
+ abstract: string;
110
+ price: number;
111
+ fullPrice: number;
112
+ };
113
+ type ICheckoutStore = Partial<ICompanyAddress> & IOption & {
114
+ category?: IOption;
115
+ timetable?: string[];
116
+ position?: {
117
+ latitude: number;
118
+ longitude: number;
119
+ };
120
+ distance?: number;
121
+ rank?: number;
122
+ };
123
+ type ICheckoutDiscount = IOption & {
124
+ abstract?: string;
125
+ price: number;
126
+ validFrom: Date | string;
127
+ validTo: Date | string;
128
+ };
129
+ type ICheckoutPayment = IOption & {
130
+ abstract?: string;
131
+ media?: IMedia;
132
+ };
133
+ type ICheckoutPaymentRedirect = {
134
+ redirectUrl: string;
135
135
  };
136
136
 
137
- declare function getItems(items: ICartItem[], market: string, locale: string, user?: IUser): Promise<ICheckoutItem[]>;
138
- declare function getInfo(checkout: ICheckoutPartial, market: string, locale: string): Promise<IAddressOptions>;
139
- declare function getDeliveries(checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutDelivery[]>;
140
- declare function getStores(checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutStore[]>;
141
- declare function getPayments(checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutPayment[]>;
142
- declare function updateCheckout(checkout: ICheckoutPartial, action: string, market: string, locale: string): Promise<ICheckoutPartial>;
143
- declare function setDiscountCode(discountCode: string, checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutPartial>;
137
+ declare function getItems(items: ICartItem[], market: string, locale: string, user?: IUser): Promise<ICheckoutItem[]>;
138
+ declare function getInfo(checkout: ICheckoutPartial, market: string, locale: string): Promise<IAddressOptions>;
139
+ declare function getDeliveries(checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutDelivery[]>;
140
+ declare function getStores(checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutStore[]>;
141
+ declare function getPayments(checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutPayment[]>;
142
+ declare function updateCheckout(checkout: ICheckoutPartial, action: string, market: string, locale: string): Promise<ICheckoutPartial>;
143
+ declare function setDiscountCode(discountCode: string, checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutPartial>;
144
144
  declare function getPayment(checkout: ICheckoutPartial, market: string, locale: string): Promise<ICheckoutPaymentRedirect>;
145
145
 
146
- declare function getCountries(locale?: string): Promise<INamedEntity[]>;
146
+ declare function getCountries(locale?: string): Promise<INamedEntity[]>;
147
147
  declare function getCountry(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
148
148
 
149
- type IFeatureType = {
150
- id: string;
151
- schema?: string;
152
- title: string;
153
- mode: string;
154
- features?: {
155
- id: IEquatable;
156
- title: string;
157
- [key: string]: unknown;
158
- }[];
149
+ type IFeatureType = {
150
+ id: string;
151
+ schema?: string;
152
+ title: string;
153
+ mode: string;
154
+ features?: {
155
+ id: IEquatable;
156
+ title: string;
157
+ [key: string]: unknown;
158
+ }[];
159
159
  };
160
160
 
161
- declare function getFeatureTypes(params?: QueryParams): Promise<IFeatureType[]>;
161
+ declare function getFeatureTypes(params?: QueryParams): Promise<IFeatureType[]>;
162
162
  declare function getFeatureType(id: IEquatable, params?: QueryParams): Promise<IFeatureType | undefined>;
163
163
 
164
- declare function getLabels(params?: QueryParams): Promise<ILabel[]>;
165
- declare function getLabel(id: IEquatable, params?: QueryParams): Promise<ILabel | undefined>;
164
+ declare function getLabels(params?: QueryParams): Promise<ILabel[]>;
165
+ declare function getLabel(id: IEquatable, params?: QueryParams): Promise<ILabel | undefined>;
166
166
  declare function resolveLabel(labels: ILabel[], id: string): string;
167
167
 
168
168
  declare function getLayout(market: string, locale: string): Promise<ILayout>;
169
169
 
170
- type ILazyComponent = {
171
- schema: string;
172
- [key: string]: unknown;
173
- };
174
- type ILazyComponentProps = {
175
- item: ILazyComponent;
176
- };
177
- type IGenericLazyComponentProps = ILazyComponentProps & any;
170
+ type ILazyComponent = {
171
+ schema: string;
172
+ [key: string]: unknown;
173
+ };
174
+ type ILazyComponentProps = {
175
+ item: ILazyComponent;
176
+ };
177
+ type IGenericLazyComponentProps = ILazyComponentProps & any;
178
178
  type ILazyModules = Record<string, ComponentType<ComponentProps<IGenericLazyComponentProps>>>;
179
179
 
180
- type ILink = {
181
- href: string;
182
- title: string;
183
- type?: string;
184
- secure?: boolean;
180
+ type ILink = {
181
+ href: string;
182
+ title: string;
183
+ type?: string;
184
+ secure?: boolean;
185
185
  };
186
186
 
187
- type IList = INamedEntity & {
188
- key?: string;
189
- listId?: IEquatable;
190
- items?: IList[];
191
- };
192
- type IKeyedList = IList & {
193
- key: string;
187
+ type IList = INamedEntity & {
188
+ key?: string;
189
+ listId?: IEquatable;
190
+ items?: IList[];
191
+ };
192
+ type IKeyedList = IList & {
193
+ key: string;
194
194
  };
195
195
 
196
- declare function getLists(locale?: string): Promise<IList[]>;
197
- declare function getListByKeys(keys: string[], locale?: string): Promise<{
198
- [key: string]: IList[];
196
+ declare function getLists(locale?: string): Promise<IList[]>;
197
+ declare function getListByKeys(keys: string[], locale?: string): Promise<{
198
+ [key: string]: IList[];
199
199
  }>;
200
200
 
201
- declare function getLocales(params?: QueryParams): Promise<ILocale[]>;
202
- declare function getLocale(id: IEquatable, params?: QueryParams): Promise<ILocale | undefined>;
201
+ declare function getLocales(params?: QueryParams): Promise<ILocale[]>;
202
+ declare function getLocale(id: IEquatable, params?: QueryParams): Promise<ILocale | undefined>;
203
203
  declare function getLocaleFromProps(props: (RenderPageResult & HtmlProps) | undefined): string | undefined;
204
204
 
205
- declare function getMarkets(params?: QueryParams): Promise<IMarket[]>;
205
+ declare function getMarkets(params?: QueryParams): Promise<IMarket[]>;
206
206
  declare function getMarket(id: IEquatable, params?: QueryParams): Promise<IMarket | undefined>;
207
207
 
208
- declare function getMenus(params?: QueryParams): Promise<IMenu[]>;
208
+ declare function getMenus(params?: QueryParams): Promise<IMenu[]>;
209
209
  declare function getMenu(id: IEquatable, params?: QueryParams): Promise<IMenu | undefined>;
210
210
 
211
- declare const IOrderStatus: {
212
- Pending: string;
213
- AwaitingPayment: string;
214
- AwaitingFulfillment: string;
215
- AwaitingShipment: string;
216
- AwaitingPickup: string;
217
- PartiallyShipped: string;
218
- Completed: string;
219
- Shipped: string;
220
- Cancelled: string;
221
- Declined: string;
222
- Refunded: string;
223
- Disputed: string;
224
- ManualVerificationRequired: string;
225
- PartiallyRefunded: string;
226
- };
227
- type IOrderStatusValue = ValueOf<typeof IOrderStatus>;
228
- type IOrder = ICheckout & {
229
- id: IEquatable;
230
- date: Date | string;
231
- status: IOrderStatusValue;
232
- };
233
- type IOrderDetail = IOrder & {
234
- href: string;
211
+ declare const IOrderStatus: {
212
+ Pending: string;
213
+ AwaitingPayment: string;
214
+ AwaitingFulfillment: string;
215
+ AwaitingShipment: string;
216
+ AwaitingPickup: string;
217
+ PartiallyShipped: string;
218
+ Completed: string;
219
+ Shipped: string;
220
+ Cancelled: string;
221
+ Declined: string;
222
+ Refunded: string;
223
+ Disputed: string;
224
+ ManualVerificationRequired: string;
225
+ PartiallyRefunded: string;
226
+ };
227
+ type IOrderStatusValue = ValueOf<typeof IOrderStatus>;
228
+ type IOrder = ICheckout & {
229
+ id: IEquatable;
230
+ date: Date | string;
231
+ status: IOrderStatusValue;
232
+ };
233
+ type IOrderDetail = IOrder & {
234
+ href: string;
235
235
  };
236
236
 
237
- declare function getOrders(market: string, locale: string): Promise<IOrderDetail[]>;
237
+ declare function getOrders(market: string, locale: string): Promise<IOrderDetail[]>;
238
238
  declare function getOrder(id: IEquatable, market: string, locale: string): Promise<IOrderDetail | null>;
239
239
 
240
- declare function findOnePage<T extends ICategorized = ICategorized>(schema: string, id: IEquatable, params?: QueryParams): Promise<T | undefined>;
241
- declare function findManyPages<T extends ICategorized = ICategorized>(schema: string, params?: QueryParams): Promise<T[]>;
242
- declare function getPage<T extends ICategorized = ICategorized>(schema: string, id: IEquatable, market?: string, locale?: string): Promise<IPageResult<T> | undefined>;
243
- declare function getPageRoutes(schema: string, id: IEquatable): Promise<IRoute[]>;
244
- declare function getPageCategory<T extends IPage>(schema: string, page?: IPage, market?: string, locale?: string): Promise<T | undefined>;
245
- declare function getErrorPageLayout(): Promise<{
246
- layout: ILayout;
247
- page: IPage;
240
+ declare function findOnePage<T extends ICategorized = ICategorized>(schema: string, id: IEquatable, params?: QueryParams): Promise<T | undefined>;
241
+ declare function findManyPages<T extends ICategorized = ICategorized>(schema: string, params?: QueryParams): Promise<T[]>;
242
+ declare function getPage<T extends ICategorized = ICategorized>(schema: string, id: IEquatable, market?: string, locale?: string): Promise<IPageResult<T> | undefined>;
243
+ declare function getPageRoutes(schema: string, id: IEquatable): Promise<IRoute[]>;
244
+ declare function getPageCategory<T extends IPage>(schema: string, page?: IPage, market?: string, locale?: string): Promise<T | undefined>;
245
+ declare function getErrorPageLayout(): Promise<{
246
+ layout: ILayout;
247
+ page: IPage;
248
248
  }>;
249
249
 
250
- declare function getProvinces(locale?: string): Promise<INamedEntity[]>;
250
+ declare function getProvinces(locale?: string): Promise<INamedEntity[]>;
251
251
  declare function getProvince(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
252
252
 
253
- declare function getRegions(locale?: string): Promise<INamedEntity[]>;
253
+ declare function getRegions(locale?: string): Promise<INamedEntity[]>;
254
254
  declare function getRegion(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
255
255
 
256
256
  declare function routeRevalidateHandler(): any;
257
257
 
258
- declare function routeInterceptor(request: NextRequest, next: NextFetchEvent): Promise<NextResponse | undefined>;
258
+ declare function routeInterceptor(request: NextRequest, next: NextFetchEvent): Promise<NextResponse<unknown> | undefined>;
259
259
 
260
- type StaticPath = {
261
- params: {
262
- [key: string]: string;
263
- };
264
- };
265
- declare function getRoutes(params?: QueryParams): Promise<IRoute[]>;
266
- declare function getRoute(id: string): Promise<IRoute | undefined>;
267
- declare function getRoutesForSchemas(schemas: string[], market?: string, locale?: string): Promise<{
268
- [key: string]: string;
269
- }>;
270
- declare function getRoutesForTemplates(templates: string[], market?: string, locale?: string): Promise<{
271
- [key: string]: string;
272
- }>;
273
- declare function getStaticPathsForSchema(schema: string): Promise<StaticPath[]>;
274
- declare function getBreadcrumbFromSegments(segments: ICategory[], market?: string, locale?: string): Promise<IRouteLink[]>;
275
- declare function getRouteLinkTree(market?: string, locale?: string): Promise<IRouteLink | undefined>;
276
- declare function categoryToRouteLink(routes: IRoute[], categories: ICategory[], category: ICategory, locale?: string): IRouteLink;
277
- declare function resolveRoute(route: IRoute & {
278
- splat?: string;
260
+ type StaticPath = {
261
+ params: {
262
+ [key: string]: string;
263
+ };
264
+ };
265
+ declare function getRoutes(params?: QueryParams): Promise<IRoute[]>;
266
+ declare function getRoute(id: string): Promise<IRoute | undefined>;
267
+ declare function getRoutesForSchemas(schemas: string[], market?: string, locale?: string): Promise<{
268
+ [key: string]: string;
269
+ }>;
270
+ declare function getRoutesForTemplates(templates: string[], market?: string, locale?: string): Promise<{
271
+ [key: string]: string;
272
+ }>;
273
+ declare function getStaticPathsForSchema(schema: string): Promise<StaticPath[]>;
274
+ declare function getBreadcrumbFromSegments(segments: ICategory[], market?: string, locale?: string): Promise<IRouteLink[]>;
275
+ declare function getRouteLinkTree(market?: string, locale?: string): Promise<IRouteLink | undefined>;
276
+ declare function categoryToRouteLink(routes: IRoute[], categories: ICategory[], category: ICategory, locale?: string): IRouteLink;
277
+ declare function resolveRoute(route: IRoute & {
278
+ splat?: string;
279
279
  }): string;
280
280
 
281
- declare const getSiteMapIndexProps: GetServerSideProps;
282
- declare const getSiteMapXMLProps: GetServerSideProps;
281
+ declare const getSiteMapIndexProps: GetServerSideProps;
282
+ declare const getSiteMapXMLProps: GetServerSideProps;
283
283
  declare const getSiteMapXSLProps: GetServerSideProps;
284
284
 
285
- type ISiteMap = {
286
- id: string;
287
- updatedAt?: Date;
288
- };
289
- declare function getSiteMapIndex(origin: string): Promise<string>;
290
- declare function getSiteMapXML(origin: string, marketId?: string, localeId?: string): Promise<string>;
285
+ type ISiteMap = {
286
+ id: string;
287
+ updatedAt?: Date;
288
+ };
289
+ declare function getSiteMapIndex(origin: string): Promise<string>;
290
+ declare function getSiteMapXML(origin: string, marketId?: string, localeId?: string): Promise<string>;
291
291
  declare function getSiteMapXSL(): Promise<string>;
292
292
 
293
- type IModelStore = {
294
- category: IQuerable<ICategory>;
295
- feature_type: IQuerable<IFeatureType>;
296
- label: IQuerable<ILabel>;
297
- list: IQuerable<IList>;
298
- locale: IQuerable<ILocale>;
299
- market: IQuerable<IMarket>;
300
- menu: IQuerable<IMenu>;
301
- redirect: IQuerable<IRedirect>;
302
- route: IQuerable<IRoute>;
303
- i18n_country: IQuerable<INamedEntity>;
304
- i18n_province: IQuerable<INamedEntity>;
305
- i18n_region: IQuerable<INamedEntity>;
306
- [key: string]: IQuerable<IEntity>;
293
+ type IModelStore = {
294
+ category: IQuerable<ICategory>;
295
+ feature_type: IQuerable<IFeatureType>;
296
+ label: IQuerable<ILabel>;
297
+ list: IQuerable<IList>;
298
+ locale: IQuerable<ILocale>;
299
+ market: IQuerable<IMarket>;
300
+ menu: IQuerable<IMenu>;
301
+ redirect: IQuerable<IRedirect>;
302
+ route: IQuerable<IRoute>;
303
+ i18n_country: IQuerable<INamedEntity>;
304
+ i18n_province: IQuerable<INamedEntity>;
305
+ i18n_region: IQuerable<INamedEntity>;
306
+ [key: string]: IQuerable<IEntity>;
307
307
  };
308
308
 
309
309
  export { IAddress, IAddressOptions, IApplication, IApplicationProps, ICartAddItem, ICartItem, ICheckout, ICheckoutDelivery, ICheckoutDiscount, ICheckoutInfo, ICheckoutItem, ICheckoutPartial, ICheckoutPayment, ICheckoutPaymentRedirect, ICheckoutStore, ICompanyAddress, IFeatureType, IGenericLazyComponentProps, IKeyedList, ILazyComponent, ILazyComponentProps, ILazyModules, ILink, IList, IModelStore, IOrder, IOrderDetail, IOrderStatus, IOrderStatusValue, ISiteMap, IUser, IUserAddress, IUserChangePassword, IUserForgot, IUserLogin, IUserRegister, StaticPath, categoryToRouteLink, findManyPages, findOnePage, getBreadcrumbFromSegments, getCategories, getCategory, getCountries, getCountry, getDeliveries, getErrorPageLayout, getFeatureType, getFeatureTypes, getInfo, getItems, getLabel, getLabels, getLayout, getListByKeys, getLists, getLocale, getLocaleFromProps, getLocales, getMarket, getMarkets, getMenu, getMenus, getOrder, getOrders, getPage, getPageCategory, getPageRoutes, getPayment, getPayments, getProvince, getProvinces, getRegion, getRegions, getRoute, getRouteLinkTree, getRoutes, getRoutesForSchemas, getRoutesForTemplates, getSegments, getSiteMapIndex, getSiteMapIndexProps, getSiteMapXML, getSiteMapXMLProps, getSiteMapXSL, getSiteMapXSLProps, getStaticPathsForSchema, getStores, resolveLabel, resolveRoute, routeInterceptor, routeRevalidateHandler, setDiscountCode, updateCheckout };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@websolutespa/bom-mixer-models",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "Mixer Models module of the BOM Repository",
5
5
  "keywords": [
6
6
  "bom",
@@ -22,21 +22,21 @@
22
22
  "peerDependencies": {
23
23
  "@websolutespa/bom-core": "*",
24
24
  "@websolutespa/bom-mixer-store": "*",
25
- "next": ">= 12.3.2"
25
+ "next": ">= 13.4.19"
26
26
  },
27
27
  "devDependencies": {
28
- "@types/react": "^18.0.18",
29
- "@types/react-dom": "^18.0.6",
28
+ "@types/react": "^18.2.18",
29
+ "@types/react-dom": "^18.2.7",
30
30
  "@websolutespa/bom-cli": "*",
31
31
  "@websolutespa/test": "*",
32
32
  "@websolutespa/tsconfig": "*",
33
- "eslint": "^8.36.0",
33
+ "eslint": "^8.46.0",
34
34
  "eslint-config-websolute": "*",
35
35
  "npm-run-all": "^4.1.5",
36
36
  "react": "^18.2.0",
37
37
  "ts-node": "^10.9.1",
38
38
  "tsup": "^6.7.0",
39
- "typescript": "^4.8.4"
39
+ "typescript": "^5.1.6"
40
40
  },
41
41
  "publishConfig": {
42
42
  "access": "public"
@@ -30,7 +30,7 @@ export async function getRoutesForSchemas(schemas: string[], market?: string, lo
30
30
  locale: {
31
31
  equals: locale,
32
32
  },
33
- }, market, locale
33
+ }, market, locale,
34
34
  });
35
35
  const items: {
36
36
  [key: string]: string;
@@ -54,7 +54,7 @@ export async function getRoutesForTemplates(templates: string[], market?: string
54
54
  locale: {
55
55
  equals: locale,
56
56
  },
57
- }, market, locale
57
+ }, market, locale,
58
58
  });
59
59
  const items: {
60
60
  [key: string]: string;
@@ -72,9 +72,9 @@ export async function getStaticPathsForSchema(schema: string): Promise<StaticPat
72
72
  const routes = await store.route.findMany({
73
73
  where: {
74
74
  schema: {
75
- equals: schema
76
- }
77
- }
75
+ equals: schema,
76
+ },
77
+ },
78
78
  });
79
79
  return routes.map((x: any) => ({ params: { id: x.page.toString(), market: x.market, locale: x.locale } }));
80
80
  }
@@ -83,12 +83,12 @@ export async function getBreadcrumbFromSegments(segments: ICategory[], market: s
83
83
  const routes: IRoute[] = await getRoutes({
84
84
  where: {
85
85
  market: {
86
- equals: market
86
+ equals: market,
87
87
  },
88
88
  locale: {
89
- equals: locale
89
+ equals: locale,
90
90
  },
91
- }
91
+ },
92
92
  });
93
93
  const tree: IRouteLink[] = segments.map(segment => {
94
94
  const route = routes.find(r =>
@@ -121,7 +121,7 @@ export async function getRouteLinkTree(market: string = 'ww', locale: string = '
121
121
  locale: {
122
122
  equals: locale,
123
123
  },
124
- }, market, locale
124
+ }, market, locale,
125
125
  });
126
126
  // console.log('getRouteLinkTree.routes');
127
127
  const categories = await store.category.findMany();