oneentry 1.0.172 → 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 +48 -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 +31 -31
- package/dist/auth-provider/authProviderApi.js +31 -31
- package/dist/auth-provider/authProvidersInterfaces.d.ts +54 -54
- 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 +4 -4
- 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 +16 -16
- package/dist/file-uploading/fileUploadingApi.js +14 -17
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +30 -30
- 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/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +26 -30
- package/dist/integration-collections/integrationCollectionsApi.js +24 -28
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +61 -60
- 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 +101 -101
- 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 +100 -100
- 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/system/systemApi.d.ts +4 -4
- package/dist/system/systemApi.js +2 -2
- package/dist/system/systemInterfaces.d.ts +11 -5
- package/dist/templates/templatesApi.d.ts +5 -5
- package/dist/templates/templatesApi.js +5 -5
- package/dist/templates/templatesInterfaces.d.ts +13 -13
- 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 +31 -31
- package/esm/auth-provider/authProviderApi.js +31 -31
- package/esm/auth-provider/authProvidersInterfaces.d.ts +54 -54
- 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 +4 -4
- 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 +16 -16
- package/esm/file-uploading/fileUploadingApi.js +14 -17
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +30 -30
- 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/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/integration-collections/integrationCollectionsApi.d.ts +26 -30
- package/esm/integration-collections/integrationCollectionsApi.js +24 -28
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +61 -60
- 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 +101 -101
- 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 +100 -100
- 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/system/systemApi.d.ts +4 -4
- package/esm/system/systemApi.js +2 -2
- package/esm/system/systemInterfaces.d.ts +11 -5
- package/esm/templates/templatesApi.d.ts +5 -5
- package/esm/templates/templatesApi.js +5 -5
- package/esm/templates/templatesInterfaces.d.ts +13 -13
- 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
|
@@ -27,18 +27,14 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
27
27
|
* Get all collections.
|
|
28
28
|
* @handleName getICollections
|
|
29
29
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
30
|
-
* @param {
|
|
30
|
+
* @param {ICollectionsListQuery} [userQuery] - Optional query parameters.
|
|
31
31
|
* @example
|
|
32
32
|
{
|
|
33
|
-
"limit":
|
|
34
|
-
"offset":
|
|
35
|
-
"entityType": "orders",
|
|
36
|
-
"entityId": 1
|
|
33
|
+
"limit": 30,
|
|
34
|
+
"offset": 0
|
|
37
35
|
}
|
|
38
|
-
* @param {number} [userQuery.limit] -
|
|
39
|
-
* @param {number} [userQuery.offset] -
|
|
40
|
-
* @param {string} [userQuery.entityType] - Entity type. Example: "orders".
|
|
41
|
-
* @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
|
|
36
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
37
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
42
38
|
* @returns {Promise<ICollectionEntity[] | IError>} Returns an array of ICollection objects or an error object if there was an issue.
|
|
43
39
|
* @see {@link https://js-sdk.oneentry.cloud/docs/integration-collections/getICollections getICollections} documentation.
|
|
44
40
|
*/
|
|
@@ -53,7 +49,7 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
53
49
|
/**
|
|
54
50
|
* Get a single collection object by id.
|
|
55
51
|
* @handleName getICollectionById
|
|
56
|
-
* @param {number} id - Collection
|
|
52
|
+
* @param {number} id - Collection ID. Example: 1.
|
|
57
53
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
58
54
|
* @returns {Promise<ICollectionEntity | IError>} Returns an ICollection object or an error object if there was an issue.
|
|
59
55
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -68,20 +64,20 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
68
64
|
/**
|
|
69
65
|
* Get all records belonging to the collection by collection id.
|
|
70
66
|
* @handleName getICollectionRowsById
|
|
71
|
-
* @param {number} id - Collection
|
|
67
|
+
* @param {number} id - Collection ID. Example: 1.
|
|
72
68
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
73
|
-
* @param {
|
|
69
|
+
* @param {ICollectionQuery} [userQuery] - Optional query parameters.
|
|
74
70
|
* @example
|
|
75
71
|
{
|
|
76
|
-
"limit":
|
|
77
|
-
"offset":
|
|
72
|
+
"limit": 30,
|
|
73
|
+
"offset": 0,
|
|
78
74
|
"entityType": "orders",
|
|
79
75
|
"entityId": 1
|
|
80
76
|
}
|
|
81
|
-
* @param {number} [userQuery.limit] -
|
|
82
|
-
* @param {number} [userQuery.offset] -
|
|
77
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
78
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
83
79
|
* @param {string} [userQuery.entityType] - Entity type. Example: "orders".
|
|
84
|
-
* @param {number} [userQuery.entityId] - Entity
|
|
80
|
+
* @param {number} [userQuery.entityId] - Entity ID. Example: 1.
|
|
85
81
|
* @returns {Promise<ICollectionRowsResponce | IError>} Returns object ItemsWithTotal, where items is an array of requested objects.
|
|
86
82
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
87
83
|
* @description Get all records belonging to the collection by collection id.
|
|
@@ -101,7 +97,7 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
101
97
|
/**
|
|
102
98
|
* Check for the existence of a text identifier (marker).
|
|
103
99
|
* @handleName validateICollectionMarker
|
|
104
|
-
* @param {string} marker -
|
|
100
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
105
101
|
* @returns {Promise<ICollectionIsValid | IError>} Returns an object with a boolean property `valid` indicating whether the marker is valid or not.
|
|
106
102
|
* @example
|
|
107
103
|
{
|
|
@@ -120,7 +116,7 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
120
116
|
/**
|
|
121
117
|
* Getting all records from the collection.
|
|
122
118
|
* @handleName getICollectionRowsByMarker
|
|
123
|
-
* @param {string} marker -
|
|
119
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
124
120
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
125
121
|
* @returns {Promise<ICollectionRowsResponce | IError>} Returns CollectionRowEntity object.
|
|
126
122
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -135,8 +131,8 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
135
131
|
/**
|
|
136
132
|
* Getting one record from the collection.
|
|
137
133
|
* @handleName getICollectionRowByMarkerAndId
|
|
138
|
-
* @param {string} marker -
|
|
139
|
-
* @param {number} id - Collection record
|
|
134
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
135
|
+
* @param {number} id - Collection record ID. Example: 1.
|
|
140
136
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
141
137
|
* @returns {Promise<ICollectionRow | IError>} Returns CollectionRowEntity object.
|
|
142
138
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -151,8 +147,8 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
151
147
|
/**
|
|
152
148
|
* Create a record in the collection.
|
|
153
149
|
* @handleName createICollectionRow
|
|
154
|
-
* @param {string} marker -
|
|
155
|
-
* @param {ICollectionFormObject} body -
|
|
150
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
151
|
+
* @param {ICollectionFormObject} body - Data for the new record.
|
|
156
152
|
* @example
|
|
157
153
|
{
|
|
158
154
|
"formIdentifier": "collection-form",
|
|
@@ -179,9 +175,9 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
179
175
|
/**
|
|
180
176
|
* Edit a record in the collection.
|
|
181
177
|
* @handleName updateICollectionRow
|
|
182
|
-
* @param {string} marker -
|
|
183
|
-
* @param {number} id - Row
|
|
184
|
-
* @param {object} body -
|
|
178
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
179
|
+
* @param {number} id - Row ID in the collection. Example: 12.
|
|
180
|
+
* @param {object} body - Data for updating the collection record.
|
|
185
181
|
* @example
|
|
186
182
|
{
|
|
187
183
|
"formIdentifier": "collection-form",
|
|
@@ -210,8 +206,8 @@ export default class IntegrationCollectionsApi extends AsyncModules {
|
|
|
210
206
|
/**
|
|
211
207
|
* Deletion of collection record object
|
|
212
208
|
* @handleName deleteICollectionRowByMarkerAndId
|
|
213
|
-
* @param {string} marker -
|
|
214
|
-
* @param {number} id -
|
|
209
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
210
|
+
* @param {number} id - ID of the collection row. Example: 12.
|
|
215
211
|
* @returns {Promise<boolean | IError>} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
|
|
216
212
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
217
213
|
* @description Deletion of collection record object
|
|
@@ -8,27 +8,23 @@ interface ICollectionsApi {
|
|
|
8
8
|
* Get all collections.
|
|
9
9
|
* @handleName getICollections
|
|
10
10
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
11
|
-
* @param {
|
|
11
|
+
* @param {ICollectionsListQuery} [userQuery] - Query parameters.
|
|
12
12
|
* @example
|
|
13
13
|
{
|
|
14
14
|
"limit": 30,
|
|
15
|
-
"offset": 0
|
|
16
|
-
"entityType": "orders",
|
|
17
|
-
"entityId": 1
|
|
15
|
+
"offset": 0
|
|
18
16
|
}
|
|
19
|
-
* @param {number} [userQuery.limit] -
|
|
20
|
-
* @param {number} [userQuery.offset] -
|
|
21
|
-
* @param {string} [userQuery.entityType] - Entity type. Example: "orders".
|
|
22
|
-
* @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
|
|
17
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
18
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
23
19
|
* @returns {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
|
|
24
20
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
25
21
|
* @description This method gets all collections.
|
|
26
22
|
*/
|
|
27
|
-
getICollections(langCode?: string, userQuery?:
|
|
23
|
+
getICollections(langCode?: string, userQuery?: ICollectionsListQuery): Promise<ICollectionEntity[] | IError>;
|
|
28
24
|
/**
|
|
29
25
|
* Get a single collection object by id.
|
|
30
26
|
* @handleName getICollectionById
|
|
31
|
-
* @param {number} id - Collection
|
|
27
|
+
* @param {number} id - Collection ID. Example: 1.
|
|
32
28
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
33
29
|
* @returns {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
|
|
34
30
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -38,9 +34,9 @@ interface ICollectionsApi {
|
|
|
38
34
|
/**
|
|
39
35
|
* Get all records belonging to the collection by collection id.
|
|
40
36
|
* @handleName getICollectionRowsById
|
|
41
|
-
* @param {number} id - Collection
|
|
37
|
+
* @param {number} id - Collection ID.
|
|
42
38
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
43
|
-
* @param {ICollectionQuery} [userQuery] - Optional
|
|
39
|
+
* @param {ICollectionQuery} [userQuery] - Optional query parameters.
|
|
44
40
|
* @example
|
|
45
41
|
{
|
|
46
42
|
"limit": 30,
|
|
@@ -48,10 +44,10 @@ interface ICollectionsApi {
|
|
|
48
44
|
"entityType": "orders",
|
|
49
45
|
"entityId": 1
|
|
50
46
|
}
|
|
51
|
-
* @param {number} [userQuery.limit] -
|
|
52
|
-
* @param {number} [userQuery.offset] -
|
|
47
|
+
* @param {number} [userQuery.limit] - Maximum number of records to return. Default: 30.
|
|
48
|
+
* @param {number} [userQuery.offset] - Number of records to skip. Default: 0.
|
|
53
49
|
* @param {string} [userQuery.entityType] - Entity type. Example: "orders".
|
|
54
|
-
* @param {number} [userQuery.entityId] - Entity
|
|
50
|
+
* @param {number} [userQuery.entityId] - Entity ID. Example: 1.
|
|
55
51
|
* @returns {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
|
|
56
52
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
57
53
|
* @description This method gets all records belonging to the collection by collection id.
|
|
@@ -60,7 +56,7 @@ interface ICollectionsApi {
|
|
|
60
56
|
/**
|
|
61
57
|
* Check for the existence of a text identifier (marker).
|
|
62
58
|
* @handleName validateICollectionMarker
|
|
63
|
-
* @param {string} marker -
|
|
59
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
64
60
|
* @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not.
|
|
65
61
|
* @example
|
|
66
62
|
{
|
|
@@ -73,7 +69,7 @@ interface ICollectionsApi {
|
|
|
73
69
|
/**
|
|
74
70
|
* Getting all records from the collection.
|
|
75
71
|
* @handleName getICollectionRowsByMarker
|
|
76
|
-
* @param {string} marker -
|
|
72
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
77
73
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
78
74
|
* @returns {ICollectionRowsResponce} Returns collection row entity object.
|
|
79
75
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -83,8 +79,8 @@ interface ICollectionsApi {
|
|
|
83
79
|
/**
|
|
84
80
|
* Getting one record from the collection.
|
|
85
81
|
* @handleName getICollectionRowByMarkerAndId
|
|
86
|
-
* @param {string} marker -
|
|
87
|
-
* @param {number} id - Collection record
|
|
82
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
83
|
+
* @param {number} id - Collection record ID. Example: 1.
|
|
88
84
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
89
85
|
* @returns {ICollectionRow} Returns collection row entity object.
|
|
90
86
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -94,8 +90,8 @@ interface ICollectionsApi {
|
|
|
94
90
|
/**
|
|
95
91
|
* Create a record in the collection.
|
|
96
92
|
* @handleName createICollectionRow
|
|
97
|
-
* @param {string} marker -
|
|
98
|
-
* @param {ICollectionFormObject} body -
|
|
93
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
94
|
+
* @param {ICollectionFormObject} body - Data for the new record.
|
|
99
95
|
* @example
|
|
100
96
|
{
|
|
101
97
|
"formIdentifier": "collection-form",
|
|
@@ -116,9 +112,9 @@ interface ICollectionsApi {
|
|
|
116
112
|
/**
|
|
117
113
|
* Edit a record in the collection.
|
|
118
114
|
* @handleName updateICollectionRow
|
|
119
|
-
* @param {string} marker -
|
|
115
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
120
116
|
* @param {number} id - Row id. Example: 12.
|
|
121
|
-
* @param {ICollectionFormObject} body -
|
|
117
|
+
* @param {ICollectionFormObject} body - Data for updating the collection record.
|
|
122
118
|
* @example
|
|
123
119
|
{
|
|
124
120
|
"formIdentifier": "collection-form",
|
|
@@ -139,8 +135,8 @@ interface ICollectionsApi {
|
|
|
139
135
|
/**
|
|
140
136
|
* Deletion of collection record object
|
|
141
137
|
* @handleName deleteICollectionRowByMarkerAndId
|
|
142
|
-
* @param {string} marker -
|
|
143
|
-
* @param {number} id -
|
|
138
|
+
* @param {string} marker - Marker of the collection. Example: "collection1".
|
|
139
|
+
* @param {number} id - ID of the collection row. Example: 12.
|
|
144
140
|
* @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
|
|
145
141
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
146
142
|
* @description This method deletes a collection record object.
|
|
@@ -150,16 +146,16 @@ interface ICollectionsApi {
|
|
|
150
146
|
/**
|
|
151
147
|
* Collection object
|
|
152
148
|
* @interface ICollectionEntity
|
|
153
|
-
* @property {number} id - Object
|
|
154
|
-
* @property {string | null} identifier - Text identifier
|
|
155
|
-
* @property {number | null} formId -
|
|
156
|
-
* @property {ILocalizeInfo} localizeInfos - Localized
|
|
149
|
+
* @property {number} id - Object ID. Example: 1.
|
|
150
|
+
* @property {string | null} identifier - Text identifier (marker) of the object. Example: "collection1".
|
|
151
|
+
* @property {number | null} formId - ID of the form used by the collection. Example: 1234.
|
|
152
|
+
* @property {ILocalizeInfo} localizeInfos - Localized data of the collection.
|
|
157
153
|
* @example
|
|
158
154
|
{
|
|
159
155
|
"title": "Admins text"
|
|
160
156
|
}
|
|
161
|
-
* @property {number | null} attributeSetId -
|
|
162
|
-
* @property {string | null} selectedAttributeMarkers -
|
|
157
|
+
* @property {number | null} attributeSetId - ID of the attribute set used by the collection's form. Example: 1234 or null if not applicable.
|
|
158
|
+
* @property {string | null} selectedAttributeMarkers - Markers of the form attributes shown as columns in the data table. Example: "collection_marker".
|
|
163
159
|
* @description Represents a collection object with various properties, including identifiers, form information, and localized data.
|
|
164
160
|
*/
|
|
165
161
|
interface ICollectionEntity {
|
|
@@ -192,8 +188,8 @@ interface ICollectionResponce {
|
|
|
192
188
|
* Collection form data object
|
|
193
189
|
* @interface ICollectionFormData
|
|
194
190
|
* @property {string} marker - Text identifier (marker) of the form field. Example: "collection_marker".
|
|
195
|
-
* @property {string} type - Type of the form field,
|
|
196
|
-
* @property {string} value - Value of the form field
|
|
191
|
+
* @property {string} type - Type of the form field, for example `"text"`, `"number"` or `"date"`. Example: "number".
|
|
192
|
+
* @property {string} value - Value of the form field. Example: "Collection marker".
|
|
197
193
|
* @description Represents a form data object within a collection, containing a marker, type, and value.
|
|
198
194
|
*/
|
|
199
195
|
interface ICollectionFormData {
|
|
@@ -204,8 +200,8 @@ interface ICollectionFormData {
|
|
|
204
200
|
/**
|
|
205
201
|
* Collection form object
|
|
206
202
|
* @interface ICollectionFormObject
|
|
207
|
-
* @property {string} formIdentifier -
|
|
208
|
-
* @property {Record<string, ICollectionFormData>} formData -
|
|
203
|
+
* @property {string} formIdentifier - Marker of the form. Example: "collection-form".
|
|
204
|
+
* @property {ICollectionFormData[] | Record<string, ICollectionFormData[]>} formData - Field values: a flat array `[{ marker, type, value }]` (as in the example), or the same array wrapped in a language code — `{ "en_US": [...] }`. The platform stores both; the SDK sends the value as is.
|
|
209
205
|
* @example
|
|
210
206
|
[
|
|
211
207
|
{
|
|
@@ -221,18 +217,16 @@ interface ICollectionFormData {
|
|
|
221
217
|
*/
|
|
222
218
|
interface ICollectionFormObject {
|
|
223
219
|
formIdentifier: string;
|
|
224
|
-
formData:
|
|
225
|
-
[key: string]: ICollectionFormData[];
|
|
226
|
-
};
|
|
220
|
+
formData: ICollectionFormData[] | Record<string, ICollectionFormData[]>;
|
|
227
221
|
}
|
|
228
222
|
/**
|
|
229
223
|
* Collection row object
|
|
230
224
|
* @interface ICollectionRow
|
|
231
|
-
* @property {number} id - Object
|
|
232
|
-
* @property {string} createdDate -
|
|
233
|
-
* @property {string} updatedDate - Date
|
|
234
|
-
* @property {number | null} [collectionId] -
|
|
235
|
-
* @property {ICollectionFormData[]} formData -
|
|
225
|
+
* @property {number} id - Object ID. Example: 1.
|
|
226
|
+
* @property {string} createdDate - Creation date of the record. Example: "2023-01-01T00:00:00Z".
|
|
227
|
+
* @property {string} updatedDate - Date the record was last updated. Example: "2023-01-02T00:00:00Z".
|
|
228
|
+
* @property {number | null} [collectionId] - ID of the collection the row belongs to. Example: "product", "order", "etc".
|
|
229
|
+
* @property {ICollectionFormData[]} formData - Form fields of the collection row.
|
|
236
230
|
* @example
|
|
237
231
|
[
|
|
238
232
|
{
|
|
@@ -241,12 +235,12 @@ interface ICollectionFormObject {
|
|
|
241
235
|
"value": "Value"
|
|
242
236
|
}
|
|
243
237
|
]
|
|
244
|
-
* @property {string | null} entityType - Type of the entity
|
|
245
|
-
* @property {number | null} entityId -
|
|
246
|
-
* @property {string | null} [attributeSetIdentifier] -
|
|
238
|
+
* @property {string | null} entityType - Type of the entity the collection row is linked to. Example: "product", "order", "etc".
|
|
239
|
+
* @property {number | null} entityId - ID of the entity the collection row is linked to. Example: 12345.
|
|
240
|
+
* @property {string | null} [attributeSetIdentifier] - Marker of the attribute set used by the form attached to the collection row, or `null` if there is none. Example: "attributeSet1" or null.
|
|
247
241
|
* @property {string | null} [langCode] - Language code the row was stored under. Example: "en_US".
|
|
248
|
-
* @property {string | null} [formIdentifier] -
|
|
249
|
-
* @property {string} total - Total
|
|
242
|
+
* @property {string | null} [formIdentifier] - Marker of the form the row was created from; returned by the create and update row endpoints. Example: "collection_form".
|
|
243
|
+
* @property {string} total - Total number of records. Example: "1".
|
|
250
244
|
* @description Represents a row in a collection, containing various properties such as identifiers, dates, form data, and an optional total value.
|
|
251
245
|
*/
|
|
252
246
|
interface ICollectionRow {
|
|
@@ -265,7 +259,7 @@ interface ICollectionRow {
|
|
|
265
259
|
/**
|
|
266
260
|
* Collection rows response object
|
|
267
261
|
* @interface ICollectionRowsResponce
|
|
268
|
-
* @property {ICollectionRow[]} items -
|
|
262
|
+
* @property {ICollectionRow[]} items - Rows of the collection.
|
|
269
263
|
* @example
|
|
270
264
|
[
|
|
271
265
|
{
|
|
@@ -294,24 +288,31 @@ interface ICollectionRowsResponce {
|
|
|
294
288
|
/**
|
|
295
289
|
* Collection is valid object
|
|
296
290
|
* @interface ICollectionIsValid
|
|
297
|
-
* @property {boolean} valid -
|
|
291
|
+
* @property {boolean} valid - Whether the marker is valid. Example: true.
|
|
298
292
|
* @description Represents a response from the validateICollectionMarker.
|
|
299
293
|
*/
|
|
300
294
|
interface ICollectionIsValid {
|
|
301
295
|
valid: boolean;
|
|
302
296
|
}
|
|
303
297
|
/**
|
|
304
|
-
* Query parameters for collection requests.
|
|
298
|
+
* Query parameters for collection row requests. All of them are optional.
|
|
305
299
|
* @interface ICollectionQuery
|
|
306
|
-
* @property {number} limit -
|
|
307
|
-
* @property {number} offset -
|
|
308
|
-
* @property {string} entityType - Entity type. Example: "orders".
|
|
309
|
-
* @property {number} entityId - Entity
|
|
300
|
+
* @property {number} [limit] - Maximum number of records to return. Default: 30.
|
|
301
|
+
* @property {number} [offset] - Number of records to skip. Default: 0.
|
|
302
|
+
* @property {string} [entityType] - Entity type. Example: "orders".
|
|
303
|
+
* @property {number} [entityId] - Entity ID. Example: 1.
|
|
310
304
|
*/
|
|
311
305
|
interface ICollectionQuery {
|
|
312
|
-
limit
|
|
313
|
-
offset
|
|
314
|
-
entityType
|
|
315
|
-
entityId
|
|
306
|
+
limit?: number;
|
|
307
|
+
offset?: number;
|
|
308
|
+
entityType?: string;
|
|
309
|
+
entityId?: number;
|
|
316
310
|
}
|
|
317
|
-
|
|
311
|
+
/**
|
|
312
|
+
* Query parameters for getICollections: pagination only — the collection list takes no entity filter.
|
|
313
|
+
* @typedef {object} ICollectionsListQuery
|
|
314
|
+
* @property {number} [limit] - Maximum number of records to return. Default: 30.
|
|
315
|
+
* @property {number} [offset] - Number of records to skip. Default: 0.
|
|
316
|
+
*/
|
|
317
|
+
type ICollectionsListQuery = Pick<ICollectionQuery, 'limit' | 'offset'>;
|
|
318
|
+
export type { ICollectionEntity, ICollectionFormObject, ICollectionIsValid, ICollectionQuery, ICollectionResponce, ICollectionRow, ICollectionRowsResponce, ICollectionsApi, ICollectionsListQuery, };
|
|
@@ -17,14 +17,14 @@ interface ILocales {
|
|
|
17
17
|
/**
|
|
18
18
|
* The `ILocalEntity` interface defines the structure of a locales entity, including its identifiers, name, and other properties.
|
|
19
19
|
* @interface ILocalEntity
|
|
20
|
-
* @property {number} id -
|
|
21
|
-
* @property {string} shortCode -
|
|
22
|
-
* @property {string} code -
|
|
23
|
-
* @property {string} name -
|
|
24
|
-
* @property {string} nativeName -
|
|
25
|
-
* @property {boolean} isActive -
|
|
26
|
-
* @property {string | null} image -
|
|
27
|
-
* @property {number} position -
|
|
20
|
+
* @property {number} id - ID of the language. Example: 1.
|
|
21
|
+
* @property {string} shortCode - Short language code, for example `"en"`. Example: "en".
|
|
22
|
+
* @property {string} code - Full language code, such as `en_US`. Example: "en_US".
|
|
23
|
+
* @property {string} name - Name of the language. Example: "English".
|
|
24
|
+
* @property {string} nativeName - Name of the language in that language. Example: "English".
|
|
25
|
+
* @property {boolean} isActive - Whether the language is active. Example: true.
|
|
26
|
+
* @property {string | null} image - Image associated with the language. Example: "https://example.com/images/en.png".
|
|
27
|
+
* @property {number} position - Position of the language in the list. Example: 1.
|
|
28
28
|
* @description This interface defines the structure of a locales entity, including its identifiers, name, and other properties.
|
|
29
29
|
*/
|
|
30
30
|
interface ILocalEntity {
|
package/esm/menus/menusApi.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export default class MenusApi extends AsyncModules implements IMenus {
|
|
|
19
19
|
/**
|
|
20
20
|
* Get pages includes in menu by marker.
|
|
21
21
|
* @handleName getMenusByMarker
|
|
22
|
-
* @param {string} marker -
|
|
22
|
+
* @param {string} marker - Marker of the menu. Example: "main_menu".
|
|
23
23
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
24
24
|
* @returns {Promise<IMenusEntity | IError>} Returns a single menu object as a ContentMenu object with included pages.
|
|
25
25
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
package/esm/menus/menusApi.js
CHANGED
|
@@ -19,7 +19,7 @@ export default class MenusApi extends AsyncModules {
|
|
|
19
19
|
/**
|
|
20
20
|
* Get pages includes in menu by marker.
|
|
21
21
|
* @handleName getMenusByMarker
|
|
22
|
-
* @param {string} marker -
|
|
22
|
+
* @param {string} marker - Marker of the menu. Example: "main_menu".
|
|
23
23
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
24
24
|
* @returns {Promise<IMenusEntity | IError>} Returns a single menu object as a ContentMenu object with included pages.
|
|
25
25
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -7,7 +7,7 @@ interface IMenus {
|
|
|
7
7
|
/**
|
|
8
8
|
* Get pages includes in menu by marker.
|
|
9
9
|
* @handleName getMenusByMarker
|
|
10
|
-
* @param {string} marker -
|
|
10
|
+
* @param {string} marker - Marker of the menu. Example: "main_menu".
|
|
11
11
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
12
12
|
* @returns {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
|
|
13
13
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -17,7 +17,7 @@ interface IMenus {
|
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* @interface IMenusPages
|
|
20
|
-
* @property {IMenusPages[]} children -
|
|
20
|
+
* @property {IMenusPages[]} children - Nested menu items (child pages).
|
|
21
21
|
* @example
|
|
22
22
|
[
|
|
23
23
|
{
|
|
@@ -29,21 +29,21 @@ interface IMenus {
|
|
|
29
29
|
"position": 1
|
|
30
30
|
}
|
|
31
31
|
]
|
|
32
|
-
* @property {number | null} id -
|
|
33
|
-
* @property {string | null} pageUrl -
|
|
34
|
-
* @property {ILocalizeInfo} localizeInfos -
|
|
32
|
+
* @property {number | null} id - ID of the menu. Example: 1.
|
|
33
|
+
* @property {string | null} pageUrl - URL of the page. Example: "about".
|
|
34
|
+
* @property {ILocalizeInfo} localizeInfos - Localized menu data.
|
|
35
35
|
* @example
|
|
36
36
|
{
|
|
37
37
|
"title": "menu"
|
|
38
38
|
}
|
|
39
|
-
* @property {IAttributeValues} attributeValues -
|
|
39
|
+
* @property {IAttributeValues} attributeValues - Attribute values of the page, keyed by attribute marker.
|
|
40
40
|
* @example
|
|
41
41
|
{
|
|
42
42
|
"color": "red",
|
|
43
43
|
"size": "large"
|
|
44
44
|
}
|
|
45
|
-
* @property {number} position -
|
|
46
|
-
* @property {number | null} parentId -
|
|
45
|
+
* @property {number} position - Position used for sorting. Example: 1.
|
|
46
|
+
* @property {number | null} parentId - ID of the parent menu item; `null` for a top-level item. Example: null.
|
|
47
47
|
* @property {'page' | 'custom' | null} [parentType] - Kind of the parent item: `page` for a menu page, `custom` for a custom item; `null` together with `parentId` means top level. Page ids and custom item ids overlap, so the parent is ambiguous without it. Example: null.
|
|
48
48
|
* @property {'page' | 'custom'} [itemType] - Kind of this item itself: `page` or `custom`. This is the value the item's children must pass in `parentType`. Example: "page".
|
|
49
49
|
* @description This interface defines the structure of a menu page entity, including its identifiers, localization information, attributes, and hierarchical relationships.
|
|
@@ -61,14 +61,14 @@ interface IMenusPages {
|
|
|
61
61
|
}
|
|
62
62
|
/**
|
|
63
63
|
* @interface IMenusEntity
|
|
64
|
-
* @property {number} id -
|
|
65
|
-
* @property {string} identifier -
|
|
66
|
-
* @property {ILocalizeInfo} localizeInfos -
|
|
64
|
+
* @property {number} id - ID of the menu. Example: 1.
|
|
65
|
+
* @property {string} identifier - Marker of the menu. Example: "main_menu".
|
|
66
|
+
* @property {ILocalizeInfo} localizeInfos - Localized menu data.
|
|
67
67
|
* @example
|
|
68
68
|
{
|
|
69
69
|
"title": "menu"
|
|
70
70
|
}
|
|
71
|
-
* @property {IMenusPages[]} pages -
|
|
71
|
+
* @property {IMenusPages[]} pages - Pages in the menu.
|
|
72
72
|
* @example
|
|
73
73
|
[
|
|
74
74
|
{
|