oneentry 1.0.176 → 1.0.178

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 (199) hide show
  1. package/README.md +12 -5
  2. package/changelog.md +116 -0
  3. package/dist/admins/adminsApi.js +2 -9
  4. package/dist/admins/adminsInterfaces.d.ts +5 -5
  5. package/dist/admins/adminsSchemas.d.ts +4 -4
  6. package/dist/admins/adminsSchemas.js +2 -2
  7. package/dist/attribute-sets/attributeSetsApi.d.ts +1 -1
  8. package/dist/attribute-sets/attributeSetsApi.js +4 -4
  9. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +65 -14
  10. package/dist/attribute-sets/attributeSetsSchemas.d.ts +8 -6
  11. package/dist/attribute-sets/attributeSetsSchemas.js +6 -9
  12. package/dist/auth-provider/authProviderApi.d.ts +4 -4
  13. package/dist/auth-provider/authProviderApi.js +90 -23
  14. package/dist/auth-provider/authProviderSchemas.d.ts +1 -0
  15. package/dist/auth-provider/authProviderSchemas.js +1 -0
  16. package/dist/auth-provider/authProvidersInterfaces.d.ts +8 -6
  17. package/dist/base/asyncModules.d.ts +62 -1
  18. package/dist/base/asyncModules.js +219 -37
  19. package/dist/base/stateModule.d.ts +2 -0
  20. package/dist/base/stateModule.js +22 -12
  21. package/dist/base/syncModules.d.ts +18 -10
  22. package/dist/base/syncModules.js +100 -29
  23. package/dist/base/utils.d.ts +26 -21
  24. package/dist/base/validation.d.ts +3 -3
  25. package/dist/base/validation.js +6 -7
  26. package/dist/blocks/blocksApi.d.ts +20 -17
  27. package/dist/blocks/blocksApi.js +82 -64
  28. package/dist/blocks/blocksInterfaces.d.ts +8 -8
  29. package/dist/discounts/discountsApi.d.ts +9 -7
  30. package/dist/discounts/discountsApi.js +16 -13
  31. package/dist/discounts/discountsInterfaces.d.ts +14 -10
  32. package/dist/events/eventsApi.d.ts +3 -3
  33. package/dist/events/eventsApi.js +3 -3
  34. package/dist/events/eventsInterfaces.d.ts +10 -14
  35. package/dist/file-uploading/fileUploadingApi.d.ts +4 -4
  36. package/dist/file-uploading/fileUploadingApi.js +13 -5
  37. package/dist/file-uploading/fileUploadingInterfaces.d.ts +5 -6
  38. package/dist/filters/filtersApi.js +2 -2
  39. package/dist/forms/formsApi.js +2 -2
  40. package/dist/forms/formsInterfaces.d.ts +1 -3
  41. package/dist/forms/formsSchemas.d.ts +3 -6
  42. package/dist/forms/formsSchemas.js +2 -4
  43. package/dist/forms-data/formsDataApi.d.ts +27 -1
  44. package/dist/forms-data/formsDataApi.js +119 -68
  45. package/dist/forms-data/formsDataInterfaces.d.ts +17 -13
  46. package/dist/general-types/generalTypesInterfaces.d.ts +1 -1
  47. package/dist/index.d.ts +7 -6
  48. package/dist/index.js +50 -7
  49. package/dist/integration-collections/integrationCollectionsApi.d.ts +15 -4
  50. package/dist/integration-collections/integrationCollectionsApi.js +41 -14
  51. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +8 -9
  52. package/dist/integration-collections/integrationCollectionsSchemas.d.ts +0 -2
  53. package/dist/integration-collections/integrationCollectionsSchemas.js +0 -1
  54. package/dist/menus/menusApi.js +1 -1
  55. package/dist/orders/ordersApi.d.ts +1 -13
  56. package/dist/orders/ordersApi.js +21 -42
  57. package/dist/orders/ordersInterfaces.d.ts +21 -14
  58. package/dist/pages/pagesApi.d.ts +8 -6
  59. package/dist/pages/pagesApi.js +48 -33
  60. package/dist/pages/pagesInterfaces.d.ts +20 -16
  61. package/dist/pages/pagesSchemas.d.ts +0 -3
  62. package/dist/pages/pagesSchemas.js +0 -1
  63. package/dist/payments/paymentsApi.d.ts +10 -11
  64. package/dist/payments/paymentsApi.js +22 -18
  65. package/dist/payments/paymentsInterfaces.d.ts +12 -14
  66. package/dist/payments/paymentsSchemas.d.ts +21 -20
  67. package/dist/payments/paymentsSchemas.js +5 -8
  68. package/dist/product-statuses/productStatusesApi.d.ts +1 -1
  69. package/dist/product-statuses/productStatusesApi.js +3 -3
  70. package/dist/product-statuses/productStatusesInterfaces.d.ts +1 -4
  71. package/dist/products/productsApi.d.ts +50 -64
  72. package/dist/products/productsApi.js +79 -80
  73. package/dist/products/productsInterfaces.d.ts +59 -90
  74. package/dist/search/searchApi.d.ts +3 -2
  75. package/dist/search/searchApi.js +7 -4
  76. package/dist/search/searchInterfaces.d.ts +2 -1
  77. package/dist/sitemap/sitemapInterfaces.d.ts +10 -6
  78. package/dist/subscriptions/subscriptionsApi.d.ts +1 -1
  79. package/dist/subscriptions/subscriptionsApi.js +1 -1
  80. package/dist/subscriptions/subscriptionsInterfaces.d.ts +1 -1
  81. package/dist/system/systemApi.d.ts +2 -0
  82. package/dist/system/systemApi.js +2 -0
  83. package/dist/system/systemInterfaces.d.ts +2 -0
  84. package/dist/templates/templatesApi.d.ts +2 -2
  85. package/dist/templates/templatesApi.js +12 -11
  86. package/dist/templates/templatesInterfaces.d.ts +2 -2
  87. package/dist/templates-preview/templatesPreviewApi.js +2 -2
  88. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +23 -13
  89. package/dist/templates-preview/templatesPreviewSchemas.d.ts +7 -0
  90. package/dist/templates-preview/templatesPreviewSchemas.js +2 -0
  91. package/dist/user-groups/userGroupsApi.js +5 -5
  92. package/dist/user-groups/userGroupsSchemas.d.ts +4 -4
  93. package/dist/users/usersApi.d.ts +1 -1
  94. package/dist/users/usersApi.js +28 -15
  95. package/dist/users/usersInterfaces.d.ts +2 -9
  96. package/dist/web-socket/lazySocket.d.ts +6 -5
  97. package/dist/web-socket/lazySocket.js +212 -15
  98. package/dist/web-socket/wsApi.d.ts +7 -4
  99. package/dist/web-socket/wsApi.js +49 -12
  100. package/dist/web-socket/wsInterfaces.d.ts +41 -4
  101. package/esm/admins/adminsApi.js +2 -9
  102. package/esm/admins/adminsInterfaces.d.ts +5 -5
  103. package/esm/admins/adminsSchemas.d.ts +4 -4
  104. package/esm/admins/adminsSchemas.js +2 -2
  105. package/esm/attribute-sets/attributeSetsApi.d.ts +1 -1
  106. package/esm/attribute-sets/attributeSetsApi.js +4 -4
  107. package/esm/attribute-sets/attributeSetsInterfaces.d.ts +65 -14
  108. package/esm/attribute-sets/attributeSetsSchemas.d.ts +8 -6
  109. package/esm/attribute-sets/attributeSetsSchemas.js +6 -9
  110. package/esm/auth-provider/authProviderApi.d.ts +4 -4
  111. package/esm/auth-provider/authProviderApi.js +90 -23
  112. package/esm/auth-provider/authProviderSchemas.d.ts +1 -0
  113. package/esm/auth-provider/authProviderSchemas.js +1 -0
  114. package/esm/auth-provider/authProvidersInterfaces.d.ts +8 -6
  115. package/esm/base/asyncModules.d.ts +62 -1
  116. package/esm/base/asyncModules.js +219 -37
  117. package/esm/base/stateModule.d.ts +2 -0
  118. package/esm/base/stateModule.js +22 -12
  119. package/esm/base/syncModules.d.ts +18 -10
  120. package/esm/base/syncModules.js +99 -29
  121. package/esm/base/utils.d.ts +26 -21
  122. package/esm/base/validation.d.ts +3 -3
  123. package/esm/base/validation.js +6 -7
  124. package/esm/blocks/blocksApi.d.ts +20 -17
  125. package/esm/blocks/blocksApi.js +82 -64
  126. package/esm/blocks/blocksInterfaces.d.ts +8 -8
  127. package/esm/discounts/discountsApi.d.ts +9 -7
  128. package/esm/discounts/discountsApi.js +16 -13
  129. package/esm/discounts/discountsInterfaces.d.ts +14 -10
  130. package/esm/events/eventsApi.d.ts +3 -3
  131. package/esm/events/eventsApi.js +3 -3
  132. package/esm/events/eventsInterfaces.d.ts +10 -14
  133. package/esm/file-uploading/fileUploadingApi.d.ts +4 -4
  134. package/esm/file-uploading/fileUploadingApi.js +13 -5
  135. package/esm/file-uploading/fileUploadingInterfaces.d.ts +5 -6
  136. package/esm/filters/filtersApi.js +2 -2
  137. package/esm/forms/formsApi.js +2 -2
  138. package/esm/forms/formsInterfaces.d.ts +1 -3
  139. package/esm/forms/formsSchemas.d.ts +3 -6
  140. package/esm/forms/formsSchemas.js +2 -4
  141. package/esm/forms-data/formsDataApi.d.ts +27 -1
  142. package/esm/forms-data/formsDataApi.js +119 -68
  143. package/esm/forms-data/formsDataInterfaces.d.ts +17 -13
  144. package/esm/general-types/generalTypesInterfaces.d.ts +1 -1
  145. package/esm/index.d.ts +7 -6
  146. package/esm/index.js +50 -7
  147. package/esm/integration-collections/integrationCollectionsApi.d.ts +15 -4
  148. package/esm/integration-collections/integrationCollectionsApi.js +41 -14
  149. package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +8 -9
  150. package/esm/integration-collections/integrationCollectionsSchemas.d.ts +0 -2
  151. package/esm/integration-collections/integrationCollectionsSchemas.js +0 -1
  152. package/esm/menus/menusApi.js +1 -1
  153. package/esm/orders/ordersApi.d.ts +1 -13
  154. package/esm/orders/ordersApi.js +21 -42
  155. package/esm/orders/ordersInterfaces.d.ts +21 -14
  156. package/esm/pages/pagesApi.d.ts +8 -6
  157. package/esm/pages/pagesApi.js +48 -33
  158. package/esm/pages/pagesInterfaces.d.ts +20 -16
  159. package/esm/pages/pagesSchemas.d.ts +0 -3
  160. package/esm/pages/pagesSchemas.js +0 -1
  161. package/esm/payments/paymentsApi.d.ts +10 -11
  162. package/esm/payments/paymentsApi.js +22 -18
  163. package/esm/payments/paymentsInterfaces.d.ts +12 -14
  164. package/esm/payments/paymentsSchemas.d.ts +21 -20
  165. package/esm/payments/paymentsSchemas.js +5 -8
  166. package/esm/product-statuses/productStatusesApi.d.ts +1 -1
  167. package/esm/product-statuses/productStatusesApi.js +3 -3
  168. package/esm/product-statuses/productStatusesInterfaces.d.ts +1 -4
  169. package/esm/products/productsApi.d.ts +50 -64
  170. package/esm/products/productsApi.js +79 -80
  171. package/esm/products/productsInterfaces.d.ts +59 -90
  172. package/esm/search/searchApi.d.ts +3 -2
  173. package/esm/search/searchApi.js +7 -4
  174. package/esm/search/searchInterfaces.d.ts +2 -1
  175. package/esm/sitemap/sitemapInterfaces.d.ts +10 -6
  176. package/esm/subscriptions/subscriptionsApi.d.ts +1 -1
  177. package/esm/subscriptions/subscriptionsApi.js +1 -1
  178. package/esm/subscriptions/subscriptionsInterfaces.d.ts +1 -1
  179. package/esm/system/systemApi.d.ts +2 -0
  180. package/esm/system/systemApi.js +2 -0
  181. package/esm/system/systemInterfaces.d.ts +2 -0
  182. package/esm/templates/templatesApi.d.ts +2 -2
  183. package/esm/templates/templatesApi.js +11 -10
  184. package/esm/templates/templatesInterfaces.d.ts +2 -2
  185. package/esm/templates-preview/templatesPreviewApi.js +2 -2
  186. package/esm/templates-preview/templatesPreviewInterfaces.d.ts +23 -13
  187. package/esm/templates-preview/templatesPreviewSchemas.d.ts +7 -0
  188. package/esm/templates-preview/templatesPreviewSchemas.js +2 -0
  189. package/esm/user-groups/userGroupsApi.js +5 -5
  190. package/esm/user-groups/userGroupsSchemas.d.ts +4 -4
  191. package/esm/users/usersApi.d.ts +1 -1
  192. package/esm/users/usersApi.js +28 -15
  193. package/esm/users/usersInterfaces.d.ts +2 -9
  194. package/esm/web-socket/lazySocket.d.ts +6 -5
  195. package/esm/web-socket/lazySocket.js +212 -15
  196. package/esm/web-socket/wsApi.d.ts +7 -4
  197. package/esm/web-socket/wsApi.js +49 -12
  198. package/esm/web-socket/wsInterfaces.d.ts +41 -4
  199. package/package.json +2 -2
