oneentry 1.0.159 → 1.0.161

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 (222) hide show
  1. package/README.md +2 -0
  2. package/changelog.md +56 -1
  3. package/dist/admins/adminsApi.d.ts +15 -1
  4. package/dist/admins/adminsApi.js +29 -0
  5. package/dist/admins/adminsInterfaces.d.ts +37 -1
  6. package/dist/base/lazySchema.d.ts +15 -0
  7. package/dist/base/lazySchema.js +20 -0
  8. package/dist/discounts/discountsApi.d.ts +14 -1
  9. package/dist/discounts/discountsApi.js +21 -0
  10. package/dist/discounts/discountsInterfaces.d.ts +27 -1
  11. package/dist/filters/filtersInterfaces.d.ts +2 -2
  12. package/dist/filters/filtersSchemas.d.ts +1 -1
  13. package/dist/filters/filtersSchemas.js +4 -1
  14. package/dist/forms-data/formsDataApi.d.ts +14 -1
  15. package/dist/forms-data/formsDataApi.js +21 -0
  16. package/dist/forms-data/formsDataInterfaces.d.ts +74 -1
  17. package/dist/index.d.ts +4 -0
  18. package/dist/index.js +3 -0
  19. package/dist/orders/ordersApi.d.ts +15 -1
  20. package/dist/orders/ordersApi.js +22 -0
  21. package/dist/orders/ordersInterfaces.d.ts +27 -1
  22. package/dist/pages/pagesApi.d.ts +14 -1
  23. package/dist/pages/pagesApi.js +21 -0
  24. package/dist/pages/pagesInterfaces.d.ts +38 -1
  25. package/dist/payments/paymentsInterfaces.d.ts +2 -2
  26. package/dist/products/productsInterfaces.d.ts +1 -1
  27. package/dist/search/searchApi.d.ts +35 -0
  28. package/dist/search/searchApi.js +86 -0
  29. package/dist/search/searchInterfaces.d.ts +94 -0
  30. package/dist/search/searchInterfaces.js +2 -0
  31. package/dist/search/searchSchemas.d.ts +73 -0
  32. package/dist/search/searchSchemas.js +44 -0
  33. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +0 -2
  34. package/dist/templates-preview/templatesPreviewSchemas.d.ts +0 -2
  35. package/dist/templates-preview/templatesPreviewSchemas.js +0 -1
  36. package/dist/types.d.ts +35 -0
  37. package/dist/types.js +2 -0
  38. package/dist/users/usersApi.d.ts +15 -1
  39. package/dist/users/usersApi.js +22 -0
  40. package/dist/users/usersInterfaces.d.ts +39 -1
  41. package/dist/web-socket/lazySocket.d.ts +18 -0
  42. package/dist/web-socket/lazySocket.js +70 -0
  43. package/esm/admins/adminsApi.d.ts +66 -0
  44. package/esm/admins/adminsApi.js +90 -0
  45. package/esm/admins/adminsInterfaces.d.ts +137 -0
  46. package/esm/admins/adminsInterfaces.js +1 -0
  47. package/esm/admins/adminsSchemas.d.ts +48 -0
  48. package/esm/admins/adminsSchemas.js +31 -0
  49. package/esm/attribute-sets/attributeSetsApi.d.ts +67 -0
  50. package/esm/attribute-sets/attributeSetsApi.js +97 -0
  51. package/esm/attribute-sets/attributeSetsInterfaces.d.ts +285 -0
  52. package/esm/attribute-sets/attributeSetsInterfaces.js +1 -0
  53. package/esm/attribute-sets/attributeSetsSchemas.d.ts +84 -0
  54. package/esm/attribute-sets/attributeSetsSchemas.js +66 -0
  55. package/esm/auth-provider/authProviderApi.d.ts +262 -0
  56. package/esm/auth-provider/authProviderApi.js +362 -0
  57. package/esm/auth-provider/authProviderSchemas.d.ts +124 -0
  58. package/esm/auth-provider/authProviderSchemas.js +92 -0
  59. package/esm/auth-provider/authProvidersInterfaces.d.ts +430 -0
  60. package/esm/auth-provider/authProvidersInterfaces.js +1 -0
  61. package/esm/base/asyncModules.d.ts +123 -0
  62. package/esm/base/asyncModules.js +382 -0
  63. package/esm/base/lazySchema.d.ts +15 -0
  64. package/esm/base/lazySchema.js +17 -0
  65. package/esm/base/stateModule.d.ts +35 -0
  66. package/esm/base/stateModule.js +51 -0
  67. package/esm/base/syncModules.d.ts +245 -0
  68. package/esm/base/syncModules.js +555 -0
  69. package/esm/base/timeIntervals.d.ts +95 -0
  70. package/esm/base/timeIntervals.js +317 -0
  71. package/esm/base/utils.d.ts +354 -0
  72. package/esm/base/utils.js +1 -0
  73. package/esm/base/validation.d.ts +98 -0
  74. package/esm/base/validation.js +118 -0
  75. package/esm/blocks/blocksApi.d.ts +252 -0
  76. package/esm/blocks/blocksApi.js +394 -0
  77. package/esm/blocks/blocksInterfaces.d.ts +361 -0
  78. package/esm/blocks/blocksInterfaces.js +1 -0
  79. package/esm/blocks/blocksSchemas.d.ts +213 -0
  80. package/esm/blocks/blocksSchemas.js +40 -0
  81. package/esm/discounts/discountsApi.d.ts +94 -0
  82. package/esm/discounts/discountsApi.js +136 -0
  83. package/esm/discounts/discountsInterfaces.d.ts +293 -0
  84. package/esm/discounts/discountsInterfaces.js +1 -0
  85. package/esm/events/eventsApi.d.ts +108 -0
  86. package/esm/events/eventsApi.js +141 -0
  87. package/esm/events/eventsInterfaces.d.ts +176 -0
  88. package/esm/events/eventsInterfaces.js +1 -0
  89. package/esm/file-uploading/fileUploadingApi.d.ts +91 -0
  90. package/esm/file-uploading/fileUploadingApi.js +127 -0
  91. package/esm/file-uploading/fileUploadingInterfaces.d.ts +116 -0
  92. package/esm/file-uploading/fileUploadingInterfaces.js +1 -0
  93. package/esm/file-uploading/fileUploadingSchemas.d.ts +24 -0
  94. package/esm/file-uploading/fileUploadingSchemas.js +19 -0
  95. package/esm/filters/filtersApi.d.ts +32 -0
  96. package/esm/filters/filtersApi.js +36 -0
  97. package/esm/filters/filtersInterfaces.d.ts +56 -0
  98. package/esm/filters/filtersInterfaces.js +1 -0
  99. package/esm/filters/filtersSchemas.d.ts +32 -0
  100. package/esm/filters/filtersSchemas.js +29 -0
  101. package/esm/forms/formsApi.d.ts +44 -0
  102. package/esm/forms/formsApi.js +54 -0
  103. package/esm/forms/formsInterfaces.d.ts +237 -0
  104. package/esm/forms/formsInterfaces.js +1 -0
  105. package/esm/forms/formsSchemas.d.ts +56 -0
  106. package/esm/forms/formsSchemas.js +32 -0
  107. package/esm/forms-data/formsDataApi.d.ts +124 -0
  108. package/esm/forms-data/formsDataApi.js +210 -0
  109. package/esm/forms-data/formsDataInterfaces.d.ts +670 -0
  110. package/esm/forms-data/formsDataInterfaces.js +1 -0
  111. package/esm/forms-data/formsDataSchemas.d.ts +107 -0
  112. package/esm/forms-data/formsDataSchemas.js +83 -0
  113. package/esm/general-types/generalTypesApi.d.ts +29 -0
  114. package/esm/general-types/generalTypesApi.js +34 -0
  115. package/esm/general-types/generalTypesInterfaces.d.ts +29 -0
  116. package/esm/general-types/generalTypesInterfaces.js +1 -0
  117. package/esm/general-types/generalTypesSchemas.d.ts +68 -0
  118. package/esm/general-types/generalTypesSchemas.js +42 -0
  119. package/esm/index.d.ts +143 -0
  120. package/esm/index.js +124 -0
  121. package/esm/integration-collections/integrationCollectionsApi.d.ts +172 -0
  122. package/esm/integration-collections/integrationCollectionsApi.js +224 -0
  123. package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +317 -0
  124. package/esm/integration-collections/integrationCollectionsInterfaces.js +1 -0
  125. package/esm/integration-collections/integrationCollectionsSchemas.d.ts +84 -0
  126. package/esm/integration-collections/integrationCollectionsSchemas.js +60 -0
  127. package/esm/locales/localesApi.d.ts +28 -0
  128. package/esm/locales/localesApi.js +33 -0
  129. package/esm/locales/localesInterfaces.d.ts +40 -0
  130. package/esm/locales/localesInterfaces.js +1 -0
  131. package/esm/locales/localesSchemas.d.ts +32 -0
  132. package/esm/locales/localesSchemas.js +23 -0
  133. package/esm/menus/menusApi.d.ts +30 -0
  134. package/esm/menus/menusApi.js +35 -0
  135. package/esm/menus/menusInterfaces.d.ts +87 -0
  136. package/esm/menus/menusInterfaces.js +2 -0
  137. package/esm/menus/menusSchemas.d.ts +16 -0
  138. package/esm/menus/menusSchemas.js +25 -0
  139. package/esm/orders/ordersApi.d.ts +213 -0
  140. package/esm/orders/ordersApi.js +288 -0
  141. package/esm/orders/ordersInterfaces.d.ts +763 -0
  142. package/esm/orders/ordersInterfaces.js +1 -0
  143. package/esm/orders/ordersSchemas.d.ts +312 -0
  144. package/esm/orders/ordersSchemas.js +171 -0
  145. package/esm/package.json +4 -0
  146. package/esm/pages/pagesApi.d.ts +173 -0
  147. package/esm/pages/pagesApi.js +414 -0
  148. package/esm/pages/pagesInterfaces.d.ts +344 -0
  149. package/esm/pages/pagesInterfaces.js +1 -0
  150. package/esm/pages/pagesSchemas.d.ts +121 -0
  151. package/esm/pages/pagesSchemas.js +60 -0
  152. package/esm/payments/paymentsApi.d.ts +88 -0
  153. package/esm/payments/paymentsApi.js +122 -0
  154. package/esm/payments/paymentsInterfaces.d.ts +189 -0
  155. package/esm/payments/paymentsInterfaces.js +1 -0
  156. package/esm/payments/paymentsSchemas.d.ts +94 -0
  157. package/esm/payments/paymentsSchemas.js +53 -0
  158. package/esm/product-statuses/productStatusesApi.d.ts +50 -0
  159. package/esm/product-statuses/productStatusesApi.js +68 -0
  160. package/esm/product-statuses/productStatusesInterfaces.d.ts +62 -0
  161. package/esm/product-statuses/productStatusesInterfaces.js +1 -0
  162. package/esm/product-statuses/productStatusesSchemas.d.ts +34 -0
  163. package/esm/product-statuses/productStatusesSchemas.js +27 -0
  164. package/esm/products/productsApi.d.ts +366 -0
  165. package/esm/products/productsApi.js +468 -0
  166. package/esm/products/productsInterfaces.d.ts +723 -0
  167. package/esm/products/productsInterfaces.js +1 -0
  168. package/esm/products/productsSchemas.d.ts +234 -0
  169. package/esm/products/productsSchemas.js +121 -0
  170. package/esm/search/searchApi.d.ts +35 -0
  171. package/esm/search/searchApi.js +47 -0
  172. package/esm/search/searchInterfaces.d.ts +94 -0
  173. package/esm/search/searchInterfaces.js +1 -0
  174. package/esm/search/searchSchemas.d.ts +73 -0
  175. package/esm/search/searchSchemas.js +41 -0
  176. package/esm/sitemap/sitemapApi.d.ts +37 -0
  177. package/esm/sitemap/sitemapApi.js +41 -0
  178. package/esm/sitemap/sitemapInterfaces.d.ts +51 -0
  179. package/esm/sitemap/sitemapInterfaces.js +1 -0
  180. package/esm/subscriptions/subscriptionsApi.d.ts +74 -0
  181. package/esm/subscriptions/subscriptionsApi.js +90 -0
  182. package/esm/subscriptions/subscriptionsInterfaces.d.ts +111 -0
  183. package/esm/subscriptions/subscriptionsInterfaces.js +1 -0
  184. package/esm/subscriptions/subscriptionsSchemas.d.ts +46 -0
  185. package/esm/subscriptions/subscriptionsSchemas.js +38 -0
  186. package/esm/system/systemApi.d.ts +46 -0
  187. package/esm/system/systemApi.js +53 -0
  188. package/esm/system/systemInterfaces.d.ts +29 -0
  189. package/esm/system/systemInterfaces.js +1 -0
  190. package/esm/templates/templatesApi.d.ts +53 -0
  191. package/esm/templates/templatesApi.js +78 -0
  192. package/esm/templates/templatesInterfaces.d.ts +68 -0
  193. package/esm/templates/templatesInterfaces.js +1 -0
  194. package/esm/templates/templatesSchemas.d.ts +48 -0
  195. package/esm/templates/templatesSchemas.js +28 -0
  196. package/esm/templates-preview/templatesPreviewApi.d.ts +40 -0
  197. package/esm/templates-preview/templatesPreviewApi.js +50 -0
  198. package/esm/templates-preview/templatesPreviewInterfaces.d.ts +129 -0
  199. package/esm/templates-preview/templatesPreviewInterfaces.js +1 -0
  200. package/esm/templates-preview/templatesPreviewSchemas.d.ts +79 -0
  201. package/esm/templates-preview/templatesPreviewSchemas.js +43 -0
  202. package/esm/types.d.ts +35 -0
  203. package/esm/types.js +1 -0
  204. package/esm/user-activity/userActivityApi.d.ts +31 -0
  205. package/esm/user-activity/userActivityApi.js +37 -0
  206. package/esm/user-activity/userActivityInterfaces.d.ts +42 -0
  207. package/esm/user-activity/userActivityInterfaces.js +1 -0
  208. package/esm/users/usersApi.d.ts +249 -0
  209. package/esm/users/usersApi.js +312 -0
  210. package/esm/users/usersInterfaces.d.ts +419 -0
  211. package/esm/users/usersInterfaces.js +1 -0
  212. package/esm/users/usersSchemas.d.ts +72 -0
  213. package/esm/users/usersSchemas.js +55 -0
  214. package/esm/web-socket/lazySocket.d.ts +18 -0
  215. package/esm/web-socket/lazySocket.js +67 -0
  216. package/esm/web-socket/wsApi.d.ts +27 -0
  217. package/esm/web-socket/wsApi.js +43 -0
  218. package/esm/web-socket/wsInterfaces.d.ts +16 -0
  219. package/esm/web-socket/wsInterfaces.js +1 -0
  220. package/package.json +47 -2
  221. package/types.d.ts +1 -0
  222. package/types.js +1 -0
