oneentry 1.0.173 → 1.0.174
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.
- package/changelog.md +23 -0
- package/dist/admins/adminsApi.d.ts +7 -7
- package/dist/admins/adminsApi.js +7 -7
- package/dist/admins/adminsInterfaces.d.ts +22 -22
- package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/dist/attribute-sets/attributeSetsApi.js +8 -8
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/dist/auth-provider/authProviderApi.d.ts +29 -29
- package/dist/auth-provider/authProviderApi.js +29 -29
- package/dist/auth-provider/authProvidersInterfaces.d.ts +52 -52
- package/dist/base/asyncModules.d.ts +6 -6
- package/dist/base/asyncModules.js +6 -6
- package/dist/base/syncModules.d.ts +1 -1
- package/dist/base/syncModules.js +1 -1
- package/dist/base/utils.d.ts +3 -3
- package/dist/blocks/blocksApi.d.ts +35 -35
- package/dist/blocks/blocksApi.js +35 -35
- package/dist/blocks/blocksInterfaces.d.ts +55 -55
- package/dist/discounts/discountsApi.d.ts +14 -14
- package/dist/discounts/discountsApi.js +14 -14
- package/dist/discounts/discountsInterfaces.d.ts +52 -52
- package/dist/events/eventsApi.d.ts +13 -13
- package/dist/events/eventsApi.js +13 -13
- package/dist/events/eventsInterfaces.d.ts +18 -18
- package/dist/file-uploading/fileUploadingApi.d.ts +14 -14
- package/dist/file-uploading/fileUploadingApi.js +14 -14
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- package/dist/filters/filtersApi.d.ts +1 -1
- package/dist/filters/filtersApi.js +1 -1
- package/dist/filters/filtersInterfaces.d.ts +7 -7
- package/dist/forms/formsApi.d.ts +3 -3
- package/dist/forms/formsApi.js +3 -3
- package/dist/forms/formsInterfaces.d.ts +42 -42
- package/dist/forms-data/formsDataApi.d.ts +14 -14
- package/dist/forms-data/formsDataApi.js +14 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +67 -68
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
- package/dist/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/dist/integration-collections/integrationCollectionsApi.js +20 -20
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- package/dist/locales/localesInterfaces.d.ts +8 -8
- package/dist/menus/menusApi.d.ts +1 -1
- package/dist/menus/menusApi.js +1 -1
- package/dist/menus/menusInterfaces.d.ts +12 -12
- package/dist/orders/ordersApi.d.ts +26 -26
- package/dist/orders/ordersApi.js +26 -26
- package/dist/orders/ordersInterfaces.d.ts +99 -99
- package/dist/pages/pagesApi.d.ts +6 -6
- package/dist/pages/pagesApi.js +6 -6
- package/dist/pages/pagesInterfaces.d.ts +46 -46
- package/dist/payments/paymentsApi.d.ts +8 -8
- package/dist/payments/paymentsApi.js +8 -8
- package/dist/payments/paymentsInterfaces.d.ts +31 -31
- package/dist/product-statuses/productStatusesApi.d.ts +2 -2
- package/dist/product-statuses/productStatusesApi.js +2 -2
- package/dist/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/dist/products/productsApi.d.ts +37 -37
- package/dist/products/productsApi.js +36 -36
- package/dist/products/productsInterfaces.d.ts +96 -96
- package/dist/search/searchApi.d.ts +3 -3
- package/dist/search/searchApi.js +3 -3
- package/dist/search/searchInterfaces.d.ts +4 -4
- package/dist/sitemap/sitemapApi.d.ts +1 -1
- package/dist/sitemap/sitemapApi.js +1 -1
- package/dist/sitemap/sitemapInterfaces.d.ts +2 -2
- package/dist/subscriptions/subscriptionsApi.d.ts +3 -3
- package/dist/subscriptions/subscriptionsApi.js +3 -3
- package/dist/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/dist/templates/templatesApi.d.ts +2 -2
- package/dist/templates/templatesApi.js +2 -2
- package/dist/templates/templatesInterfaces.d.ts +10 -10
- package/dist/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/dist/templates-preview/templatesPreviewApi.js +1 -1
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/dist/user-activity/userActivityApi.d.ts +1 -1
- package/dist/user-activity/userActivityApi.js +1 -1
- package/dist/user-activity/userActivityInterfaces.d.ts +4 -4
- package/dist/user-groups/userGroupsApi.d.ts +1 -1
- package/dist/user-groups/userGroupsApi.js +1 -1
- package/dist/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/dist/users/usersApi.d.ts +7 -7
- package/dist/users/usersApi.js +7 -7
- package/dist/users/usersInterfaces.d.ts +34 -34
- package/esm/admins/adminsApi.d.ts +7 -7
- package/esm/admins/adminsApi.js +7 -7
- package/esm/admins/adminsInterfaces.d.ts +22 -22
- package/esm/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/esm/attribute-sets/attributeSetsApi.js +8 -8
- package/esm/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/esm/auth-provider/authProviderApi.d.ts +29 -29
- package/esm/auth-provider/authProviderApi.js +29 -29
- package/esm/auth-provider/authProvidersInterfaces.d.ts +52 -52
- package/esm/base/asyncModules.d.ts +6 -6
- package/esm/base/asyncModules.js +6 -6
- package/esm/base/syncModules.d.ts +1 -1
- package/esm/base/syncModules.js +1 -1
- package/esm/base/utils.d.ts +3 -3
- package/esm/blocks/blocksApi.d.ts +35 -35
- package/esm/blocks/blocksApi.js +35 -35
- package/esm/blocks/blocksInterfaces.d.ts +55 -55
- package/esm/discounts/discountsApi.d.ts +14 -14
- package/esm/discounts/discountsApi.js +14 -14
- package/esm/discounts/discountsInterfaces.d.ts +52 -52
- package/esm/events/eventsApi.d.ts +13 -13
- package/esm/events/eventsApi.js +13 -13
- package/esm/events/eventsInterfaces.d.ts +18 -18
- package/esm/file-uploading/fileUploadingApi.d.ts +14 -14
- package/esm/file-uploading/fileUploadingApi.js +14 -14
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- package/esm/filters/filtersApi.d.ts +1 -1
- package/esm/filters/filtersApi.js +1 -1
- package/esm/filters/filtersInterfaces.d.ts +7 -7
- package/esm/forms/formsApi.d.ts +3 -3
- package/esm/forms/formsApi.js +3 -3
- package/esm/forms/formsInterfaces.d.ts +42 -42
- package/esm/forms-data/formsDataApi.d.ts +14 -14
- package/esm/forms-data/formsDataApi.js +14 -14
- package/esm/forms-data/formsDataInterfaces.d.ts +67 -68
- package/esm/general-types/generalTypesInterfaces.d.ts +2 -2
- package/esm/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/esm/integration-collections/integrationCollectionsApi.js +20 -20
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- package/esm/locales/localesInterfaces.d.ts +8 -8
- package/esm/menus/menusApi.d.ts +1 -1
- package/esm/menus/menusApi.js +1 -1
- package/esm/menus/menusInterfaces.d.ts +12 -12
- package/esm/orders/ordersApi.d.ts +26 -26
- package/esm/orders/ordersApi.js +26 -26
- package/esm/orders/ordersInterfaces.d.ts +99 -99
- package/esm/pages/pagesApi.d.ts +6 -6
- package/esm/pages/pagesApi.js +6 -6
- package/esm/pages/pagesInterfaces.d.ts +46 -46
- package/esm/payments/paymentsApi.d.ts +8 -8
- package/esm/payments/paymentsApi.js +8 -8
- package/esm/payments/paymentsInterfaces.d.ts +31 -31
- package/esm/product-statuses/productStatusesApi.d.ts +2 -2
- package/esm/product-statuses/productStatusesApi.js +2 -2
- package/esm/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/esm/products/productsApi.d.ts +37 -37
- package/esm/products/productsApi.js +36 -36
- package/esm/products/productsInterfaces.d.ts +96 -96
- package/esm/search/searchApi.d.ts +3 -3
- package/esm/search/searchApi.js +3 -3
- package/esm/search/searchInterfaces.d.ts +4 -4
- package/esm/sitemap/sitemapApi.d.ts +1 -1
- package/esm/sitemap/sitemapApi.js +1 -1
- package/esm/sitemap/sitemapInterfaces.d.ts +2 -2
- package/esm/subscriptions/subscriptionsApi.d.ts +3 -3
- package/esm/subscriptions/subscriptionsApi.js +3 -3
- package/esm/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/esm/templates/templatesApi.d.ts +2 -2
- package/esm/templates/templatesApi.js +2 -2
- package/esm/templates/templatesInterfaces.d.ts +10 -10
- package/esm/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/esm/templates-preview/templatesPreviewApi.js +1 -1
- package/esm/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/esm/user-activity/userActivityApi.d.ts +1 -1
- package/esm/user-activity/userActivityApi.js +1 -1
- package/esm/user-activity/userActivityInterfaces.d.ts +4 -4
- package/esm/user-groups/userGroupsApi.d.ts +1 -1
- package/esm/user-groups/userGroupsApi.js +1 -1
- package/esm/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/esm/users/usersApi.d.ts +7 -7
- package/esm/users/usersApi.js +7 -7
- package/esm/users/usersInterfaces.d.ts +34 -34
- package/package.json +2 -2
|
@@ -17,7 +17,7 @@ interface IFileUploading {
|
|
|
17
17
|
* Upload file function.
|
|
18
18
|
* @handleName upload
|
|
19
19
|
* @param {File | Blob} file - File to upload. Example: `new File(["content"], "file.png", {"type": "image/png"})`
|
|
20
|
-
* @param {IUploadingQuery} fileQuery - Where the file
|
|
20
|
+
* @param {IUploadingQuery} fileQuery - Where the file is stored. Required: without `type`, `entity` and `id` the endpoint answers `400 … should not be empty`.
|
|
21
21
|
* @example
|
|
22
22
|
{
|
|
23
23
|
"type": "page",
|
|
@@ -28,9 +28,9 @@ interface IFileUploading {
|
|
|
28
28
|
"compress": true,
|
|
29
29
|
"template": 1
|
|
30
30
|
}
|
|
31
|
-
* @param {string} fileQuery.type -
|
|
32
|
-
* @param {string} fileQuery.entity -
|
|
33
|
-
* @param {number} fileQuery.id -
|
|
31
|
+
* @param {string} fileQuery.type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
|
|
32
|
+
* @param {string} fileQuery.entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
|
|
33
|
+
* @param {number} fileQuery.id - ID of the object the file belongs to; sets the folder name in the storage. Example: 3787.
|
|
34
34
|
* @param {number} [fileQuery.width] - Optional width parameter. Example: 0.
|
|
35
35
|
* @param {number} [fileQuery.height] - Optional height parameter. Example: 0.
|
|
36
36
|
* @param {boolean} [fileQuery.compress] - Optional flag of optimization (compression) for images. Example: true.
|
|
@@ -43,7 +43,7 @@ interface IFileUploading {
|
|
|
43
43
|
* Deletes a file from the cloud file storage.
|
|
44
44
|
* @handleName delete
|
|
45
45
|
* @param {string} [filename] - File name. Example: "file.png".
|
|
46
|
-
* @param {IUploadingQuery} fileQuery - Where the file
|
|
46
|
+
* @param {IUploadingQuery} fileQuery - Where the file is stored. Required: without `type`, `entity` and `id` the endpoint answers `400 … should not be empty`.
|
|
47
47
|
* @example
|
|
48
48
|
{
|
|
49
49
|
"type": "page",
|
|
@@ -51,9 +51,9 @@ interface IFileUploading {
|
|
|
51
51
|
"id": 3787,
|
|
52
52
|
"template": 1
|
|
53
53
|
}
|
|
54
|
-
* @param {string} fileQuery.type -
|
|
55
|
-
* @param {string} fileQuery.entity -
|
|
56
|
-
* @param {number} fileQuery.id -
|
|
54
|
+
* @param {string} fileQuery.type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
|
|
55
|
+
* @param {string} fileQuery.entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
|
|
56
|
+
* @param {number} fileQuery.id - ID of the object the file belongs to; sets the folder name in the storage. Example: 3787.
|
|
57
57
|
* @param {number} [fileQuery.template] - preview template identifier. Example: 1.
|
|
58
58
|
* @returns {boolean | IError} Returns a promise that resolves to true when the file was deleted or an error object if there was an issue.
|
|
59
59
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -62,11 +62,11 @@ interface IFileUploading {
|
|
|
62
62
|
/**
|
|
63
63
|
* Get file by parameters.
|
|
64
64
|
* @handleName getFile
|
|
65
|
-
* @param {number} id -
|
|
66
|
-
* @param {string} type -
|
|
67
|
-
* @param {string} entity -
|
|
68
|
-
* @param {string} filename -
|
|
69
|
-
* @param {string} [template] - Preview template
|
|
65
|
+
* @param {number} id - ID of the object the file belongs to; sets the folder name in the storage. Example: 3787.
|
|
66
|
+
* @param {string} type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
|
|
67
|
+
* @param {string} entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
|
|
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
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
71
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
72
72
|
*/
|
|
@@ -80,7 +80,7 @@ interface IFileUploading {
|
|
|
80
80
|
* @param {string[]} [ownerTables] - Filter by the section the attached record belongs to. Example: ["products", "pages"].
|
|
81
81
|
* @param {string[]} [localeCodes] - Filter by the locale of the link, not of the file content. Example: ["en_US"].
|
|
82
82
|
* @param {boolean} [onlyTruncated] - Return only files whose extracted text was cut at the size ceiling.
|
|
83
|
-
* @param {number} [offset] -
|
|
83
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
84
84
|
* @param {number} [limit] - Parameter for pagination, 1 to 50. Default: 10.
|
|
85
85
|
* @returns {IFileSearchResponse} Returns the found files with their matching fragments.
|
|
86
86
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -100,13 +100,13 @@ interface IFileEntity {
|
|
|
100
100
|
/**
|
|
101
101
|
* Represents a query for uploading files, including type, entity, and optional parameters like width, height, and compression.
|
|
102
102
|
* @interface IUploadingQuery
|
|
103
|
-
* @property {string} type -
|
|
104
|
-
* @property {string} entity -
|
|
105
|
-
* @property {number} id -
|
|
103
|
+
* @property {string} type - Storage type; determines the folder the file is stored in, for example `"page"`. Example: "page".
|
|
104
|
+
* @property {string} entity - Name of the entity the file belongs to; sets the folder name in the storage. Example: "editor".
|
|
105
|
+
* @property {number} id - ID of the object the file belongs to; sets the folder name in the storage. Example: 3787.
|
|
106
106
|
* @property {number} [width] - Width parameter. Example: 0.
|
|
107
107
|
* @property {number} [height] - Height parameter. Example: 0.
|
|
108
|
-
* @property {boolean} [compress] -
|
|
109
|
-
* @description Represents a query for uploading files, including type, entity, and optional parameters like width, height, and compression. `type`, `entity` and `id` are required by the endpoint: it answers `400 … should not be empty` without any of them
|
|
108
|
+
* @property {boolean} [compress] - Whether to compress (optimize) uploaded images. Example: true.
|
|
109
|
+
* @description Represents a query for uploading files, including type, entity, and optional parameters like width, height, and compression. `type`, `entity` and `id` are required by the endpoint: it answers `400 … should not be empty` without any of them.
|
|
110
110
|
*/
|
|
111
111
|
interface IUploadingQuery {
|
|
112
112
|
type: string;
|
|
@@ -117,7 +117,7 @@ interface IUploadingQuery {
|
|
|
117
117
|
/**
|
|
118
118
|
* Represents the return value of an uploading operation, including the filename, download link, and file size.
|
|
119
119
|
* @interface IUploadingReturn
|
|
120
|
-
* @property {string} filename -
|
|
120
|
+
* @property {string} filename - File name with its relative path. Example: "uploads/file.png".
|
|
121
121
|
* @property {string} downloadLink - Link for downloading the file. Example: "https://example.com/uploads/file.png".
|
|
122
122
|
* @property {number} size - Size of the file in bytes. Example: 1024.
|
|
123
123
|
* @property {string} contentType - MIME type of the uploaded file. Example: "image/png".
|
|
@@ -158,7 +158,7 @@ interface IFileSearchSnippet {
|
|
|
158
158
|
/**
|
|
159
159
|
* The `IFileSearchItem` interface describes one found file.
|
|
160
160
|
* @interface IFileSearchItem
|
|
161
|
-
* @property {number} id -
|
|
161
|
+
* @property {number} id - ID of the indexed file. Example: 1077.
|
|
162
162
|
* @property {string} storageKey - Key of the object in the storage; the file link is built from it. Example: "files/project/file/644/product/db1918c4.pdf".
|
|
163
163
|
* @property {string} extension - File extension. Example: "pdf".
|
|
164
164
|
* @property {string | null} title - Title from the document metadata, `null` when the document carries none. Example: "Microsoft Word - COG Agenda.docx".
|
|
@@ -187,7 +187,7 @@ interface IFileSearchItem {
|
|
|
187
187
|
* @interface IFileSearchQueryLanguage
|
|
188
188
|
* @property {string[]} resolved - Languages the query was actually run in. Example: ["english"].
|
|
189
189
|
* @property {string} source - How they were chosen: "explicit" when taken from `langCode`, otherwise detected. Example: "explicit".
|
|
190
|
-
* @property {string[]} candidates - Languages considered. Example: ["english"].
|
|
190
|
+
* @property {string[]} candidates - Languages that were considered. Example: ["english"].
|
|
191
191
|
* @description How the query language was resolved for the search.
|
|
192
192
|
*/
|
|
193
193
|
interface IFileSearchQueryLanguage {
|
|
@@ -199,11 +199,11 @@ interface IFileSearchQueryLanguage {
|
|
|
199
199
|
* The `IFileSearchResponse` interface describes the result of a file content search.
|
|
200
200
|
* @interface IFileSearchResponse
|
|
201
201
|
* @property {number} total - Total number of matching files. Example: 166.
|
|
202
|
-
* @property {number} offset -
|
|
203
|
-
* @property {number} limit -
|
|
202
|
+
* @property {number} offset - Number of records to skip. Example: 0.
|
|
203
|
+
* @property {number} limit - Maximum number of records to return. Example: 10.
|
|
204
204
|
* @property {IFileSearchQueryLanguage} queryLanguage - How the query language was resolved.
|
|
205
205
|
* @property {string[]} warnings - Warnings about the search, empty when there are none.
|
|
206
|
-
* @property {IFileSearchItem[]} items -
|
|
206
|
+
* @property {IFileSearchItem[]} items - Files that match the query.
|
|
207
207
|
* @description The result of a file content search.
|
|
208
208
|
*/
|
|
209
209
|
interface IFileSearchResponse {
|
|
@@ -21,7 +21,7 @@ export default class FiltersApi extends AsyncModules implements IFiltersApi {
|
|
|
21
21
|
/**
|
|
22
22
|
* Get a filter by its marker (tree of items).
|
|
23
23
|
* @handleName getFilterByMarker
|
|
24
|
-
* @param {string} marker -
|
|
24
|
+
* @param {string} marker - Marker of the filter. Example: "main".
|
|
25
25
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
26
26
|
* @returns {Promise<IContentFilter | IError>} Returns the filter with its items tree.
|
|
27
27
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -59,7 +59,7 @@ class FiltersApi extends asyncModules_1.default {
|
|
|
59
59
|
/**
|
|
60
60
|
* Get a filter by its marker (tree of items).
|
|
61
61
|
* @handleName getFilterByMarker
|
|
62
|
-
* @param {string} marker -
|
|
62
|
+
* @param {string} marker - Marker of the filter. Example: "main".
|
|
63
63
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
64
64
|
* @returns {Promise<IContentFilter | IError>} Returns the filter with its items tree.
|
|
65
65
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -8,7 +8,7 @@ interface IFiltersApi {
|
|
|
8
8
|
/**
|
|
9
9
|
* Get a filter by its marker (tree of items).
|
|
10
10
|
* @handleName getFilterByMarker
|
|
11
|
-
* @param {string} marker -
|
|
11
|
+
* @param {string} marker - Marker of the filter. Example: "main".
|
|
12
12
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
13
13
|
* @returns {Promise<IContentFilter | IError>} Returns the filter with its items tree.
|
|
14
14
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -25,12 +25,12 @@ type TContentFilterItemType = 'page' | 'product' | 'admin' | 'attribute' | 'disc
|
|
|
25
25
|
* Content filter item (tree node).
|
|
26
26
|
* @interface IContentFilterItem
|
|
27
27
|
* @property {TContentFilterItemType} type - Tree node type. Example: "page".
|
|
28
|
-
* @property {string | null} [marker] - Marker of the linked entity
|
|
28
|
+
* @property {string | null} [marker] - Marker of the linked entity; `null` for `type=page`. Example: "about".
|
|
29
29
|
* @property {string | null} [url] - Page URL (only for type=page; null otherwise). Example: "about".
|
|
30
|
-
* @property {ILocalizeInfo} [localizeInfos] - Localized
|
|
30
|
+
* @property {ILocalizeInfo} [localizeInfos] - Localized data of the linked entity in the requested locale.
|
|
31
31
|
* @property {string | string[] | null} [value] - Unified node value: an array of values in range for a range attribute, a resolved title for a legacy checkbox attribute, the discount value for discount/personal-discount/bonus, the object id for product/admin/payment-method, and null for a page. Example: ["25", "50", "75"].
|
|
32
|
-
* @property {number} [position] -
|
|
33
|
-
* @property {IContentFilterItem[]} [children] - Nested tree nodes
|
|
32
|
+
* @property {number} [position] - Position of the node among its siblings at the same level. Example: 1.
|
|
33
|
+
* @property {IContentFilterItem[]} [children] - Nested tree nodes; regular and custom items share one array.
|
|
34
34
|
* @description A single node of a content filter items tree.
|
|
35
35
|
*/
|
|
36
36
|
interface IContentFilterItem {
|
|
@@ -45,8 +45,8 @@ interface IContentFilterItem {
|
|
|
45
45
|
/**
|
|
46
46
|
* Content filter.
|
|
47
47
|
* @interface IContentFilter
|
|
48
|
-
* @property {ILocalizeInfo} localizeInfos - Localized
|
|
49
|
-
* @property {IContentFilterItem[]} [items] -
|
|
48
|
+
* @property {ILocalizeInfo} localizeInfos - Localized data of the filter in the requested locale.
|
|
49
|
+
* @property {IContentFilterItem[]} [items] - Tree of filter items: regular and custom items in one array.
|
|
50
50
|
* @description A content filter with its localized info and items tree.
|
|
51
51
|
*/
|
|
52
52
|
interface IContentFilter {
|
package/dist/forms/formsApi.d.ts
CHANGED
|
@@ -24,8 +24,8 @@ export default class FormsApi extends AsyncModules implements IForms {
|
|
|
24
24
|
* Get all forms.
|
|
25
25
|
* @handleName getAllForms
|
|
26
26
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
|
-
* @param {number} [offset] -
|
|
28
|
-
* @param {number} [limit] -
|
|
27
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
28
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
29
29
|
* @returns {Promise<IFormsResponse | IError>} Returns paginated object with array of FormEntity and total count.
|
|
30
30
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
31
31
|
* @see {@link https://js-sdk.oneentry.cloud/docs/forms/getAllForms getAllForms} documentation.
|
|
@@ -34,7 +34,7 @@ export default class FormsApi extends AsyncModules implements IForms {
|
|
|
34
34
|
/**
|
|
35
35
|
* Get one form by form marker.
|
|
36
36
|
* @handleName getFormByMarker
|
|
37
|
-
* @param {string} marker - Marker of form. Example: "contact_form".
|
|
37
|
+
* @param {string} marker - Marker of the form. Example: "contact_form".
|
|
38
38
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
39
39
|
* @returns {Promise<IFormsEntity | IError>} Returns object of type FormEntity.
|
|
40
40
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
package/dist/forms/formsApi.js
CHANGED
|
@@ -62,8 +62,8 @@ class FormsApi extends asyncModules_1.default {
|
|
|
62
62
|
* Get all forms.
|
|
63
63
|
* @handleName getAllForms
|
|
64
64
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
65
|
-
* @param {number} [offset] -
|
|
66
|
-
* @param {number} [limit] -
|
|
65
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
66
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
67
67
|
* @returns {Promise<IFormsResponse | IError>} Returns paginated object with array of FormEntity and total count.
|
|
68
68
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
69
69
|
* @see {@link https://js-sdk.oneentry.cloud/docs/forms/getAllForms getAllForms} documentation.
|
|
@@ -77,7 +77,7 @@ class FormsApi extends asyncModules_1.default {
|
|
|
77
77
|
/**
|
|
78
78
|
* Get one form by form marker.
|
|
79
79
|
* @handleName getFormByMarker
|
|
80
|
-
* @param {string} marker - Marker of form. Example: "contact_form".
|
|
80
|
+
* @param {string} marker - Marker of the form. Example: "contact_form".
|
|
81
81
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
82
82
|
* @returns {Promise<IFormsEntity | IError>} Returns object of type FormEntity.
|
|
83
83
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -11,8 +11,8 @@ interface IForms {
|
|
|
11
11
|
* Retrieves all forms in the system.
|
|
12
12
|
* @handleName getAllForms
|
|
13
13
|
* @param {string} [langCode] - The language code for localization. Default: "en_US".
|
|
14
|
-
* @param {number} [offset] -
|
|
15
|
-
* @param {number} [limit] -
|
|
14
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
15
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
16
16
|
* @returns {IFormsEntity[]} A promise that resolves to an array of form entities or an error.
|
|
17
17
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
18
18
|
* @description This method retrieves all forms in the system.
|
|
@@ -32,7 +32,7 @@ interface IForms {
|
|
|
32
32
|
/**
|
|
33
33
|
* Represents the structure of a form page.
|
|
34
34
|
* @interface IFromPages
|
|
35
|
-
* @property {number} id -
|
|
35
|
+
* @property {number} id - ID of the form data record. Example: 123.
|
|
36
36
|
* @property {number} pageId - The identifier of the page. Example: 12.
|
|
37
37
|
* @property {number} formId - The identifier of the form. Example: 321.
|
|
38
38
|
* @property {number} positionId - The identifier of the position. Example: 1.
|
|
@@ -58,22 +58,22 @@ interface IFromPages {
|
|
|
58
58
|
/**
|
|
59
59
|
* Represents the structure of a form entity.
|
|
60
60
|
* @interface IFormsEntity
|
|
61
|
-
* @property {number} id -
|
|
62
|
-
* @property {number | null} attributeSetId -
|
|
61
|
+
* @property {number} id - Object ID. Example: 12345.
|
|
62
|
+
* @property {number | null} attributeSetId - ID of the attribute set the form uses, or `null` if there is none. Example: 1234.
|
|
63
63
|
* @property {string | null} type - Form type. Example: "contact".
|
|
64
|
-
* @property {IFormLocalizeInfo} localizeInfos -
|
|
64
|
+
* @property {IFormLocalizeInfo} localizeInfos - Localized name of the form and form-side texts such as success and error messages.
|
|
65
65
|
* @example
|
|
66
66
|
{
|
|
67
67
|
"key": "value"
|
|
68
68
|
}
|
|
69
|
-
* @property {number} version -
|
|
70
|
-
* @property {number} position -
|
|
71
|
-
* @property {string} identifier -
|
|
72
|
-
* @property {string} processingType -
|
|
73
|
-
* @property {number | null} templateId -
|
|
69
|
+
* @property {number} version - Version number of the object; changes with each update. Example: 1.
|
|
70
|
+
* @property {number} position - Position of the object, used for sorting. Example: 1.
|
|
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".
|
|
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
75
|
* @property {number | string} [total] - Total count of related entries. Example: "1".
|
|
76
|
-
* @property {IFormConfig[]} [moduleFormConfigs] -
|
|
76
|
+
* @property {IFormConfig[]} [moduleFormConfigs] - Form configurations of the module associated with the form.
|
|
77
77
|
* @description This interface defines the structure of a form entity, including its identifiers, attributes, and processing data.
|
|
78
78
|
*/
|
|
79
79
|
interface IFormsEntity {
|
|
@@ -97,8 +97,8 @@ interface IFormsEntity {
|
|
|
97
97
|
* @property {string} [successMessage] - Message shown to the user after successful submission.
|
|
98
98
|
* @property {string} [unsuccessMessage] - Message shown to the user after a failed submission.
|
|
99
99
|
* @property {string} [urlAddress] - URL where the form data is sent for processing (used by `processingType: "url"`).
|
|
100
|
-
* @property {string} [database] - Database flag
|
|
101
|
-
* @property {string} [script] - Script flag
|
|
100
|
+
* @property {string} [database] - Database flag or ID used by the form processor. The API sends it as a string: `"0"`, `"1"` or an ID.
|
|
101
|
+
* @property {string} [script] - Script flag or ID used by the form processor. The API sends it as a string: `"0"`, `"1"` or an ID.
|
|
102
102
|
* @description Localization payload of a form — extends {@link ILocalizeInfo} with form-side fields (messages, processing config). Unlike the base type, `title` is optional here.
|
|
103
103
|
*/
|
|
104
104
|
interface IFormLocalizeInfo extends Omit<ILocalizeInfo, 'title'> {
|
|
@@ -112,7 +112,7 @@ interface IFormLocalizeInfo extends Omit<ILocalizeInfo, 'title'> {
|
|
|
112
112
|
}
|
|
113
113
|
/**
|
|
114
114
|
* @interface IFormAttribute
|
|
115
|
-
* @property {string} marker -
|
|
115
|
+
* @property {string} marker - Marker of the field. Example: "email".
|
|
116
116
|
* @property {AttributeType} type - Attribute data type (e.g. "string", "file").
|
|
117
117
|
* @property {number} position - Sort position of the field. Example: 1.
|
|
118
118
|
* @property {boolean} isVisible - Whether the field is exposed to the user. Example: true.
|
|
@@ -122,14 +122,14 @@ interface IFormLocalizeInfo extends Omit<ILocalizeInfo, 'title'> {
|
|
|
122
122
|
* @property {boolean} [multiselect] - For `list` fields — whether several options from `listTitles` may be selected. Optional. Example: false.
|
|
123
123
|
* @property {IAttributeValidators} validators - Validation rules; empty object when no validators are configured.
|
|
124
124
|
* @property {Record<string, unknown>} settings - Field-specific configuration; empty object by default.
|
|
125
|
-
* @property {Record<string, IFormAttributeAdditionalField>} additionalFields - Nested sub-fields keyed by marker; empty object when none.
|
|
126
|
-
* @property {boolean} [isLogin] - Whether this field
|
|
127
|
-
* @property {boolean} [isSignUp] - Whether this field is
|
|
128
|
-
* @property {boolean} [isPassword] - Whether this field
|
|
129
|
-
* @property {boolean} [isSignUpRequired] - Whether this field is required during sign-up.
|
|
130
|
-
* @property {boolean} [isNotificationEmail] - Whether this field
|
|
131
|
-
* @property {boolean} [isNotificationPhonePush] - Whether this field
|
|
132
|
-
* @property {boolean} [isNotificationPhoneSMS] - Whether this field
|
|
125
|
+
* @property {Record<string, IFormAttributeAdditionalField>} additionalFields - Nested sub-fields keyed by marker; an empty object when there are none.
|
|
126
|
+
* @property {boolean} [isLogin] - Whether this field holds the login used for authentication. Present only on attributes of sign-in and sign-up forms. Example: false.
|
|
127
|
+
* @property {boolean} [isSignUp] - Whether this field is used during sign-up. Present only on attributes of sign-in and sign-up forms. Example: false.
|
|
128
|
+
* @property {boolean} [isPassword] - Whether this field holds the password used for authentication. Present only on attributes of sign-in and sign-up forms. Example: false.
|
|
129
|
+
* @property {boolean} [isSignUpRequired] - Whether this field is required during sign-up. Present only on attributes of sign-in and sign-up forms. Example: false.
|
|
130
|
+
* @property {boolean} [isNotificationEmail] - Whether this field holds the email used for notifications. Present only on attributes of sign-in and sign-up forms. Example: false.
|
|
131
|
+
* @property {boolean} [isNotificationPhonePush] - Whether this field holds the phone number used for push notifications. Present only on attributes of sign-in and sign-up forms. Example: false.
|
|
132
|
+
* @property {boolean} [isNotificationPhoneSMS] - Whether this field holds the phone number used for SMS notifications. Present only on attributes of sign-in and sign-up forms. Example: false.
|
|
133
133
|
* @description Definition of a single field inside a form — extends a generic attribute with form-specific authentication / notification flags (returned only for sign-in/sign-up forms).
|
|
134
134
|
*/
|
|
135
135
|
interface IFormAttribute {
|
|
@@ -168,26 +168,26 @@ interface IFormAttributeAdditionalField {
|
|
|
168
168
|
/**
|
|
169
169
|
* Represents the structure of a form configuration.
|
|
170
170
|
* @interface IFormConfig
|
|
171
|
-
* @property {number} id -
|
|
172
|
-
* @property {string} [formIdentifier] -
|
|
173
|
-
* @property {string} moduleIdentifier -
|
|
174
|
-
* @property {boolean} isGlobal -
|
|
175
|
-
* @property {boolean} isClosed -
|
|
176
|
-
* @property {boolean} [isModerate] -
|
|
177
|
-
* @property {boolean} [viewOnlyUserData] -
|
|
178
|
-
* @property {boolean} [commentOnlyUserData] -
|
|
171
|
+
* @property {number} id - ID of the form configuration. Example: 123.
|
|
172
|
+
* @property {string} [formIdentifier] - Marker of the form (products and pages API only). Example: "review".
|
|
173
|
+
* @property {string} moduleIdentifier - Marker of the module the form configuration belongs to. Example: "module_identifier".
|
|
174
|
+
* @property {boolean} isGlobal - Whether the form configuration is global. Example: true.
|
|
175
|
+
* @property {boolean} isClosed - Whether the form configuration is closed. Example: true.
|
|
176
|
+
* @property {boolean} [isModerate] - Whether the form requires moderation. Returned only by the Products and Pages APIs. Example: false.
|
|
177
|
+
* @property {boolean} [viewOnlyUserData] - Whether users see only the form data they submitted themselves. Example: true.
|
|
178
|
+
* @property {boolean} [commentOnlyUserData] - Whether commenting is limited to user data (forms API). Example: true.
|
|
179
179
|
* @property {boolean} [viewOnlyMyData] - Indicates whether the form configuration allows viewing my data (used in products/pages API). Example: false.
|
|
180
|
-
* @property {boolean} [commentOnlyMyData] -
|
|
181
|
-
* @property {object[]} entityIdentifiers -
|
|
180
|
+
* @property {boolean} [commentOnlyMyData] - Whether commenting is limited to the user's own data (products and pages API). Example: false.
|
|
181
|
+
* @property {object[]} entityIdentifiers - Entities the form configuration is attached to.
|
|
182
182
|
* @property {string} entityIdentifiers[].id - Entity identifier. Example: "catalog".
|
|
183
183
|
* @property {boolean} entityIdentifiers[].isNested - Indicates if entity is nested. Example: false.
|
|
184
|
-
* @property {string[]} [nestedEntityIdentifiers] -
|
|
185
|
-
* @property {string[]} [exceptionIds] -
|
|
186
|
-
* @property {number} [formDataCount] - Total
|
|
187
|
-
* @property {Record<string, number>} [entityFormDataCount] -
|
|
188
|
-
* @property {boolean | null} [isRating] -
|
|
189
|
-
* @property {boolean | null} [isAnonymous] -
|
|
190
|
-
* @property {boolean | null} [allowHalfRatings] -
|
|
184
|
+
* @property {string[]} [nestedEntityIdentifiers] - Markers of nested entities. Returned only by the Products and Pages APIs. Example: ["catalog"].
|
|
185
|
+
* @property {string[]} [exceptionIds] - Exception IDs.
|
|
186
|
+
* @property {number} [formDataCount] - Total number of form records (products and pages API only). Example: 306.
|
|
187
|
+
* @property {Record<string, number>} [entityFormDataCount] - Number of form records per entity ID (products and pages API only). Example: `{"catalog": 306}`.
|
|
188
|
+
* @property {boolean | null} [isRating] - Whether this form configuration collects ratings. Example: null.
|
|
189
|
+
* @property {boolean | null} [isAnonymous] - Whether anonymous submissions are allowed. Example: null.
|
|
190
|
+
* @property {boolean | null} [allowHalfRatings] - Whether half-star ratings are allowed. Example: null.
|
|
191
191
|
* @property {boolean | null} [allowRerating] - Indicates whether re-rating is allowed. Example: null.
|
|
192
192
|
* @property {number | null} [maxRatingScale] - Maximum rating scale value. Example: 5.
|
|
193
193
|
* @property {string} [ratingCalculation] - Rating calculation method. Example: "average".
|
|
@@ -229,8 +229,8 @@ interface IEntityIdentifier {
|
|
|
229
229
|
/**
|
|
230
230
|
* Represents the paginated response structure for forms.
|
|
231
231
|
* @interface IFormsResponse
|
|
232
|
-
* @property {number} total - Total
|
|
233
|
-
* @property {IFormsEntity[]} items -
|
|
232
|
+
* @property {number} total - Total number of forms.
|
|
233
|
+
* @property {IFormsEntity[]} items - Forms in this response.
|
|
234
234
|
*/
|
|
235
235
|
interface IFormsResponse {
|
|
236
236
|
total: number;
|
|
@@ -39,9 +39,9 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
39
39
|
* @param {string} body.formIdentifier - The identifier for the form. Example: "form".
|
|
40
40
|
* @param {number} body.formModuleConfigId - The ID of the form module configuration. Example: 2.
|
|
41
41
|
* @param {string} body.moduleEntityIdentifier - The identifier of the module entity. Example: "form".
|
|
42
|
-
* @param {
|
|
42
|
+
* @param {number | null} [body.replayTo] - Identifier of the parent form data record this one replies to (for threaded data such as comments); `null` for a top-level record. The platform stores it as `parentId`.
|
|
43
43
|
* @param {string | null} [body.status] - The status of the form submission.
|
|
44
|
-
* @param {FormDataType[]} body.formData - Form
|
|
44
|
+
* @param {FormDataType[]} body.formData - Form fields.
|
|
45
45
|
* @example
|
|
46
46
|
[
|
|
47
47
|
{
|
|
@@ -81,7 +81,7 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
81
81
|
* so it is stripped from an array of values and from a lone value object alike. A value
|
|
82
82
|
* of any other shape is returned untouched and the endpoint names the field it cannot
|
|
83
83
|
* read — instead of the library dying on `value.map is not a function` before the
|
|
84
|
-
* request is made
|
|
84
|
+
* request is made.
|
|
85
85
|
*/
|
|
86
86
|
private _stripContentType;
|
|
87
87
|
/**
|
|
@@ -103,8 +103,8 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
103
103
|
* Get one object of form data by marker.
|
|
104
104
|
* @handleName getFormsDataByMarker
|
|
105
105
|
* @param {string} marker - Marker of the form. Example: "contact_form".
|
|
106
|
-
* @param {number} formModuleConfigId -
|
|
107
|
-
* @param {IFormsDataFilter} [body] - Filter for the records to return. Every field is optional; an omitted or empty
|
|
106
|
+
* @param {number} formModuleConfigId - ID of the form module configuration. Example: 4.
|
|
107
|
+
* @param {IFormsDataFilter} [body] - Filter for the records to return. Every field is optional; an omitted or empty field is not applied.
|
|
108
108
|
* @example
|
|
109
109
|
{
|
|
110
110
|
"entityIdentifier": "blog",
|
|
@@ -120,10 +120,10 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
120
120
|
* @param {FormDataStatus[]} [body.status] - Moderation statuses to keep: "sent", "moderation", "approved", "banned", "deleted". Must be an array; anything outside the set is rejected with `400 each value in status must be a valid enum value`. Example: ["approved"].
|
|
121
121
|
* @param {string} [body.dateFrom] - Lower bound of the submission date, `YYYY-MM-DD`. An empty string means "no bound" — the SDK removes it from the body, because the endpoint answers `400 dateFrom must be a valid date in format "YYYY-MM-DD"` to one. An unparsable non-empty value still fails the request. Example: "2025-01-01".
|
|
122
122
|
* @param {string} [body.dateTo] - Upper bound of the submission date, `YYYY-MM-DD`. An empty string means "no bound", handled like `dateFrom`. Example: "2025-12-31".
|
|
123
|
-
* @param {number} [isExtended] -
|
|
123
|
+
* @param {number} [isExtended] - Pass `1` to return additional fields for each record. Default: `0`. Example: 1.
|
|
124
124
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
125
|
-
* @param {number} [offset] -
|
|
126
|
-
* @param {number} [limit] -
|
|
125
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
126
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
127
127
|
* @returns {Promise<IFormsByMarkerDataEntity | IError>} Returns an object containing the form data or an error object if there was an issue.
|
|
128
128
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
129
129
|
* @description Each record's `formData` comes back **already unwrapped from its locale**. The API sends `formData: { "en_US": [ … ] }`; the SDK normalizes the response and hands over the array for `langCode`, so read `record.formData` — `record.formData[langCode]` is `undefined` and yields an empty list with no error. This holds for both values of `isExtended`.
|
|
@@ -137,7 +137,7 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
137
137
|
/**
|
|
138
138
|
* Update one object of form data by id. Requires user authentication.
|
|
139
139
|
* @handleName updateFormsDataByid
|
|
140
|
-
* @param {number} id -
|
|
140
|
+
* @param {number} id - Form data ID. Example: 1.
|
|
141
141
|
* @returns {Promise<IUpdateFormsData | IError>} Returns an object containing the updated form data or an error object if there was an issue.
|
|
142
142
|
* @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/updateFormsDataByid updateFormsDataByid} documentation.
|
|
143
143
|
*/
|
|
@@ -145,7 +145,7 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
145
145
|
/**
|
|
146
146
|
* Update form data status by id. Requires user authentication.
|
|
147
147
|
* @handleName updateFormsDataStatusByid
|
|
148
|
-
* @param {number} id -
|
|
148
|
+
* @param {number} id - Form data ID. Example: 1.
|
|
149
149
|
* @param {object} body - Request body.
|
|
150
150
|
* @returns {Promise<boolean | IError>} Returns an object containing the updated form data or an error object if there was an issue.
|
|
151
151
|
* @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/updateFormsDataStatusByid updateFormsDataStatusByid} documentation.
|
|
@@ -154,7 +154,7 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
154
154
|
/**
|
|
155
155
|
* Delete one object of form data by id. Requires user authentication.
|
|
156
156
|
* @handleName deleteFormsDataByid
|
|
157
|
-
* @param {number} id -
|
|
157
|
+
* @param {number} id - Form data ID. Example: 1.
|
|
158
158
|
* @returns {Promise<boolean | IError>} Returns an object containing the deleted form data or an error object if there was an issue.
|
|
159
159
|
* @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/deleteFormsDataByid deleteFormsDataByid} documentation.
|
|
160
160
|
*/
|
|
@@ -162,10 +162,10 @@ export default class FormsDataApi extends AsyncModules implements IFormsData {
|
|
|
162
162
|
/**
|
|
163
163
|
* Semantic (vector) search for form data.
|
|
164
164
|
* @handleName getFormsDataByVectorSearch
|
|
165
|
-
* @param {IFormsDataVectorSearch} body - Vector search
|
|
165
|
+
* @param {IFormsDataVectorSearch} body - Vector search parameters. Example: `{ queryText: "order confirmation" }`.
|
|
166
166
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
167
|
-
* @param {number} [offset] -
|
|
168
|
-
* @param {number} [limit] -
|
|
167
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
168
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
169
169
|
* @returns {Promise<IVectorSearchResponse<IFormsDataSearchResponse> | IError>} Returns an object with an array of found form data records and total count.
|
|
170
170
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
171
171
|
* @description This method performs a semantic (vector) search for form data.
|
|
@@ -79,9 +79,9 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
79
79
|
* @param {string} body.formIdentifier - The identifier for the form. Example: "form".
|
|
80
80
|
* @param {number} body.formModuleConfigId - The ID of the form module configuration. Example: 2.
|
|
81
81
|
* @param {string} body.moduleEntityIdentifier - The identifier of the module entity. Example: "form".
|
|
82
|
-
* @param {
|
|
82
|
+
* @param {number | null} [body.replayTo] - Identifier of the parent form data record this one replies to (for threaded data such as comments); `null` for a top-level record. The platform stores it as `parentId`.
|
|
83
83
|
* @param {string | null} [body.status] - The status of the form submission.
|
|
84
|
-
* @param {FormDataType[]} body.formData - Form
|
|
84
|
+
* @param {FormDataType[]} body.formData - Form fields.
|
|
85
85
|
* @example
|
|
86
86
|
[
|
|
87
87
|
{
|
|
@@ -193,7 +193,7 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
193
193
|
* so it is stripped from an array of values and from a lone value object alike. A value
|
|
194
194
|
* of any other shape is returned untouched and the endpoint names the field it cannot
|
|
195
195
|
* read — instead of the library dying on `value.map is not a function` before the
|
|
196
|
-
* request is made
|
|
196
|
+
* request is made.
|
|
197
197
|
*/
|
|
198
198
|
_stripContentType(value) {
|
|
199
199
|
// An entry carrying `contentType` is copied without it rather than edited:
|
|
@@ -237,8 +237,8 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
237
237
|
* Get one object of form data by marker.
|
|
238
238
|
* @handleName getFormsDataByMarker
|
|
239
239
|
* @param {string} marker - Marker of the form. Example: "contact_form".
|
|
240
|
-
* @param {number} formModuleConfigId -
|
|
241
|
-
* @param {IFormsDataFilter} [body] - Filter for the records to return. Every field is optional; an omitted or empty
|
|
240
|
+
* @param {number} formModuleConfigId - ID of the form module configuration. Example: 4.
|
|
241
|
+
* @param {IFormsDataFilter} [body] - Filter for the records to return. Every field is optional; an omitted or empty field is not applied.
|
|
242
242
|
* @example
|
|
243
243
|
{
|
|
244
244
|
"entityIdentifier": "blog",
|
|
@@ -254,10 +254,10 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
254
254
|
* @param {FormDataStatus[]} [body.status] - Moderation statuses to keep: "sent", "moderation", "approved", "banned", "deleted". Must be an array; anything outside the set is rejected with `400 each value in status must be a valid enum value`. Example: ["approved"].
|
|
255
255
|
* @param {string} [body.dateFrom] - Lower bound of the submission date, `YYYY-MM-DD`. An empty string means "no bound" — the SDK removes it from the body, because the endpoint answers `400 dateFrom must be a valid date in format "YYYY-MM-DD"` to one. An unparsable non-empty value still fails the request. Example: "2025-01-01".
|
|
256
256
|
* @param {string} [body.dateTo] - Upper bound of the submission date, `YYYY-MM-DD`. An empty string means "no bound", handled like `dateFrom`. Example: "2025-12-31".
|
|
257
|
-
* @param {number} [isExtended] -
|
|
257
|
+
* @param {number} [isExtended] - Pass `1` to return additional fields for each record. Default: `0`. Example: 1.
|
|
258
258
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
259
|
-
* @param {number} [offset] -
|
|
260
|
-
* @param {number} [limit] -
|
|
259
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
260
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
261
261
|
* @returns {Promise<IFormsByMarkerDataEntity | IError>} Returns an object containing the form data or an error object if there was an issue.
|
|
262
262
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
263
263
|
* @description Each record's `formData` comes back **already unwrapped from its locale**. The API sends `formData: { "en_US": [ … ] }`; the SDK normalizes the response and hands over the array for `langCode`, so read `record.formData` — `record.formData[langCode]` is `undefined` and yields an empty list with no error. This holds for both values of `isExtended`.
|
|
@@ -276,7 +276,7 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
276
276
|
/**
|
|
277
277
|
* Update one object of form data by id. Requires user authentication.
|
|
278
278
|
* @handleName updateFormsDataByid
|
|
279
|
-
* @param {number} id -
|
|
279
|
+
* @param {number} id - Form data ID. Example: 1.
|
|
280
280
|
* @returns {Promise<IUpdateFormsData | IError>} Returns an object containing the updated form data or an error object if there was an issue.
|
|
281
281
|
* @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/updateFormsDataByid updateFormsDataByid} documentation.
|
|
282
282
|
*/
|
|
@@ -289,7 +289,7 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
289
289
|
/**
|
|
290
290
|
* Update form data status by id. Requires user authentication.
|
|
291
291
|
* @handleName updateFormsDataStatusByid
|
|
292
|
-
* @param {number} id -
|
|
292
|
+
* @param {number} id - Form data ID. Example: 1.
|
|
293
293
|
* @param {object} body - Request body.
|
|
294
294
|
* @returns {Promise<boolean | IError>} Returns an object containing the updated form data or an error object if there was an issue.
|
|
295
295
|
* @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/updateFormsDataStatusByid updateFormsDataStatusByid} documentation.
|
|
@@ -301,7 +301,7 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
301
301
|
/**
|
|
302
302
|
* Delete one object of form data by id. Requires user authentication.
|
|
303
303
|
* @handleName deleteFormsDataByid
|
|
304
|
-
* @param {number} id -
|
|
304
|
+
* @param {number} id - Form data ID. Example: 1.
|
|
305
305
|
* @returns {Promise<boolean | IError>} Returns an object containing the deleted form data or an error object if there was an issue.
|
|
306
306
|
* @see {@link https://js-sdk.oneentry.cloud/docs/forms-data/deleteFormsDataByid deleteFormsDataByid} documentation.
|
|
307
307
|
*/
|
|
@@ -312,10 +312,10 @@ class FormsDataApi extends asyncModules_1.default {
|
|
|
312
312
|
/**
|
|
313
313
|
* Semantic (vector) search for form data.
|
|
314
314
|
* @handleName getFormsDataByVectorSearch
|
|
315
|
-
* @param {IFormsDataVectorSearch} body - Vector search
|
|
315
|
+
* @param {IFormsDataVectorSearch} body - Vector search parameters. Example: `{ queryText: "order confirmation" }`.
|
|
316
316
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
317
|
-
* @param {number} [offset] -
|
|
318
|
-
* @param {number} [limit] -
|
|
317
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
318
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
319
319
|
* @returns {Promise<IVectorSearchResponse<IFormsDataSearchResponse> | IError>} Returns an object with an array of found form data records and total count.
|
|
320
320
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
321
321
|
* @description This method performs a semantic (vector) search for form data.
|