@@ -20,7 +20,7 @@ interface IEvents {
20
20
  * @handleName subscribeByMarker
21
21
  * @param {string} marker - The marker identifying the event. Example: "product_price_change".
22
22
  * @param {number} productId - The ID of the product to subscribe to. Example: 12345.
23
- * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
23
+ * @param {string} [langCode] - Optional language code for localization. Default: the client's language.
24
24
  * @returns {Promise<boolean | IError>} A promise that resolves to any type or an error.
25
25
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
26
26
  * @description This method subscribes to an event on a product by its marker.
@@ -31,7 +31,7 @@ interface IEvents {
31
31
  * @handleName unsubscribeByMarker
32
32
  * @param {string} marker - The marker identifying the event. Example: "product_price_change".
33
33
  * @param {number} productId - ID of the product to unsubscribe from. Example: 12345.
34
- * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
34
+ * @param {string} [langCode] - Optional language code for localization. Default: the client's language.
35
35
  * @returns {Promise<boolean | IError>} A promise that resolves to any type or an error.
36
36
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
37
37
  * @description This method unsubscribes from an event on a product by its marker.
@@ -42,7 +42,7 @@ interface IEvents {
42
42
  * @handleName getAllEvents
43
43
  * @returns {Promise<IContentApiEvent[] | IError>} A promise that resolves to an array of events or an error.
44
44
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
45
- * @description This method returns all available events.
45
+ * @description This method returns all available events. This method requires user authorization — without it the API answers `401 Unauthorized`.
46
46
  */
47
47
  getAllEvents(): Promise<IContentApiEvent[] | IError>;
48
48
  /**
@@ -85,16 +85,12 @@ interface IEvents {
85
85
  * @property {number} total - Total number of found records. Example: 100.
86
86
  * @property {ISubscriptionItem[]} items - Subscriptions, each with an event marker and a product ID.
87
87
  * @example
88
- [
89
- {
90
- eventMarker: 'product_price_change',
91
- productId: 12345
92
- },
93
- {
94
- eventMarker: 'product_stock_update',
95
- productId: 67890
96
- }
97
- ]
88
+ {
89
+ "total": 1,
90
+ "items": [
91
+ { "eventMarker": "lessPrice", "productId": 2954 }
92
+ ]
93
+ }
98
94
  * @property { string } items.eventMarker - Event marker.
99
95
  * @property { number } items.productId - Product ID.
100
96
  * @description Represents a response from the events API containing a total count and an array of subscription items.
@@ -173,4 +169,4 @@ interface ISubscribeFormEvent {
173
169
  formDataId: number;
174
170
  status?: string;
175
171
  }
176
- export type { IContentApiEvent, IEvents, IFormSubscriptionsResponse, IListFormSubscription, ISubscribeBody, ISubscribeFormEvent, ISubscriptions, };
172
+ export type { IContentApiEvent, IEvents, IFormSubscriptionsResponse, IListFormSubscription, ISubscribeBody, ISubscribeFormEvent, ISubscriptionItem, ISubscriptions, };
@@ -99,6 +99,7 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
99
99
  * @param {string} filename - The name to give the created file.
100
100
  * @param {string} [mimeType] - Optional MIME type for the file.
101
101
  * @returns {Promise<File>} A promise that resolves to a File object.
102
+ * @throws {Error} When the URL answers with an error status — the body of the error page is not turned into a file.
102
103
  */
103
104
  createFileFromUrl(url: string, filename: string, mimeType?: string): Promise<File>;
104
105
  /**
@@ -108,10 +109,9 @@ export default class FileUploadingApi extends AsyncModules implements IFileUploa
108
109
  * @param {string} type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
109
110
  * @param {string} entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
110
111
  * @param {string} filename - File name. Example: "file.png".
111
- * @param {string} [template] - Preview template: its numeric ID or its marker, for example `"preview"`. Without it, no preview is generated. Example: "preview_template".
112
- * @returns {Promise<Response | IError>} Returns a promise that resolves to a Response object containing the file data or an error object if there was an issue.
113
- * @throws {IError} When isShell=false and an error occurs during the fetch
112
+ * @param {string} [template] - Kept for compatibility: `GET /files` ignores it — the answer is the original file with any value, an unknown template included (CMS-1101, CMS-1128). Previews are made on `upload`.
113
+ * @returns {Promise<Response>} Resolves to the raw `Response` of the request — also on an error: check `response.ok`. A missing file answers `404` with a JSON body but a `content-type` taken from the requested file name (`image/png` …).
114
114
  * @see {@link https://js-sdk.oneentry.cloud/docs/file-uploading/getFile getFile} documentation.
115
115
  */
116
- getFile(id: number, type: string, entity: string, filename: string, template?: string): Promise<Response | IError>;
116
+ getFile(id: number, type: string, entity: string, filename: string, template?: string): Promise<Response>;
117
117
  }
@@ -121,7 +121,10 @@ class FileUploadingApi extends asyncModules_1.default {
121
121
  const query = { ...this._defaultQuery, ...fileQuery };
122
122
  // The endpoint answers 200 with an empty body, which _parseJson reads as `{}`;
123
123
  // _fetchBoolean turns that into the declared `true` (CMS-1072)
124
- return this._fetchBoolean(() => this._fetchDelete(`?filename=${filename}&` + this._queryParamsToString(query)));
124
+ return this._fetchBoolean(() => this._fetchDelete(
125
+ // The name is encoded like the other parameters: `#` cut the query and dropped
126
+ // type/entity/id, `&id=` added parameters of its own
127
+ `?` + this._queryParamsToString({ filename, ...query })));
125
128
  }
126
129
  /**
127
130
  * Public search across the content of files attached to records.
@@ -171,10 +174,15 @@ class FileUploadingApi extends asyncModules_1.default {
171
174
  * @param {string} filename - The name to give the created file.
172
175
  * @param {string} [mimeType] - Optional MIME type for the file.
173
176
  * @returns {Promise<File>} A promise that resolves to a File object.
177
+ * @throws {Error} When the URL answers with an error status — the body of the error page is not turned into a file.
174
178
  */
175
179
  async createFileFromUrl(url, filename, mimeType) {
176
180
  // eslint-disable-next-line no-undef
177
181
  const response = await fetch(url);
182
+ // A 404 page of the storage used to become the "file" and was then uploaded as is
183
+ if (!response.ok) {
184
+ throw new Error(`OneEntry SDK: createFileFromUrl got ${response.status} from ${url}`);
185
+ }
178
186
  const blob = await response.blob();
179
187
  const file = new File([blob], filename, { type: mimeType || blob.type });
180
188
  return file;
@@ -186,14 +194,14 @@ class FileUploadingApi extends asyncModules_1.default {
186
194
  * @param {string} type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
187
195
  * @param {string} entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
188
196
  * @param {string} filename - File name. Example: "file.png".
189
- * @param {string} [template] - Preview template: its numeric ID or its marker, for example `"preview"`. Without it, no preview is generated. Example: "preview_template".
190
- * @returns {Promise<Response | IError>} Returns a promise that resolves to a Response object containing the file data or an error object if there was an issue.
191
- * @throws {IError} When isShell=false and an error occurs during the fetch
197
+ * @param {string} [template] - Kept for compatibility: `GET /files` ignores it — the answer is the original file with any value, an unknown template included (CMS-1101, CMS-1128). Previews are made on `upload`.
198
+ * @returns {Promise<Response>} Resolves to the raw `Response` of the request — also on an error: check `response.ok`. A missing file answers `404` with a JSON body but a `content-type` taken from the requested file name (`image/png` …).
192
199
  * @see {@link https://js-sdk.oneentry.cloud/docs/file-uploading/getFile getFile} documentation.
193
200
  */
194
201
  async getFile(id, type, entity, filename, template) {
195
202
  // eslint-disable-next-line no-undef
196
- const response = await fetch(this._getFullPath(`?id=${id}&type=${type}&entity=${entity}${`&filename=${filename}`}${template ? `&template=${template}` : ''}`), {
203
+ const response = await fetch(this._getFullPath('?' +
204
+ this._queryParamsToString({ id, type, entity, filename, template })), {
197
205
  method: 'GET',
198
206
  headers: {
199
207
  'Content-Type': 'application/json',
@@ -66,11 +66,10 @@ interface IFileUploading {
66
66
  * @param {string} type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
67
67
  * @param {string} entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
68
68
  * @param {string} filename - File name. Example: "file.png".
69
- * @param {string} [template] - Preview template: its numeric ID or its marker, for example `"preview"`. Without it, no preview is generated. Example: "1".
70
- * @returns {Response | IError} Returns a promise that resolves to a Response object containing the file data or an error object if there was an issue.
71
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
69
+ * @param {string} [template] - Kept for compatibility: `GET /files` ignores it — the answer is the original file with any value, an unknown template included (CMS-1101, CMS-1128). Previews are made on `upload`.
70
+ * @returns {Response} The raw `Response` of the request — also on an error: check `response.ok`. A missing file answers `404` with a JSON body but a `content-type` taken from the file name. No IError is returned and nothing is thrown on an HTTP error.
72
71
  */
73
- getFile(id: number, type: string, entity: string, filename: string, template?: string): Promise<Response | IError>;
72
+ getFile(id: number, type: string, entity: string, filename: string, template?: string): Promise<Response>;
74
73
  /**
75
74
  * Public search across the content of files attached to records.
76
75
  * @handleName searchFileContent
@@ -186,7 +185,7 @@ interface IFileSearchItem {
186
185
  * The `IFileSearchQueryLanguage` interface describes how the query language was resolved.
187
186
  * @interface IFileSearchQueryLanguage
188
187
  * @property {string[]} resolved - Languages the query was actually run in. Example: ["english"].
189
- * @property {string} source - How they were chosen: "explicit" when taken from `langCode`, otherwise detected. Example: "explicit".
188
+ * @property {string} source - How they were chosen: `"explicit"` when taken from `langCode`; detected otherwise (seen: `"script"`). Detection runs only with `langCode: ""` — by default the client's language is sent. Example: "explicit".
190
189
  * @property {string[]} candidates - Languages that were considered. Example: ["english"].
191
190
  * @description How the query language was resolved for the search.
192
191
  */
@@ -202,7 +201,7 @@ interface IFileSearchQueryLanguage {
202
201
  * @property {number} offset - Number of records to skip. Example: 0.
203
202
  * @property {number} limit - Maximum number of records to return. Example: 10.
204
203
  * @property {IFileSearchQueryLanguage} queryLanguage - How the query language was resolved.
205
- * @property {string[]} warnings - Warnings about the search, empty when there are none.
204
+ * @property {string[]} warnings - Warning codes, empty when there are none. Seen: `processing_disabled` (content indexing is off — `items` is always empty), `query_language_capped`, `query_too_common`.
206
205
  * @property {IFileSearchItem[]} items - Files that match the query.
207
206
  * @description The result of a file content search.
208
207
  */
@@ -67,9 +67,9 @@ class FiltersApi extends asyncModules_1.default {
67
67
  * @see {@link https://js-sdk.oneentry.cloud/docs/filters/getFilterByMarker getFilterByMarker} documentation.
68
68
  */
69
69
  async getFilterByMarker(marker, langCode = this.state.lang) {
70
- const data = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${langCode}`);
70
+ const data = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${encodeURIComponent(langCode)}`);
71
71
  const validated = await this._validateResponse(data, schema('ContentFilterSchema'));
72
- return this._normalizeData(validated);
72
+ return this._normalizeData(validated, langCode);
73
73
  }
74
74
  }
75
75
  exports.default = FiltersApi;
@@ -69,7 +69,7 @@ class FormsApi extends asyncModules_1.default {
69
69
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms/getAllForms getAllForms} documentation.
70
70
  */
71
71
  async getAllForms(langCode = this.state.lang, offset = 0, limit = 30) {
72
- const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
72
+ const result = await this._fetchGet(`?langCode=${encodeURIComponent(langCode)}&offset=${encodeURIComponent(String(offset))}&limit=${encodeURIComponent(String(limit))}`);
73
73
  // Validate response if validation is enabled
74
74
  const validated = await this._validateResponse(result, schema('FormsResponseSchema'));
75
75
  return this._normalizeData(validated, langCode);
@@ -84,7 +84,7 @@ class FormsApi extends asyncModules_1.default {
84
84
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms/getFormByMarker getFormByMarker} documentation.
85
85
  */
86
86
  async getFormByMarker(marker, langCode = this.state.lang) {
87
- const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${langCode}`);
87
+ const result = await this._fetchGet(`/marker/${this._pathSegment(marker)}?langCode=${encodeURIComponent(langCode)}`);
88
88
  // Validate response if validation is enabled
89
89
  const validated = await this._validateResponse(result, schema('FormEntitySchema'));
90
90
  return this._normalizeData(validated, langCode);
@@ -69,10 +69,9 @@ interface IFromPages {
69
69
  * @property {number} version - Version number of the object; changes with each update. Example: 1.
70
70
  * @property {number} position - Position of the object, used for sorting. Example: 1.
71
71
  * @property {string} identifier - Text identifier (marker) of the object. Example: "form_contact_us".
72
- * @property {string} processingType - How form submissions are processed, for example `"email"` or `"url"`. Example: "async".
72
+ * @property {string} processingType - How form submissions are processed: the processing type chosen in the form settings. Example: "script".
73
73
  * @property {number | null} templateId - ID of the template used by the form, or `null` when the form has no template. Example: 6789.
74
74
  * @property {IFormAttribute[]} attributes - Form fields with their localization, validators and form-specific flags, sorted by `position`. The API returns an empty object for forms with no attributes — the SDK normalizes it to an empty array.
75
- * @property {number | string} [total] - Total count of related entries. Example: "1".
76
75
  * @property {IFormConfig[]} [moduleFormConfigs] - Form configurations of the module associated with the form.
77
76
  * @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
78
77
  */
@@ -87,7 +86,6 @@ interface IFormsEntity {
87
86
  processingType: string;
88
87
  templateId: number | null;
89
88
  attributes: IFormAttribute[];
90
- total?: number | string;
91
89
  moduleFormConfigs?: IFormConfig[];
92
90
  }
93
91
  /**
@@ -13,8 +13,7 @@ export declare const FormEntitySchema: z.ZodObject<{
13
13
  type: z.ZodNullable<z.ZodString>;
14
14
  attributeSetId: z.ZodNullable<z.ZodNumber>;
15
15
  templateId: z.ZodNullable<z.ZodNumber>;
16
- total: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
17
- attributes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
16
+ attributes: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
18
17
  moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
19
18
  }, z.core.$strip>;
20
19
  /**
@@ -32,8 +31,7 @@ export declare const FormsResponseSchema: z.ZodObject<{
32
31
  type: z.ZodNullable<z.ZodString>;
33
32
  attributeSetId: z.ZodNullable<z.ZodNumber>;
34
33
  templateId: z.ZodNullable<z.ZodNumber>;
35
- total: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
36
- attributes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
34
+ attributes: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
37
35
  moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
38
36
  }, z.core.$strip>>;
39
37
  }, z.core.$strip>;
@@ -50,7 +48,6 @@ export declare const SingleFormSchema: z.ZodObject<{
50
48
  type: z.ZodNullable<z.ZodString>;
51
49
  attributeSetId: z.ZodNullable<z.ZodNumber>;
52
50
  templateId: z.ZodNullable<z.ZodNumber>;
53
- total: z.ZodOptional<z.ZodUnion<readonly [z.ZodNumber, z.ZodString]>>;
54
- attributes: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>>;
51
+ attributes: z.ZodUnion<readonly [z.ZodArray<z.ZodAny>, z.ZodRecord<z.ZodString, z.ZodAny>]>;
55
52
  moduleFormConfigs: z.ZodOptional<z.ZodArray<z.ZodAny>>;
56
53
  }, z.core.$strip>;
@@ -16,10 +16,8 @@ exports.FormEntitySchema = zod_1.z.object({
16
16
  type: zod_1.z.string().nullable(),
17
17
  attributeSetId: zod_1.z.number().nullable(),
18
18
  templateId: zod_1.z.number().nullable(),
19
- total: zod_1.z.union([zod_1.z.number(), zod_1.z.string()]).optional(),
20
- attributes: zod_1.z
21
- .union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())])
22
- .optional(),
19
+ // Required as in IFormsEntity: a form without fields comes as `{}`
20
+ attributes: zod_1.z.union([zod_1.z.array(zod_1.z.any()), zod_1.z.record(zod_1.z.string(), zod_1.z.any())]),
23
21
  moduleFormConfigs: zod_1.z.array(zod_1.z.any()).optional(),
24
22
  });
25
23
  /**
@@ -136,14 +136,40 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
136
136
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/getFormsDataByMarker getFormsDataByMarker} documentation.
137
137
  */
138
138
  getFormsDataByMarker(marker: string, formModuleConfigId: number, body?: IFormsDataFilter, isExtended?: number, langCode?: string, offset?: number, limit?: number): Promise<IFormsByMarkerDataEntity | IError>;
139
+ /**
140
+ * Wrap the caller's flat `formData` array under its language code and upload any
141
+ * file fields, so the submit endpoints receive `{ [langCode]: [...] }`. Shared by
142
+ * postFormsData and updateFormsDataByid so the two never diverge.
143
+ * @param {FormDataType[]} rawFormData - Flat array of form fields.
144
+ * @param {string} langCode - Language code the fields are wrapped under.
145
+ * @returns {Promise<object>} The locale-keyed formData and the first upload error, if any.
146
+ */
147
+ private _buildLocalizedFormData;
139
148
  /**
140
149
  * Update one object of form data by id. Requires user authentication.
141
150
  * @handleName updateFormsDataByid
142
151
  * @param {number} id - Form data ID. Example: 1.
152
+ * @param {IBodyPostFormData} body - Form data to save: the same fields as in `postFormsData` (`formIdentifier`, `formModuleConfigId`, `moduleEntityIdentifier`, `replayTo`, `status`, `formData`). The flat `formData` array is wrapped under `langCode` before sending, exactly like `postFormsData`.
153
+ * @param {string} [langCode] - Language code the form fields are saved under. Default: "en_US".
154
+ * @example
155
+ {
156
+ "formIdentifier": "test-form",
157
+ "formModuleConfigId": 2,
158
+ "moduleEntityIdentifier": "blog",
159
+ "replayTo": null,
160
+ "status": "sent",
161
+ "formData": [
162
+ {
163
+ "marker": "name",
164
+ "type": "string",
165
+ "value": "Test"
166
+ }
167
+ ]
168
+ }
143
169
  * @returns {Promise<IUpdateFormsData | IError>} Returns an object containing the updated form data or an error object if there was an issue.
144
170
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/updateFormsDataByid updateFormsDataByid} documentation.
145
171
  */
146
- updateFormsDataByid(id: number, body?: object): Promise<IUpdateFormsData | IError>;
172
+ updateFormsDataByid(id: number, body: IBodyPostFormData, langCode?: string): Promise<IUpdateFormsData | IError>;
147
173
  /**
148
174
  * Update form data status by id. Requires user authentication.
149
175
  * @handleName updateFormsDataStatusByid
@@ -104,67 +104,13 @@ class FormsDataApi extends asyncModules_1.default {
104
104
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/postFormsData postFormsData} documentation.
105
105
  */
106
106
  async postFormsData(body, langCode = this.state.lang) {
107
- const formData = {};
108
- // filter button fields; keep spam fields so the captcha token in their `value` reaches the server
109
- formData[langCode] = Array.isArray(body.formData)
110
- ? body.formData.filter((fd) => fd.type !== 'button')
111
- : [body.formData].filter((fd) => fd.type !== 'button');
112
- /**
113
- * Handle file uploads if fileQuery is present
114
- * Check if there is any element in formData[langCode] that contains one of the specified types
115
- */
116
- if (formData[langCode].find((fd) => ['file', 'image', 'groupOfImages'].includes(fd.type))) {
117
- // Create an instance of FileUploadingApi with the current state
118
- const fileUploader = new fileUploadingApi_1.default(this.state);
119
- // Process each element in formData[langCode] asynchronously
120
- formData[langCode] = await Promise.all(formData[langCode].map(async (field) => {
121
- // Check if the type is one of the specified types
122
- if (['file', 'image', 'groupOfImages'].includes(field.type)) {
123
- // Work on a copy: the caller's field keeps its File and its fileQuery,
124
- // so a reused body sends the same form again (CMS-1071)
125
- const fd = { ...field };
126
- // If fileQuery does not exist, we create it and assign it to an object with the following properties:
127
- if (!fd.fileQuery) {
128
- const fileQuery = {
129
- type: 'page',
130
- entity: 'editor',
131
- // Generate a random 4-digit ID
132
- id: Number(Math.floor(Math.random() * 10000)
133
- .toString()
134
- .padStart(4, '0')),
135
- };
136
- fd.fileQuery = fileQuery;
137
- }
138
- // Convert fd.value to an array if it is a FileList, otherwise use it directly
139
- const filesArray = typeof FileList !== 'undefined' && fd.value instanceof FileList
140
- ? Array.from(fd.value)
141
- : fd.value;
142
- // If filesArray is an array, upload the files it holds asynchronously
143
- if (Array.isArray(filesArray)) {
144
- const uploadPromises = filesArray.map((file) =>
145
- // An entry that is already in storage is passed through: a
146
- // second upload would send the descriptor itself as the file
147
- // and the endpoint answers `value[0].filename is required`.
148
- this._isUploadable(file)
149
- ? fileUploader.upload(file, fd.fileQuery).catch((e) => e)
150
- : file);
151
- fd.value = (await Promise.all(uploadPromises)).flat();
152
- }
153
- // If fd.value is a single File or Blob, upload it
154
- else if (this._isUploadable(fd.value)) {
155
- fd.value = await fileUploader
156
- .upload(fd.value, fd.fileQuery)
157
- .catch((e) => e); // Catch any errors during upload
158
- }
159
- // Remove the 'fileQuery' property from the object after processing
160
- delete fd.fileQuery;
161
- // Remove the 'contentType' property from the file object because it is not needed and not valid
162
- fd.value = this._stripContentType(fd.value);
163
- return fd;
164
- }
165
- // Return the form data element untouched
166
- return field;
167
- }));
107
+ // Wrap the flat formData under langCode (and upload any files) before sending
108
+ const { formData, uploadError } = await this._buildLocalizedFormData(body.formData, langCode);
109
+ if (uploadError) {
110
+ if (this.state.isShell) {
111
+ return uploadError;
112
+ }
113
+ throw uploadError;
168
114
  }
169
115
  // The wrapped formData goes into a new body: written back into the caller's
170
116
  // object, a second call with it wrapped the wrapper and answered `400` (CMS-1071)
@@ -272,23 +218,128 @@ class FormsDataApi extends asyncModules_1.default {
272
218
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/getFormsDataByMarker getFormsDataByMarker} documentation.
273
219
  */
274
220
  async getFormsDataByMarker(marker, formModuleConfigId, body = {}, isExtended = 0, langCode = this.state.lang, offset = 0, limit = 30) {
275
- const result = await this._fetchPost(`/marker/${this._pathSegment(marker)}?formModuleConfigId=${formModuleConfigId}&isExtended=${isExtended}&langCode=${langCode}&offset=${offset}&limit=${limit}`, this._stripEmptyDates(body));
221
+ const result = await this._fetchPost(`/marker/${this._pathSegment(marker)}?formModuleConfigId=${encodeURIComponent(String(formModuleConfigId))}&isExtended=${encodeURIComponent(String(isExtended))}&langCode=${encodeURIComponent(langCode)}&offset=${encodeURIComponent(String(offset))}&limit=${encodeURIComponent(String(limit))}`, this._stripEmptyDates(body));
276
222
  // Validate response if validation is enabled
277
223
  const validated = await this._validateResponse(result, schema('FormsByMarkerDataResponseSchema'));
278
224
  return this._normalizeData(validated, langCode);
279
225
  }
226
+ /**
227
+ * Wrap the caller's flat `formData` array under its language code and upload any
228
+ * file fields, so the submit endpoints receive `{ [langCode]: [...] }`. Shared by
229
+ * postFormsData and updateFormsDataByid so the two never diverge.
230
+ * @param {FormDataType[]} rawFormData - Flat array of form fields.
231
+ * @param {string} langCode - Language code the fields are wrapped under.
232
+ * @returns {Promise<object>} The locale-keyed formData and the first upload error, if any.
233
+ */
234
+ async _buildLocalizedFormData(rawFormData, langCode) {
235
+ const formData = {};
236
+ // filter button fields; keep spam fields so the captcha token in their `value` reaches the server
237
+ formData[langCode] = Array.isArray(rawFormData)
238
+ ? rawFormData.filter((fd) => fd.type !== 'button')
239
+ : [rawFormData].filter((fd) => fd.type !== 'button');
240
+ /**
241
+ * Handle file uploads if fileQuery is present
242
+ * Check if there is any element in formData[langCode] that contains one of the specified types
243
+ */
244
+ if (formData[langCode].find((fd) => ['file', 'image', 'groupOfImages'].includes(fd.type))) {
245
+ // Create an instance of FileUploadingApi with the current state
246
+ const fileUploader = new fileUploadingApi_1.default(this.state);
247
+ // Process each element in formData[langCode] asynchronously
248
+ formData[langCode] = await Promise.all(formData[langCode].map(async (field) => {
249
+ // Check if the type is one of the specified types
250
+ if (['file', 'image', 'groupOfImages'].includes(field.type)) {
251
+ // Work on a copy: the caller's field keeps its File and its fileQuery,
252
+ // so a reused body sends the same form again (CMS-1071)
253
+ const fd = { ...field };
254
+ // If fileQuery does not exist, we create it and assign it to an object with the following properties:
255
+ if (!fd.fileQuery) {
256
+ const fileQuery = {
257
+ type: 'page',
258
+ entity: 'editor',
259
+ // Generate a random 4-digit ID
260
+ id: Number(Math.floor(Math.random() * 10000)
261
+ .toString()
262
+ .padStart(4, '0')),
263
+ };
264
+ fd.fileQuery = fileQuery;
265
+ }
266
+ // Convert fd.value to an array if it is a FileList, otherwise use it directly
267
+ const filesArray = typeof FileList !== 'undefined' && fd.value instanceof FileList
268
+ ? Array.from(fd.value)
269
+ : fd.value;
270
+ // If filesArray is an array, upload the files it holds asynchronously
271
+ if (Array.isArray(filesArray)) {
272
+ const uploadPromises = filesArray.map((file) =>
273
+ // An entry that is already in storage is passed through: a
274
+ // second upload would send the descriptor itself as the file
275
+ // and the endpoint answers `value[0].filename is required`.
276
+ this._isUploadable(file)
277
+ ? fileUploader.upload(file, fd.fileQuery).catch((e) => e)
278
+ : file);
279
+ fd.value = (await Promise.all(uploadPromises)).flat();
280
+ }
281
+ // If fd.value is a single File or Blob, upload it
282
+ else if (this._isUploadable(fd.value)) {
283
+ fd.value = await fileUploader
284
+ .upload(fd.value, fd.fileQuery)
285
+ .catch((e) => e); // Catch any errors during upload
286
+ }
287
+ // Remove the 'fileQuery' property from the object after processing
288
+ delete fd.fileQuery;
289
+ // Remove the 'contentType' property from the file object because it is not needed and not valid
290
+ fd.value = this._stripContentType(fd.value);
291
+ return fd;
292
+ }
293
+ // Return the form data element untouched
294
+ return field;
295
+ }));
296
+ }
297
+ // A failed upload used to be sent to the platform as the field's value, and the caller
298
+ // got a success: the form is not sent, the upload's error is the answer
299
+ const uploadError = formData[langCode]
300
+ .flatMap((field) => Array.isArray(field === null || field === void 0 ? void 0 : field.value) ? field.value : [field === null || field === void 0 ? void 0 : field.value])
301
+ .find((value) => this._isErrorResponse(value));
302
+ return { formData, uploadError };
303
+ }
280
304
  /**
281
305
  * Update one object of form data by id. Requires user authentication.
282
306
  * @handleName updateFormsDataByid
283
307
  * @param {number} id - Form data ID. Example: 1.
308
+ * @param {IBodyPostFormData} body - Form data to save: the same fields as in `postFormsData` (`formIdentifier`, `formModuleConfigId`, `moduleEntityIdentifier`, `replayTo`, `status`, `formData`). The flat `formData` array is wrapped under `langCode` before sending, exactly like `postFormsData`.
309
+ * @param {string} [langCode] - Language code the form fields are saved under. Default: "en_US".
310
+ * @example
311
+ {
312
+ "formIdentifier": "test-form",
313
+ "formModuleConfigId": 2,
314
+ "moduleEntityIdentifier": "blog",
315
+ "replayTo": null,
316
+ "status": "sent",
317
+ "formData": [
318
+ {
319
+ "marker": "name",
320
+ "type": "string",
321
+ "value": "Test"
322
+ }
323
+ ]
324
+ }
284
325
  * @returns {Promise<IUpdateFormsData | IError>} Returns an object containing the updated form data or an error object if there was an issue.
285
326
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/updateFormsDataByid updateFormsDataByid} documentation.
286
327
  */
287
- async updateFormsDataByid(id, body = {}) {
288
- const result = await this._fetchPut(`/${id}`, body);
328
+ async updateFormsDataByid(id, body, langCode = this.state.lang) {
329
+ // Wrap the flat formData under langCode (and upload any files) — the endpoint
330
+ // rejects a flat array with `400 formData must be ... keyed by lang code`
331
+ const { formData, uploadError } = await this._buildLocalizedFormData(body.formData, langCode);
332
+ if (uploadError) {
333
+ if (this.state.isShell) {
334
+ return uploadError;
335
+ }
336
+ throw uploadError;
337
+ }
338
+ const result = await this._fetchPut(`/${this._pathSegment(String(id))}`, { ...body, formData });
289
339
  // Validate response if validation is enabled
290
340
  const validated = await this._validateResponse(result, schema('UpdateFormsDataSchema'));
291
- return validated;
341
+ // The fields went in under `langCode`, so unwrap the response from the same locale
342
+ return this._normalizeData(validated, langCode);
292
343
  }
293
344
  /**
294
345
  * Update form data status by id. Requires user authentication.
@@ -299,7 +350,7 @@ class FormsDataApi extends asyncModules_1.default {
299
350
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/updateFormsDataStatusByid updateFormsDataStatusByid} documentation.
300
351
  */
301
352
  async updateFormsDataStatusByid(id, body = {}) {
302
- const result = await this._fetchPut(`/${id}/update-status`, body);
353
+ const result = await this._fetchPut(`/${this._pathSegment(String(id))}/update-status`, body);
303
354
  return result;
304
355
  }
305
356
  /**
@@ -310,8 +361,8 @@ class FormsDataApi extends asyncModules_1.default {
310
361
  * @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/deleteFormsDataByid deleteFormsDataByid} documentation.
311
362
  */
312
363
  async deleteFormsDataByid(id) {
313
- const result = await this._fetchDelete(`/${id}`);
314
- return result;
364
+ const result = await this._fetchDelete(`/${this._pathSegment(String(id))}`);
365
+ return this._asBoolean(result);
315
366
  }
316
367
  /**
317
368
  * Semantic (vector) search for form data.
@@ -225,9 +225,14 @@ interface IFormDataEntity {
225
225
  "id": 1,
226
226
  "formIdentifier": "form",
227
227
  "time": "2025-06-06T19:07:45.993Z",
228
- "formData": {},
229
- "attributeSetIdentifier": "form",
230
- "actionMessage": "Action message string"
228
+ "formData": [
229
+ {
230
+ "marker": "name",
231
+ "type": "string",
232
+ "value": "Test"
233
+ }
234
+ ],
235
+ "attributeSetIdentifier": "form"
231
236
  }
232
237
  ]
233
238
  * @property {number} total - Total number of found records. Example: 100.
@@ -241,13 +246,13 @@ interface IFormsDataEntity {
241
246
  * Represents the structure of a form data entity.
242
247
  * @interface IFormByMarkerDataEntity
243
248
  * @property {number} id - ID of the form data record. Example: 12345.
244
- * @property {null | number} parentId - ID of the parent form data record; `null` for a top-level record. Example: 123.
249
+ * @property {null | number} [parentId] - ID of the parent form data record; `null` for a top-level record. Returned only with `isExtended` = 1. Example: 123.
245
250
  * @property {string} formIdentifier - Marker of the form. Example: "contact_form".
246
- * @property {number} depth - Example: 1.
247
- * @property {string | null} ip - IP address the form was submitted from. Example: '127.0.0.1'.
248
- * @property {string | null} fingerprint - Device fingerprint of the sender. Example: 'fingerprint'.
249
- * @property {string | null} status - Moderation status of the record: "sent", "moderation", "approved", "banned" or "deleted"; `null` when the form does not moderate. Example: 'approved'.
250
- * @property {string | null} userIdentifier - Text identifier (marker) of the user. Example: "admin".
251
+ * @property {number} [depth] - Nesting depth of the record. Returned only with `isExtended` = 1. Example: 1.
252
+ * @property {string | null} [ip] - IP address the form was submitted from. Not returned by the by-marker list. Example: '127.0.0.1'.
253
+ * @property {string | null} [fingerprint] - Device fingerprint of the sender. Not returned by the by-marker list. Example: 'fingerprint'.
254
+ * @property {string | null} [status] - Moderation status of the record: "sent", "moderation", "approved", "banned" or "deleted"; `null` when the form does not moderate. Returned only with `isExtended` = 1. Example: 'approved'.
255
+ * @property {string | null} [userIdentifier] - Text identifier (marker) of the user. Returned only with `isExtended` = 1. Example: "admin".
251
256
  * @property {FormDataType[]} formData - Submitted fields, **already unwrapped from the locale**: the API returns `{ "en_US": [ … ] }` and the SDK hands over the array for the requested `langCode`. Read `formData` directly — `formData[langCode]` is `undefined`.
252
257
  * @example
253
258
  [
@@ -260,7 +265,7 @@ interface IFormsDataEntity {
260
265
  * @property {string | null} attributeSetIdentifier - Marker of the attribute set used by the form. Example: "product_attributes".
261
266
  * @property {Date | string} time - Date and time the form data was last changed. Example: "2023-10-01T12:00:00Z".
262
267
  * @property {string} entityIdentifier - Marker of the entity the record belongs to. Example: "test".
263
- * @property {boolean} isUserAdmin - Whether the record was submitted by an admin. Example: true.
268
+ * @property {boolean} [isUserAdmin] - Whether the record was submitted by an admin. Returned only with `isExtended` = 1. Example: true.
264
269
  * @property {number} formModuleConfigId - ID of the form module configuration. Example: 2.
265
270
  * @property {string} [moduleIdentifier] - Marker of the module. Example: "blog".
266
271
  * @property {number} entityId - ID of the entity the record belongs to. Example: 2.
@@ -287,7 +292,7 @@ interface IFormByMarkerDataEntity {
287
292
  /**
288
293
  * Represents a collection of form data entities.
289
294
  * @interface IFormsByMarkerDataEntity
290
- * @property {IFormByMarkerDataEntity[]} items - Form data records.
295
+ * @property {IFormByMarkerDataEntity[]} items - Form data records. The example shows a record with `isExtended` = 1; without it `parentId`, `depth`, `status`, `userIdentifier` and `isUserAdmin` are not returned.
291
296
  * @example
292
297
  [
293
298
  {
@@ -295,7 +300,6 @@ interface IFormByMarkerDataEntity {
295
300
  "parentId": null,
296
301
  "formIdentifier": "test-form",
297
302
  "depth": 0,
298
- "ip": null,
299
303
  "status": null,
300
304
  "userIdentifier": null,
301
305
  "formData": [
@@ -862,4 +866,4 @@ interface IListOptionValue {
862
866
  value: string;
863
867
  extended: IListOptionExtended;
864
868
  }
865
- export type { FormDataPostType, FormDataStatus, FormDataType, IBodyPostFormData, IBodyPostTypeList, IBodyPostTypeSpam, IBodyPostTypeText, IBodyTypeEntity, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, IBodyTypeTimeInterval, ICaptchaEvent, ICaptchaValue, IFileValue, IFormByMarkerDataEntity, IFormDataEntity, IFormDataSearchEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IFormsDataFilter, IFormsDataSearchResponse, IFormsDataVectorSearch, IImageValue, IImageValueParams, IListOptionExtended, IListOptionValue, IPostFormResponse, IPostFormResponseData, ITextEditorParams, ITextSubmissionValue, ITextValue, ITextWithHeaderValue, ITimeDateValue, IUpdateFormsData, };
869
+ export type { FormDataPostType, FormDataStatus, FormDataType, IBodyPostFormData, IBodyPostTypeList, IBodyPostTypeSpam, IBodyPostTypeText, IBodyTypeEntity, IBodyTypeFile, IBodyTypeImageGroupOfImages, IBodyTypeRadioButtonList, IBodyTypeStringNumberFloat, IBodyTypeText, IBodyTypeTextWithHeader, IBodyTypeTimeDate, IBodyTypeTimeInterval, ICaptchaEvent, ICaptchaValue, IFileValue, IFormByMarkerDataEntity, IFormDataEntity, IFormDataSearchEntity, IFormsByMarkerDataEntity, IFormsData, IFormsDataEntity, IFormsDataFilter, IFormsDataSearchResponse, IFormsDataVectorSearch, IImageValue, IImageValueParams, IListOptionExtended, IListOptionValue, IPostFormResponse, IPostFormResponseData, ITextEditorParams, ITextSubmissionValue, ITextSubmissionValueHtml, ITextSubmissionValueMd, ITextSubmissionValuePlain, ITextValue, ITextWithHeaderValue, ITimeDateValue, IUpdateFormsData, };
@@ -19,7 +19,7 @@ interface IGeneralTypes {
19
19
  * Represents a general type entity.
20
20
  * @interface IGeneralTypesEntity
21
21
  * @property {number} id - ID of the type. Example: 1.
22
- * @property {BlockType} type - Type name: a `BlockType` value such as `"product"` or `"service"`. Example: "product", "category", "etc".
22
+ * @property {BlockType} type - Type name: a `BlockType` value such as `"product"`, `"catalog_page"`, `"product_block"` or `"service"`. Example: "product".
23
23
  * @description Represents a general type entity with an identifier and a type.
24
24
  */
25
25
  interface IGeneralTypesEntity {