oneentry 1.0.142 → 1.0.143

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 (149) hide show
  1. package/dist/admins/adminsApi.d.ts +50 -0
  2. package/dist/admins/adminsApi.js +65 -0
  3. package/dist/admins/adminsInterfaces.d.ts +98 -0
  4. package/dist/admins/adminsInterfaces.js +2 -0
  5. package/dist/admins/adminsSchemas.d.ts +30 -0
  6. package/dist/admins/adminsSchemas.js +27 -0
  7. package/dist/attribute-sets/attributeSetsApi.d.ts +63 -0
  8. package/dist/attribute-sets/attributeSetsApi.js +98 -0
  9. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +185 -0
  10. package/dist/attribute-sets/attributeSetsInterfaces.js +2 -0
  11. package/dist/attribute-sets/attributeSetsSchemas.d.ts +90 -0
  12. package/dist/attribute-sets/attributeSetsSchemas.js +74 -0
  13. package/dist/auth-provider/authProviderApi.d.ts +249 -0
  14. package/dist/auth-provider/authProviderApi.js +354 -0
  15. package/dist/auth-provider/authProviderSchemas.d.ts +131 -0
  16. package/dist/auth-provider/authProviderSchemas.js +82 -0
  17. package/dist/auth-provider/authProvidersInterfaces.d.ts +412 -0
  18. package/dist/auth-provider/authProvidersInterfaces.js +2 -0
  19. package/dist/base/asyncModules.d.ts +80 -0
  20. package/dist/base/asyncModules.js +448 -0
  21. package/dist/base/result.d.ts +39 -0
  22. package/dist/base/result.js +154 -0
  23. package/dist/base/stateModule.d.ts +41 -0
  24. package/dist/base/stateModule.js +128 -0
  25. package/dist/base/syncModules.d.ts +286 -0
  26. package/dist/base/syncModules.js +716 -0
  27. package/dist/base/utils.d.ts +197 -0
  28. package/dist/base/utils.js +2 -0
  29. package/dist/base/validation.d.ts +118 -0
  30. package/dist/base/validation.js +132 -0
  31. package/dist/blocks/blocksApi.d.ts +76 -0
  32. package/dist/blocks/blocksApi.js +188 -0
  33. package/dist/blocks/blocksInterfaces.d.ts +168 -0
  34. package/dist/blocks/blocksInterfaces.js +2 -0
  35. package/dist/blocks/blocksSchemas.d.ts +195 -0
  36. package/dist/blocks/blocksSchemas.js +43 -0
  37. package/dist/discounts/discountsApi.d.ts +56 -0
  38. package/dist/discounts/discountsApi.js +82 -0
  39. package/dist/discounts/discountsInterfaces.d.ts +145 -0
  40. package/dist/discounts/discountsInterfaces.js +2 -0
  41. package/dist/events/eventsApi.d.ts +60 -0
  42. package/dist/events/eventsApi.js +97 -0
  43. package/dist/events/eventsInterfaces.d.ts +87 -0
  44. package/dist/events/eventsInterfaces.js +2 -0
  45. package/dist/file-uploading/fileUploadingApi.d.ts +88 -0
  46. package/dist/file-uploading/fileUploadingApi.js +129 -0
  47. package/dist/file-uploading/fileUploadingInterfaces.d.ts +114 -0
  48. package/dist/file-uploading/fileUploadingInterfaces.js +2 -0
  49. package/dist/file-uploading/fileUploadingSchemas.d.ts +22 -0
  50. package/dist/file-uploading/fileUploadingSchemas.js +21 -0
  51. package/dist/forms/formsApi.d.ts +42 -0
  52. package/dist/forms/formsApi.js +57 -0
  53. package/dist/forms/formsInterfaces.d.ts +134 -0
  54. package/dist/forms/formsInterfaces.js +2 -0
  55. package/dist/forms/formsSchemas.d.ts +50 -0
  56. package/dist/forms/formsSchemas.js +31 -0
  57. package/dist/forms-data/formsDataApi.d.ts +106 -0
  58. package/dist/forms-data/formsDataApi.js +189 -0
  59. package/dist/forms-data/formsDataInterfaces.d.ts +522 -0
  60. package/dist/forms-data/formsDataInterfaces.js +2 -0
  61. package/dist/forms-data/formsDataSchemas.d.ts +115 -0
  62. package/dist/forms-data/formsDataSchemas.js +86 -0
  63. package/dist/general-types/generalTypesApi.d.ts +28 -0
  64. package/dist/general-types/generalTypesApi.js +38 -0
  65. package/dist/general-types/generalTypesInterfaces.d.ts +29 -0
  66. package/dist/general-types/generalTypesInterfaces.js +2 -0
  67. package/dist/general-types/generalTypesSchemas.d.ts +50 -0
  68. package/dist/general-types/generalTypesSchemas.js +35 -0
  69. package/dist/index.d.ts +100 -0
  70. package/dist/index.js +103 -0
  71. package/dist/integration-collections/integrationCollectionsApi.d.ts +163 -0
  72. package/dist/integration-collections/integrationCollectionsApi.js +220 -0
  73. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +313 -0
  74. package/dist/integration-collections/integrationCollectionsInterfaces.js +2 -0
  75. package/dist/integration-collections/integrationCollectionsSchemas.d.ts +80 -0
  76. package/dist/integration-collections/integrationCollectionsSchemas.js +61 -0
  77. package/dist/locales/localesApi.d.ts +27 -0
  78. package/dist/locales/localesApi.js +37 -0
  79. package/dist/locales/localesInterfaces.d.ts +40 -0
  80. package/dist/locales/localesInterfaces.js +2 -0
  81. package/dist/locales/localesSchemas.d.ts +32 -0
  82. package/dist/locales/localesSchemas.js +26 -0
  83. package/dist/menus/menusApi.d.ts +29 -0
  84. package/dist/menus/menusApi.js +39 -0
  85. package/dist/menus/menusInterfaces.d.ts +87 -0
  86. package/dist/menus/menusInterfaces.js +3 -0
  87. package/dist/menus/menusSchemas.d.ts +16 -0
  88. package/dist/menus/menusSchemas.js +28 -0
  89. package/dist/orders/ordersApi.d.ts +149 -0
  90. package/dist/orders/ordersApi.js +203 -0
  91. package/dist/orders/ordersInterfaces.d.ts +520 -0
  92. package/dist/orders/ordersInterfaces.js +2 -0
  93. package/dist/orders/ordersSchemas.d.ts +120 -0
  94. package/dist/orders/ordersSchemas.js +101 -0
  95. package/dist/pages/pagesApi.d.ts +151 -0
  96. package/dist/pages/pagesApi.js +390 -0
  97. package/dist/pages/pagesInterfaces.d.ts +284 -0
  98. package/dist/pages/pagesInterfaces.js +2 -0
  99. package/dist/pages/pagesSchemas.d.ts +85 -0
  100. package/dist/pages/pagesSchemas.js +46 -0
  101. package/dist/payments/paymentsApi.d.ts +82 -0
  102. package/dist/payments/paymentsApi.js +121 -0
  103. package/dist/payments/paymentsInterfaces.d.ts +200 -0
  104. package/dist/payments/paymentsInterfaces.js +2 -0
  105. package/dist/payments/paymentsSchemas.d.ts +100 -0
  106. package/dist/payments/paymentsSchemas.js +65 -0
  107. package/dist/product-statuses/productStatusesApi.d.ts +47 -0
  108. package/dist/product-statuses/productStatusesApi.js +70 -0
  109. package/dist/product-statuses/productStatusesInterfaces.d.ts +62 -0
  110. package/dist/product-statuses/productStatusesInterfaces.js +2 -0
  111. package/dist/product-statuses/productStatusesSchemas.d.ts +34 -0
  112. package/dist/product-statuses/productStatusesSchemas.js +30 -0
  113. package/dist/products/productsApi.d.ts +365 -0
  114. package/dist/products/productsApi.js +459 -0
  115. package/dist/products/productsInterfaces.d.ts +577 -0
  116. package/dist/products/productsInterfaces.js +2 -0
  117. package/dist/products/productsSchemas.d.ts +200 -0
  118. package/dist/products/productsSchemas.js +98 -0
  119. package/dist/sitemap/sitemapApi.d.ts +35 -0
  120. package/dist/sitemap/sitemapApi.js +45 -0
  121. package/dist/sitemap/sitemapInterfaces.d.ts +40 -0
  122. package/dist/sitemap/sitemapInterfaces.js +2 -0
  123. package/dist/system/systemApi.d.ts +43 -0
  124. package/dist/system/systemApi.js +56 -0
  125. package/dist/system/systemInterfaces.d.ts +29 -0
  126. package/dist/system/systemInterfaces.js +2 -0
  127. package/dist/templates/templatesApi.d.ts +49 -0
  128. package/dist/templates/templatesApi.js +75 -0
  129. package/dist/templates/templatesInterfaces.d.ts +67 -0
  130. package/dist/templates/templatesInterfaces.js +2 -0
  131. package/dist/templates/templatesSchemas.d.ts +48 -0
  132. package/dist/templates/templatesSchemas.js +31 -0
  133. package/dist/templates-preview/templatesPreviewApi.d.ts +38 -0
  134. package/dist/templates-preview/templatesPreviewApi.js +53 -0
  135. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +119 -0
  136. package/dist/templates-preview/templatesPreviewInterfaces.js +2 -0
  137. package/dist/templates-preview/templatesPreviewSchemas.d.ts +83 -0
  138. package/dist/templates-preview/templatesPreviewSchemas.js +48 -0
  139. package/dist/users/usersApi.d.ts +143 -0
  140. package/dist/users/usersApi.js +171 -0
  141. package/dist/users/usersInterfaces.d.ts +229 -0
  142. package/dist/users/usersInterfaces.js +2 -0
  143. package/dist/users/usersSchemas.d.ts +38 -0
  144. package/dist/users/usersSchemas.js +28 -0
  145. package/dist/web-socket/wsApi.d.ts +25 -0
  146. package/dist/web-socket/wsApi.js +45 -0
  147. package/dist/web-socket/wsInterfaces.d.ts +16 -0
  148. package/dist/web-socket/wsInterfaces.js +2 -0
  149. package/package.json +3 -81
