oneentry 1.0.142 → 1.0.144

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