oneentry 1.0.138 → 1.0.140
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/README.md +16 -1
- package/configure.js +40 -21
- package/package.json +15 -12
- 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 -137
- package/dist/auth-provider/authProviderSchemas.js +0 -85
- package/dist/auth-provider/authProvidersInterfaces.d.ts +0 -417
- 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 -148
- package/dist/base/syncModules.js +0 -530
- 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 -74
- package/dist/blocks/blocksApi.js +0 -184
- 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/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 -65
- package/dist/forms/formsSchemas.js +0 -36
- 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 -94
- package/dist/index.js +0 -97
- 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 -84
- package/dist/integration-collections/integrationCollectionsSchemas.js +0 -63
- 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 -126
- package/dist/orders/ordersApi.js +0 -169
- package/dist/orders/ordersInterfaces.d.ts +0 -427
- package/dist/orders/ordersInterfaces.js +0 -2
- package/dist/orders/ordersSchemas.d.ts +0 -158
- package/dist/orders/ordersSchemas.js +0 -120
- 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 -137
- package/dist/payments/paymentsSchemas.js +0 -78
- 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 -464
- package/dist/products/productsInterfaces.d.ts +0 -583
- package/dist/products/productsInterfaces.js +0 -2
- package/dist/products/productsSchemas.d.ts +0 -212
- package/dist/products/productsSchemas.js +0 -85
- package/dist/system/systemApi.d.ts +0 -65
- package/dist/system/systemApi.js +0 -82
- package/dist/system/systemInterfaces.d.ts +0 -23
- package/dist/system/systemInterfaces.js +0 -2
- 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 -174
- 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,158 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Validation schemas for Orders module
|
|
3
|
-
* @description Zod schemas for validating orders-related API responses
|
|
4
|
-
*/
|
|
5
|
-
import { z } from 'zod';
|
|
6
|
-
/**
|
|
7
|
-
* Order item schema
|
|
8
|
-
* @description Order item schema for validating orders-related API responses
|
|
9
|
-
*/
|
|
10
|
-
export declare const OrderItemSchema: z.ZodObject<{
|
|
11
|
-
id: z.ZodNumber;
|
|
12
|
-
productId: z.ZodNumber;
|
|
13
|
-
quantity: z.ZodNumber;
|
|
14
|
-
price: z.ZodNumber;
|
|
15
|
-
total: z.ZodNumber;
|
|
16
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
17
|
-
}, z.core.$strip>;
|
|
18
|
-
/**
|
|
19
|
-
* Order entity schema
|
|
20
|
-
* @description Order entity schema for validating orders-related API responses
|
|
21
|
-
*/
|
|
22
|
-
export declare const OrderEntitySchema: z.ZodObject<{
|
|
23
|
-
id: z.ZodNumber;
|
|
24
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
25
|
-
statusMarker: z.ZodOptional<z.ZodString>;
|
|
26
|
-
statusIdentifier: z.ZodOptional<z.ZodString>;
|
|
27
|
-
userId: z.ZodOptional<z.ZodNumber>;
|
|
28
|
-
userIdentifier: z.ZodOptional<z.ZodString>;
|
|
29
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
30
|
-
totalSum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
31
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32
|
-
id: z.ZodNumber;
|
|
33
|
-
productId: z.ZodNumber;
|
|
34
|
-
quantity: z.ZodNumber;
|
|
35
|
-
price: z.ZodNumber;
|
|
36
|
-
total: z.ZodNumber;
|
|
37
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
38
|
-
}, z.core.$strip>>>;
|
|
39
|
-
products: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
40
|
-
formData: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
41
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
42
|
-
createdDate: z.ZodOptional<z.ZodString>;
|
|
43
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
44
|
-
storageId: z.ZodOptional<z.ZodNumber>;
|
|
45
|
-
formIdentifier: z.ZodOptional<z.ZodString>;
|
|
46
|
-
attributeSetIdentifier: z.ZodOptional<z.ZodString>;
|
|
47
|
-
currency: z.ZodOptional<z.ZodString>;
|
|
48
|
-
paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
|
|
49
|
-
paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
50
|
-
paymentUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
51
|
-
isCompleted: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
52
|
-
}, z.core.$strip>;
|
|
53
|
-
/**
|
|
54
|
-
* Orders list response schema
|
|
55
|
-
* @returns Orders list response schema
|
|
56
|
-
*/
|
|
57
|
-
export declare const OrdersResponseSchema: z.ZodObject<{
|
|
58
|
-
items: z.ZodArray<z.ZodObject<{
|
|
59
|
-
id: z.ZodNumber;
|
|
60
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
61
|
-
statusMarker: z.ZodOptional<z.ZodString>;
|
|
62
|
-
statusIdentifier: z.ZodOptional<z.ZodString>;
|
|
63
|
-
userId: z.ZodOptional<z.ZodNumber>;
|
|
64
|
-
userIdentifier: z.ZodOptional<z.ZodString>;
|
|
65
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
66
|
-
totalSum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
67
|
-
items: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
68
|
-
id: z.ZodNumber;
|
|
69
|
-
productId: z.ZodNumber;
|
|
70
|
-
quantity: z.ZodNumber;
|
|
71
|
-
price: z.ZodNumber;
|
|
72
|
-
total: z.ZodNumber;
|
|
73
|
-
attributes: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
74
|
-
}, z.core.$strip>>>;
|
|
75
|
-
products: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
76
|
-
formData: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
77
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
78
|
-
createdDate: z.ZodOptional<z.ZodString>;
|
|
79
|
-
updatedAt: z.ZodOptional<z.ZodString>;
|
|
80
|
-
storageId: z.ZodOptional<z.ZodNumber>;
|
|
81
|
-
formIdentifier: z.ZodOptional<z.ZodString>;
|
|
82
|
-
attributeSetIdentifier: z.ZodOptional<z.ZodString>;
|
|
83
|
-
currency: z.ZodOptional<z.ZodString>;
|
|
84
|
-
paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
|
|
85
|
-
paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
86
|
-
paymentUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
87
|
-
isCompleted: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
|
|
88
|
-
}, z.core.$strip>>;
|
|
89
|
-
total: z.ZodNumber;
|
|
90
|
-
}, z.core.$strip>;
|
|
91
|
-
/**
|
|
92
|
-
* Order storage schema
|
|
93
|
-
* @returns Order storage validation schema
|
|
94
|
-
*/
|
|
95
|
-
export declare const OrderStorageSchema: z.ZodObject<{
|
|
96
|
-
id: z.ZodNumber;
|
|
97
|
-
marker: z.ZodString;
|
|
98
|
-
name: z.ZodString;
|
|
99
|
-
isActive: z.ZodBoolean;
|
|
100
|
-
position: z.ZodOptional<z.ZodNumber>;
|
|
101
|
-
statuses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
102
|
-
id: z.ZodNumber;
|
|
103
|
-
marker: z.ZodString;
|
|
104
|
-
name: z.ZodString;
|
|
105
|
-
position: z.ZodOptional<z.ZodNumber>;
|
|
106
|
-
}, z.core.$strip>>>;
|
|
107
|
-
}, z.core.$strip>;
|
|
108
|
-
/**
|
|
109
|
-
* Orders storage list response schema
|
|
110
|
-
* @returns Orders storage list response schema
|
|
111
|
-
*/
|
|
112
|
-
export declare const OrdersStorageResponseSchema: z.ZodArray<z.ZodObject<{
|
|
113
|
-
id: z.ZodNumber;
|
|
114
|
-
marker: z.ZodString;
|
|
115
|
-
name: z.ZodString;
|
|
116
|
-
isActive: z.ZodBoolean;
|
|
117
|
-
position: z.ZodOptional<z.ZodNumber>;
|
|
118
|
-
statuses: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
119
|
-
id: z.ZodNumber;
|
|
120
|
-
marker: z.ZodString;
|
|
121
|
-
name: z.ZodString;
|
|
122
|
-
position: z.ZodOptional<z.ZodNumber>;
|
|
123
|
-
}, z.core.$strip>>>;
|
|
124
|
-
}, z.core.$strip>>;
|
|
125
|
-
/**
|
|
126
|
-
* Create order response schema
|
|
127
|
-
* API returns a simplified order object after creation
|
|
128
|
-
* @returns Create order response schema
|
|
129
|
-
*/
|
|
130
|
-
export declare const CreateOrderResponseSchema: z.ZodObject<{
|
|
131
|
-
id: z.ZodNumber;
|
|
132
|
-
identifier: z.ZodOptional<z.ZodString>;
|
|
133
|
-
statusMarker: z.ZodOptional<z.ZodString>;
|
|
134
|
-
total: z.ZodOptional<z.ZodNumber>;
|
|
135
|
-
totalSum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
136
|
-
createdAt: z.ZodOptional<z.ZodString>;
|
|
137
|
-
createdDate: z.ZodOptional<z.ZodString>;
|
|
138
|
-
formIdentifier: z.ZodOptional<z.ZodString>;
|
|
139
|
-
paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
|
|
140
|
-
formData: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
141
|
-
products: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
142
|
-
currency: z.ZodOptional<z.ZodString>;
|
|
143
|
-
}, z.core.$strip>;
|
|
144
|
-
/**
|
|
145
|
-
* Update order response schema
|
|
146
|
-
* API returns the full order object after update
|
|
147
|
-
*/
|
|
148
|
-
export declare const UpdateOrderResponseSchema: z.ZodObject<{
|
|
149
|
-
id: z.ZodNumber;
|
|
150
|
-
formIdentifier: z.ZodOptional<z.ZodString>;
|
|
151
|
-
paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
|
|
152
|
-
formData: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
153
|
-
products: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
154
|
-
currency: z.ZodOptional<z.ZodString>;
|
|
155
|
-
totalSum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
156
|
-
success: z.ZodOptional<z.ZodBoolean>;
|
|
157
|
-
message: z.ZodOptional<z.ZodString>;
|
|
158
|
-
}, z.core.$strip>;
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UpdateOrderResponseSchema = exports.CreateOrderResponseSchema = exports.OrdersStorageResponseSchema = exports.OrderStorageSchema = exports.OrdersResponseSchema = exports.OrderEntitySchema = exports.OrderItemSchema = void 0;
|
|
4
|
-
/**
|
|
5
|
-
* Validation schemas for Orders module
|
|
6
|
-
* @description Zod schemas for validating orders-related API responses
|
|
7
|
-
*/
|
|
8
|
-
const zod_1 = require("zod");
|
|
9
|
-
/**
|
|
10
|
-
* Order item schema
|
|
11
|
-
* @description Order item schema for validating orders-related API responses
|
|
12
|
-
*/
|
|
13
|
-
exports.OrderItemSchema = zod_1.z.object({
|
|
14
|
-
id: zod_1.z.number(),
|
|
15
|
-
productId: zod_1.z.number(),
|
|
16
|
-
quantity: zod_1.z.number(),
|
|
17
|
-
price: zod_1.z.number(),
|
|
18
|
-
total: zod_1.z.number(),
|
|
19
|
-
attributes: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
20
|
-
});
|
|
21
|
-
/**
|
|
22
|
-
* Order entity schema
|
|
23
|
-
* @description Order entity schema for validating orders-related API responses
|
|
24
|
-
*/
|
|
25
|
-
exports.OrderEntitySchema = zod_1.z.object({
|
|
26
|
-
id: zod_1.z.number(),
|
|
27
|
-
identifier: zod_1.z.string().optional(),
|
|
28
|
-
statusMarker: zod_1.z.string().optional(),
|
|
29
|
-
statusIdentifier: zod_1.z.string().optional(),
|
|
30
|
-
userId: zod_1.z.number().optional(),
|
|
31
|
-
userIdentifier: zod_1.z.string().optional(),
|
|
32
|
-
total: zod_1.z.number().optional(),
|
|
33
|
-
totalSum: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
34
|
-
items: zod_1.z.array(exports.OrderItemSchema).optional(),
|
|
35
|
-
products: zod_1.z.array(zod_1.z.any()).optional(),
|
|
36
|
-
formData: zod_1.z
|
|
37
|
-
.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())])
|
|
38
|
-
.optional(),
|
|
39
|
-
createdAt: zod_1.z.string().optional(),
|
|
40
|
-
createdDate: zod_1.z.string().optional(),
|
|
41
|
-
updatedAt: zod_1.z.string().optional(),
|
|
42
|
-
storageId: zod_1.z.number().optional(),
|
|
43
|
-
formIdentifier: zod_1.z.string().optional(),
|
|
44
|
-
attributeSetIdentifier: zod_1.z.string().optional(),
|
|
45
|
-
currency: zod_1.z.string().optional(),
|
|
46
|
-
paymentAccountIdentifier: zod_1.z.string().optional(),
|
|
47
|
-
paymentAccountLocalizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
48
|
-
paymentUrl: zod_1.z.string().optional().nullable(),
|
|
49
|
-
isCompleted: zod_1.z.boolean().optional().nullable(),
|
|
50
|
-
});
|
|
51
|
-
/**
|
|
52
|
-
* Orders list response schema
|
|
53
|
-
* @returns Orders list response schema
|
|
54
|
-
*/
|
|
55
|
-
exports.OrdersResponseSchema = zod_1.z.object({
|
|
56
|
-
items: zod_1.z.array(exports.OrderEntitySchema),
|
|
57
|
-
total: zod_1.z.number(),
|
|
58
|
-
});
|
|
59
|
-
/**
|
|
60
|
-
* Order storage schema
|
|
61
|
-
* @returns Order storage validation schema
|
|
62
|
-
*/
|
|
63
|
-
exports.OrderStorageSchema = zod_1.z.object({
|
|
64
|
-
id: zod_1.z.number(),
|
|
65
|
-
marker: zod_1.z.string(),
|
|
66
|
-
name: zod_1.z.string(),
|
|
67
|
-
isActive: zod_1.z.boolean(),
|
|
68
|
-
position: zod_1.z.number().optional(),
|
|
69
|
-
statuses: zod_1.z
|
|
70
|
-
.array(zod_1.z.object({
|
|
71
|
-
id: zod_1.z.number(),
|
|
72
|
-
marker: zod_1.z.string(),
|
|
73
|
-
name: zod_1.z.string(),
|
|
74
|
-
position: zod_1.z.number().optional(),
|
|
75
|
-
}))
|
|
76
|
-
.optional(),
|
|
77
|
-
});
|
|
78
|
-
/**
|
|
79
|
-
* Orders storage list response schema
|
|
80
|
-
* @returns Orders storage list response schema
|
|
81
|
-
*/
|
|
82
|
-
exports.OrdersStorageResponseSchema = zod_1.z.array(exports.OrderStorageSchema);
|
|
83
|
-
/**
|
|
84
|
-
* Create order response schema
|
|
85
|
-
* API returns a simplified order object after creation
|
|
86
|
-
* @returns Create order response schema
|
|
87
|
-
*/
|
|
88
|
-
exports.CreateOrderResponseSchema = zod_1.z.object({
|
|
89
|
-
id: zod_1.z.number(),
|
|
90
|
-
identifier: zod_1.z.string().optional(),
|
|
91
|
-
statusMarker: zod_1.z.string().optional(),
|
|
92
|
-
total: zod_1.z.number().optional(),
|
|
93
|
-
totalSum: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
94
|
-
createdAt: zod_1.z.string().optional(),
|
|
95
|
-
createdDate: zod_1.z.string().optional(),
|
|
96
|
-
formIdentifier: zod_1.z.string().optional(),
|
|
97
|
-
paymentAccountIdentifier: zod_1.z.string().optional(),
|
|
98
|
-
formData: zod_1.z
|
|
99
|
-
.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())])
|
|
100
|
-
.optional(),
|
|
101
|
-
products: zod_1.z.array(zod_1.z.any()).optional(),
|
|
102
|
-
currency: zod_1.z.string().optional(),
|
|
103
|
-
});
|
|
104
|
-
/**
|
|
105
|
-
* Update order response schema
|
|
106
|
-
* API returns the full order object after update
|
|
107
|
-
*/
|
|
108
|
-
exports.UpdateOrderResponseSchema = zod_1.z.object({
|
|
109
|
-
id: zod_1.z.number(),
|
|
110
|
-
formIdentifier: zod_1.z.string().optional(),
|
|
111
|
-
paymentAccountIdentifier: zod_1.z.string().optional(),
|
|
112
|
-
formData: zod_1.z
|
|
113
|
-
.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())])
|
|
114
|
-
.optional(),
|
|
115
|
-
products: zod_1.z.array(zod_1.z.any()).optional(),
|
|
116
|
-
currency: zod_1.z.string().optional(),
|
|
117
|
-
totalSum: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
118
|
-
success: zod_1.z.boolean().optional(),
|
|
119
|
-
message: zod_1.z.string().optional(),
|
|
120
|
-
});
|
package/dist/pages/pagesApi.d.ts
DELETED
|
@@ -1,151 +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 { IPageApi, IPageConfig, IPagesEntity, IPositionBlock } from './pagesInterfaces';
|
|
5
|
-
/**
|
|
6
|
-
* Controllers for working with page objects, including catalog pages
|
|
7
|
-
* @handle /api/content/pages
|
|
8
|
-
* @description Controllers for working with page objects, including catalog pages
|
|
9
|
-
*/
|
|
10
|
-
export default class PageApi extends AsyncModules implements IPageApi {
|
|
11
|
-
protected state: StateModule;
|
|
12
|
-
protected _url: string;
|
|
13
|
-
/**
|
|
14
|
-
* Constructor
|
|
15
|
-
* @param {StateModule} state - The state module.
|
|
16
|
-
* @description Constructor initializes the PageApi with a given state.
|
|
17
|
-
*/
|
|
18
|
-
constructor(state: StateModule);
|
|
19
|
-
/**
|
|
20
|
-
* Get all top-level page objects.
|
|
21
|
-
* @handleName getRootPages
|
|
22
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
23
|
-
* @returns {Promise<IPagesEntity[] | IError>} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
24
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
25
|
-
* @description Get all top-level page objects.
|
|
26
|
-
*/
|
|
27
|
-
getRootPages(langCode?: string): Promise<IPagesEntity[] | IError>;
|
|
28
|
-
/**
|
|
29
|
-
* Get all page objects with product information as an array.
|
|
30
|
-
* @handleName getPages
|
|
31
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
32
|
-
* @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
|
|
33
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
34
|
-
* @description Get all page objects with product information as an array.
|
|
35
|
-
*/
|
|
36
|
-
getPages(langCode?: string): Promise<IPagesEntity[] | IError>;
|
|
37
|
-
/**
|
|
38
|
-
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
39
|
-
* @handleName getPageById
|
|
40
|
-
* @param {number} id - The unique identifier of the page to be fetched. Example: 1.
|
|
41
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
42
|
-
* @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
|
|
43
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
44
|
-
* @description Get page object with information about forms, blocks, menus, linked to the page.
|
|
45
|
-
*/
|
|
46
|
-
getPageById(id: number, langCode?: string): Promise<IPagesEntity | IError>;
|
|
47
|
-
/**
|
|
48
|
-
* Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
49
|
-
* @handleName getPageByUrl
|
|
50
|
-
* @param {string} url - Page URL. Example: "about".
|
|
51
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
52
|
-
* @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
|
|
53
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
54
|
-
* @description Get page object with information about forms, blocks, menus, linked to the page by URL.
|
|
55
|
-
*/
|
|
56
|
-
getPageByUrl(url: string, langCode?: string): Promise<IPagesEntity | IError>;
|
|
57
|
-
/**
|
|
58
|
-
* Get child pages object with information as an array.
|
|
59
|
-
* @handleName getChildPagesByParentUrl
|
|
60
|
-
* @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
|
|
61
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
62
|
-
* @returns {Promise<IPagesEntity | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
|
|
63
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
64
|
-
* @description Get child pages object with information as an array.
|
|
65
|
-
*/
|
|
66
|
-
getChildPagesByParentUrl(url: string, langCode?: string): Promise<IPagesEntity[] | IError>;
|
|
67
|
-
/**
|
|
68
|
-
* Get all blocks by page url.
|
|
69
|
-
* @handleName getBlocksByPageUrl
|
|
70
|
-
* @param {string} url - Page URL. Example: "about".
|
|
71
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
72
|
-
* @returns {Promise<IPositionBlock[] | IError>} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
|
|
73
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
74
|
-
* @description Get all blocks by page url.
|
|
75
|
-
*/
|
|
76
|
-
getBlocksByPageUrl(url: string, langCode?: string): Promise<IPositionBlock[] | IError>;
|
|
77
|
-
/**
|
|
78
|
-
* Get settings for the page.
|
|
79
|
-
* @handleName getConfigPageByUrl
|
|
80
|
-
* @param {string} url - Page URL. Example: "about".
|
|
81
|
-
* @returns {Promise<IPageConfig | IError>} Returns a ConfigPage object with page display settings
|
|
82
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
83
|
-
* @description Get settings for the page.
|
|
84
|
-
*/
|
|
85
|
-
getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
|
|
86
|
-
/**
|
|
87
|
-
* Quick search for page objects with limited output.
|
|
88
|
-
* @handleName searchPage
|
|
89
|
-
* @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
|
|
90
|
-
* @param {string} [url] - Page URL. Example: "catalog".
|
|
91
|
-
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
92
|
-
* @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
|
|
93
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
94
|
-
* @description Quick search for page objects with limited output.
|
|
95
|
-
*/
|
|
96
|
-
searchPage(name: string, url?: string, langCode?: string): Promise<IPagesEntity[] | IError>;
|
|
97
|
-
/**
|
|
98
|
-
* Add template data to pages
|
|
99
|
-
* @handleName addTemplateToPages
|
|
100
|
-
* @param {IPagesEntity[]} data - An array of page objects (IPagesEntity[]) to which template data will be added.
|
|
101
|
-
* @example
|
|
102
|
-
[
|
|
103
|
-
{
|
|
104
|
-
"id": 8,
|
|
105
|
-
"parentId": null,
|
|
106
|
-
"moduleFormConfigs": [],
|
|
107
|
-
"pageUrl": "blog",
|
|
108
|
-
"depth": 0,
|
|
109
|
-
"localizeInfos": {
|
|
110
|
-
"title": "Blog",
|
|
111
|
-
"menuTitle": "Blog",
|
|
112
|
-
"htmlContent": "",
|
|
113
|
-
"plainContent": "",
|
|
114
|
-
},
|
|
115
|
-
"isVisible": true,
|
|
116
|
-
"forms": [],
|
|
117
|
-
"blocks": [],
|
|
118
|
-
"type": "common_page",
|
|
119
|
-
"templateIdentifier": "template",
|
|
120
|
-
"attributeSetIdentifier": "page",
|
|
121
|
-
"attributeValues": {},
|
|
122
|
-
"isSync": true,
|
|
123
|
-
"template": {
|
|
124
|
-
"id": 4,
|
|
125
|
-
"attributeSetIdentifier": null,
|
|
126
|
-
"title": "Template",
|
|
127
|
-
"generalTypeId": 4,
|
|
128
|
-
"identifier": "template",
|
|
129
|
-
"version": 0,
|
|
130
|
-
"generalTypeName": "catalog_page",
|
|
131
|
-
"attributeValues": {},
|
|
132
|
-
"position": 1,
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
* @returns {Promise<any | IError>} An array of page objects with template data added
|
|
137
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
138
|
-
* @description Add template data to pages. Optimized to avoid N+1 query problem by fetching only unique templates in parallel.
|
|
139
|
-
* For example, if 100 pages use 3 different templates, this method makes 3 requests instead of 100.
|
|
140
|
-
*/
|
|
141
|
-
protected addTemplateToPages(data: IPagesEntity[]): Promise<any | IError>;
|
|
142
|
-
/**
|
|
143
|
-
* Add template data to page by page templateIdentifier
|
|
144
|
-
* @handleName addTemplateToPage
|
|
145
|
-
* @param {IPagesEntity} data - Page object (IPagesEntity) to which template data will be added.
|
|
146
|
-
* @returns {Promise<any | IError>} An array of page objects with template data added
|
|
147
|
-
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
148
|
-
* @description Add template data to page by page templateIdentifier
|
|
149
|
-
*/
|
|
150
|
-
protected addTemplateToPage(data: IPagesEntity): Promise<any | IError>;
|
|
151
|
-
}
|