@@ -0,0 +1,200 @@
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
+ paymentStages: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
60
+ discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
61
+ }, z.core.$strip>;
62
+ /**
63
+ * Products response schema
64
+ */
65
+ export declare const ProductsResponseSchema: z.ZodObject<{
66
+ items: z.ZodArray<z.ZodObject<{
67
+ id: z.ZodNumber;
68
+ identifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
69
+ attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
70
+ localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
71
+ statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
72
+ isVisible: z.ZodOptional<z.ZodBoolean>;
73
+ statusIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
74
+ position: z.ZodOptional<z.ZodNumber>;
75
+ isPositionLocked: z.ZodOptional<z.ZodBoolean>;
76
+ templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
77
+ shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
78
+ price: z.ZodNullable<z.ZodNumber>;
79
+ additional: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
80
+ sku: z.ZodNullable<z.ZodOptional<z.ZodString>>;
81
+ isSync: z.ZodOptional<z.ZodBoolean>;
82
+ categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
83
+ attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
84
+ productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
85
+ blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
86
+ moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
87
+ currency: z.ZodOptional<z.ZodString>;
88
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
89
+ id: z.ZodNumber;
90
+ filename: z.ZodString;
91
+ url: z.ZodString;
92
+ size: z.ZodOptional<z.ZodNumber>;
93
+ type: z.ZodOptional<z.ZodString>;
94
+ }, z.core.$strip>>>;
95
+ relatedProducts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
96
+ pageId: z.ZodOptional<z.ZodNumber>;
97
+ paymentStages: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
98
+ discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
99
+ }, z.core.$strip>>;
100
+ total: z.ZodNumber;
101
+ }, z.core.$strip>;
102
+ /**
103
+ * Single product response schema
104
+ */
105
+ export declare const SingleProductSchema: z.ZodObject<{
106
+ id: z.ZodNumber;
107
+ identifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
108
+ attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
109
+ localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
110
+ statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
111
+ isVisible: z.ZodOptional<z.ZodBoolean>;
112
+ statusIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
113
+ position: z.ZodOptional<z.ZodNumber>;
114
+ isPositionLocked: z.ZodOptional<z.ZodBoolean>;
115
+ templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
116
+ shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
117
+ price: z.ZodNullable<z.ZodNumber>;
118
+ additional: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
119
+ sku: z.ZodNullable<z.ZodOptional<z.ZodString>>;
120
+ isSync: z.ZodOptional<z.ZodBoolean>;
121
+ categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
122
+ attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
123
+ productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
124
+ blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
125
+ moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
126
+ currency: z.ZodOptional<z.ZodString>;
127
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
128
+ id: z.ZodNumber;
129
+ filename: z.ZodString;
130
+ url: z.ZodString;
131
+ size: z.ZodOptional<z.ZodNumber>;
132
+ type: z.ZodOptional<z.ZodString>;
133
+ }, z.core.$strip>>>;
134
+ relatedProducts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
135
+ pageId: z.ZodOptional<z.ZodNumber>;
136
+ paymentStages: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
137
+ discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
138
+ }, z.core.$strip>;
139
+ /**
140
+ * Products count schema
141
+ */
142
+ export declare const ProductsCountSchema: z.ZodObject<{
143
+ totalAll: z.ZodNumber;
144
+ totalInCategory: z.ZodNumber;
145
+ totalInCategoryWithNested: z.ZodNumber;
146
+ }, z.core.$strip>;
147
+ /**
148
+ * Product block schema
149
+ */
150
+ export declare const ProductBlockSchema: z.ZodObject<{
151
+ id: z.ZodNumber;
152
+ attributeSetIdentifier: z.ZodNullable<z.ZodString>;
153
+ localizeInfos: z.ZodRecord<z.ZodString, z.ZodAny>;
154
+ version: z.ZodNumber;
155
+ position: z.ZodNumber;
156
+ identifier: z.ZodString;
157
+ type: z.ZodString;
158
+ customSettings: z.ZodRecord<z.ZodString, z.ZodAny>;
159
+ templateIdentifier: z.ZodNullable<z.ZodString>;
160
+ isVisible: z.ZodBoolean;
161
+ isSync: z.ZodBoolean;
162
+ attributeValues: z.ZodRecord<z.ZodString, z.ZodAny>;
163
+ }, z.core.$strip>;
164
+ /**
165
+ * Related products schema
166
+ */
167
+ export declare const RelatedProductsSchema: z.ZodArray<z.ZodObject<{
168
+ id: z.ZodNumber;
169
+ identifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
170
+ attributeSetIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
171
+ localizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
172
+ statusLocalizeInfos: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
173
+ isVisible: z.ZodOptional<z.ZodBoolean>;
174
+ statusIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
175
+ position: z.ZodOptional<z.ZodNumber>;
176
+ isPositionLocked: z.ZodOptional<z.ZodBoolean>;
177
+ templateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
178
+ shortDescTemplateIdentifier: z.ZodNullable<z.ZodOptional<z.ZodString>>;
179
+ price: z.ZodNullable<z.ZodNumber>;
180
+ additional: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
181
+ sku: z.ZodNullable<z.ZodOptional<z.ZodString>>;
182
+ isSync: z.ZodOptional<z.ZodBoolean>;
183
+ categories: z.ZodOptional<z.ZodArray<z.ZodString>>;
184
+ attributeValues: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
185
+ productPages: z.ZodOptional<z.ZodArray<z.ZodAny>>;
186
+ blocks: z.ZodOptional<z.ZodArray<z.ZodString>>;
187
+ moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
188
+ currency: z.ZodOptional<z.ZodString>;
189
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
190
+ id: z.ZodNumber;
191
+ filename: z.ZodString;
192
+ url: z.ZodString;
193
+ size: z.ZodOptional<z.ZodNumber>;
194
+ type: z.ZodOptional<z.ZodString>;
195
+ }, z.core.$strip>>>;
196
+ relatedProducts: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
197
+ pageId: z.ZodOptional<z.ZodNumber>;
198
+ paymentStages: z.ZodNullable<z.ZodOptional<z.ZodAny>>;
199
+ discountConfig: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
200
+ }, z.core.$strip>>;
@@ -0,0 +1,98 @@
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
+ paymentStages: zod_1.z.any().optional().nullable(),
57
+ discountConfig: zod_1.z.record(zod_1.z.string(), zod_1.z.any()).optional(),
58
+ });
59
+ /**
60
+ * Products response schema
61
+ */
62
+ exports.ProductsResponseSchema = zod_1.z.object({
63
+ items: zod_1.z.array(exports.ProductEntitySchema),
64
+ total: zod_1.z.number(),
65
+ });
66
+ /**
67
+ * Single product response schema
68
+ */
69
+ exports.SingleProductSchema = exports.ProductEntitySchema;
70
+ /**
71
+ * Products count schema
72
+ */
73
+ exports.ProductsCountSchema = zod_1.z.object({
74
+ totalAll: zod_1.z.number(),
75
+ totalInCategory: zod_1.z.number(),
76
+ totalInCategoryWithNested: zod_1.z.number(),
77
+ });
78
+ /**
79
+ * Product block schema
80
+ */
81
+ exports.ProductBlockSchema = zod_1.z.object({
82
+ id: zod_1.z.number(),
83
+ attributeSetIdentifier: zod_1.z.string().nullable(),
84
+ localizeInfos: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
85
+ version: zod_1.z.number(),
86
+ position: zod_1.z.number(),
87
+ identifier: zod_1.z.string(),
88
+ type: zod_1.z.string(),
89
+ customSettings: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
90
+ templateIdentifier: zod_1.z.string().nullable(),
91
+ isVisible: zod_1.z.boolean(),
92
+ isSync: zod_1.z.boolean(),
93
+ attributeValues: zod_1.z.record(zod_1.z.string(), zod_1.z.any()),
94
+ });
95
+ /**
96
+ * Related products schema
97
+ */
98
+ exports.RelatedProductsSchema = zod_1.z.array(exports.ProductEntitySchema);
@@ -0,0 +1,35 @@
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
+ }
@@ -0,0 +1,45 @@
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;
@@ -0,0 +1,40 @@
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 };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,43 @@
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<unknown | 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<unknown | IError>;
27
+ /**
28
+ * Sends a GET request to the '/test500' endpoint and returns the result.
29
+ * @handleName test500
30
+ * @returns {Promise<unknown | 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<unknown | IError>;
35
+ /**
36
+ * Getting the number of requests to API.
37
+ * @handleName getApiStat
38
+ * @returns {Promise<unknown | 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<unknown>;
43
+ }
@@ -0,0 +1,56 @@
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 system - system
9
+ * @handle /api/content/system
10
+ * @description Controllers for working with system - system
11
+ */
12
+ class SystemApi extends asyncModules_1.default {
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - The state module.
16
+ * @description Constructor initializes the SystemApi with a given state.
17
+ */
18
+ constructor(state) {
19
+ super(state);
20
+ this._url = state.url + '/api/content/system';
21
+ }
22
+ /**
23
+ * Sends a GET request to the '/test404' endpoint and returns the result.
24
+ * @handleName test404
25
+ * @returns {Promise<unknown | IError>} The response from the server after fetching data from the '/test404' endpoint.
26
+ * @throws {IError} When isShell=false and an error occurs during the fetch
27
+ * @description This method is used to test the 404 error handling by sending a GET request to a specific endpoint.
28
+ */
29
+ async test404() {
30
+ const result = await this._fetchGet('/test404');
31
+ return result;
32
+ }
33
+ /**
34
+ * Sends a GET request to the '/test500' endpoint and returns the result.
35
+ * @handleName test500
36
+ * @returns {Promise<unknown | IError>} The response from the server after fetching data from the '/test500' endpoint.
37
+ * @throws {IError} When isShell=false and an error occurs during the fetch
38
+ * @description This method is used to test the 500 error handling by sending a GET request to a specific endpoint.
39
+ */
40
+ async test500() {
41
+ const result = await this._fetchGet('/test500');
42
+ return result;
43
+ }
44
+ /**
45
+ * Getting the number of requests to API.
46
+ * @handleName getApiStat
47
+ * @returns {Promise<unknown | IError>} Return object with date and count.
48
+ * @throws {IError} When isShell=false and an error occurs during the fetch
49
+ * @description Getting the number of requests to API.
50
+ */
51
+ async getApiStat() {
52
+ const result = await this._fetchGet('/api-stat');
53
+ return result;
54
+ }
55
+ }
56
+ exports.default = SystemApi;
@@ -0,0 +1,29 @@
1
+ import type { IError } from 'base/utils';
2
+ /**
3
+ * @interface ISystemApi
4
+ * @description Represents a interface object of System Api.
5
+ */
6
+ interface ISystemApi {
7
+ /**
8
+ * Test 404 error.
9
+ * @handleName test404
10
+ * @returns {unknown} Returns a Promise that resolves with any data.
11
+ * @description This method tests 404 error.
12
+ */
13
+ test404(): Promise<unknown | IError>;
14
+ /**
15
+ * Test 500 error.
16
+ * @handleName test500
17
+ * @returns {unknown} Returns a Promise that resolves with any data.
18
+ * @description This method tests 500 error.
19
+ */
20
+ test500(): Promise<unknown | IError>;
21
+ /**
22
+ * getApiStat
23
+ * @handleName getApiStat
24
+ * @returns {unknown} Returns a Promise that resolves with any data.
25
+ * @description This method getApiStat.
26
+ */
27
+ getApiStat(): Promise<unknown>;
28
+ }
29
+ export type { ISystemApi };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,49 @@
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
+ }