oneentry 1.0.139 → 1.0.141

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.
Files changed (53) hide show
  1. package/README.md +16 -1
  2. package/configure.js +40 -21
  3. package/dist/auth-provider/authProviderSchemas.d.ts +24 -30
  4. package/dist/auth-provider/authProviderSchemas.js +12 -15
  5. package/dist/auth-provider/authProvidersInterfaces.d.ts +10 -2
  6. package/dist/base/syncModules.js +1 -1
  7. package/dist/blocks/blocksApi.d.ts +2 -0
  8. package/dist/blocks/blocksApi.js +6 -2
  9. package/dist/discounts/discountsApi.d.ts +56 -0
  10. package/dist/discounts/discountsApi.js +82 -0
  11. package/dist/discounts/discountsInterfaces.d.ts +145 -0
  12. package/dist/discounts/discountsInterfaces.js +2 -0
  13. package/dist/forms/formsSchemas.d.ts +18 -33
  14. package/dist/forms/formsSchemas.js +6 -11
  15. package/dist/index.d.ts +11 -5
  16. package/dist/index.js +6 -0
  17. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +2 -2
  18. package/dist/integration-collections/integrationCollectionsSchemas.d.ts +2 -6
  19. package/dist/integration-collections/integrationCollectionsSchemas.js +1 -3
  20. package/dist/orders/ordersApi.d.ts +26 -3
  21. package/dist/orders/ordersApi.js +36 -2
  22. package/dist/orders/ordersInterfaces.d.ts +104 -4
  23. package/dist/orders/ordersSchemas.d.ts +34 -72
  24. package/dist/orders/ordersSchemas.js +16 -35
  25. package/dist/pages/pagesApi.d.ts +2 -2
  26. package/dist/pages/pagesApi.js +3 -3
  27. package/dist/pages/pagesInterfaces.d.ts +3 -3
  28. package/dist/payments/paymentsInterfaces.d.ts +1 -1
  29. package/dist/payments/paymentsSchemas.d.ts +53 -90
  30. package/dist/payments/paymentsSchemas.js +21 -34
  31. package/dist/product-statuses/productStatusesApi.d.ts +2 -2
  32. package/dist/product-statuses/productStatusesInterfaces.d.ts +2 -2
  33. package/dist/products/productsApi.d.ts +5 -4
  34. package/dist/products/productsApi.js +9 -5
  35. package/dist/products/productsInterfaces.d.ts +11 -8
  36. package/dist/products/productsSchemas.d.ts +14 -34
  37. package/dist/products/productsSchemas.js +14 -3
  38. package/dist/sitemap/sitemapApi.d.ts +35 -0
  39. package/dist/sitemap/sitemapApi.js +45 -0
  40. package/dist/sitemap/sitemapInterfaces.d.ts +40 -0
  41. package/dist/sitemap/sitemapInterfaces.js +2 -0
  42. package/dist/system/systemApi.d.ts +3 -25
  43. package/dist/system/systemApi.js +0 -24
  44. package/dist/system/systemInterfaces.d.ts +13 -5
  45. package/dist/system/systemInterfaces.js +3 -0
  46. package/dist/templates-preview/templatesPreviewApi.d.ts +2 -2
  47. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +3 -3
  48. package/dist/users/usersApi.d.ts +2 -2
  49. package/dist/users/usersApi.js +0 -1
  50. package/dist/users/usersInterfaces.d.ts +3 -3
  51. package/dist/users/usersSchemas.d.ts +1 -1
  52. package/dist/users/usersSchemas.js +1 -1
  53. package/package.json +3 -78
