@websolutespa/bom-mixer-models 0.4.1 → 1.0.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 +12 -0
- package/dist/index.d.ts +36 -12
- package/dist/index.js +406 -50
- package/dist/index.mjs +392 -50
- package/package.json +1 -1
- package/src/category/category.service.ts +8 -30
- package/src/checkout/checkout.service.ts +1 -1
- package/src/country/country.service.ts +7 -1
- package/src/feature_type/feature_type.service.ts +7 -1
- package/src/index.ts +2 -0
- package/src/label/label.service.ts +7 -1
- package/src/layout/layout.service.ts +11 -0
- package/src/locale/locale.service.ts +12 -1
- package/src/market/market.service.ts +7 -1
- package/src/menu/menu.service.ts +6 -6
- package/src/page/page.service.ts +7 -0
- package/src/province/province.service.ts +7 -1
- package/src/redirect/redirect.service.ts +15 -0
- package/src/region/region.service.ts +7 -1
- package/src/route/route.interceptor.ts +22 -4
- package/src/route/route.service.ts +14 -14
- package/src/sitemap/sitemap.handler.ts +48 -0
- package/src/sitemap/sitemap.service.ts +268 -0
- package/src/store/store.ts +2 -1
package/CHANGELOG.md
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
|
-
import { ISchema, IEquatable, IMedia, QueryParams, ICategory, ICategorized, IOption, INamedEntity, ILabel, ILayout, ILocale, IMarket, IMenu, ValueOf, IPageResult, IRoute, IPage, IRouteLink, IQuerable, IEntity } from '@websolutespa/bom-core';
|
|
1
|
+
import { ISchema, IEquatable, IMedia, QueryParams, ICategory, ICategorized, IOption, INamedEntity, ILabel, ILayout, ILocale, IMarket, IMenu, ValueOf, IPageResult, IRoute, IPage, IRouteLink, IQuerable, IRedirect, IEntity } from '@websolutespa/bom-core';
|
|
2
2
|
import { ComponentType, ComponentProps } from 'react';
|
|
3
|
+
import { HtmlProps } from 'next/dist/shared/lib/html-context';
|
|
4
|
+
import { RenderPageResult } from 'next/dist/shared/lib/utils';
|
|
3
5
|
import { NextRequest, NextFetchEvent, NextResponse } from 'next/server';
|
|
6
|
+
import { GetServerSideProps } from 'next';
|
|
4
7
|
|
|
5
8
|
type ICartItem = ISchema & {
|
|
6
9
|
id: IEquatable;
|
|
@@ -15,8 +18,8 @@ type ICartItem = ISchema & {
|
|
|
15
18
|
type ICartAddItem = Omit<ICartItem, 'qty'>;
|
|
16
19
|
|
|
17
20
|
declare function getCategories(params?: QueryParams): Promise<ICategory[]>;
|
|
18
|
-
declare function
|
|
19
|
-
declare function
|
|
21
|
+
declare function getCategory(id: IEquatable, params?: QueryParams): Promise<ICategory | undefined>;
|
|
22
|
+
declare function getSegments(item: ICategorized, params?: QueryParams): Promise<ICategory[]>;
|
|
20
23
|
|
|
21
24
|
type IUserLogin = {
|
|
22
25
|
email: string;
|
|
@@ -131,7 +134,8 @@ declare function getPayment(checkout: ICheckoutPartial, market: string, locale:
|
|
|
131
134
|
redirectUrl: string;
|
|
132
135
|
}>;
|
|
133
136
|
|
|
134
|
-
declare function getCountries(locale?: string): Promise<INamedEntity[]>;
|
|
137
|
+
declare function getCountries(locale?: string): Promise<INamedEntity[]>;
|
|
138
|
+
declare function getCountry(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
|
|
135
139
|
|
|
136
140
|
type IFeatureType = {
|
|
137
141
|
id: string;
|
|
@@ -145,9 +149,11 @@ type IFeatureType = {
|
|
|
145
149
|
}[];
|
|
146
150
|
};
|
|
147
151
|
|
|
148
|
-
declare function getFeatureTypes(params?: QueryParams): Promise<IFeatureType[]>;
|
|
152
|
+
declare function getFeatureTypes(params?: QueryParams): Promise<IFeatureType[]>;
|
|
153
|
+
declare function getFeatureType(id: IEquatable, params?: QueryParams): Promise<IFeatureType | undefined>;
|
|
149
154
|
|
|
150
155
|
declare function getLabels(params?: QueryParams): Promise<ILabel[]>;
|
|
156
|
+
declare function getLabel(id: IEquatable, params?: QueryParams): Promise<ILabel | undefined>;
|
|
151
157
|
declare function resolveLabel(labels: ILabel[], id: string): string;
|
|
152
158
|
|
|
153
159
|
declare function getLayout(market: string, locale: string): Promise<ILayout>;
|
|
@@ -183,12 +189,15 @@ declare function getListByKeys(keys: string[], locale?: string): Promise<{
|
|
|
183
189
|
[key: string]: IList[];
|
|
184
190
|
}>;
|
|
185
191
|
|
|
186
|
-
declare function getLocales(params?: QueryParams): Promise<ILocale[]>;
|
|
192
|
+
declare function getLocales(params?: QueryParams): Promise<ILocale[]>;
|
|
193
|
+
declare function getLocale(id: IEquatable, params?: QueryParams): Promise<ILocale | undefined>;
|
|
194
|
+
declare function getLocaleFromProps(props: (RenderPageResult & HtmlProps) | undefined): string | undefined;
|
|
187
195
|
|
|
188
|
-
declare function getMarkets(params?: QueryParams): Promise<IMarket[]>;
|
|
196
|
+
declare function getMarkets(params?: QueryParams): Promise<IMarket[]>;
|
|
197
|
+
declare function getMarket(id: IEquatable, params?: QueryParams): Promise<IMarket | undefined>;
|
|
189
198
|
|
|
190
|
-
declare function
|
|
191
|
-
declare function
|
|
199
|
+
declare function getMenus(params?: QueryParams): Promise<IMenu[]>;
|
|
200
|
+
declare function getMenu(id: IEquatable, params?: QueryParams): Promise<IMenu | undefined>;
|
|
192
201
|
|
|
193
202
|
declare const IOrderStatus: {
|
|
194
203
|
Pending: string;
|
|
@@ -229,9 +238,11 @@ declare function getErrorPageLayout(): Promise<{
|
|
|
229
238
|
page: IPage;
|
|
230
239
|
}>;
|
|
231
240
|
|
|
232
|
-
declare function getProvinces(locale?: string): Promise<INamedEntity[]>;
|
|
241
|
+
declare function getProvinces(locale?: string): Promise<INamedEntity[]>;
|
|
242
|
+
declare function getProvince(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
|
|
233
243
|
|
|
234
|
-
declare function getRegions(locale?: string): Promise<INamedEntity[]>;
|
|
244
|
+
declare function getRegions(locale?: string): Promise<INamedEntity[]>;
|
|
245
|
+
declare function getRegion(id: IEquatable, params?: QueryParams): Promise<INamedEntity | undefined>;
|
|
235
246
|
|
|
236
247
|
declare function routeRevalidateHandler(): any;
|
|
237
248
|
|
|
@@ -258,6 +269,18 @@ type StaticPath = {
|
|
|
258
269
|
};
|
|
259
270
|
};
|
|
260
271
|
|
|
272
|
+
declare const getSiteMapIndexProps: GetServerSideProps;
|
|
273
|
+
declare const getSiteMapXMLProps: GetServerSideProps;
|
|
274
|
+
declare const getSiteMapXSLProps: GetServerSideProps;
|
|
275
|
+
|
|
276
|
+
type ISiteMap = {
|
|
277
|
+
id: string;
|
|
278
|
+
updatedAt?: Date;
|
|
279
|
+
};
|
|
280
|
+
declare function getSiteMapIndex(): Promise<string>;
|
|
281
|
+
declare function getSiteMapXML(marketId?: string, localeId?: string): Promise<string>;
|
|
282
|
+
declare function getSiteMapXSL(): Promise<string>;
|
|
283
|
+
|
|
261
284
|
type IModelStore = {
|
|
262
285
|
category: IQuerable<ICategory>;
|
|
263
286
|
feature_type: IQuerable<IFeatureType>;
|
|
@@ -266,6 +289,7 @@ type IModelStore = {
|
|
|
266
289
|
locale: IQuerable<ILocale>;
|
|
267
290
|
market: IQuerable<IMarket>;
|
|
268
291
|
menu: IQuerable<IMenu>;
|
|
292
|
+
redirect: IQuerable<IRedirect>;
|
|
269
293
|
route: IQuerable<IRoute>;
|
|
270
294
|
i18n_country: IQuerable<INamedEntity>;
|
|
271
295
|
i18n_province: IQuerable<INamedEntity>;
|
|
@@ -273,4 +297,4 @@ type IModelStore = {
|
|
|
273
297
|
[key: string]: IQuerable<IEntity>;
|
|
274
298
|
};
|
|
275
299
|
|
|
276
|
-
export { IAddress, IAddressOptions, ICartAddItem, ICartItem, ICheckout, ICheckoutDelivery, ICheckoutDiscount, ICheckoutInfo, ICheckoutItem, ICheckoutPartial, ICheckoutPayment, ICheckoutStore, ICompanyAddress, IFeatureType, IGenericLazyComponentProps, IKeyedList, ILazyComponent, ILazyComponentProps, ILazyModules, ILink, IList, IModelStore, IOrder, IOrderDetail, IOrderStatus, IOrderStatusValue, IUser, IUserAddress, IUserChangePassword, IUserForgot, IUserLogin, IUserRegister, StaticPath, categoryToRouteLink, findManyPages, findOnePage, getBreadcrumbFromSegments, getCategories, getCountries, getDeliveries, getErrorPageLayout, getFeatureTypes, getInfo, getItems, getLabels, getLayout, getListByKeys, getLists, getLocales, getMarkets, getMenu, getMenus, getOrder, getOrders, getPage, getPageCategory, getPageRoutes, getPayment, getPayments, getProvinces, getRegions, getRoute, getRouteLinkTree,
|
|
300
|
+
export { IAddress, IAddressOptions, ICartAddItem, ICartItem, ICheckout, ICheckoutDelivery, ICheckoutDiscount, ICheckoutInfo, ICheckoutItem, ICheckoutPartial, ICheckoutPayment, 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 };
|