oneentry 1.0.141 → 1.0.142
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/configure.js +107 -15
- package/package.json +81 -3
- package/dist/admins/adminsApi.d.ts +0 -50
- package/dist/admins/adminsApi.js +0 -65
- package/dist/admins/adminsInterfaces.d.ts +0 -99
- package/dist/admins/adminsInterfaces.js +0 -2
- package/dist/admins/adminsSchemas.d.ts +0 -30
- package/dist/admins/adminsSchemas.js +0 -27
- package/dist/attribute-sets/attributeSetsApi.d.ts +0 -63
- package/dist/attribute-sets/attributeSetsApi.js +0 -98
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +0 -187
- package/dist/attribute-sets/attributeSetsInterfaces.js +0 -2
- package/dist/attribute-sets/attributeSetsSchemas.d.ts +0 -90
- package/dist/attribute-sets/attributeSetsSchemas.js +0 -74
- package/dist/auth-provider/authProviderApi.d.ts +0 -249
- package/dist/auth-provider/authProviderApi.js +0 -351
- package/dist/auth-provider/authProviderSchemas.d.ts +0 -131
- package/dist/auth-provider/authProviderSchemas.js +0 -82
- package/dist/auth-provider/authProvidersInterfaces.d.ts +0 -425
- package/dist/auth-provider/authProvidersInterfaces.js +0 -2
- package/dist/base/asyncModules.d.ts +0 -80
- package/dist/base/asyncModules.js +0 -440
- package/dist/base/result.d.ts +0 -39
- package/dist/base/result.js +0 -154
- package/dist/base/stateModule.d.ts +0 -41
- package/dist/base/stateModule.js +0 -128
- package/dist/base/syncModules.d.ts +0 -149
- package/dist/base/syncModules.js +0 -549
- package/dist/base/utils.d.ts +0 -197
- package/dist/base/utils.js +0 -2
- package/dist/base/validation.d.ts +0 -118
- package/dist/base/validation.js +0 -132
- package/dist/blocks/blocksApi.d.ts +0 -76
- package/dist/blocks/blocksApi.js +0 -188
- package/dist/blocks/blocksInterfaces.d.ts +0 -173
- package/dist/blocks/blocksInterfaces.js +0 -2
- package/dist/blocks/blocksSchemas.d.ts +0 -187
- package/dist/blocks/blocksSchemas.js +0 -43
- package/dist/discounts/discountsApi.d.ts +0 -56
- package/dist/discounts/discountsApi.js +0 -82
- package/dist/discounts/discountsInterfaces.d.ts +0 -145
- package/dist/discounts/discountsInterfaces.js +0 -2
- package/dist/events/eventsApi.d.ts +0 -60
- package/dist/events/eventsApi.js +0 -97
- package/dist/events/eventsInterfaces.d.ts +0 -87
- package/dist/events/eventsInterfaces.js +0 -2
- package/dist/file-uploading/fileUploadingApi.d.ts +0 -88
- package/dist/file-uploading/fileUploadingApi.js +0 -132
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +0 -117
- package/dist/file-uploading/fileUploadingInterfaces.js +0 -2
- package/dist/file-uploading/fileUploadingSchemas.d.ts +0 -22
- package/dist/file-uploading/fileUploadingSchemas.js +0 -21
- package/dist/forms/formsApi.d.ts +0 -42
- package/dist/forms/formsApi.js +0 -57
- package/dist/forms/formsInterfaces.d.ts +0 -132
- package/dist/forms/formsInterfaces.js +0 -2
- package/dist/forms/formsSchemas.d.ts +0 -50
- package/dist/forms/formsSchemas.js +0 -31
- package/dist/forms-data/formsDataApi.d.ts +0 -106
- package/dist/forms-data/formsDataApi.js +0 -189
- package/dist/forms-data/formsDataInterfaces.d.ts +0 -525
- package/dist/forms-data/formsDataInterfaces.js +0 -2
- package/dist/forms-data/formsDataSchemas.d.ts +0 -115
- package/dist/forms-data/formsDataSchemas.js +0 -86
- package/dist/general-types/generalTypesApi.d.ts +0 -28
- package/dist/general-types/generalTypesApi.js +0 -38
- package/dist/general-types/generalTypesInterfaces.d.ts +0 -30
- package/dist/general-types/generalTypesInterfaces.js +0 -2
- package/dist/general-types/generalTypesSchemas.d.ts +0 -50
- package/dist/general-types/generalTypesSchemas.js +0 -35
- package/dist/index.d.ts +0 -100
- package/dist/index.js +0 -103
- package/dist/integration-collections/integrationCollectionsApi.d.ts +0 -173
- package/dist/integration-collections/integrationCollectionsApi.js +0 -220
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +0 -313
- package/dist/integration-collections/integrationCollectionsInterfaces.js +0 -2
- package/dist/integration-collections/integrationCollectionsSchemas.d.ts +0 -80
- package/dist/integration-collections/integrationCollectionsSchemas.js +0 -61
- package/dist/locales/localesApi.d.ts +0 -27
- package/dist/locales/localesApi.js +0 -37
- package/dist/locales/localesInterfaces.d.ts +0 -41
- package/dist/locales/localesInterfaces.js +0 -2
- package/dist/locales/localesSchemas.d.ts +0 -32
- package/dist/locales/localesSchemas.js +0 -26
- package/dist/menus/menusApi.d.ts +0 -29
- package/dist/menus/menusApi.js +0 -39
- package/dist/menus/menusInterfaces.d.ts +0 -88
- package/dist/menus/menusInterfaces.js +0 -4
- package/dist/menus/menusSchemas.d.ts +0 -16
- package/dist/menus/menusSchemas.js +0 -28
- package/dist/orders/ordersApi.d.ts +0 -149
- package/dist/orders/ordersApi.js +0 -203
- package/dist/orders/ordersInterfaces.d.ts +0 -527
- package/dist/orders/ordersInterfaces.js +0 -2
- package/dist/orders/ordersSchemas.d.ts +0 -120
- package/dist/orders/ordersSchemas.js +0 -101
- package/dist/pages/pagesApi.d.ts +0 -151
- package/dist/pages/pagesApi.js +0 -390
- package/dist/pages/pagesInterfaces.d.ts +0 -292
- package/dist/pages/pagesInterfaces.js +0 -2
- package/dist/pages/pagesSchemas.d.ts +0 -85
- package/dist/pages/pagesSchemas.js +0 -46
- package/dist/payments/paymentsApi.d.ts +0 -82
- package/dist/payments/paymentsApi.js +0 -121
- package/dist/payments/paymentsInterfaces.d.ts +0 -206
- package/dist/payments/paymentsInterfaces.js +0 -2
- package/dist/payments/paymentsSchemas.d.ts +0 -100
- package/dist/payments/paymentsSchemas.js +0 -65
- package/dist/product-statuses/productStatusesApi.d.ts +0 -47
- package/dist/product-statuses/productStatusesApi.js +0 -70
- package/dist/product-statuses/productStatusesInterfaces.d.ts +0 -66
- package/dist/product-statuses/productStatusesInterfaces.js +0 -2
- package/dist/product-statuses/productStatusesSchemas.d.ts +0 -34
- package/dist/product-statuses/productStatusesSchemas.js +0 -30
- package/dist/products/productsApi.d.ts +0 -365
- package/dist/products/productsApi.js +0 -459
- package/dist/products/productsInterfaces.d.ts +0 -586
- package/dist/products/productsInterfaces.js +0 -2
- package/dist/products/productsSchemas.d.ts +0 -192
- package/dist/products/productsSchemas.js +0 -96
- package/dist/sitemap/sitemapApi.d.ts +0 -35
- package/dist/sitemap/sitemapApi.js +0 -45
- package/dist/sitemap/sitemapInterfaces.d.ts +0 -40
- package/dist/sitemap/sitemapInterfaces.js +0 -2
- package/dist/system/systemApi.d.ts +0 -43
- package/dist/system/systemApi.js +0 -58
- package/dist/system/systemInterfaces.d.ts +0 -31
- package/dist/system/systemInterfaces.js +0 -5
- package/dist/templates/templatesApi.d.ts +0 -49
- package/dist/templates/templatesApi.js +0 -75
- package/dist/templates/templatesInterfaces.d.ts +0 -70
- package/dist/templates/templatesInterfaces.js +0 -2
- package/dist/templates/templatesSchemas.d.ts +0 -48
- package/dist/templates/templatesSchemas.js +0 -31
- package/dist/templates-preview/templatesPreviewApi.d.ts +0 -38
- package/dist/templates-preview/templatesPreviewApi.js +0 -53
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +0 -121
- package/dist/templates-preview/templatesPreviewInterfaces.js +0 -2
- package/dist/templates-preview/templatesPreviewSchemas.d.ts +0 -83
- package/dist/templates-preview/templatesPreviewSchemas.js +0 -48
- package/dist/users/usersApi.d.ts +0 -143
- package/dist/users/usersApi.js +0 -173
- package/dist/users/usersInterfaces.d.ts +0 -235
- package/dist/users/usersInterfaces.js +0 -2
- package/dist/users/usersSchemas.d.ts +0 -38
- package/dist/users/usersSchemas.js +0 -28
- package/dist/web-socket/wsApi.d.ts +0 -25
- package/dist/web-socket/wsApi.js +0 -45
- package/dist/web-socket/wsInterfaces.d.ts +0 -17
- package/dist/web-socket/wsInterfaces.js +0 -2
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validation schemas for Products module
|
|
3
|
-
* @description Zod schemas for validating products-related API responses
|
|
4
|
-
*/
|
|
5
|
-
import { z } from 'zod';
|
|
6
|
-
/**
|
|
7
|
-
* Product price schema
|
|
8
|
-
*/
|
|
9
|
-
export declare const ProductPriceSchema: z.ZodObject<{
|
|
10
|
-
value: z.ZodNumber;
|
|
11
|
-
currency: z.ZodString;
|
|
12
|
-
compareValue: z.ZodOptional<z.ZodNumber>;
|
|
13
|
-
}, z.core.$strip>;
|
|
14
|
-
/**
|
|
15
|
-
* Product image schema
|
|
16
|
-
*/
|
|
17
|
-
export declare const ProductImageSchema: z.ZodObject<{
|
|
18
|
-
id: z.ZodNumber;
|
|
19
|
-
filename: z.ZodString;
|
|
20
|
-
url: z.ZodString;
|
|
21
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
22
|
-
type: z.ZodOptional<z.ZodString>;
|
|
23
|
-
}, z.core.$strip>;
|
|
24
|
-
/**
|
|
25
|
-
* Product entity schema
|
|
26
|
-
* Includes all fields returned by the API
|
|
27
|
-
*/
|
|
28
|
-
export declare const ProductEntitySchema: z.ZodObject<{
|
|
29
|
-
id: z.ZodNumber;
|
|
30
|
-
identifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
31
|
-
attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
32
|
-
localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
33
|
-
statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
34
|
-
isVisible: z.ZodOptional<z.ZodBoolean>;
|
|
35
|
-
statusIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
36
|
-
position: z.ZodOptional<z.ZodNumber>;
|
|
37
|
-
isPositionLocked: z.ZodOptional<z.ZodBoolean>;
|
|
38
|
-
templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
39
|
-
shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
40
|
-
price: z.ZodNullable<z.ZodNumber>;
|
|
41
|
-
additional: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
42
|
-
sku: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
43
|
-
isSync: z.ZodOptional<z.ZodBoolean>;
|
|
44
|
-
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
45
|
-
attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
46
|
-
productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
47
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
48
|
-
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
49
|
-
currency: z.ZodOptional<z.ZodString>;
|
|
50
|
-
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
51
|
-
id: z.ZodNumber;
|
|
52
|
-
filename: z.ZodString;
|
|
53
|
-
url: z.ZodString;
|
|
54
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
55
|
-
type: z.ZodOptional<z.ZodString>;
|
|
56
|
-
}, z.core.$strip>>>;
|
|
57
|
-
relatedProducts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
58
|
-
pageId: z.ZodOptional<z.ZodNumber>;
|
|
59
|
-
}, z.core.$strip>;
|
|
60
|
-
/**
|
|
61
|
-
* Products response schema
|
|
62
|
-
*/
|
|
63
|
-
export declare const ProductsResponseSchema: z.ZodObject<{
|
|
64
|
-
items: z.ZodArray<z.ZodObject<{
|
|
65
|
-
id: z.ZodNumber;
|
|
66
|
-
identifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
67
|
-
attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
68
|
-
localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
69
|
-
statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
70
|
-
isVisible: z.ZodOptional<z.ZodBoolean>;
|
|
71
|
-
statusIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
72
|
-
position: z.ZodOptional<z.ZodNumber>;
|
|
73
|
-
isPositionLocked: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
-
templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
75
|
-
shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
76
|
-
price: z.ZodNullable<z.ZodNumber>;
|
|
77
|
-
additional: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
78
|
-
sku: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
79
|
-
isSync: z.ZodOptional<z.ZodBoolean>;
|
|
80
|
-
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
81
|
-
attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
82
|
-
productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
83
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
84
|
-
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
85
|
-
currency: z.ZodOptional<z.ZodString>;
|
|
86
|
-
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
87
|
-
id: z.ZodNumber;
|
|
88
|
-
filename: z.ZodString;
|
|
89
|
-
url: z.ZodString;
|
|
90
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
91
|
-
type: z.ZodOptional<z.ZodString>;
|
|
92
|
-
}, z.core.$strip>>>;
|
|
93
|
-
relatedProducts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
94
|
-
pageId: z.ZodOptional<z.ZodNumber>;
|
|
95
|
-
}, z.core.$strip>>;
|
|
96
|
-
total: z.ZodNumber;
|
|
97
|
-
}, z.core.$strip>;
|
|
98
|
-
/**
|
|
99
|
-
* Single product response schema
|
|
100
|
-
*/
|
|
101
|
-
export declare const SingleProductSchema: z.ZodObject<{
|
|
102
|
-
id: z.ZodNumber;
|
|
103
|
-
identifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
104
|
-
attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
105
|
-
localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
106
|
-
statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
107
|
-
isVisible: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
-
statusIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
109
|
-
position: z.ZodOptional<z.ZodNumber>;
|
|
110
|
-
isPositionLocked: z.ZodOptional<z.ZodBoolean>;
|
|
111
|
-
templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
112
|
-
shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
113
|
-
price: z.ZodNullable<z.ZodNumber>;
|
|
114
|
-
additional: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
115
|
-
sku: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
116
|
-
isSync: z.ZodOptional<z.ZodBoolean>;
|
|
117
|
-
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
118
|
-
attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
119
|
-
productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
120
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
121
|
-
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
122
|
-
currency: z.ZodOptional<z.ZodString>;
|
|
123
|
-
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
124
|
-
id: z.ZodNumber;
|
|
125
|
-
filename: z.ZodString;
|
|
126
|
-
url: z.ZodString;
|
|
127
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
128
|
-
type: z.ZodOptional<z.ZodString>;
|
|
129
|
-
}, z.core.$strip>>>;
|
|
130
|
-
relatedProducts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
131
|
-
pageId: z.ZodOptional<z.ZodNumber>;
|
|
132
|
-
}, z.core.$strip>;
|
|
133
|
-
/**
|
|
134
|
-
* Products count schema
|
|
135
|
-
*/
|
|
136
|
-
export declare const ProductsCountSchema: z.ZodObject<{
|
|
137
|
-
totalAll: z.ZodNumber;
|
|
138
|
-
totalInCategory: z.ZodNumber;
|
|
139
|
-
totalInCategoryWithNested: z.ZodNumber;
|
|
140
|
-
}, z.core.$strip>;
|
|
141
|
-
/**
|
|
142
|
-
* Product block schema
|
|
143
|
-
*/
|
|
144
|
-
export declare const ProductBlockSchema: z.ZodObject<{
|
|
145
|
-
id: z.ZodNumber;
|
|
146
|
-
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
147
|
-
localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
148
|
-
version: z.ZodNumber;
|
|
149
|
-
position: z.ZodNumber;
|
|
150
|
-
identifier: z.ZodString;
|
|
151
|
-
type: z.ZodString;
|
|
152
|
-
customSettings: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
153
|
-
templateIdentifier: z.ZodNullable<z.ZodString>;
|
|
154
|
-
isVisible: z.ZodBoolean;
|
|
155
|
-
isSync: z.ZodBoolean;
|
|
156
|
-
attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
157
|
-
}, z.core.$strip>;
|
|
158
|
-
/**
|
|
159
|
-
* Related products schema
|
|
160
|
-
*/
|
|
161
|
-
export declare const RelatedProductsSchema: z.ZodArray<z.ZodObject<{
|
|
162
|
-
id: z.ZodNumber;
|
|
163
|
-
identifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
164
|
-
attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
165
|
-
localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
166
|
-
statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
167
|
-
isVisible: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
-
statusIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
169
|
-
position: z.ZodOptional<z.ZodNumber>;
|
|
170
|
-
isPositionLocked: z.ZodOptional<z.ZodBoolean>;
|
|
171
|
-
templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
172
|
-
shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
173
|
-
price: z.ZodNullable<z.ZodNumber>;
|
|
174
|
-
additional: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
175
|
-
sku: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
176
|
-
isSync: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
-
categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
178
|
-
attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
179
|
-
productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
180
|
-
blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
181
|
-
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
182
|
-
currency: z.ZodOptional<z.ZodString>;
|
|
183
|
-
images: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
184
|
-
id: z.ZodNumber;
|
|
185
|
-
filename: z.ZodString;
|
|
186
|
-
url: z.ZodString;
|
|
187
|
-
size: z.ZodOptional<z.ZodNumber>;
|
|
188
|
-
type: z.ZodOptional<z.ZodString>;
|
|
189
|
-
}, z.core.$strip>>>;
|
|
190
|
-
relatedProducts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
|
|
191
|
-
pageId: z.ZodOptional<z.ZodNumber>;
|
|
192
|
-
}, z.core.$strip>>;
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RelatedProductsSchema = exports.ProductBlockSchema = exports.ProductsCountSchema = exports.SingleProductSchema = exports.ProductsResponseSchema = exports.ProductEntitySchema = exports.ProductImageSchema = exports.ProductPriceSchema = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Validation schemas for Products module
|
|
6
|
-
* @description Zod schemas for validating products-related API responses
|
|
7
|
-
*/
|
|
8
|
-
const zod_1 = require("zod");
|
|
9
|
-
/**
|
|
10
|
-
* Product price schema
|
|
11
|
-
*/
|
|
12
|
-
exports.ProductPriceSchema = zod_1.z.object({
|
|
13
|
-
value: zod_1.z.number(),
|
|
14
|
-
currency: zod_1.z.string(),
|
|
15
|
-
compareValue: zod_1.z.number().optional(),
|
|
16
|
-
});
|
|
17
|
-
/**
|
|
18
|
-
* Product image schema
|
|
19
|
-
*/
|
|
20
|
-
exports.ProductImageSchema = zod_1.z.object({
|
|
21
|
-
id: zod_1.z.number(),
|
|
22
|
-
filename: zod_1.z.string(),
|
|
23
|
-
url: zod_1.z.string(),
|
|
24
|
-
size: zod_1.z.number().optional(),
|
|
25
|
-
type: zod_1.z.string().optional(),
|
|
26
|
-
});
|
|
27
|
-
/**
|
|
28
|
-
* Product entity schema
|
|
29
|
-
* Includes all fields returned by the API
|
|
30
|
-
*/
|
|
31
|
-
exports.ProductEntitySchema = zod_1.z.object({
|
|
32
|
-
id: zod_1.z.number(),
|
|
33
|
-
identifier: zod_1.z.string().optional().nullable(),
|
|
34
|
-
attributeSetIdentifier: zod_1.z.string().optional().nullable(),
|
|
35
|
-
localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
36
|
-
statusLocalizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
37
|
-
isVisible: zod_1.z.boolean().optional(),
|
|
38
|
-
statusIdentifier: zod_1.z.string().optional().nullable(),
|
|
39
|
-
position: zod_1.z.number().optional(),
|
|
40
|
-
isPositionLocked: zod_1.z.boolean().optional(),
|
|
41
|
-
templateIdentifier: zod_1.z.string().optional().nullable(),
|
|
42
|
-
shortDescTemplateIdentifier: zod_1.z.string().optional().nullable(),
|
|
43
|
-
price: zod_1.z.number().nullable(),
|
|
44
|
-
additional: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
45
|
-
sku: zod_1.z.string().optional().nullable(),
|
|
46
|
-
isSync: zod_1.z.boolean().optional(),
|
|
47
|
-
categories: zod_1.z.array(zod_1.z.string()).optional(),
|
|
48
|
-
attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
49
|
-
productPages: zod_1.z.array(zod_1.z.any()).optional(),
|
|
50
|
-
blocks: zod_1.z.array(zod_1.z.string()).optional(),
|
|
51
|
-
moduleFormConfigs: zod_1.z.array(zod_1.z.any()).optional(),
|
|
52
|
-
currency: zod_1.z.string().optional(),
|
|
53
|
-
images: zod_1.z.array(exports.ProductImageSchema).optional(),
|
|
54
|
-
relatedProducts: zod_1.z.array(zod_1.z.number()).optional(),
|
|
55
|
-
pageId: zod_1.z.number().optional(),
|
|
56
|
-
});
|
|
57
|
-
/**
|
|
58
|
-
* Products response schema
|
|
59
|
-
*/
|
|
60
|
-
exports.ProductsResponseSchema = zod_1.z.object({
|
|
61
|
-
items: zod_1.z.array(exports.ProductEntitySchema),
|
|
62
|
-
total: zod_1.z.number(),
|
|
63
|
-
});
|
|
64
|
-
/**
|
|
65
|
-
* Single product response schema
|
|
66
|
-
*/
|
|
67
|
-
exports.SingleProductSchema = exports.ProductEntitySchema;
|
|
68
|
-
/**
|
|
69
|
-
* Products count schema
|
|
70
|
-
*/
|
|
71
|
-
exports.ProductsCountSchema = zod_1.z.object({
|
|
72
|
-
totalAll: zod_1.z.number(),
|
|
73
|
-
totalInCategory: zod_1.z.number(),
|
|
74
|
-
totalInCategoryWithNested: zod_1.z.number(),
|
|
75
|
-
});
|
|
76
|
-
/**
|
|
77
|
-
* Product block schema
|
|
78
|
-
*/
|
|
79
|
-
exports.ProductBlockSchema = zod_1.z.object({
|
|
80
|
-
id: zod_1.z.number(),
|
|
81
|
-
attributeSetIdentifier: zod_1.z.string().nullable(),
|
|
82
|
-
localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
83
|
-
version: zod_1.z.number(),
|
|
84
|
-
position: zod_1.z.number(),
|
|
85
|
-
identifier: zod_1.z.string(),
|
|
86
|
-
type: zod_1.z.string(),
|
|
87
|
-
customSettings: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
88
|
-
templateIdentifier: zod_1.z.string().nullable(),
|
|
89
|
-
isVisible: zod_1.z.boolean(),
|
|
90
|
-
isSync: zod_1.z.boolean(),
|
|
91
|
-
attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
92
|
-
});
|
|
93
|
-
/**
|
|
94
|
-
* Related products schema
|
|
95
|
-
*/
|
|
96
|
-
exports.RelatedProductsSchema = zod_1.z.array(exports.ProductEntitySchema);
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import AsyncModules from '../base/asyncModules';
|
|
2
|
-
import type StateModule from '../base/stateModule';
|
|
3
|
-
import type { IError } from '../base/utils';
|
|
4
|
-
import type { ISitemapApi, ISitemapEntity, ISitemapQuery } from './sitemapInterfaces';
|
|
5
|
-
/**
|
|
6
|
-
* Controllers for working with sitemaps.
|
|
7
|
-
* @handle /api/content/sitemap
|
|
8
|
-
* @class SitemapApi
|
|
9
|
-
* @augments AsyncModules
|
|
10
|
-
* @implements {ISitemapApi}
|
|
11
|
-
*/
|
|
12
|
-
export default class SitemapApi extends AsyncModules implements ISitemapApi {
|
|
13
|
-
protected state: StateModule;
|
|
14
|
-
protected _url: string;
|
|
15
|
-
/**
|
|
16
|
-
* Constructor for SitemapApi class.
|
|
17
|
-
* @param {StateModule} state - The state module.
|
|
18
|
-
*/
|
|
19
|
-
constructor(state: StateModule);
|
|
20
|
-
/**
|
|
21
|
-
* Retrieves the set of sitemaps.
|
|
22
|
-
* @handleName getSitemap
|
|
23
|
-
* @returns {Promise<string[] | IError>} Returns an array of sitemap URLs.
|
|
24
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
25
|
-
*/
|
|
26
|
-
getSitemap(): Promise<ISitemapEntity[] | IError>;
|
|
27
|
-
/**
|
|
28
|
-
* Generates a new set of sitemaps.
|
|
29
|
-
* @handleName updateSitemap
|
|
30
|
-
* @param {ISitemapQuery} body - Sitemap body params.
|
|
31
|
-
* @returns {Promise<string[] | IError>} Returns an array of sitemap URLs.
|
|
32
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
33
|
-
*/
|
|
34
|
-
updateSitemap(body: ISitemapQuery): Promise<ISitemapEntity[] | IError>;
|
|
35
|
-
}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const asyncModules_1 = __importDefault(require("../base/asyncModules"));
|
|
7
|
-
/**
|
|
8
|
-
* Controllers for working with sitemaps.
|
|
9
|
-
* @handle /api/content/sitemap
|
|
10
|
-
* @class SitemapApi
|
|
11
|
-
* @augments AsyncModules
|
|
12
|
-
* @implements {ISitemapApi}
|
|
13
|
-
*/
|
|
14
|
-
class SitemapApi extends asyncModules_1.default {
|
|
15
|
-
/**
|
|
16
|
-
* Constructor for SitemapApi class.
|
|
17
|
-
* @param {StateModule} state - The state module.
|
|
18
|
-
*/
|
|
19
|
-
constructor(state) {
|
|
20
|
-
super(state);
|
|
21
|
-
this._url = state.url + '/api/content/sitemap';
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Retrieves the set of sitemaps.
|
|
25
|
-
* @handleName getSitemap
|
|
26
|
-
* @returns {Promise<string[] | IError>} Returns an array of sitemap URLs.
|
|
27
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
28
|
-
*/
|
|
29
|
-
async getSitemap() {
|
|
30
|
-
const data = await this._fetchGet(`/`);
|
|
31
|
-
return this._normalizeData(data);
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Generates a new set of sitemaps.
|
|
35
|
-
* @handleName updateSitemap
|
|
36
|
-
* @param {ISitemapQuery} body - Sitemap body params.
|
|
37
|
-
* @returns {Promise<string[] | IError>} Returns an array of sitemap URLs.
|
|
38
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
39
|
-
*/
|
|
40
|
-
async updateSitemap(body) {
|
|
41
|
-
const data = await this._fetchPost(`/`, body);
|
|
42
|
-
return this._normalizeData(data);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
exports.default = SitemapApi;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { IError } from '../base/utils';
|
|
2
|
-
/**
|
|
3
|
-
* Query parameters for sitemap requests.
|
|
4
|
-
* @interface ISitemapQuery
|
|
5
|
-
*/
|
|
6
|
-
interface ISitemapQuery {
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
}
|
|
9
|
-
/**
|
|
10
|
-
* Entity interface for sitemap.
|
|
11
|
-
* @property {string} url - URL of the sitemap.
|
|
12
|
-
* @property {string} lastmod - Last modification date of the sitemap.
|
|
13
|
-
* @property {string} changefreq - Frequency of changes for the sitemap.
|
|
14
|
-
* @property {string} priority - Priority of the sitemap.
|
|
15
|
-
* @interface ISitemapEntity
|
|
16
|
-
*/
|
|
17
|
-
interface ISitemapEntity {
|
|
18
|
-
url: string;
|
|
19
|
-
lastmod: string;
|
|
20
|
-
changefreq: string;
|
|
21
|
-
priority: string;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Interface for the Sitemap API module.
|
|
25
|
-
* @interface ISitemapApi
|
|
26
|
-
*/
|
|
27
|
-
interface ISitemapApi {
|
|
28
|
-
/**
|
|
29
|
-
* Retrieves the set of sitemaps.
|
|
30
|
-
* @returns {Promise<ISitemapEntity[] | IError>}
|
|
31
|
-
*/
|
|
32
|
-
getSitemap(): Promise<ISitemapEntity[] | IError>;
|
|
33
|
-
/**
|
|
34
|
-
* Generates a new set of sitemaps.
|
|
35
|
-
* @param {ISitemapQuery} body - Sitemap body params.
|
|
36
|
-
* @returns {Promise<ISitemapEntity[] | IError>}
|
|
37
|
-
*/
|
|
38
|
-
updateSitemap(body: ISitemapQuery): Promise<ISitemapEntity[] | IError>;
|
|
39
|
-
}
|
|
40
|
-
export type { ISitemapApi, ISitemapEntity, ISitemapQuery };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import AsyncModules from '../base/asyncModules';
|
|
2
|
-
import type StateModule from '../base/stateModule';
|
|
3
|
-
import type { IError } from '../base/utils';
|
|
4
|
-
import type { ISystemApi } from './systemInterfaces';
|
|
5
|
-
/**
|
|
6
|
-
* Controllers for working with system - system
|
|
7
|
-
* @handle /api/content/system
|
|
8
|
-
* @description Controllers for working with system - system
|
|
9
|
-
*/
|
|
10
|
-
export default class SystemApi extends AsyncModules implements ISystemApi {
|
|
11
|
-
protected state: StateModule;
|
|
12
|
-
protected _url: string;
|
|
13
|
-
/**
|
|
14
|
-
* Constructor
|
|
15
|
-
* @param {StateModule} state - The state module.
|
|
16
|
-
* @description Constructor initializes the SystemApi with a given state.
|
|
17
|
-
*/
|
|
18
|
-
constructor(state: StateModule);
|
|
19
|
-
/**
|
|
20
|
-
* Sends a GET request to the '/test404' endpoint and returns the result.
|
|
21
|
-
* @handleName test404
|
|
22
|
-
* @returns {Promise<any | IError>} The response from the server after fetching data from the '/test404' endpoint.
|
|
23
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
24
|
-
* @description This method is used to test the 404 error handling by sending a GET request to a specific endpoint.
|
|
25
|
-
*/
|
|
26
|
-
test404(): Promise<any | IError>;
|
|
27
|
-
/**
|
|
28
|
-
* Sends a GET request to the '/test500' endpoint and returns the result.
|
|
29
|
-
* @handleName test500
|
|
30
|
-
* @returns {Promise<any | IError>} The response from the server after fetching data from the '/test500' endpoint.
|
|
31
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
32
|
-
* @description This method is used to test the 500 error handling by sending a GET request to a specific endpoint.
|
|
33
|
-
*/
|
|
34
|
-
test500(): Promise<any | IError>;
|
|
35
|
-
/**
|
|
36
|
-
* Getting the number of requests to API.
|
|
37
|
-
* @handleName getApiStat
|
|
38
|
-
* @returns {Promise<any | IError>} Return object with date and count.
|
|
39
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
40
|
-
* @description Getting the number of requests to API.
|
|
41
|
-
*/
|
|
42
|
-
getApiStat(): Promise<any>;
|
|
43
|
-
}
|
package/dist/system/systemApi.js
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
/* eslint-disable jsdoc/reject-any-type */
|
|
7
|
-
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
8
|
-
const asyncModules_1 = __importDefault(require("../base/asyncModules"));
|
|
9
|
-
/**
|
|
10
|
-
* Controllers for working with system - system
|
|
11
|
-
* @handle /api/content/system
|
|
12
|
-
* @description Controllers for working with system - system
|
|
13
|
-
*/
|
|
14
|
-
class SystemApi extends asyncModules_1.default {
|
|
15
|
-
/**
|
|
16
|
-
* Constructor
|
|
17
|
-
* @param {StateModule} state - The state module.
|
|
18
|
-
* @description Constructor initializes the SystemApi with a given state.
|
|
19
|
-
*/
|
|
20
|
-
constructor(state) {
|
|
21
|
-
super(state);
|
|
22
|
-
this._url = state.url + '/api/content/system';
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* Sends a GET request to the '/test404' endpoint and returns the result.
|
|
26
|
-
* @handleName test404
|
|
27
|
-
* @returns {Promise<any | IError>} The response from the server after fetching data from the '/test404' endpoint.
|
|
28
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
29
|
-
* @description This method is used to test the 404 error handling by sending a GET request to a specific endpoint.
|
|
30
|
-
*/
|
|
31
|
-
async test404() {
|
|
32
|
-
const result = await this._fetchGet('/test404');
|
|
33
|
-
return result;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* Sends a GET request to the '/test500' endpoint and returns the result.
|
|
37
|
-
* @handleName test500
|
|
38
|
-
* @returns {Promise<any | IError>} The response from the server after fetching data from the '/test500' endpoint.
|
|
39
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
40
|
-
* @description This method is used to test the 500 error handling by sending a GET request to a specific endpoint.
|
|
41
|
-
*/
|
|
42
|
-
async test500() {
|
|
43
|
-
const result = await this._fetchGet('/test500');
|
|
44
|
-
return result;
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Getting the number of requests to API.
|
|
48
|
-
* @handleName getApiStat
|
|
49
|
-
* @returns {Promise<any | IError>} Return object with date and count.
|
|
50
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
51
|
-
* @description Getting the number of requests to API.
|
|
52
|
-
*/
|
|
53
|
-
async getApiStat() {
|
|
54
|
-
const result = await this._fetchGet('/api-stat');
|
|
55
|
-
return result;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
exports.default = SystemApi;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { IError } from 'base/utils';
|
|
2
|
-
/**
|
|
3
|
-
* @interface ISystemApi
|
|
4
|
-
* @property {Function} test404 - Test 404 error.
|
|
5
|
-
* @property {Function} test500 - Test 500 error.
|
|
6
|
-
* @description Represents a interface object of System Api.
|
|
7
|
-
*/
|
|
8
|
-
interface ISystemApi {
|
|
9
|
-
/**
|
|
10
|
-
* Test 404 error.
|
|
11
|
-
* @handleName test404
|
|
12
|
-
* @returns {any} Returns a Promise that resolves with any data.
|
|
13
|
-
* @description This method tests 404 error.
|
|
14
|
-
*/
|
|
15
|
-
test404(): Promise<any | IError>;
|
|
16
|
-
/**
|
|
17
|
-
* Test 500 error.
|
|
18
|
-
* @handleName test500
|
|
19
|
-
* @returns {any} Returns a Promise that resolves with any data.
|
|
20
|
-
* @description This method tests 500 error.
|
|
21
|
-
*/
|
|
22
|
-
test500(): Promise<any | IError>;
|
|
23
|
-
/**
|
|
24
|
-
* getApiStat
|
|
25
|
-
* @handleName getApiStat
|
|
26
|
-
* @returns {any} Returns a Promise that resolves with any data.
|
|
27
|
-
* @description This method getApiStat.
|
|
28
|
-
*/
|
|
29
|
-
getApiStat(): Promise<any>;
|
|
30
|
-
}
|
|
31
|
-
export type { ISystemApi };
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import AsyncModules from '../base/asyncModules';
|
|
2
|
-
import type StateModule from '../base/stateModule';
|
|
3
|
-
import type { IError, Types } from '../base/utils';
|
|
4
|
-
import type { ITemplateEntity, ITemplatesApi } from './templatesInterfaces';
|
|
5
|
-
/**
|
|
6
|
-
* Controllers for working with template objects
|
|
7
|
-
* @module TemplateController
|
|
8
|
-
* @handle /api/content/templates
|
|
9
|
-
* @description This module provides a set of controllers for handling operations related to template objects.
|
|
10
|
-
*/
|
|
11
|
-
export default class TemplatesPreviewApi extends AsyncModules implements ITemplatesApi {
|
|
12
|
-
protected state: StateModule;
|
|
13
|
-
protected _url: string;
|
|
14
|
-
/**
|
|
15
|
-
* Constructor for TemplatesApi class.
|
|
16
|
-
* @param {StateModule} state - The state module instance.
|
|
17
|
-
* @description Initializes the TemplatesApi class with the provided state module instance.
|
|
18
|
-
*/
|
|
19
|
-
constructor(state: StateModule);
|
|
20
|
-
/**
|
|
21
|
-
* Get all template objects grouped by types.
|
|
22
|
-
* @handleName getAllTemplates
|
|
23
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
24
|
-
* @returns {Promise<Record<Types, ITemplateEntity[]> | IError>} Returns an object GroupedTemplatesObject, which contains an array of template objects TemplateEntity
|
|
25
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
26
|
-
* @description This function is designed to fetch organized template objects in groups based on their types.
|
|
27
|
-
*/
|
|
28
|
-
getAllTemplates(langCode?: string): Promise<Record<Types, ITemplateEntity[]> | IError>;
|
|
29
|
-
/**
|
|
30
|
-
* Get template objects by type.
|
|
31
|
-
* @handleName getTemplateByType
|
|
32
|
-
* @param {Types} type - The type of templates to retrieve. This parameter specifies the category or classification of templates being requested. Example: "product".
|
|
33
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
34
|
-
* @returns {Promise<ITemplateEntity[] | IError>} Returns a TemplateEntity object.
|
|
35
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
36
|
-
* @description Fetch template objects that belong to a specific type, with an optional filter by language.
|
|
37
|
-
*/
|
|
38
|
-
getTemplateByType(type: Types, langCode?: string): Promise<ITemplateEntity[] | IError>;
|
|
39
|
-
/**
|
|
40
|
-
* Get one template object by marker.
|
|
41
|
-
* @handleName getTemplateByMarker
|
|
42
|
-
* @param {string} marker - The unique marker of the template to retrieve. Example: "template_12345".
|
|
43
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
44
|
-
* @returns {Promise<ITemplateEntity | IError>} Returns a TemplateEntity object
|
|
45
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
46
|
-
* @description Fetch a specific template object based on its unique marker.
|
|
47
|
-
*/
|
|
48
|
-
getTemplateByMarker(marker: string, langCode?: string): Promise<ITemplateEntity | IError>;
|
|
49
|
-
}
|