@@ -21,34 +21,20 @@ export declare const OrderItemSchema: z.ZodObject<{
21
21
  */
22
22
  export declare const OrderEntitySchema: z.ZodObject<{
23
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
24
  storageId: z.ZodOptional<z.ZodNumber>;
25
+ createdDate: z.ZodOptional<z.ZodString>;
26
+ statusIdentifier: z.ZodOptional<z.ZodString>;
45
27
  formIdentifier: z.ZodOptional<z.ZodString>;
46
- attributeSetIdentifier: z.ZodOptional<z.ZodString>;
28
+ formData: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
29
+ attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
30
+ totalSum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
47
31
  currency: z.ZodOptional<z.ZodString>;
48
- paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
32
+ paymentAccountIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
49
33
  paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
50
34
  paymentUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
35
+ products: z.ZodOptional<z.ZodArray<z.ZodAny>>;
51
36
  isCompleted: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
37
+ statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
52
38
  }, z.core.$strip>;
53
39
  /**
54
40
  * Orders list response schema
@@ -57,34 +43,20 @@ export declare const OrderEntitySchema: z.ZodObject<{
57
43
  export declare const OrdersResponseSchema: z.ZodObject<{
58
44
  items: z.ZodArray<z.ZodObject<{
59
45
  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
46
  storageId: z.ZodOptional<z.ZodNumber>;
47
+ createdDate: z.ZodOptional<z.ZodString>;
48
+ statusIdentifier: z.ZodOptional<z.ZodString>;
81
49
  formIdentifier: z.ZodOptional<z.ZodString>;
82
- attributeSetIdentifier: z.ZodOptional<z.ZodString>;
50
+ formData: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
51
+ attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
52
+ totalSum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
83
53
  currency: z.ZodOptional<z.ZodString>;
84
- paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
54
+ paymentAccountIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
85
55
  paymentAccountLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
86
56
  paymentUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
57
+ products: z.ZodOptional<z.ZodArray<z.ZodAny>>;
87
58
  isCompleted: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
59
+ statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
88
60
  }, z.core.$strip>>;
89
61
  total: z.ZodNumber;
90
62
  }, z.core.$strip>;
@@ -94,16 +66,14 @@ export declare const OrdersResponseSchema: z.ZodObject<{
94
66
  */
95
67
  export declare const OrderStorageSchema: z.ZodObject<{
96
68
  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>>>;
69
+ identifier: z.ZodNullable<z.ZodString>;
70
+ localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
71
+ formIdentifier: z.ZodNullable<z.ZodString>;
72
+ generalTypeId: z.ZodNullable<z.ZodNumber>;
73
+ paymentAccountIdentifiers: z.ZodArray<z.ZodObject<{
74
+ identifier: z.ZodString;
75
+ }, z.core.$strip>>;
76
+ position: z.ZodNullable<z.ZodNumber>;
107
77
  }, z.core.$strip>;
108
78
  /**
109
79
  * Orders storage list response schema
@@ -111,16 +81,14 @@ export declare const OrderStorageSchema: z.ZodObject<{
111
81
  */
112
82
  export declare const OrdersStorageResponseSchema: z.ZodArray<z.ZodObject<{
113
83
  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>>>;
84
+ identifier: z.ZodNullable<z.ZodString>;
85
+ localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
86
+ formIdentifier: z.ZodNullable<z.ZodString>;
87
+ generalTypeId: z.ZodNullable<z.ZodNumber>;
88
+ paymentAccountIdentifiers: z.ZodArray<z.ZodObject<{
89
+ identifier: z.ZodString;
90
+ }, z.core.$strip>>;
91
+ position: z.ZodNullable<z.ZodNumber>;
124
92
  }, z.core.$strip>>;
125
93
  /**
126
94
  * Create order response schema
@@ -129,17 +97,13 @@ export declare const OrdersStorageResponseSchema: z.ZodArray<z.ZodObject<{
129
97
  */
130
98
  export declare const CreateOrderResponseSchema: z.ZodObject<{
131
99
  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
100
  formIdentifier: z.ZodOptional<z.ZodString>;
139
101
  paymentAccountIdentifier: z.ZodOptional<z.ZodString>;
140
102
  formData: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
141
103
  products: z.ZodOptional<z.ZodArray<z.ZodAny>>;
142
104
  currency: z.ZodOptional<z.ZodString>;
105
+ totalSum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
106
+ createdDate: z.ZodOptional<z.ZodString>;
143
107
  }, z.core.$strip>;
144
108
  /**
145
109
  * Update order response schema
@@ -153,6 +117,4 @@ export declare const UpdateOrderResponseSchema: z.ZodObject<{
153
117
  products: z.ZodOptional<z.ZodArray<z.ZodAny>>;
154
118
  currency: z.ZodOptional<z.ZodString>;
155
119
  totalSum: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
156
- success: z.ZodOptional<z.ZodBoolean>;
157
- message: z.ZodOptional<z.ZodString>;
158
120
  }, z.core.$strip>;
@@ -24,29 +24,22 @@ exports.OrderItemSchema = zod_1.z.object({
24
24
  */
25
25
  exports.OrderEntitySchema = zod_1.z.object({
26
26
  id: zod_1.z.number(),
27
- identifier: zod_1.z.string().optional(),
28
- statusMarker: zod_1.z.string().optional(),
27
+ storageId: zod_1.z.number().optional(),
28
+ createdDate: zod_1.z.string().optional(),
29
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(),
30
+ formIdentifier: zod_1.z.string().optional(),
36
31
  formData: zod_1.z
37
32
  .union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())])
