oneentry 1.0.144 → 1.0.145
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/dist/admins/adminsInterfaces.d.ts +3 -0
- package/dist/admins/adminsSchemas.d.ts +2 -0
- package/dist/admins/adminsSchemas.js +2 -1
- package/dist/attribute-sets/attributeSetsSchemas.d.ts +0 -2
- package/dist/attribute-sets/attributeSetsSchemas.js +0 -3
- package/dist/auth-provider/authProviderSchemas.d.ts +27 -36
- package/dist/auth-provider/authProviderSchemas.js +17 -6
- package/dist/auth-provider/authProvidersInterfaces.d.ts +22 -15
- package/dist/base/syncModules.js +17 -5
- package/dist/base/validation.d.ts +10 -30
- package/dist/base/validation.js +10 -17
- package/dist/blocks/blocksSchemas.d.ts +68 -100
- package/dist/discounts/discountsInterfaces.d.ts +4 -0
- package/dist/forms/formsInterfaces.d.ts +18 -2
- package/dist/forms/formsSchemas.d.ts +3 -0
- package/dist/forms/formsSchemas.js +1 -0
- package/dist/forms-data/formsDataInterfaces.d.ts +3 -3
- package/dist/forms-data/formsDataSchemas.d.ts +4 -12
- package/dist/forms-data/formsDataSchemas.js +3 -3
- package/dist/orders/ordersInterfaces.d.ts +4 -2
- package/dist/orders/ordersSchemas.d.ts +49 -34
- package/dist/orders/ordersSchemas.js +38 -29
- package/dist/pages/pagesSchemas.d.ts +7 -1
- package/dist/pages/pagesSchemas.js +5 -1
- package/dist/payments/paymentsSchemas.d.ts +4 -4
- package/dist/payments/paymentsSchemas.js +1 -1
- package/dist/products/productsSchemas.d.ts +68 -100
- package/dist/products/productsSchemas.js +17 -19
- package/dist/users/usersSchemas.d.ts +8 -14
- package/dist/users/usersSchemas.js +1 -4
- package/package.json +1 -1
|
@@ -70,11 +70,13 @@ interface IFromPages {
|
|
|
70
70
|
* @property {string} identifier - The textual identifier for the record field. Example: "form_contact_us".
|
|
71
71
|
* @property {string} processingType - Type of form processing. Example: "async".
|
|
72
72
|
* @property {number | null} templateId - The identifier of the template used by the form, or null if no template is used. Example: 6789.
|
|
73
|
-
* @property {IAttributes[] | Record<string, any>} attributes - The attributes of the form, which can be an array of attribute objects or a record of key-value pairs.
|
|
73
|
+
* @property {IAttributes[] | Record<string, any>} [attributes] - The attributes of the form, which can be an array of attribute objects or a record of key-value pairs.
|
|
74
74
|
* @example
|
|
75
75
|
{
|
|
76
76
|
"key": "value"
|
|
77
77
|
}
|
|
78
|
+
* @property {number | string} [total] - Total count of related entries. Example: "1".
|
|
79
|
+
* @property {IFormConfig[]} [moduleFormConfigs] - Array of module form configurations associated with the form.
|
|
78
80
|
* @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
|
|
79
81
|
*/
|
|
80
82
|
interface IFormsEntity {
|
|
@@ -87,7 +89,9 @@ interface IFormsEntity {
|
|
|
87
89
|
identifier: string;
|
|
88
90
|
processingType: string;
|
|
89
91
|
templateId: number | null;
|
|
90
|
-
attributes
|
|
92
|
+
attributes?: IAttributes[] | Record<string, unknown>;
|
|
93
|
+
total?: number | string;
|
|
94
|
+
moduleFormConfigs?: IFormConfig[];
|
|
91
95
|
}
|
|
92
96
|
/**
|
|
93
97
|
* Represents the structure of a form configuration.
|
|
@@ -109,6 +113,12 @@ interface IFormsEntity {
|
|
|
109
113
|
* @property {string[]} [exceptionIds] - An array of exception identifiers.
|
|
110
114
|
* @property {number} [formDataCount] - Total count of form data entries (only in products/pages API). Example: 306.
|
|
111
115
|
* @property {Record<string, number>} [entityFormDataCount] - Form data count per entity identifier (only in products/pages API). Example: {"catalog": 306}.
|
|
116
|
+
* @property {boolean | null} [isRating] - Indicates whether this form config is for ratings. Example: null.
|
|
117
|
+
* @property {boolean | null} [isAnonymous] - Indicates whether anonymous submissions are allowed. Example: null.
|
|
118
|
+
* @property {boolean | null} [allowHalfRatings] - Indicates whether half ratings are allowed. Example: null.
|
|
119
|
+
* @property {boolean | null} [allowRerating] - Indicates whether re-rating is allowed. Example: null.
|
|
120
|
+
* @property {number | null} [maxRatingScale] - Maximum rating scale value. Example: 5.
|
|
121
|
+
* @property {string} [ratingCalculation] - Rating calculation method. Example: "average".
|
|
112
122
|
* @description This interface defines the structure of a form configuration, including its identifiers, module association, and entity identifiers. Different APIs return different field variants.
|
|
113
123
|
*/
|
|
114
124
|
interface IFormConfig {
|
|
@@ -130,6 +140,12 @@ interface IFormConfig {
|
|
|
130
140
|
exceptionIds?: string[];
|
|
131
141
|
formDataCount?: number;
|
|
132
142
|
entityFormDataCount?: Record<string, number>;
|
|
143
|
+
isRating?: boolean | null;
|
|
144
|
+
isAnonymous?: boolean | null;
|
|
145
|
+
allowHalfRatings?: boolean | null;
|
|
146
|
+
allowRerating?: boolean | null;
|
|
147
|
+
maxRatingScale?: number | null;
|
|
148
|
+
ratingCalculation?: string;
|
|
133
149
|
}
|
|
134
150
|
/**
|
|
135
151
|
* Represents the paginated response structure for forms.
|
|
@@ -13,6 +13,7 @@ export declare const FormEntitySchema: z.ZodObject<{
|
|
|
13
13
|
type: z.ZodNullable<z.ZodString>;
|
|
14
14
|
attributeSetId: z.ZodNullable<z.ZodNumber>;
|
|
15
15
|
templateId: z.ZodNullable<z.ZodNumber>;
|
|
16
|
+
total: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
16
17
|
attributes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
17
18
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
18
19
|
}, z.core.$strip>;
|
|
@@ -31,6 +32,7 @@ export declare const FormsResponseSchema: z.ZodObject<{
|
|
|
31
32
|
type: z.ZodNullable<z.ZodString>;
|
|
32
33
|
attributeSetId: z.ZodNullable<z.ZodNumber>;
|
|
33
34
|
templateId: z.ZodNullable<z.ZodNumber>;
|
|
35
|
+
total: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
34
36
|
attributes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
35
37
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
36
38
|
}, z.core.$strip>>;
|
|
@@ -48,6 +50,7 @@ export declare const SingleFormSchema: z.ZodObject<{
|
|
|
48
50
|
type: z.ZodNullable<z.ZodString>;
|
|
49
51
|
attributeSetId: z.ZodNullable<z.ZodNumber>;
|
|
50
52
|
templateId: z.ZodNullable<z.ZodNumber>;
|
|
53
|
+
total: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
|
|
51
54
|
attributes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
|
|
52
55
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
53
56
|
}, z.core.$strip>;
|
|
@@ -16,6 +16,7 @@ exports.FormEntitySchema = zod_1.z.object({
|
|
|
16
16
|
type: zod_1.z.string().nullable(),
|
|
17
17
|
attributeSetId: zod_1.z.number().nullable(),
|
|
18
18
|
templateId: zod_1.z.number().nullable(),
|
|
19
|
+
total: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
19
20
|
attributes: zod_1.z
|
|
20
21
|
.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())])
|
|
21
22
|
.optional(),
|
|
@@ -241,10 +241,10 @@ interface IFormsByMarkerDataEntity {
|
|
|
241
241
|
"value": "Jack"
|
|
242
242
|
}
|
|
243
243
|
]
|
|
244
|
-
* @property {string} actionMessage - Action message for the form data. Example: "Form submitted successfully".
|
|
244
|
+
* @property {string | Record<string, string>} actionMessage - Action message for the form data (can be localized). Example: "Form submitted successfully" or { "en_US": "Success" }.
|
|
245
245
|
*/
|
|
246
246
|
interface IPostFormResponse {
|
|
247
|
-
actionMessage: string
|
|
247
|
+
actionMessage: string | Record<string, any>;
|
|
248
248
|
formData: {
|
|
249
249
|
id: number;
|
|
250
250
|
formIdentifier: string;
|
|
@@ -255,7 +255,7 @@ interface IPostFormResponse {
|
|
|
255
255
|
formModuleId: number;
|
|
256
256
|
userIdentifier: string | null;
|
|
257
257
|
parentId: number | null;
|
|
258
|
-
formData: FormDataType[]
|
|
258
|
+
formData: FormDataType[] | Record<string, any>;
|
|
259
259
|
};
|
|
260
260
|
}
|
|
261
261
|
/**
|
|
@@ -27,11 +27,7 @@ export declare const FormByMarkerDataEntitySchema: z.ZodObject<{
|
|
|
27
27
|
marker: z.ZodString;
|
|
28
28
|
type: z.ZodString;
|
|
29
29
|
value: z.ZodAny;
|
|
30
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.
|
|
31
|
-
marker: z.ZodString;
|
|
32
|
-
type: z.ZodString;
|
|
33
|
-
value: z.ZodAny;
|
|
34
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>>]>;
|
|
30
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
35
31
|
attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
36
32
|
time: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
37
33
|
entityIdentifier: z.ZodOptional<z.ZodString>;
|
|
@@ -57,11 +53,7 @@ export declare const FormsByMarkerDataResponseSchema: z.ZodObject<{
|
|
|
57
53
|
marker: z.ZodString;
|
|
58
54
|
type: z.ZodString;
|
|
59
55
|
value: z.ZodAny;
|
|
60
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.
|
|
61
|
-
marker: z.ZodString;
|
|
62
|
-
type: z.ZodString;
|
|
63
|
-
value: z.ZodAny;
|
|
64
|
-
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>>]>;
|
|
56
|
+
}, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
65
57
|
attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
66
58
|
time: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
|
|
67
59
|
entityIdentifier: z.ZodOptional<z.ZodString>;
|
|
@@ -85,8 +77,8 @@ export declare const PostFormResponseSchema: z.ZodObject<{
|
|
|
85
77
|
fingerprint: z.ZodString;
|
|
86
78
|
isUserAdmin: z.ZodBoolean;
|
|
87
79
|
formModuleId: z.ZodNumber;
|
|
88
|
-
userIdentifier: z.
|
|
89
|
-
parentId: z.
|
|
80
|
+
userIdentifier: z.ZodNullable<z.ZodString>;
|
|
81
|
+
parentId: z.ZodNullable<z.ZodNumber>;
|
|
90
82
|
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
|
|
91
83
|
marker: z.ZodString;
|
|
92
84
|
type: z.ZodString;
|
|
@@ -31,7 +31,7 @@ exports.FormByMarkerDataEntitySchema = zod_1.z.object({
|
|
|
31
31
|
userIdentifier: zod_1.z.string().nullish(),
|
|
32
32
|
formData: zod_1.z.union([
|
|
33
33
|
zod_1.z.array(exports.FormDataTypeSchema),
|
|
34
|
-
zod_1.z.record(zod_1.z.string(), zod_1.z.
|
|
34
|
+
zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
35
35
|
]),
|
|
36
36
|
attributeSetIdentifier: zod_1.z.string().nullish(),
|
|
37
37
|
time: zod_1.z.union([zod_1.z.date(), zod_1.z.string()]),
|
|
@@ -61,8 +61,8 @@ exports.PostFormResponseSchema = zod_1.z.object({
|
|
|
61
61
|
fingerprint: zod_1.z.string(),
|
|
62
62
|
isUserAdmin: zod_1.z.boolean(),
|
|
63
63
|
formModuleId: zod_1.z.number(),
|
|
64
|
-
userIdentifier: zod_1.z.
|
|
65
|
-
parentId: zod_1.z.
|
|
64
|
+
userIdentifier: zod_1.z.string().nullable(),
|
|
65
|
+
parentId: zod_1.z.number().nullable(),
|
|
66
66
|
formData: zod_1.z.union([
|
|
67
67
|
zod_1.z.array(exports.FormDataTypeSchema),
|
|
68
68
|
zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
@@ -493,15 +493,17 @@ interface IOrderByMarkerEntity {
|
|
|
493
493
|
* @property {number} [id] - Status identifier. Example: 1.
|
|
494
494
|
* @property {object} [localizeInfos] - Localized information for the status.
|
|
495
495
|
* @property {string} [identifier] - Text identifier of the status. Example: "inProgress".
|
|
496
|
-
* @property {
|
|
496
|
+
* @property {number} [position] - Position of the status. Example: 1.
|
|
497
497
|
* @property {boolean} [isUsed] - Whether the status is in use. Example: true.
|
|
498
|
+
* @property {boolean} [isDefault] - Whether the status is the default status. Example: true.
|
|
498
499
|
*/
|
|
499
500
|
interface IOrderStatus {
|
|
500
501
|
id?: number;
|
|
501
502
|
localizeInfos?: object;
|
|
502
503
|
identifier?: string;
|
|
503
|
-
position?:
|
|
504
|
+
position?: number;
|
|
504
505
|
isUsed?: boolean;
|
|
506
|
+
isDefault?: boolean;
|
|
505
507
|
}
|
|
506
508
|
/**
|
|
507
509
|
* Interface representing a product in an order preview.
|
|
@@ -21,19 +21,19 @@ export declare const OrderItemSchema: z.ZodObject<{
|
|
|
21
21
|
*/
|
|
22
22
|
export declare const OrderEntitySchema: z.ZodObject<{
|
|
23
23
|
id: z.ZodNumber;
|
|
24
|
-
storageId: z.
|
|
25
|
-
createdDate: z.
|
|
24
|
+
storageId: z.ZodNumber;
|
|
25
|
+
createdDate: z.ZodString;
|
|
26
26
|
statusIdentifier: z.ZodOptional<z.ZodString>;
|
|
27
27
|
formIdentifier: z.ZodOptional<z.ZodString>;
|
|
28
|
-
formData: z.
|
|
29
|
-
attributeSetIdentifier: z.
|
|
30
|
-
totalSum: z.
|
|
31
|
-
currency: z.
|
|
32
|
-
paymentAccountIdentifier: z.
|
|
33
|
-
paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
34
|
-
paymentUrl: z.ZodNullable<z.
|
|
35
|
-
products: z.
|
|
36
|
-
isCompleted: z.ZodNullable<z.
|
|
28
|
+
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
29
|
+
attributeSetIdentifier: z.ZodOptional<z.ZodString>;
|
|
30
|
+
totalSum: z.ZodString;
|
|
31
|
+
currency: z.ZodString;
|
|
32
|
+
paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
|
|
33
|
+
paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
34
|
+
paymentUrl: z.ZodNullable<z.ZodString>;
|
|
35
|
+
products: z.ZodArray<z.ZodAny>;
|
|
36
|
+
isCompleted: z.ZodNullable<z.ZodBoolean>;
|
|
37
37
|
statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
38
38
|
}, z.core.$strip>;
|
|
39
39
|
/**
|
|
@@ -43,19 +43,19 @@ export declare const OrderEntitySchema: z.ZodObject<{
|
|
|
43
43
|
export declare const OrdersResponseSchema: z.ZodObject<{
|
|
44
44
|
items: z.ZodArray<z.ZodObject<{
|
|
45
45
|
id: z.ZodNumber;
|
|
46
|
-
storageId: z.
|
|
47
|
-
createdDate: z.
|
|
46
|
+
storageId: z.ZodNumber;
|
|
47
|
+
createdDate: z.ZodString;
|
|
48
48
|
statusIdentifier: z.ZodOptional<z.ZodString>;
|
|
49
49
|
formIdentifier: z.ZodOptional<z.ZodString>;
|
|
50
|
-
formData: z.
|
|
51
|
-
attributeSetIdentifier: z.
|
|
52
|
-
totalSum: z.
|
|
53
|
-
currency: z.
|
|
54
|
-
paymentAccountIdentifier: z.
|
|
55
|
-
paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.
|
|
56
|
-
paymentUrl: z.ZodNullable<z.
|
|
57
|
-
products: z.
|
|
58
|
-
isCompleted: z.ZodNullable<z.
|
|
50
|
+
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
51
|
+
attributeSetIdentifier: z.ZodOptional<z.ZodString>;
|
|
52
|
+
totalSum: z.ZodString;
|
|
53
|
+
currency: z.ZodString;
|
|
54
|
+
paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
|
|
55
|
+
paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
56
|
+
paymentUrl: z.ZodNullable<z.ZodString>;
|
|
57
|
+
products: z.ZodArray<z.ZodAny>;
|
|
58
|
+
isCompleted: z.ZodNullable<z.ZodBoolean>;
|
|
59
59
|
statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
60
60
|
}, z.core.$strip>>;
|
|
61
61
|
total: z.ZodNumber;
|
|
@@ -97,13 +97,20 @@ export declare const OrdersStorageResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
97
97
|
*/
|
|
98
98
|
export declare const CreateOrderResponseSchema: z.ZodObject<{
|
|
99
99
|
id: z.ZodNumber;
|
|
100
|
-
formIdentifier: z.
|
|
101
|
-
paymentAccountIdentifier: z.
|
|
102
|
-
formData: z.
|
|
103
|
-
products: z.
|
|
104
|
-
currency: z.
|
|
105
|
-
totalSum: z.
|
|
100
|
+
formIdentifier: z.ZodString;
|
|
101
|
+
paymentAccountIdentifier: z.ZodString;
|
|
102
|
+
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
103
|
+
products: z.ZodArray<z.ZodAny>;
|
|
104
|
+
currency: z.ZodString;
|
|
105
|
+
totalSum: z.ZodNumber;
|
|
106
106
|
createdDate: z.ZodOptional<z.ZodString>;
|
|
107
|
+
statusIdentifier: z.ZodOptional<z.ZodString>;
|
|
108
|
+
couponCode: z.ZodOptional<z.ZodString>;
|
|
109
|
+
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
110
|
+
discountConfig: z.ZodOptional<z.ZodUnknown>;
|
|
111
|
+
bonusAmount: z.ZodOptional<z.ZodNumber>;
|
|
112
|
+
bonusApplied: z.ZodOptional<z.ZodNumber>;
|
|
113
|
+
totalDue: z.ZodOptional<z.ZodNumber>;
|
|
107
114
|
}, z.core.$strip>;
|
|
108
115
|
/**
|
|
109
116
|
* Update order response schema
|
|
@@ -111,10 +118,18 @@ export declare const CreateOrderResponseSchema: z.ZodObject<{
|
|
|
111
118
|
*/
|
|
112
119
|
export declare const UpdateOrderResponseSchema: z.ZodObject<{
|
|
113
120
|
id: z.ZodNumber;
|
|
114
|
-
formIdentifier: z.
|
|
115
|
-
paymentAccountIdentifier: z.
|
|
116
|
-
formData: z.
|
|
117
|
-
products: z.
|
|
118
|
-
currency: z.
|
|
119
|
-
totalSum: z.
|
|
121
|
+
formIdentifier: z.ZodString;
|
|
122
|
+
paymentAccountIdentifier: z.ZodString;
|
|
123
|
+
formData: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
|
|
124
|
+
products: z.ZodArray<z.ZodAny>;
|
|
125
|
+
currency: z.ZodString;
|
|
126
|
+
totalSum: z.ZodNumber;
|
|
127
|
+
createdDate: z.ZodOptional<z.ZodString>;
|
|
128
|
+
statusIdentifier: z.ZodOptional<z.ZodString>;
|
|
129
|
+
couponCode: z.ZodOptional<z.ZodString>;
|
|
130
|
+
additionalDiscountsMarkers: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
131
|
+
discountConfig: z.ZodOptional<z.ZodUnknown>;
|
|
132
|
+
bonusAmount: z.ZodOptional<z.ZodNumber>;
|
|
133
|
+
bonusApplied: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
totalDue: z.ZodOptional<z.ZodNumber>;
|
|
120
135
|
}, z.core.$strip>;
|
|
@@ -24,21 +24,19 @@ exports.OrderItemSchema = zod_1.z.object({
|
|
|
24
24
|
*/
|
|
25
25
|
exports.OrderEntitySchema = zod_1.z.object({
|
|
26
26
|
id: zod_1.z.number(),
|
|
27
|
-
storageId: zod_1.z.number()
|
|
28
|
-
createdDate: zod_1.z.string()
|
|
27
|
+
storageId: zod_1.z.number(),
|
|
28
|
+
createdDate: zod_1.z.string(),
|
|
29
29
|
statusIdentifier: zod_1.z.string().optional(),
|
|
30
30
|
formIdentifier: zod_1.z.string().optional(),
|
|
31
|
-
formData: zod_1.z
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
products: zod_1.z.array(zod_1.z.any()).optional(),
|
|
41
|
-
isCompleted: zod_1.z.boolean().optional().nullable(),
|
|
31
|
+
formData: zod_1.z.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())]),
|
|
32
|
+
attributeSetIdentifier: zod_1.z.string().optional(),
|
|
33
|
+
totalSum: zod_1.z.string(),
|
|
34
|
+
currency: zod_1.z.string(),
|
|
35
|
+
paymentAccountIdentifier: zod_1.z.string().optional(),
|
|
36
|
+
paymentAccountLocalizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
37
|
+
paymentUrl: zod_1.z.string().nullable(),
|
|
38
|
+
products: zod_1.z.array(zod_1.z.any()),
|
|
39
|
+
isCompleted: zod_1.z.boolean().nullable(),
|
|
42
40
|
statusLocalizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
|
|
43
41
|
});
|
|
44
42
|
/**
|
|
@@ -74,15 +72,20 @@ exports.OrdersStorageResponseSchema = zod_1.z.array(exports.OrderStorageSchema);
|
|
|
74
72
|
*/
|
|
75
73
|
exports.CreateOrderResponseSchema = zod_1.z.object({
|
|
76
74
|
id: zod_1.z.number(),
|
|
77
|
-
formIdentifier: zod_1.z.string()
|
|
78
|
-
paymentAccountIdentifier: zod_1.z.string()
|
|
79
|
-
formData: zod_1.z
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
currency: zod_1.z.string().optional(),
|
|
84
|
-
totalSum: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
|
|
75
|
+
formIdentifier: zod_1.z.string(),
|
|
76
|
+
paymentAccountIdentifier: zod_1.z.string(),
|
|
77
|
+
formData: zod_1.z.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())]),
|
|
78
|
+
products: zod_1.z.array(zod_1.z.any()),
|
|
79
|
+
currency: zod_1.z.string(),
|
|
80
|
+
totalSum: zod_1.z.number(),
|
|
85
81
|
createdDate: zod_1.z.string().optional(),
|
|
82
|
+
statusIdentifier: zod_1.z.string().optional(),
|
|
83
|
+
couponCode: zod_1.z.string().optional(),
|
|
84
|
+
additionalDiscountsMarkers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
85
|
+
discountConfig: zod_1.z.unknown().optional(),
|
|
86
|
+
bonusAmount: zod_1.z.number().optional(),
|
|
87
|
+
bonusApplied: zod_1.z.number().optional(),
|
|
88
|
+
totalDue: zod_1.z.number().optional(),
|
|
86
89
|
});
|
|
87
90
|
/**
|
|
88
91
|
* Update order response schema
|
|
@@ -90,12 +93,18 @@ exports.CreateOrderResponseSchema = zod_1.z.object({
|
|
|
90
93
|
*/
|
|
91
94
|
exports.UpdateOrderResponseSchema = zod_1.z.object({
|
|
92
95
|
id: zod_1.z.number(),
|
|
93
|
-
formIdentifier: zod_1.z.string()
|
|
94
|
-
paymentAccountIdentifier: zod_1.z.string()
|
|
95
|
-
formData: zod_1.z
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
formIdentifier: zod_1.z.string(),
|
|
97
|
+
paymentAccountIdentifier: zod_1.z.string(),
|
|
98
|
+
formData: zod_1.z.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())]),
|
|
99
|
+
products: zod_1.z.array(zod_1.z.any()),
|
|
100
|
+
currency: zod_1.z.string(),
|
|
101
|
+
totalSum: zod_1.z.number(),
|
|
102
|
+
createdDate: zod_1.z.string().optional(),
|
|
103
|
+
statusIdentifier: zod_1.z.string().optional(),
|
|
104
|
+
couponCode: zod_1.z.string().optional(),
|
|
105
|
+
additionalDiscountsMarkers: zod_1.z.array(zod_1.z.string()).optional(),
|
|
106
|
+
discountConfig: zod_1.z.unknown().optional(),
|
|
107
|
+
bonusAmount: zod_1.z.number().optional(),
|
|
108
|
+
bonusApplied: zod_1.z.number().optional(),
|
|
109
|
+
totalDue: zod_1.z.number().optional(),
|
|
101
110
|
});
|
|
@@ -19,6 +19,7 @@ export declare const PageEntitySchema: z.ZodObject<{
|
|
|
19
19
|
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
20
20
|
attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
21
21
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
22
|
+
rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
22
23
|
isSync: z.ZodBoolean;
|
|
23
24
|
template: z.ZodOptional<z.ZodAny>;
|
|
24
25
|
blocks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -44,6 +45,7 @@ export declare const PagesResponseSchema: z.ZodArray<z.ZodObject<{
|
|
|
44
45
|
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
45
46
|
attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
46
47
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
48
|
+
rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
47
49
|
isSync: z.ZodBoolean;
|
|
48
50
|
template: z.ZodOptional<z.ZodAny>;
|
|
49
51
|
blocks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -69,6 +71,7 @@ export declare const SinglePageSchema: z.ZodObject<{
|
|
|
69
71
|
attributeSetIdentifier: z.ZodNullable<z.ZodString>;
|
|
70
72
|
attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
71
73
|
moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
|
|
74
|
+
rating: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
72
75
|
isSync: z.ZodBoolean;
|
|
73
76
|
template: z.ZodOptional<z.ZodAny>;
|
|
74
77
|
blocks: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodArray<z.ZodString>]>>;
|
|
@@ -82,4 +85,7 @@ export declare const SinglePageSchema: z.ZodObject<{
|
|
|
82
85
|
/**
|
|
83
86
|
* Page config schema
|
|
84
87
|
*/
|
|
85
|
-
export declare const PageConfigSchema: z.
|
|
88
|
+
export declare const PageConfigSchema: z.ZodObject<{
|
|
89
|
+
rowsPerPage: z.ZodNullable<z.ZodNumber>;
|
|
90
|
+
productsPerRow: z.ZodNullable<z.ZodNumber>;
|
|
91
|
+
}, z.core.$strip>;
|
|
@@ -22,6 +22,7 @@ exports.PageEntitySchema = zod_1.z.object({
|
|
|
22
22
|
attributeSetIdentifier: zod_1.z.string().nullable(),
|
|
23
23
|
attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
|
|
24
24
|
moduleFormConfigs: zod_1.z.array(zod_1.z.any()).optional(),
|
|
25
|
+
rating: zod_1.z.record(zod_1.z.string(), zod_1.z.unknown()).optional(),
|
|
25
26
|
isSync: zod_1.z.boolean(),
|
|
26
27
|
template: zod_1.z.any().optional(),
|
|
27
28
|
blocks: zod_1.z.union([zod_1.z.array(zod_1.z.any()), zod_1.z.array(zod_1.z.string())]).optional(),
|
|
@@ -43,4 +44,7 @@ exports.SinglePageSchema = exports.PageEntitySchema;
|
|
|
43
44
|
/**
|
|
44
45
|
* Page config schema
|
|
45
46
|
*/
|
|
46
|
-
exports.PageConfigSchema = zod_1.z.
|
|
47
|
+
exports.PageConfigSchema = zod_1.z.object({
|
|
48
|
+
rowsPerPage: zod_1.z.number().nullable(),
|
|
49
|
+
productsPerRow: zod_1.z.number().nullable(),
|
|
50
|
+
});
|
|
@@ -6,7 +6,7 @@ import { z } from 'zod';
|
|
|
6
6
|
export declare const PaymentSessionSchema: z.ZodObject<{
|
|
7
7
|
id: z.ZodNumber;
|
|
8
8
|
orderId: z.ZodNumber;
|
|
9
|
-
amount: z.ZodNullable<z.ZodNumber
|
|
9
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
10
10
|
status: z.ZodString;
|
|
11
11
|
createdDate: z.ZodString;
|
|
12
12
|
updatedDate: z.ZodString;
|
|
@@ -22,7 +22,7 @@ export declare const PaymentSessionsResponseSchema: z.ZodObject<{
|
|
|
22
22
|
items: z.ZodArray<z.ZodObject<{
|
|
23
23
|
id: z.ZodNumber;
|
|
24
24
|
orderId: z.ZodNumber;
|
|
25
|
-
amount: z.ZodNullable<z.ZodNumber
|
|
25
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
26
26
|
status: z.ZodString;
|
|
27
27
|
createdDate: z.ZodString;
|
|
28
28
|
updatedDate: z.ZodString;
|
|
@@ -39,7 +39,7 @@ export declare const PaymentSessionsResponseSchema: z.ZodObject<{
|
|
|
39
39
|
export declare const SinglePaymentSessionSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
40
40
|
id: z.ZodNumber;
|
|
41
41
|
orderId: z.ZodNumber;
|
|
42
|
-
amount: z.ZodNullable<z.ZodNumber
|
|
42
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
43
43
|
status: z.ZodString;
|
|
44
44
|
createdDate: z.ZodString;
|
|
45
45
|
updatedDate: z.ZodString;
|
|
@@ -49,7 +49,7 @@ export declare const SinglePaymentSessionSchema: z.ZodUnion<readonly [z.ZodObjec
|
|
|
49
49
|
}, z.core.$strip>, z.ZodArray<z.ZodObject<{
|
|
50
50
|
id: z.ZodNumber;
|
|
51
51
|
orderId: z.ZodNumber;
|
|
52
|
-
amount: z.ZodNullable<z.ZodNumber
|
|
52
|
+
amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
|
|
53
53
|
status: z.ZodString;
|
|
54
54
|
createdDate: z.ZodString;
|
|
55
55
|
updatedDate: z.ZodString;
|
|
@@ -9,7 +9,7 @@ const zod_1 = require("zod");
|
|
|
9
9
|
exports.PaymentSessionSchema = zod_1.z.object({
|
|
10
10
|
id: zod_1.z.number(),
|
|
11
11
|
orderId: zod_1.z.number(),
|
|
12
|
-
amount: zod_1.z.number().nullable(),
|
|
12
|
+
amount: zod_1.z.number().nullable().optional(),
|
|
13
13
|
status: zod_1.z.string(),
|
|
14
14
|
createdDate: zod_1.z.string(),
|
|
15
15
|
updatedDate: zod_1.z.string(),
|