@@ -0,0 +1,670 @@
1
+ import type { IError } from '../base/utils.js';
2
+ import type { IUploadingQuery } from '../file-uploading/fileUploadingInterfaces.js';
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
+ * Semantic (vector) search for form data.
75
+ * @handleName getFormsDataByVectorSearch
76
+ * @param {IFormsDataVectorSearch} body - Vector search body. Example: `{ queryText: "order confirmation" }`.
77
+ * @param {string} [langCode] - Language code. Default: "en_US".
78
+ * @param {number} [offset] - Parameter for pagination. Default: 0.
79
+ * @param {number} [limit] - Parameter for pagination. Default: 30.
80
+ * @returns {Promise<IFormsDataSearchResponse | IError>} Returns an object with an array of found form data records and total count.
81
+ * @throws {IError} When isShell=false and an error occurs during the fetch
82
+ */
83
+ getFormsDataByVectorSearch(body: IFormsDataVectorSearch, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataSearchResponse | IError>;
84
+ }
85
+ /**
86
+ * Body for semantic (vector) form data search.
87
+ * @interface IFormsDataVectorSearch
88
+ * @property {string} queryText - Natural-language search query. Example: "order confirmation".
89
+ * @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2). Example: 0.3.
90
+ * @property {number} [maxHits] - Top-K candidates fetched before pagination. Default: 100. Max: 500. Example: 10.
91
+ * @property {boolean} [debug] - When true, each returned item gets a `distance` field. Example: false.
92
+ * @description Body for the form-data vector/search endpoint.
93
+ */
94
+ interface IFormsDataVectorSearch {
95
+ queryText: string;
96
+ vectorDistanceThreshold?: number;
97
+ maxHits?: number;
98
+ debug?: boolean;
99
+ }
100
+ /**
101
+ * Represents a form data record returned by the vector search endpoint.
102
+ * @interface IFormDataSearchEntity
103
+ * @property {number} [id] - The unique identifier of the form data record. Example: 12345.
104
+ * @property {string} [formIdentifier] - Text identifier of the form. Example: "contact_form".
105
+ * @property {Date | string} [time] - Date and time the form data was last changed. Example: "2023-02-12 10:56".
106
+ * @property {FormDataType[]} [formData] - Data submitted by the form.
107
+ * @example
108
+ [
109
+ {
110
+ "marker": "name",
111
+ "type": "string",
112
+ "value": "Test"
113
+ }
114
+ ]
115
+ * @property {string} [userIdentifier] - Text identifier of the user who submitted the form. Example: "user_12345".
116
+ * @property {string} [entityIdentifier] - Text identifier of the entity the record belongs to. Example: "product_1".
117
+ * @property {number} [parentId] - Identifier of the parent form data record. Example: 1.
118
+ * @property {string} [ip] - IP address the form was submitted from. Example: "127.0.0.1".
119
+ * @property {string} [fingerprint] - Device fingerprint of the sender. Example: "UQ_123456_abcdef".
120
+ * @property {boolean} [isUserAdmin] - Whether the record was submitted by an admin. Example: false.
121
+ * @property {'sent' | 'banned' | 'deleted' | 'moderation' | 'approved'} [status] - Moderation status of the record. Example: "sent".
122
+ * @description This interface defines a form data record as returned by the semantic (vector) search endpoint. Unlike IFormDataEntity it carries the moderation and sender fields of the raw record.
123
+ */
124
+ interface IFormDataSearchEntity {
125
+ id?: number;
126
+ formIdentifier?: string;
127
+ time?: Date | string;
128
+ formData?: FormDataType[];
129
+ userIdentifier?: string;
130
+ entityIdentifier?: string;
131
+ parentId?: number;
132
+ ip?: string;
133
+ fingerprint?: string;
134
+ isUserAdmin?: boolean;
135
+ status?: 'sent' | 'banned' | 'deleted' | 'moderation' | 'approved';
136
+ }
137
+ /**
138
+ * @interface IFormsDataSearchResponse
139
+ * @property {IFormDataSearchEntity[]} items - Array of found form data records.
140
+ * @property {number} total - Total number of found records. Example: 100.
141
+ * @description This interface defines the structure of the response returned by the form data vector search endpoint.
142
+ */
143
+ interface IFormsDataSearchResponse {
144
+ items: IFormDataSearchEntity[];
145
+ total: number;
146
+ }
147
+ /**
148
+ * Represents the structure of a form data entity.
149
+ * @interface IFormDataEntity
150
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
151
+ * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
152
+ * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
153
+ * @property {FormDataType[]} formData - Form data.
154
+ * @example
155
+ [
156
+ {
157
+ "marker": "name",
158
+ "type": "string",
159
+ "value": "Test"
160
+ }
161
+ ]
162
+ * @property {string | null} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
163
+ * @property {string} [moduleIdentifier] - Module identifier. Example: "blog".
164
+ * @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
165
+ */
166
+ interface IFormDataEntity {
167
+ id: number;
168
+ formIdentifier: string;
169
+ time: Date | string;
170
+ formData: FormDataType[];
171
+ attributeSetIdentifier: string | null;
172
+ moduleIdentifier?: string;
173
+ }
174
+ /**
175
+ * Represents a collection of form data entities.
176
+ * @interface IFormsDataEntity
177
+ * @property {IFormDataEntity[]} items - Array of form data objects.
178
+ * @example
179
+ [
180
+ {
181
+ "id": 1,
182
+ "formIdentifier": "form",
183
+ "time": "2025-06-06T19:07:45.993Z",
184
+ "formData": {},
185
+ "attributeSetIdentifier": "form",
186
+ "actionMessage": "Action message string"
187
+ }
188
+ ]
189
+ * @property {number} total - Total number of found records. Example: 100.
190
+ * @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
191
+ */
192
+ interface IFormsDataEntity {
193
+ items: IFormDataEntity[];
194
+ total: number;
195
+ }
196
+ /**
197
+ * Represents the structure of a form data entity.
198
+ * @interface IFormByMarkerDataEntity
199
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
200
+ * @property {null | number} parentId - The unique identifier of the parent form page. Example: 123.
201
+ * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
202
+ * @property {number} depth - Example: 1.
203
+ * @property {string | null} ip - Ip. Example: '127.0.0.1'.
204
+ * @property {string | null} fingerprint - Fingerprint. Example: 'fingerprint'.
205
+ * @property {string | null} status - Status. Example: 'approved'.
206
+ * @property {string | null} userIdentifier - Text identifier (marker) of the user. Example: "admin".
207
+ * @property {FormDataType[]} formData - Form data.
208
+ * @example
209
+ [
210
+ {
211
+ "marker": "name",
212
+ "type": "string",
213
+ "value": "Test"
214
+ }
215
+ ]
216
+ * @property {string | null} attributeSetIdentifier - Text identifier (marker) of the used attribute set. Example: "product_attributes".
217
+ * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
218
+ * @property {string} entityIdentifier - Text identifier (marker) of the entity. Example: "test".
219
+ * @property {boolean} isUserAdmin - Is user admin. Example: true.
220
+ * @property {number} formModuleConfigId - Form module config Id. Example: 2.
221
+ * @property {string} [moduleIdentifier] - Module identifier. Example: "blog".
222
+ * @property {number} entityId - Form module config Id. Example: 2.
223
+ * @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
224
+ */
225
+ interface IFormByMarkerDataEntity {
226
+ id: number;
227
+ parentId?: null | number;
228
+ formIdentifier: string;
229
+ depth?: number;
230
+ ip?: string | null;
231
+ fingerprint?: string | null;
232
+ status?: string | null;
233
+ userIdentifier?: string | null;
234
+ formData: FormDataType[];
235
+ attributeSetIdentifier?: string | null;
236
+ time: Date | string;
237
+ entityIdentifier?: string;
238
+ isUserAdmin?: boolean;
239
+ formModuleConfigId?: number;
240
+ moduleIdentifier?: string;
241
+ entityId?: number;
242
+ }
243
+ /**
244
+ * Represents a collection of form data entities.
245
+ * @interface IFormsByMarkerDataEntity
246
+ * @property {IFormByMarkerDataEntity[]} items - Array of form data objects.
247
+ * @example
248
+ [
249
+ {
250
+ "id": 42,
251
+ "parentId": null,
252
+ "formIdentifier": "test-form",
253
+ "depth": 0,
254
+ "ip": null,
255
+ "status": null,
256
+ "userIdentifier": null,
257
+ "formData": [
258
+ {
259
+ "marker": "name",
260
+ "type": "string",
261
+ "value": "Test"
262
+ }
263
+ ],
264
+ "attributeSetIdentifier": "form",
265
+ "time": "2025-03-03T15:51:17.458Z",
266
+ "entityIdentifier": "blog",
267
+ "isUserAdmin": false,
268
+ "formModuleConfigId": 2
269
+ }
270
+ ]
271
+ * @property {number} total - Total number of found records. Example: 100.
272
+ * @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
273
+ */
274
+ interface IFormsByMarkerDataEntity {
275
+ items: IFormByMarkerDataEntity[];
276
+ total: number;
277
+ }
278
+ /**
279
+ * Represents the structure of the response after posting form data.
280
+ * @interface IPostFormResponse
281
+ * @property {object} formData - Form data.
282
+ * @example
283
+ {
284
+ "id": 42,
285
+ "formIdentifier": "contact_form",
286
+ "time": "2023-10-01T12:00:00Z",
287
+ "entityIdentifier": "blog",
288
+ "isUserAdmin": false,
289
+ "formModuleId": 2,
290
+ "parentId": null,
291
+ "userIdentifier": null,
292
+ "formData": [
293
+ {
294
+ "marker": "name",
295
+ "type": "string",
296
+ "value": "Jack"
297
+ }
298
+ ]
299
+ }
300
+ * @property {number} formData.id - The unique identifier of the form page. Example: 12345.
301
+ * @property {string} formData.formIdentifier - The identifier of the form. Example: "contact_form".
302
+ * @property {string} formData.time - The time of the form submit. Example: "2023-10-01T12:00:00Z".
303
+ * @property {string} formData.entityIdentifier - The entity identifier. Example: "blog".
304
+ * @property {boolean} formData.isUserAdmin - Is user admin. Example: false.
305
+ * @property {number} formData.formModuleId - The form module identifier. Example: 2.
306
+ * @property {string | null} formData.userIdentifier - The user identifier. Example: null.
307
+ * @property {number | null} formData.parentId - The parent identifier. Example: null.
308
+ * @property {FormDataType[]} formData.formData - Form fields data.
309
+ * @example
310
+ [
311
+ {
312
+ "marker": "name",
313
+ "type": "string",
314
+ "value": "Jack"
315
+ }
316
+ ]
317
+ * @property {string} actionMessage - Action message for the form data (can be localized). Example: "Form submitted successfully".
318
+ */
319
+ interface IPostFormResponse {
320
+ formData: IPostFormResponseData;
321
+ actionMessage: string;
322
+ }
323
+ /**
324
+ * @interface IPostFormResponseData
325
+ * @property {number} id - Identifier of the created form data record. Example: 42.
326
+ * @property {string} formIdentifier - Identifier of the form. Example: "contact_form".
327
+ * @property {string} time - Time of submission. Example: "2023-10-01T12:00:00Z".
328
+ * @property {string} entityIdentifier - Identifier of the entity the form is attached to. Example: "blog".
329
+ * @property {string | null} fingerprint - Submission fingerprint, or null for anonymous / app-token submissions.
330
+ * @property {boolean} isUserAdmin - Whether the submitting user is an administrator. Example: false.
331
+ * @property {number} formModuleId - Form module configuration identifier. Example: 2.
332
+ * @property {string | null} userIdentifier - Identifier of the submitting user, or null when anonymous.
333
+ * @property {number | null} parentId - Identifier of the parent record, or null when top-level.
334
+ * @property {FormDataType[]} formData - Submitted form fields.
335
+ * @description Inner `formData` payload of {@link IPostFormResponse} — describes the created form data record.
336
+ */
337
+ interface IPostFormResponseData {
338
+ id: number;
339
+ formIdentifier: string;
340
+ time: string;
341
+ entityIdentifier: string;
342
+ fingerprint: string | null;
343
+ isUserAdmin: boolean;
344
+ formModuleId: number;
345
+ userIdentifier: string | null;
346
+ parentId: number | null;
347
+ formData: FormDataType[];
348
+ }
349
+ /**
350
+ * Represents the structure of the response after updating form data.
351
+ * @interface IUpdateFormsData
352
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
353
+ * @property {string} formIdentifier - The identifier of the form. Example: "contact_form".
354
+ * @property {string} time - The time of the form submit. Example: "2023-10-01T12:00:00Z".
355
+ * @property {FormDataType[]} formData - Form fields data.
356
+ * @property {string} userIdentifier - The user identifier. Example: null.
357
+ * @property {string} entityIdentifier - The entity identifier. Example: "blog".
358
+ * @property {null | number} parentId - The parent identifier. Example: null.
359
+ * @property {null | string} fingerprint - The fingerprint of the form. Example: null.
360
+ * @property {boolean} isUserAdmin - Is user admin. Example: false.
361
+ * @property {number} formModuleId - The form module identifier. Example: 2.
362
+ */
363
+ interface IUpdateFormsData {
364
+ id: number;
365
+ formIdentifier: string;
366
+ time: string;
367
+ formData: FormDataType[];
368
+ userIdentifier: string;
369
+ entityIdentifier: string;
370
+ parentId: null | number;
371
+ fingerprint: null | string;
372
+ isUserAdmin: boolean;
373
+ formModuleId: number;
374
+ }
375
+ /**
376
+ * Contains an array of data form objects with the following values
377
+ */
378
+ type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | Record<string, unknown>;
379
+ /**
380
+ * Represents the structure of the body for posting form data.
381
+ * @interface IBodyPostFormData
382
+ * @property {string} formIdentifier - Text identifier (marker) of the form. Example: "form".
383
+ * @property {number} formModuleConfigId - The unique identifier of the form module configuration. Example: 2.
384
+ * @property {string} moduleEntityIdentifier - Text identifier (marker) of the module entity. Example: "blog".
385
+ * @property {string | null} replayTo - Email to reply to. Example: "some@email.com".
386
+ * @property {string} status - Status of the form. Example: "sent".
387
+ * @property {FormDataType[]} formData - Array of form data objects.
388
+ * @example
389
+ [
390
+ {
391
+ "marker": "name",
392
+ "type": "string",
393
+ "value": "Jack"
394
+ }
395
+ ]
396
+ * @property {string} formData[].marker - The marker identifying the form field. Example: "name".
397
+ * @property {string} formData[].type - The type of the form field. Example: "string".
398
+ * @property {string} formData[].value - The value of the form field. Example: "name".
399
+ * @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files.
400
+ * @example
401
+ {
402
+ "type": "page",
403
+ "entity": "editor",
404
+ "id": 3787
405
+ }
406
+ * @description This interface defines the structure of a form post object, including its identifiers, time, form data, and optional file query.
407
+ */
408
+ interface IBodyPostFormData {
409
+ formIdentifier: string;
410
+ formModuleConfigId: number;
411
+ moduleEntityIdentifier: string;
412
+ replayTo: string | null;
413
+ status: string;
414
+ formData: FormDataType[];
415
+ fileQuery?: IUploadingQuery;
416
+ }
417
+ /**
418
+ * Represents a form data entity with a simple value.
419
+ * @interface IBodyTypeStringNumberFloat
420
+ * @property {string} marker - marker name. Example: "some_marker".
421
+ * @property {string} type - Type value. "string" | "number" | "float". Example: "string".
422
+ * @property {string | number | null} value - Value of the form data entity. Send it as a string; in responses numeric fields come back normalized to `number`, or `null` when the field is empty. Example: "string".
423
+ * @description Represents a form data entity with a marker, type, and value.
424
+ */
425
+ interface IBodyTypeStringNumberFloat {
426
+ marker: string;
427
+ type: 'string' | 'number' | 'float';
428
+ value: string | number | null;
429
+ }
430
+ /**
431
+ * Represents a date/time form data entity.
432
+ * @interface IBodyTypeTimeDate
433
+ * @property {string} marker - marker name. Example: "ome_marker".
434
+ * @property {string} type - Type value. 'date' | 'dateTime' | 'time' Example: "date".
435
+ * @property {object} value - Date object. Contains fullDate, formattedValue, formatString.
436
+ * @example
437
+ {
438
+ "fullDate": "2024-05-07T21:02:00.000Z",
439
+ "formattedValue": "08-05-2024 00:02",
440
+ "formatString": "DD-MM-YYYY HH:mm"
441
+ }
442
+ * @description Represents a date, dateTime, or time value in a structured format.
443
+ */
444
+ interface IBodyTypeTimeDate {
445
+ marker: string;
446
+ type: 'date' | 'dateTime' | 'time';
447
+ value: ITimeDateValue;
448
+ }
449
+ /**
450
+ * @interface ITimeDateValue
451
+ * @property {string} fullDate - ISO date string. Example: "2024-05-07T21:02:00.000Z".
452
+ * @property {string} formattedValue - Human-readable formatted date. Example: "08-05-2024 00:02".
453
+ * @property {string} formatString - Format mask used to render `formattedValue`. Example: "DD-MM-YYYY HH:mm".
454
+ * @description Value payload for `date`/`dateTime`/`time` form fields.
455
+ */
456
+ interface ITimeDateValue {
457
+ fullDate: string;
458
+ formattedValue: string;
459
+ formatString: string;
460
+ }
461
+ /**
462
+ * Represents a text form data entity.
463
+ * @interface IBodyTypeText
464
+ * @property {string} marker - marker name. Example: "some_marker".
465
+ * @property {string} type - Type value. Example: "text".
466
+ * @property {object} value - Text Object. Contains html as string, plain text and params.
467
+ * @example
468
+ {
469
+ "htmlValue": "<p>Hello world</p>",
470
+ "plainValue": "",
471
+ "params": {
472
+ "isEditorDisabled": false,
473
+ "isImageCompressed": true
474
+ }
475
+ }
476
+ * @description Represents a text value with HTML and plain text representations, along with parameters for editor and image compression settings.
477
+ */
478
+ interface IBodyTypeText {
479
+ marker: string;
480
+ type: 'text';
481
+ value: ITextValue;
482
+ }
483
+ /**
484
+ * @interface ITextEditorParams
485
+ * @property {boolean} isEditorDisabled - Whether the rich-text editor is disabled. Example: false.
486
+ * @property {boolean} isImageCompressed - Whether embedded images are compressed. Example: true.
487
+ * @description Editor parameters attached to text-type form values.
488
+ */
489
+ interface ITextEditorParams {
490
+ isEditorDisabled: boolean;
491
+ isImageCompressed: boolean;
492
+ }
493
+ /**
494
+ * @interface ITextValue
495
+ * @property {string} htmlValue - HTML representation of the text. Example: "<p>Hello world</p>".
496
+ * @property {string} plainValue - Plain-text representation.
497
+ * @property {ITextEditorParams} params - Editor configuration applied to this value.
498
+ * @description Value payload for `text` form fields.
499
+ */
500
+ interface ITextValue {
501
+ htmlValue: string;
502
+ plainValue: string;
503
+ params: ITextEditorParams;
504
+ }
505
+ /**
506
+ * Represents a text with header form data entity.
507
+ * @interface IBodyTypeTextWithHeader
508
+ * @property {string} marker - marker name. Example: "about".
509
+ * @property {string} type - Type value. Example: "textWithHeader".
510
+ * @property {object} value - Text Object. Contains html as string, header and params.
511
+ * @example
512
+ {
513
+ "header": "Headline",
514
+ "htmlValue": "<p>Hello World</p>",
515
+ "plainValue": "",
516
+ "params": {
517
+ "isEditorDisabled": false,
518
+ "isImageCompressed": true
519
+ }
520
+ }
521
+ * @description Represents a text value with a header, HTML and plain text representations, along with parameters for editor and image compression settings.
522
+ */
523
+ interface IBodyTypeTextWithHeader {
524
+ marker: string;
525
+ type: 'textWithHeader';
526
+ value: ITextWithHeaderValue;
527
+ }
528
+ /**
529
+ * @interface ITextWithHeaderValue
530
+ * @property {string} header - Headline text. Example: "Headline".
531
+ * @property {string} htmlValue - HTML body. Example: "<p>Hello world</p>".
532
+ * @property {string} plainValue - Plain-text body.
533
+ * @property {ITextEditorParams} params - Editor configuration applied to this value.
534
+ * @description Value payload for `textWithHeader` form fields.
535
+ */
536
+ interface ITextWithHeaderValue {
537
+ header: string;
538
+ htmlValue: string;
539
+ plainValue: string;
540
+ params: ITextEditorParams;
541
+ }
542
+ /**
543
+ * Represents an image or group of images form data entity.
544
+ * @interface IBodyTypeImageGroupOfImages
545
+ * @property {string} marker - marker name. Example: "avatar".
546
+ * @property {'image' | 'groupOfImage'} type - Type value. Example: "image".
547
+ * @property {object} value - Image Object. Contains image information.
548
+ * @example
549
+ [
550
+ {
551
+ "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
552
+ "downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
553
+ "size": 392585,
554
+ "previewLink": "",
555
+ "params": {
556
+ "isImageCompressed": true
557
+ }
558
+ }
559
+ ]
560
+ * @description Represents an image or a group of images with their details, including filename, download link, size, preview link, and parameters for image compression.
561
+ */
562
+ interface IBodyTypeImageGroupOfImages {
563
+ marker: string;
564
+ type: 'image' | 'groupOfImage';
565
+ value: IImageValue | IImageValue[];
566
+ }
567
+ /**
568
+ * @interface IImageValueParams
569
+ * @property {boolean} isImageCompressed - Whether the stored image has been compressed by the server. Example: true.
570
+ * @description Per-image parameters attached to an image form value.
571
+ */
572
+ interface IImageValueParams {
573
+ isImageCompressed: boolean;
574
+ }
575
+ /**
576
+ * @interface IImageValue
577
+ * @property {string} filename - Server-side path to the image. Example: "files/project/page/10/image/foo.png".
578
+ * @property {string} downloadLink - Public URL to download the image.
579
+ * @property {number} size - File size in bytes. Example: 392585.
580
+ * @property {string} previewLink - URL to a preview-sized version (may be empty).
581
+ * @property {IImageValueParams} params - Image-specific parameters.
582
+ * @description Value payload for `image`/`groupOfImage` form fields.
583
+ */
584
+ interface IImageValue {
585
+ filename: string;
586
+ downloadLink: string;
587
+ size: number;
588
+ previewLink: string;
589
+ params: IImageValueParams;
590
+ }
591
+ /**
592
+ * Represents a file form data entity.
593
+ * @interface IBodyTypeFile
594
+ * @property {string} marker - marker name. Example: "picture".
595
+ * @property {'file'} type - Type value. Example: "file".
596
+ * @property {object} value - File Object. Contains file information. A single attached file is returned as the object itself, several files as an array.
597
+ * @example
598
+ [
599
+ {
600
+ "filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
601
+ "downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
602
+ "size": 392585
603
+ }
604
+ ]
605
+ * @description Represents a file with its details, including filename, download link, and size.
606
+ */
607
+ interface IBodyTypeFile {
608
+ marker: string;
609
+ type: 'file';
610
+ value: IFileValue | IFileValue[];
611
+ }
612
+ /**
613
+ * @interface IFileValue
614
+ * @property {string} filename - Server-side path to the file.
615
+ * @property {string} downloadLink - Public URL to download the file.
616
+ * @property {number} size - File size in bytes.
617
+ * @description Value payload for `file` form fields.
618
+ */
619
+ interface IFileValue {
620
+ filename: string;
621
+ downloadLink: string;
622
+ size: number;
623
+ }
624
+ /**
625
+ * Represents a radio button or list selection form data entity.
626
+ * @interface IBodyTypeRadioButtonList
627
+ * @property {string} marker - marker name. Example: "selector".
628
+ * @property {string} type - Type value. Example: 'list'.
629
+ * @property {Array} value - Array of list or radioButton bojects.
630
+ * @example
631
+ [
632
+ {
633
+ "title": "red",
634
+ "value": "1",
635
+ "extended": {
636
+ "value": "red",
637
+ "type": "string"
638
+ }
639
+ }
640
+ ]
641
+ * @description Represents a list or radio button selection with multiple options, each containing a title, value, and extended information.
642
+ */
643
+ interface IBodyTypeRadioButtonList {
644
+ marker: string;
645
+ type: 'list' | 'radioButton';
646
+ value: IListOptionValue[];
647
+ }
648
+ /**
649
+ * @interface IListOptionExtended
650
+ * @property {string} value - Extended option value (e.g. color code "#ff0000"). Example: "red".
651
+ * @property {string} type - Type of the extended value (e.g. "string", "color"). Example: "string".
652
+ * @description Extended payload attached to a list/radio option.
653
+ */
654
+ interface IListOptionExtended {
655
+ value: string;
656
+ type: string;
657
+ }
658
+ /**
659
+ * @interface IListOptionValue
660
+ * @property {string} title - Option title shown to the user.
661
+ * @property {string} value - Underlying option value.
662
+ * @property {IListOptionExtended} extended - Extended payload (e.g. color/code) attached to the option.
663
+ * @description Value payload for `list`/`radioButton` form fields.
664
+ */
665
+ interface IListOptionValue {
666
+ title: string;
667
+ value: string;
668
+ extended: IListOptionExtended;
669
+ }
670
+ export type { FormDataType, IBodyPostFormData, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, IFileValue, IFormByMarkerDataEntity, IFormDataEntity, IFormDataSearchEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IFormsDataSearchResponse, IFormsDataVectorSearch, IImageValue, IImageValueParams, IListOptionExtended, IListOptionValue, IPostFormResponse, IPostFormResponseData, ITextEditorParams, ITextValue, ITextWithHeaderValue, ITimeDateValue, IUpdateFormsData, };
@@ -0,0 +1 @@
1
+ export {};