38
33
  .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(),
34
+ attributeSetIdentifier: zod_1.z.string().optional().nullable(),
35
+ totalSum: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
45
36
  currency: zod_1.z.string().optional(),
46
- paymentAccountIdentifier: zod_1.z.string().optional(),
37
+ paymentAccountIdentifier: zod_1.z.string().optional().nullable(),
47
38
  paymentAccountLocalizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
48
39
  paymentUrl: zod_1.z.string().optional().nullable(),
40
+ products: zod_1.z.array(zod_1.z.any()).optional(),
49
41
  isCompleted: zod_1.z.boolean().optional().nullable(),
42
+ statusLocalizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
50
43
  });
51
44
  /**
52
45
  * Orders list response schema
@@ -62,18 +55,12 @@ exports.OrdersResponseSchema = zod_1.z.object({
62
55
  */
63
56
  exports.OrderStorageSchema = zod_1.z.object({
64
57
  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(),
58
+ identifier: zod_1.z.string().nullable(),
59
+ localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
60
+ formIdentifier: zod_1.z.string().nullable(),
61
+ generalTypeId: zod_1.z.number().nullable(),
62
+ paymentAccountIdentifiers: zod_1.z.array(zod_1.z.object({ identifier: zod_1.z.string() })),
63
+ position: zod_1.z.number().nullable(),
77
64
  });
78
65
  /**
79
66
  * Orders storage list response schema
@@ -87,12 +74,6 @@ exports.OrdersStorageResponseSchema = zod_1.z.array(exports.OrderStorageSchema);
87
74
  */
