oneentry 1.0.140 → 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 (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 +99 -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 +187 -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 +351 -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 +425 -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 +440 -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 +149 -0
  26. package/dist/base/syncModules.js +549 -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 +173 -0
  34. package/dist/blocks/blocksInterfaces.js +2 -0
  35. package/dist/blocks/blocksSchemas.d.ts +187 -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 +132 -0
  47. package/dist/file-uploading/fileUploadingInterfaces.d.ts +117 -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 +132 -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 +525 -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 +30 -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 +173 -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 +41 -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 +88 -0
  86. package/dist/menus/menusInterfaces.js +4 -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 +527 -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 +292 -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 +206 -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 +66 -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 +586 -0
  116. package/dist/products/productsInterfaces.js +2 -0
  117. package/dist/products/productsSchemas.d.ts +192 -0
  118. package/dist/products/productsSchemas.js +96 -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 +58 -0
  125. package/dist/system/systemInterfaces.d.ts +31 -0
  126. package/dist/system/systemInterfaces.js +5 -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 +70 -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 +121 -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 +173 -0
  141. package/dist/users/usersInterfaces.d.ts +235 -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 +17 -0
  148. package/dist/web-socket/wsInterfaces.js +2 -0
  149. package/package.json +3 -81
@@ -0,0 +1,525 @@
1
+ import type { IError } from '../base/utils';
2
+ import type { IUploadingQuery } from '../file-uploading/fileUploadingInterfaces';
3
+ /**
4
+ * Interface for retrieving and posting form data in the system.
5
+ * @interface IFormsData
6
+ * @property {Function} getFormsData - Get all forms data.
7
+ * @property {Function} postFormsData - Find all product page objects with pagination and multiple filtering.
8
+ * @property {Function} getFormsDataByMarker - Get one object of form data by marker.
9
+ * @description This interface defines methods for retrieving and posting form data in the system.
10
+ */
11
+ interface IFormsData {
12
+ /**
13
+ * Creating an object of data save information by form
14
+ * @handleName postFormsData
15
+ * @param {IBodyPostFormData} body - Request body.
16
+ * @example
17
+ {
18
+ "formIdentifier": "test-form",
19
+ "formModuleConfigId": 2,
20
+ "moduleEntityIdentifier": "blog",
21
+ "replayTo": null,
22
+ "status": "sent",
23
+ "formData": [
24
+ {
25
+ "marker": "name",
26
+ "type": "string",
27
+ "value": "Test"
28
+ }
29
+ ]
30
+ }
31
+ * @param {string} body.formIdentifier - The identifier for the form. Example: "form".
32
+ * @param {number} body.formModuleConfigId - The ID of the form module configuration. Example: 2.
33
+ * @param {string} body.moduleEntityIdentifier - The identifier of the module entity. Example: "form".
34
+ * @param {string | null} [body.replayTo] - The email address to which the reply should be sent. Example: null.
35
+ * @param {string | null} [body.status] - The status of the form submission. Example: "sent".
36
+ * @param {FormDataType[]} body.formData - Form data.
37
+ * @example
38
+ [
39
+ {
40
+ "marker": "name",
41
+ "type": "string",
42
+ "value": "Jack"
43
+ }
44
+ ]
45
+ * @param {string} body.formData[].marker - The marker identifying the form field. Example: "name".
46
+ * @param {string} body.formData[].type - The type of the form field. Example: "string".
47
+ * @param {string} body.formData[].value - The value of the form field. Example: "Jack".
48
+ * @param {string} [langCode] - Language code. Default: "en_US".
49
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
50
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
51
+ */
52
+ postFormsData(body: IBodyPostFormData, langCode?: string): Promise<IPostFormResponse | IError>;
53
+ /**
54
+ * Retrieves form data by its marker.
55
+ * @handleName getFormsDataByMarker
56
+ * @param {string} marker - The marker identifying the form data. Example: "contact_form_data".
57
+ * @param {number} formModuleConfigId - The form module configuration ID. Example: 4.
58
+ * @param {object} [body] - Request body. Default: {}.
59
+ * @example
60
+ {
61
+ "entityIdentifier": "test",
62
+ "userIdentifier": "",
63
+ "status": "",
64
+ "dateFrom": "2025-08-11",
65
+ "dateTo": ""
66
+ }
67
+ * @param {number} [isNested] - Flag for getting hierarchical data. Example: 1.
68
+ * @param {string} [langCode] - The language code for localization. Default: "en_US".
69
+ * @param {number} [offset] - Optional offset for pagination. Default: 0.
70
+ * @param {number} [limit] - Optional limit for pagination. Default: 30.
71
+ * @returns {IFormsByMarkerDataEntity} A promise that resolves to a form data entity or an error.
72
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
73
+ * @description This method retrieves form data by its marker.
74
+ */
75
+ getFormsDataByMarker(marker: string, formModuleConfigId: number, body?: object, isNested?: number, langCode?: string, offset?: number, limit?: number): Promise<IFormsByMarkerDataEntity | IError>;
76
+ }
77
+ /**
78
+ * Represents the structure of a form data entity.
79
+ * @interface IFormDataEntity
80
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
81
+ * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
82
+ * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
83
+ * @property {FormDataType[]} formData - Form data.
84
+ * @example
85
+ [
86
+ {
87
+ "marker": "name",
88
+ "type": "string",
89
+ "value": "Test"
90
+ }
91
+ ]
92
+ * @property {string | null} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
93
+ * @property {string} [moduleIdentifier] - Module identifier. Example: "blog".
94
+ * @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
95
+ */
96
+ interface IFormDataEntity {
97
+ id: number;
98
+ formIdentifier: string;
99
+ time: Date | string;
100
+ formData: FormDataType[];
101
+ attributeSetIdentifier: string | null;
102
+ moduleIdentifier?: string;
103
+ }
104
+ /**
105
+ * Represents a collection of form data entities.
106
+ * @interface IFormsDataEntity
107
+ * @property {IFormDataEntity[]} items - Array of form data objects.
108
+ * @example
109
+ [
110
+ {
111
+ "id": 1,
112
+ "formIdentifier": "form",
113
+ "time": "2025-06-06T19:07:45.993Z",
114
+ "formData": {},
115
+ "attributeSetIdentifier": "form",
116
+ "actionMessage": "Action message string"
117
+ }
118
+ ]
119
+ * @property {number} total - Total number of found records. Example: 100.
120
+ * @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
121
+ */
122
+ interface IFormsDataEntity {
123
+ items: IFormDataEntity[];
124
+ total: number;
125
+ }
126
+ /**
127
+ * Represents the structure of a form data entity.
128
+ * @interface IFormByMarkerDataEntity
129
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
130
+ * @property {null | number} parentId - The unique identifier of the parent form page. Example: 123.
131
+ * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
132
+ * @property {number} depth - Example: 1.
133
+ * @property {string | null} ip - Ip. Example: '127.0.0.1'.
134
+ * @property {string | null} fingerprint - Fingerprint. Example: 'fingerprint'.
135
+ * @property {string | null} status - Status. Example: 'approved'.
136
+ * @property {string | null} userIdentifier - Text identifier (marker) of the user. Example: "admin".
137
+ * @property {FormDataType[]} formData - Form data.
138
+ * @example
139
+ [
140
+ {
141
+ "marker": "name",
142
+ "type": "string",
143
+ "value": "Test"
144
+ }
145
+ ]
146
+ * @property {string | null} attributeSetIdentifier - Text identifier (marker) of the used attribute set. Example: "product_attributes".
147
+ * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
148
+ * @property {string} entityIdentifier - Text identifier (marker) of the entity. Example: "test".
149
+ * @property {boolean} isUserAdmin - Is user admin. Example: true.
150
+ * @property {number} formModuleConfigId - Form module config Id. Example: 2.
151
+ * @property {string} [moduleIdentifier] - Module identifier. Example: "blog".
152
+ * @property {number} entityId - Form module config Id. Example: 2.
153
+ * @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
154
+ */
155
+ interface IFormByMarkerDataEntity {
156
+ id: number;
157
+ parentId?: null | number;
158
+ formIdentifier: string;
159
+ depth?: number;
160
+ ip?: string | null;
161
+ fingerprint?: string | null;
162
+ status?: string | null;
163
+ userIdentifier?: string | null;
164
+ formData: FormDataType[];
165
+ attributeSetIdentifier?: string | null;
166
+ time: Date | string;
167
+ entityIdentifier?: string;
168
+ isUserAdmin?: boolean;
169
+ formModuleConfigId?: number;
170
+ moduleIdentifier?: string;
171
+ entityId?: number;
172
+ }
173
+ /**
174
+ * Represents a collection of form data entities.
175
+ * @interface IFormsByMarkerDataEntity
176
+ * @property {IFormByMarkerDataEntity[]} items - Array of form data objects.
177
+ * @example
178
+ [
179
+ {
180
+ "id": 42,
181
+ "parentId": null,
182
+ "formIdentifier": "test-form",
183
+ "depth": 0,
184
+ "ip": null,
185
+ "status": null,
186
+ "userIdentifier": null,
187
+ "formData": [
188
+ {
189
+ "marker": "name",
190
+ "type": "string",
191
+ "value": "Test"
192
+ }
193
+ ],
194
+ "attributeSetIdentifier": "form",
195
+ "time": "2025-03-03T15:51:17.458Z",
196
+ "entityIdentifier": "blog",
197
+ "isUserAdmin": false,
198
+ "formModuleConfigId": 2
199
+ }
200
+ ]
201
+ * @property {number} total - Total number of found records. Example: 100.
202
+ * @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
203
+ */
204
+ interface IFormsByMarkerDataEntity {
205
+ items: IFormByMarkerDataEntity[];
206
+ total: number;
207
+ }
208
+ /**
209
+ * Represents the structure of the response after posting form data.
210
+ * @interface IPostFormResponse
211
+ * @property {object} formData - Form data.
212
+ * @example
213
+ {
214
+ "id": 42,
215
+ "formIdentifier": "contact_form",
216
+ "time": "2023-10-01T12:00:00Z",
217
+ "entityIdentifier": "blog",
218
+ "isUserAdmin": false,
219
+ "formModuleId": 2,
220
+ "parentId": null,
221
+ "userIdentifier": null,
222
+ "formData": [
223
+ {
224
+ "marker": "name",
225
+ "type": "string",
226
+ "value": "Jack"
227
+ }
228
+ ]
229
+ }
230
+ * @property {number} formData.id - The unique identifier of the form page. Example: 12345.
231
+ * @property {string} formData.formIdentifier - The identifier of the form. Example: "contact_form".
232
+ * @property {string} formData.time - The time of the form submit. Example: "2023-10-01T12:00:00Z".
233
+ * @property {string} formData.entityIdentifier - The entity identifier. Example: "blog".
234
+ * @property {boolean} formData.isUserAdmin - Is user admin. Example: false.
235
+ * @property {number} formData.formModuleId - The form module identifier. Example: 2.
236
+ * @property {string | null} formData.userIdentifier - The user identifier. Example: null.
237
+ * @property {number | null} formData.parentId - The parent identifier. Example: null.
238
+ * @property {FormDataType[]} formData.formData - Form fields data.
239
+ * @example
240
+ [
241
+ {
242
+ "marker": "name",
243
+ "type": "string",
244
+ "value": "Jack"
245
+ }
246
+ ]
247
+ * @property {string} actionMessage - Action message for the form data. Example: "Form submitted successfully".
248
+ */
249
+ interface IPostFormResponse {
250
+ actionMessage: string;
251
+ formData: {
252
+ id: number;
253
+ formIdentifier: string;
254
+ time: string;
255
+ entityIdentifier: string;
256
+ fingerprint: string;
257
+ isUserAdmin: boolean;
258
+ formModuleId: number;
259
+ userIdentifier: string | null;
260
+ parentId: number | null;
261
+ formData: FormDataType[];
262
+ };
263
+ }
264
+ /**
265
+ * Represents the structure of the response after updating form data.
266
+ * @interface IUpdateFormsData
267
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
268
+ * @property {string} formIdentifier - The identifier of the form. Example: "contact_form".
269
+ * @property {string} time - The time of the form submit. Example: "2023-10-01T12:00:00Z".
270
+ * @property {FormDataType[]} formData - Form fields data.
271
+ * @property {string} userIdentifier - The user identifier. Example: null.
272
+ * @property {string} entityIdentifier - The entity identifier. Example: "blog".
273
+ * @property {null | number} parentId - The parent identifier. Example: null.
274
+ * @property {null | string} fingerprint - The fingerprint of the form. Example: null.
275
+ * @property {boolean} isUserAdmin - Is user admin. Example: false.
276
+ * @property {number} formModuleId - The form module identifier. Example: 2.
277
+ */
278
+ interface IUpdateFormsData {
279
+ id: number;
280
+ formIdentifier: string;
281
+ time: string;
282
+ formData: FormDataType[];
283
+ userIdentifier: string;
284
+ entityIdentifier: string;
285
+ parentId: null | number;
286
+ fingerprint: null | string;
287
+ isUserAdmin: boolean;
288
+ formModuleId: number;
289
+ }
290
+ /**
291
+ * Contains an array of data form objects with the following values
292
+ */
293
+ type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | Record<string, any>;
294
+ /**
295
+ * Represents the structure of the body for posting form data.
296
+ * @interface IBodyPostFormData
297
+ * @property {string} formIdentifier - Text identifier (marker) of the form. Example: "form".
298
+ * @property {number} formModuleConfigId - The unique identifier of the form module configuration. Example: 2.
299
+ * @property {string} moduleEntityIdentifier - Text identifier (marker) of the module entity. Example: "blog".
300
+ * @property {string | null} replayTo - Email to reply to. Example: "some@email.com".
301
+ * @property {string} status - Status of the form. Example: "sent".
302
+ * @property {FormDataType[]} formData - Array of form data objects.
303
+ * @example
304
+ [
305
+ {
306
+ "marker": "name",
307
+ "type": "string",
308
+ "value": "Jack"
309
+ }
310
+ ]
311
+ * @property {string} formData[].marker - The marker identifying the form field. Example: "name".
312
+ * @property {string} formData[].type - The type of the form field. Example: "string".
313
+ * @property {string} formData[].value - The value of the form field. Example: "name".
314
+ * @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files.
315
+ * @example
316
+ {
317
+ "type": "page",
318
+ "entity": "editor",
319
+ "id": 3787
320
+ }
321
+ * @description This interface defines the structure of a form post object, including its identifiers, time, form data, and optional file query.
322
+ */
323
+ interface IBodyPostFormData {
324
+ formIdentifier: string;
325
+ formModuleConfigId: number;
326
+ moduleEntityIdentifier: string;
327
+ replayTo: string | null;
328
+ status: string;
329
+ formData: FormDataType[];
330
+ fileQuery?: IUploadingQuery;
331
+ }
332
+ /**
333
+ * Represents a form data entity with a simple value.
334
+ * @interface IBodyTypeStringNumberFloat
335
+ * @property {string} marker - marker name. Example: "some_marker".
336
+ * @property {string} type - Type value. "string" | "number" | "float". Example: "string".
337
+ * @property {string} value - Value of the form data entity, which can be a "string", "number", or "float". Example: "string".
338
+ * @description Represents a form data entity with a marker, type, and value.
339
+ */
340
+ interface IBodyTypeStringNumberFloat {
341
+ marker: string;
342
+ type: 'string' | 'number' | 'float';
343
+ value: string;
344
+ }
345
+ /**
346
+ * Represents a date/time form data entity.
347
+ * @interface IBodyTypeTimeDate
348
+ * @property {string} marker - marker name. Example: "ome_marker".
349
+ * @property {string} type - Type value. 'date' | 'dateTime' | 'time' Example: "date".
350
+ * @property {object} value - Date object. Contains fullDate, formattedValue, formatString.
351
+ * @example
352
+ {
353
+ "fullDate": "2024-05-07T21:02:00.000Z",
354
+ "formattedValue": "08-05-2024 00:02",
355
+ "formatString": "DD-MM-YYYY HH:mm"
356
+ }
357
+ * @description Represents a date, dateTime, or time value in a structured format.
358
+ */
359
+ interface IBodyTypeTimeDate {
360
+ marker: string;
361
+ type: 'date' | 'dateTime' | 'time';
362
+ value: {
363
+ fullDate: string;
364
+ formattedValue: string;
365
+ formatString: string;
366
+ };
367
+ }
368
+ /**
369
+ * Represents a text form data entity.
370
+ * @interface IBodyTypeText
371
+ * @property {string} marker - marker name. Example: "some_marker".
372
+ * @property {string} type - Type value. Example: "text".
373
+ * @property {object} value - Text Object. Contains html as string, plain text and params.
374
+ * @example
375
+ {
376
+ "htmlValue": "<p>Hello world</p>",
377
+ "plainValue": "",
378
+ "params": {
379
+ "isEditorDisabled": false,
380
+ "isImageCompressed": true
381
+ }
382
+ }
383
+ * @description Represents a text value with HTML and plain text representations, along with parameters for editor and image compression settings.
384
+ */
385
+ interface IBodyTypeText {
386
+ marker: string;
387
+ type: 'text';
388
+ value: {
389
+ htmlValue: string;
390
+ plainValue: string;
391
+ params: {
392
+ isEditorDisabled: boolean;
393
+ isImageCompressed: boolean;
394
+ };
395
+ };
396
+ }
397
+ /**
398
+ * Represents a text with header form data entity.
399
+ * @interface IBodyTypeTextWithHeader
400
+ * @property {string} marker - marker name. Example: "about".
401
+ * @property {string} type - Type value. Example: "textWithHeader".
402
+ * @property {object} value - Text Object. Contains html as string, header and params.
403
+ * @example
404
+ {
405
+ "header": "Headline",
406
+ "htmlValue": "<p>Hello World</p>",
407
+ "plainValue": "",
408
+ "params": {
409
+ "isEditorDisabled": false,
410
+ "isImageCompressed": true
411
+ }
412
+ }
413
+ * @description Represents a text value with a header, HTML and plain text representations, along with parameters for editor and image compression settings.
414
+ */
415
+ interface IBodyTypeTextWithHeader {
416
+ marker: string;
417
+ type: 'textWithHeader';
418
+ value: {
419
+ header: string;
420
+ htmlValue: string;
421
+ plainValue: string;
422
+ params: {
423
+ isEditorDisabled: boolean;
424
+ isImageCompressed: boolean;
425
+ };
426
+ };
427
+ }
428
+ /**
429
+ * Represents an image or group of images form data entity.
430
+ * @interface IBodyTypeImageGroupOfImages
431
+ * @property {string} marker - marker name. Example: "avatar".
432
+ * @property {'image' | 'groupOfImage'} type - Type value. Example: "image".
433
+ * @property {object} value - Image Object. Contains image information.
434
+ * @example
435
+ [
436
+ {
437
+ "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
438
+ "downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
439
+ "size": 392585,
440
+ "previewLink": "",
441
+ "params": {
442
+ "isImageCompressed": true
443
+ }
444
+ }
445
+ ]
446
+ * @description Represents an image or a group of images with their details, including filename, download link, size, preview link, and parameters for image compression.
447
+ */
448
+ interface IBodyTypeImageGroupOfImages {
449
+ marker: string;
450
+ type: 'image' | 'groupOfImage';
451
+ value: {
452
+ filename: string;
453
+ downloadLink: string;
454
+ size: number;
455
+ previewLink: string;
456
+ params: {
457
+ isImageCompressed: boolean;
458
+ };
459
+ } | Array<{
460
+ filename: string;
461
+ downloadLink: string;
462
+ size: number;
463
+ previewLink: string;
464
+ params: {
465
+ isImageCompressed: boolean;
466
+ };
467
+ }>;
468
+ }
469
+ /**
470
+ * Represents a file form data entity.
471
+ * @interface IBodyTypeFile
472
+ * @property {string} marker - marker name. Example: "picture".
473
+ * @property {'file'} type - Type value. Example: "file".
474
+ * @property {object} value - File Object. Contains file information.
475
+ * @example
476
+ [
477
+ {
478
+ "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
479
+ "downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
480
+ "size": 392585
481
+ }
482
+ ]
483
+ * @description Represents a file with its details, including filename, download link, and size.
484
+ */
485
+ interface IBodyTypeFile {
486
+ marker: string;
487
+ type: 'file';
488
+ value: {
489
+ filename: string;
490
+ downloadLink: string;
491
+ size: number;
492
+ };
493
+ }
494
+ /**
495
+ * Represents a radio button or list selection form data entity.
496
+ * @interface IBodyTypeRadioButtonList
497
+ * @property {string} marker - marker name. Example: "selector".
498
+ * @property {string} type - Type value. Example: 'list'.
499
+ * @property {Array} value - Array of list or radioButton bojects.
500
+ * @example
501
+ [
502
+ {
503
+ "title": "red",
504
+ "value": "1",
505
+ "extended": {
506
+ "value": "red",
507
+ "type": "string"
508
+ }
509
+ }
510
+ ]
511
+ * @description Represents a list or radio button selection with multiple options, each containing a title, value, and extended information.
512
+ */
513
+ interface IBodyTypeRadioButtonList {
514
+ marker: string;
515
+ type: 'list' | 'radioButton';
516
+ value: Array<{
517
+ title: string;
518
+ value: string;
519
+ extended: {
520
+ value: string;
521
+ type: string;
522
+ };
523
+ }>;
524
+ }
525
+ export type { FormDataType, IBodyPostFormData, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, IFormByMarkerDataEntity, IFormDataEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IPostFormResponse, IUpdateFormsData, };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Validation schemas for FormsData module
3
+ * @description Zod schemas for validating forms data-related API responses
4
+ */
5
+ import { z } from 'zod';
6
+ /**
7
+ * Form data type schema (flexible structure)
8
+ */
9
+ export declare const FormDataTypeSchema: z.ZodUnion<readonly [z.ZodObject<{
10
+ marker: z.ZodString;
11
+ type: z.ZodString;
12
+ value: z.ZodAny;
13
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
14
+ /**
15
+ * Form by marker data entity schema
16
+ */
17
+ export declare const FormByMarkerDataEntitySchema: z.ZodObject<{
18
+ id: z.ZodNumber;
19
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
20
+ formIdentifier: z.ZodString;
21
+ depth: z.ZodOptional<z.ZodNumber>;
22
+ ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
23
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
24
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
25
+ userIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
26
+ formData: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
27
+ marker: z.ZodString;
28
+ type: z.ZodString;
29
+ value: z.ZodAny;
30
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
31
+ marker: z.ZodString;
32
+ type: z.ZodString;
33
+ value: z.ZodAny;
34
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>>]>;
35
+ attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ time: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
37
+ entityIdentifier: z.ZodOptional<z.ZodString>;
38
+ isUserAdmin: z.ZodOptional<z.ZodBoolean>;
39
+ formModuleConfigId: z.ZodOptional<z.ZodNumber>;
40
+ moduleIdentifier: z.ZodOptional<z.ZodString>;
41
+ entityId: z.ZodOptional<z.ZodNumber>;
42
+ }, z.core.$strip>;
43
+ /**
44
+ * Forms by marker data response schema
45
+ */
46
+ export declare const FormsByMarkerDataResponseSchema: z.ZodObject<{
47
+ items: z.ZodArray<z.ZodObject<{
48
+ id: z.ZodNumber;
49
+ parentId: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
50
+ formIdentifier: z.ZodString;
51
+ depth: z.ZodOptional<z.ZodNumber>;
52
+ ip: z.ZodOptional<z.ZodNullable<z.ZodString>>;
53
+ fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
54
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
55
+ userIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ formData: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
57
+ marker: z.ZodString;
58
+ type: z.ZodString;
59
+ value: z.ZodAny;
60
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
61
+ marker: z.ZodString;
62
+ type: z.ZodString;
63
+ value: z.ZodAny;
64
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>>]>;
65
+ attributeSetIdentifier: z.ZodOptional<z.ZodNullable<z.ZodString>>;
66
+ time: z.ZodUnion<readonly [z.ZodDate, z.ZodString]>;
67
+ entityIdentifier: z.ZodOptional<z.ZodString>;
68
+ isUserAdmin: z.ZodOptional<z.ZodBoolean>;
69
+ formModuleConfigId: z.ZodOptional<z.ZodNumber>;
70
+ moduleIdentifier: z.ZodOptional<z.ZodString>;
71
+ entityId: z.ZodOptional<z.ZodNumber>;
72
+ }, z.core.$strip>>;
73
+ total: z.ZodNumber;
74
+ }, z.core.$strip>;
75
+ /**
76
+ * Post form response schema
77
+ */
78
+ export declare const PostFormResponseSchema: z.ZodObject<{
79
+ actionMessage: z.ZodUnion<readonly [z.ZodString, z.ZodRecord<z.ZodString, z.ZodAny>]>;
80
+ formData: z.ZodObject<{
81
+ id: z.ZodNumber;
82
+ formIdentifier: z.ZodString;
83
+ time: z.ZodString;
84
+ entityIdentifier: z.ZodString;
85
+ fingerprint: z.ZodString;
86
+ isUserAdmin: z.ZodBoolean;
87
+ formModuleId: z.ZodNumber;
88
+ userIdentifier: z.ZodAny;
89
+ parentId: z.ZodAny;
90
+ formData: z.ZodUnion<readonly [z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
91
+ marker: z.ZodString;
92
+ type: z.ZodString;
93
+ value: z.ZodAny;
94
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
95
+ }, z.core.$strip>;
96
+ }, z.core.$strip>;
97
+ /**
98
+ * Update forms data response schema
99
+ */
100
+ export declare const UpdateFormsDataSchema: z.ZodObject<{
101
+ id: z.ZodNumber;
102
+ formIdentifier: z.ZodString;
103
+ time: z.ZodString;
104
+ formData: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
105
+ marker: z.ZodString;
106
+ type: z.ZodString;
107
+ value: z.ZodAny;
108
+ }, z.core.$strip>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
109
+ userIdentifier: z.ZodString;
110
+ entityIdentifier: z.ZodString;
111
+ parentId: z.ZodNullable<z.ZodNumber>;
112
+ fingerprint: z.ZodNullable<z.ZodString>;
113
+ isUserAdmin: z.ZodBoolean;
114
+ formModuleId: z.ZodNumber;
115
+ }, z.core.$strip>;