88
75
  exports.CreateOrderResponseSchema = zod_1.z.object({
89
76
  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
77
  formIdentifier: zod_1.z.string().optional(),
97
78
  paymentAccountIdentifier: zod_1.z.string().optional(),
98
79
  formData: zod_1.z
@@ -100,6 +81,8 @@ exports.CreateOrderResponseSchema = zod_1.z.object({
100
81
  .optional(),
101
82
  products: zod_1.z.array(zod_1.z.any()).optional(),
102
83
  currency: zod_1.z.string().optional(),
84
+ totalSum: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
85
+ createdDate: zod_1.z.string().optional(),
103
86
  });
104
87
  /**
105
88
  * Update order response schema
@@ -115,6 +98,4 @@ exports.UpdateOrderResponseSchema = zod_1.z.object({
115
98
  products: zod_1.z.array(zod_1.z.any()).optional(),
116
99
  currency: zod_1.z.string().optional(),
117
100
  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
101
  });
@@ -1,13 +1,13 @@
1
1
  import AsyncModules from '../base/asyncModules';
2
2
  import type StateModule from '../base/stateModule';
3
3
  import type { IError } from '../base/utils';
4
- import type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock } from './pagesInterfaces';
4
+ import type { IPageConfig, IPagesApi, IPagesEntity, IPositionBlock } from './pagesInterfaces';
5
5
  /**
6
6
  * Controllers for working with page objects, including catalog pages
7
7
  * @handle /api/content/pages
8
8
  * @description Controllers for working with page objects, including catalog pages
9
9
  */
10
- export default class PageApi extends AsyncModules implements IPageApi {
10
+ export default class PagesApi extends AsyncModules implements IPagesApi {
11
11
  protected state: StateModule;
12
12
  protected _url: string;
13
13
  /**
@@ -13,7 +13,7 @@ const pagesSchemas_1 = require("./pagesSchemas");
13
13
  * @handle /api/content/pages
14
14
  * @description Controllers for working with page objects, including catalog pages
15
15
  */
16
- class PageApi extends asyncModules_1.default {
16
+ class PagesApi extends asyncModules_1.default {
17
17
  /**
18
18
  * Constructor
19
19
  * @param {StateModule} state - The state module.
@@ -365,9 +365,9 @@ class PageApi extends asyncModules_1.default {
365
365
  }
366
366
  }
367
367
  }
368
- exports.default = PageApi;
368
+ exports.default = PagesApi;
369
369
  /**
370
- * Helper module for working with blocks (similar products and product blocks)
370
+ * Helper module for working with blocks, similar products and product blocks
371
371
  * @description Internal module for fetching products and similar products for blocks
372
372
  */
373
373
  class StaffModule extends asyncModules_1.default {
@@ -3,7 +3,7 @@ import type { IBlockEntity } from '../blocks/blocksInterfaces';
3
3
  import type { IFormConfig } from '../forms/formsInterfaces';
4
4
  import type { ITemplateEntity } from '../templates/templatesInterfaces';
5
5
  /**
6
- * @interface IPageApi
6
+ * @interface IPagesApi
7
7
  * @property {Function} getRootPages - Get all top-level page objects.
8
8
  * @property {Function} getCatalogPages - Get all page objects with product information as an array.
9
9
  * @property {Function} getPages - Get all page objects with product information as an array.
@@ -14,7 +14,7 @@ import type { ITemplateEntity } from '../templates/templatesInterfaces';
14
14
  * @property {Function} searchPage - Quick search for page objects with limited output.
15
15
  * @description This interface defines methods for retrieving and managing pages in the system.
16
16
  */
17
- interface IPageApi {
17
+ interface IPagesApi {
18
18
  /**
19
19
  * Get all top-level page objects.
20
20
  * @handleName getRootPages
@@ -289,4 +289,4 @@ interface IPagesEntity {
289
289
  total?: string;
290
290
  categoryPath?: string;
291
291
  }
292
- export type { IPageApi, IPageConfig, IPagesEntity, IPositionBlock, IPositionForm, };
292
+ export type { IPageConfig, IPagesApi, IPagesEntity, IPositionBlock, IPositionForm, };
@@ -103,7 +103,7 @@ interface ISessionsEntity {
103
103
  * @property {string} updatedDate - Object modification date. Example: "2025-02-26T10:13:16.839Z".
104
104
  * @property {string} type - Type may be 'session' or 'intent'. Example: "session".
105
105
  * @property {string} status - Payment status. Example: "completed".
106
- * @property {number} paymentAccountId - Payment ID from an external provider. Example: "9BE88048TU058770M".
106
+ * @property {number} paymentAccountId - Payment account identifier. Example: 1.
107
107
  * @property {number} orderId - Order identifier. Example: 1.
108
108
  * @property {string | null} paymentUrl - payment link. Example: " https://www.sandbox.paypal.com/checkoutnow?token=9BE88048TU058770M".
109
109
  * @property {number | null} [amount] - Amount of the payment session. Example: 100.
@@ -4,21 +4,15 @@ import { z } from 'zod';
4
4
  * @description Zod schema for validating payment session responses
5
5
  */
6
6
  export declare const PaymentSessionSchema: z.ZodObject<{
7
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
8
- orderId: z.ZodOptional<z.ZodNumber>;
9
- orderIdentifier: z.ZodOptional<z.ZodString>;
10
- amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
11
- currency: z.ZodOptional<z.ZodString>;
7
+ id: z.ZodNumber;
8
+ orderId: z.ZodNumber;
9
+ amount: z.ZodNullable<z.ZodNumber>;
12
10
  status: z.ZodString;
13
- paymentMethod: z.ZodOptional<z.ZodString>;
14
- createdDate: z.ZodOptional<z.ZodString>;
15
- updatedDate: z.ZodOptional<z.ZodString>;
16
- createdAt: z.ZodOptional<z.ZodString>;
17
- expiresAt: z.ZodOptional<z.ZodString>;
18
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
19
- type: z.ZodOptional<z.ZodString>;
20
- paymentAccountId: z.ZodOptional<z.ZodNumber>;
21
- paymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
+ createdDate: z.ZodString;
12
+ updatedDate: z.ZodString;
13
+ type: z.ZodString;
14
+ paymentAccountId: z.ZodNumber;
15
+ paymentUrl: z.ZodNullable<z.ZodString>;
22
16
  }, z.core.$strip>;
23
17
  /**
24
18
  * Payment sessions response schema
@@ -26,21 +20,15 @@ export declare const PaymentSessionSchema: z.ZodObject<{
26
20
  */
27
21
  export declare const PaymentSessionsResponseSchema: z.ZodObject<{
28
22
  items: z.ZodArray<z.ZodObject<{
29
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
30
- orderId: z.ZodOptional<z.ZodNumber>;
31
- orderIdentifier: z.ZodOptional<z.ZodString>;
32
- amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
33
- currency: z.ZodOptional<z.ZodString>;
23
+ id: z.ZodNumber;
24
+ orderId: z.ZodNumber;
25
+ amount: z.ZodNullable<z.ZodNumber>;
34
26
  status: z.ZodString;
35
- paymentMethod: z.ZodOptional<z.ZodString>;
36
- createdDate: z.ZodOptional<z.ZodString>;
37
- updatedDate: z.ZodOptional<z.ZodString>;
38
- createdAt: z.ZodOptional<z.ZodString>;
39
- expiresAt: z.ZodOptional<z.ZodString>;
40
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
41
- type: z.ZodOptional<z.ZodString>;
42
- paymentAccountId: z.ZodOptional<z.ZodNumber>;
43
- paymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
27
+ createdDate: z.ZodString;
28
+ updatedDate: z.ZodString;
29
+ type: z.ZodString;
30
+ paymentAccountId: z.ZodNumber;
31
+ paymentUrl: z.ZodNullable<z.ZodString>;
44
32
  }, z.core.$strip>>;
45
33
  total: z.ZodNumber;
46
34
  }, z.core.$strip>;
@@ -49,37 +37,25 @@ export declare const PaymentSessionsResponseSchema: z.ZodObject<{
49
37
  * @description Schema for a single payment session or array of sessions by order
50
38
  */
51
39
  export declare const SinglePaymentSessionSchema: z.ZodUnion<readonly [z.ZodObject<{
52
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
53
- orderId: z.ZodOptional<z.ZodNumber>;
54
- orderIdentifier: z.ZodOptional<z.ZodString>;
55
- amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
56
- currency: z.ZodOptional<z.ZodString>;
40
+ id: z.ZodNumber;
41
+ orderId: z.ZodNumber;
42
+ amount: z.ZodNullable<z.ZodNumber>;
57
43
  status: z.ZodString;
58
- paymentMethod: z.ZodOptional<z.ZodString>;
59
- createdDate: z.ZodOptional<z.ZodString>;
60
- updatedDate: z.ZodOptional<z.ZodString>;
61
- createdAt: z.ZodOptional<z.ZodString>;
62
- expiresAt: z.ZodOptional<z.ZodString>;
63
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
64
- type: z.ZodOptional<z.ZodString>;
65
- paymentAccountId: z.ZodOptional<z.ZodNumber>;
66
- paymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ createdDate: z.ZodString;
45
+ updatedDate: z.ZodString;
46
+ type: z.ZodString;
47
+ paymentAccountId: z.ZodNumber;
48
+ paymentUrl: z.ZodNullable<z.ZodString>;
67
49
  }, z.core.$strip>, z.ZodArray<z.ZodObject<{
68
- id: z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>;
69
- orderId: z.ZodOptional<z.ZodNumber>;
70
- orderIdentifier: z.ZodOptional<z.ZodString>;
71
- amount: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
72
- currency: z.ZodOptional<z.ZodString>;
50
+ id: z.ZodNumber;
51
+ orderId: z.ZodNumber;
52
+ amount: z.ZodNullable<z.ZodNumber>;
73
53
  status: z.ZodString;
74
- paymentMethod: z.ZodOptional<z.ZodString>;
75
- createdDate: z.ZodOptional<z.ZodString>;
76
- updatedDate: z.ZodOptional<z.ZodString>;
77
- createdAt: z.ZodOptional<z.ZodString>;
78
- expiresAt: z.ZodOptional<z.ZodString>;
79
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
80
- type: z.ZodOptional<z.ZodString>;
81
- paymentAccountId: z.ZodOptional<z.ZodNumber>;
82
- paymentUrl: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ createdDate: z.ZodString;
55
+ updatedDate: z.ZodString;
56
+ type: z.ZodString;
57
+ paymentAccountId: z.ZodNumber;
58
+ paymentUrl: z.ZodNullable<z.ZodString>;
83
59
  }, z.core.$strip>>]>;
84
60
  /**
85
61
  * Payment account schema
@@ -87,51 +63,38 @@ export declare const SinglePaymentSessionSchema: z.ZodUnion<readonly [z.ZodObjec
87
63
  */
88
64
  export declare const PaymentAccountSchema: z.ZodObject<{
89
65
  id: z.ZodNumber;
90
- identifier: z.ZodOptional<z.ZodString>;
91
- marker: z.ZodOptional<z.ZodString>;
92
- name: z.ZodOptional<z.ZodString>;
93
- isActive: z.ZodOptional<z.ZodBoolean>;
94
- isVisible: z.ZodOptional<z.ZodBoolean>;
95
- isUsed: z.ZodOptional<z.ZodBoolean>;
96
- testMode: z.ZodOptional<z.ZodBoolean>;
97
- provider: z.ZodOptional<z.ZodString>;
98
- type: z.ZodOptional<z.ZodString>;
99
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
100
- settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
66
+ identifier: z.ZodString;
67
+ isVisible: z.ZodBoolean;
68
+ isUsed: z.ZodBoolean;
69
+ testMode: z.ZodBoolean;
70
+ type: z.ZodString;
71
+ settings: z.ZodRecord<z.ZodString, z.ZodAny>;
101
72
  testSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
102
- localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
103
- position: z.ZodOptional<z.ZodNumber>;
104
- updatedDate: z.ZodOptional<z.ZodString>;
73
+ localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
74
+ updatedDate: z.ZodString;
105
75
  }, z.core.$strip>;
106
76
  /**
107
77
  * Payment accounts response schema
108
78
  */
109
79
  export declare const PaymentAccountsResponseSchema: z.ZodArray<z.ZodObject<{
110
80
  id: z.ZodNumber;
111
- identifier: z.ZodOptional<z.ZodString>;
112
- marker: z.ZodOptional<z.ZodString>;
113
- name: z.ZodOptional<z.ZodString>;
114
- isActive: z.ZodOptional<z.ZodBoolean>;
115
- isVisible: z.ZodOptional<z.ZodBoolean>;
116
- isUsed: z.ZodOptional<z.ZodBoolean>;
117
- testMode: z.ZodOptional<z.ZodBoolean>;
118
- provider: z.ZodOptional<z.ZodString>;
119
- type: z.ZodOptional<z.ZodString>;
120
- config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
121
- settings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
81
+ identifier: z.ZodString;
82
+ isVisible: z.ZodBoolean;
83
+ isUsed: z.ZodBoolean;
84
+ testMode: z.ZodBoolean;
85
+ type: z.ZodString;
86
+ settings: z.ZodRecord<z.ZodString, z.ZodAny>;
122
87
  testSettings: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
123
- localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
124
- position: z.ZodOptional<z.ZodNumber>;
125
- updatedDate: z.ZodOptional<z.ZodString>;
88
+ localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
89
+ updatedDate: z.ZodString;
126
90
  }, z.core.$strip>>;
127
91
  /**
128
92
  * Create session response schema
129
93
  */
130
94
  export declare const CreateSessionResponseSchema: z.ZodObject<{
131
- id: z.ZodString;
132
- url: z.ZodOptional<z.ZodString>;
133
- status: z.ZodString;
134
- amount: z.ZodNumber;
135
- currency: z.ZodString;
136
- createdAt: z.ZodString;
95
+ id: z.ZodNumber;
96
+ updatedDate: z.ZodString;
97
+ version: z.ZodNumber;
98
+ identifier: z.ZodString;
99
+ paymentUrl: z.ZodString;
137
100
  }, z.core.$strip>;
@@ -7,21 +7,15 @@ const zod_1 = require("zod");
7
7
  * @description Zod schema for validating payment session responses
8
8
  */
9
9
  exports.PaymentSessionSchema = zod_1.z.object({
10
- id: zod_1.z.union([zod_1.z.string(), zod_1.z.number()]),
11
- orderId: zod_1.z.number().optional(),
12
- orderIdentifier: zod_1.z.string().optional(),
13
- amount: zod_1.z.number().nullable().optional(),
14
- currency: zod_1.z.string().optional(),
10
+ id: zod_1.z.number(),
11
+ orderId: zod_1.z.number(),
12
+ amount: zod_1.z.number().nullable(),
15
13
  status: zod_1.z.string(),
16
- paymentMethod: zod_1.z.string().optional(),
17
- createdDate: zod_1.z.string().optional(),
18
- updatedDate: zod_1.z.string().optional(),
19
- createdAt: zod_1.z.string().optional(),
20
- expiresAt: zod_1.z.string().optional(),
21
- metadata: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
22
- type: zod_1.z.string().optional(),
23
- paymentAccountId: zod_1.z.number().optional(),
24
- paymentUrl: zod_1.z.string().nullable().optional(),
14
+ createdDate: zod_1.z.string(),
15
+ updatedDate: zod_1.z.string(),
16
+ type: zod_1.z.string(),
17
+ paymentAccountId: zod_1.z.number(),
18
+ paymentUrl: zod_1.z.string().nullable(),
25
19
  });
26
20
  /**
27
21
  * Payment sessions response schema
@@ -45,21 +39,15 @@ exports.SinglePaymentSessionSchema = zod_1.z.union([
45
39
  */
46
40
  exports.PaymentAccountSchema = zod_1.z.object({
47
41
  id: zod_1.z.number(),
48
- identifier: zod_1.z.string().optional(),
49
- marker: zod_1.z.string().optional(),
50
- name: zod_1.z.string().optional(),
51
- isActive: zod_1.z.boolean().optional(),
52
- isVisible: zod_1.z.boolean().optional(),
53
- isUsed: zod_1.z.boolean().optional(),
54
- testMode: zod_1.z.boolean().optional(),
55
- provider: zod_1.z.string().optional(),
56
- type: zod_1.z.string().optional(),
57
- config: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
58
- settings: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
42
+ identifier: zod_1.z.string(),
43
+ isVisible: zod_1.z.boolean(),
44
+ isUsed: zod_1.z.boolean(),
45
+ testMode: zod_1.z.boolean(),
46
+ type: zod_1.z.string(),
47
+ settings: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
59
48
  testSettings: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
60
- localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
61
- position: zod_1.z.number().optional(),
62
- updatedDate: zod_1.z.string().optional(),
49
+ localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
50
+ updatedDate: zod_1.z.string(),
63
51
  });
64
52
  /**
65
53
  * Payment accounts response schema
@@ -69,10 +57,9 @@ exports.PaymentAccountsResponseSchema = zod_1.z.array(exports.PaymentAccountSche
69
57
  * Create session response schema
70
58
  */
71
59
  exports.CreateSessionResponseSchema = zod_1.z.object({
72
- id: zod_1.z.string(),
73
- url: zod_1.z.string().optional(),
74
- status: zod_1.z.string(),
75
- amount: zod_1.z.number(),
76
- currency: zod_1.z.string(),
77
- createdAt: zod_1.z.string(),
60
+ id: zod_1.z.number(),
61
+ updatedDate: zod_1.z.string(),
62
+ version: zod_1.z.number(),
63
+ identifier: zod_1.z.string(),
64
+ paymentUrl: zod_1.z.string(),
78
65
  });
@@ -1,13 +1,13 @@
1
1
  import AsyncModules from '../base/asyncModules';
2
2
  import type StateModule from '../base/stateModule';
3
3
  import type { IError } from '../base/utils';
4
- import type { IProductStatusEntity, IProductStatuses } from './productStatusesInterfaces';
4
+ import type { IProductStatusEntity, IProductStatusesApi } from './productStatusesInterfaces';
5
5
  /**
6
6
  * Controllers for working with product statuses
7
7
  * @handle /api/content/product-statuses
8
8
  * @description Controllers for working with product statuses
9
9
  */
10
- export default class ProductStatusesApi extends AsyncModules implements IProductStatuses {
10
+ export default class ProductStatusesApi extends AsyncModules implements IProductStatusesApi {
11
11
  protected state: StateModule;
12
12
  protected _url: string;
13
13
  /**
@@ -7,7 +7,7 @@ import type { IError, ILocalizeInfo } from '../base/utils';
7
7
  * @property {Function} validateMarker - Check the existence of a textual identifier.
8
8
  * @description This interface defines methods for retrieving and managing product statuses in the system.
9
9
  */
10
- interface IProductStatuses {
10
+ interface IProductStatusesApi {
11
11
  /**
12
12
  * Search for all product status objects.
13
13
  * @handleName getProductStatuses
@@ -63,4 +63,4 @@ interface IProductStatusEntity {
63
63
  version: number;
64
64
  position: number;
65
65
  }
66
- export type { IProductStatusEntity, IProductStatuses };
66
+ export type { IProductStatusEntity, IProductStatusesApi };