oneentry 1.0.126 → 1.0.127
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/README.md +0 -2
- package/configure.js +25 -18
- package/dist/admins/adminsApi.d.ts +30 -25
- package/dist/admins/adminsApi.js +30 -25
- package/dist/admins/adminsInterfaces.d.ts +45 -54
- package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
- package/dist/attribute-sets/attributeSetsApi.js +26 -27
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
- package/dist/auth-provider/authProviderApi.d.ts +132 -158
- package/dist/auth-provider/authProviderApi.js +131 -157
- package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
- package/dist/base/asyncModules.d.ts +23 -21
- package/dist/base/asyncModules.js +30 -25
- package/dist/base/result.d.ts +31 -0
- package/dist/base/result.js +32 -1
- package/dist/base/stateModule.d.ts +10 -0
- package/dist/base/stateModule.js +50 -2
- package/dist/base/syncModules.d.ts +41 -49
- package/dist/base/syncModules.js +49 -48
- package/dist/base/utils.d.ts +38 -7
- package/dist/blocks/blocksApi.d.ts +27 -36
- package/dist/blocks/blocksApi.js +27 -36
- package/dist/blocks/blocksInterfaces.d.ts +92 -97
- package/dist/config.d.ts +13 -0
- package/dist/config.js +30 -0
- package/dist/events/eventsApi.d.ts +16 -33
- package/dist/events/eventsApi.js +32 -46
- package/dist/events/eventsInterfaces.d.ts +42 -37
- package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
- package/dist/file-uploading/fileUploadingApi.js +44 -47
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
- package/dist/forms/formsApi.d.ts +15 -14
- package/dist/forms/formsApi.js +15 -14
- package/dist/forms/formsInterfaces.d.ts +36 -40
- package/dist/forms-data/formsDataApi.d.ts +40 -44
- package/dist/forms-data/formsDataApi.js +42 -44
- package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
- package/dist/general-types/generalTypesApi.d.ts +5 -5
- package/dist/general-types/generalTypesApi.js +5 -5
- package/dist/general-types/generalTypesInterfaces.d.ts +6 -9
- package/dist/index.d.ts +12 -13
- package/dist/index.js +12 -13
- package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
- package/dist/integration-collections/integrationCollectionsApi.js +86 -102
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
- package/dist/locales/localesApi.d.ts +7 -3
- package/dist/locales/localesApi.js +7 -3
- package/dist/locales/localesInterfaces.d.ts +14 -13
- package/dist/menus/menusApi.d.ts +9 -5
- package/dist/menus/menusApi.js +9 -5
- package/dist/menus/menusInterfaces.d.ts +43 -48
- package/dist/menus/menusInterfaces.js +1 -0
- package/dist/orders/ordersApi.d.ts +62 -70
- package/dist/orders/ordersApi.js +62 -71
- package/dist/orders/ordersInterfaces.d.ts +238 -203
- package/dist/pages/pagesApi.d.ts +67 -80
- package/dist/pages/pagesApi.js +71 -81
- package/dist/pages/pagesInterfaces.d.ts +164 -160
- package/dist/payments/paymentsApi.d.ts +24 -34
- package/dist/payments/paymentsApi.js +24 -38
- package/dist/payments/paymentsInterfaces.d.ts +82 -76
- package/dist/product-statuses/productStatusesApi.d.ts +13 -13
- package/dist/product-statuses/productStatusesApi.js +13 -13
- package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
- package/dist/products/productsApi.d.ts +246 -267
- package/dist/products/productsApi.js +247 -267
- package/dist/products/productsInterfaces.d.ts +333 -339
- package/dist/system/systemApi.d.ts +19 -21
- package/dist/system/systemApi.js +20 -21
- package/dist/system/systemInterfaces.d.ts +14 -3
- package/dist/templates/templatesApi.d.ts +13 -16
- package/dist/templates/templatesApi.js +13 -16
- package/dist/templates/templatesInterfaces.d.ts +30 -29
- package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
- package/dist/templates-preview/templatesPreviewApi.js +10 -11
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
- package/dist/users/usersApi.d.ts +36 -43
- package/dist/users/usersApi.js +36 -43
- package/dist/users/usersInterfaces.d.ts +92 -96
- package/dist/web-socket/wsApi.d.ts +5 -3
- package/dist/web-socket/wsApi.js +6 -3
- package/dist/web-socket/wsInterfaces.d.ts +7 -2
- package/package.json +16 -12
|
@@ -3,17 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
/* eslint-disable jsdoc/reject-any-type */
|
|
6
7
|
const asyncModules_1 = __importDefault(require("../base/asyncModules"));
|
|
7
8
|
/**
|
|
8
9
|
* Controllers for working with attributes.
|
|
9
|
-
*
|
|
10
10
|
* @handle /api/content/integration-collections
|
|
11
11
|
* @class IntegrationCollectionsApi
|
|
12
|
-
* @
|
|
12
|
+
* @augments AsyncModules
|
|
13
13
|
* @implements {ICollectionsApi}
|
|
14
14
|
* @description This class provides methods to interact with integration collections, including retrieving all collections, getting a single collection by ID, and managing collection rows.
|
|
15
15
|
*/
|
|
16
16
|
class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
17
|
+
/**
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
17
20
|
constructor(state) {
|
|
18
21
|
super(state);
|
|
19
22
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -26,28 +29,24 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
26
29
|
}
|
|
27
30
|
/**
|
|
28
31
|
* Get all collections.
|
|
29
|
-
*
|
|
30
32
|
* @handleName getICollections
|
|
31
|
-
*
|
|
32
|
-
* @param
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
* @param
|
|
41
|
-
* @param
|
|
42
|
-
* @param
|
|
43
|
-
* @
|
|
44
|
-
* @return {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
|
|
33
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
34
|
+
* @param {object} [userQuery] - Optional set query parameters. Example:
|
|
35
|
+
{
|
|
36
|
+
"limit": 0,
|
|
37
|
+
"offset": 30,
|
|
38
|
+
"entityType": "orders",
|
|
39
|
+
"entityId": 1
|
|
40
|
+
}
|
|
41
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
|
|
42
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
|
|
43
|
+
* @param {string} [userQuery.entityType] - Entity type. Example: "orders".
|
|
44
|
+
* @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
|
|
45
|
+
* @returns {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
|
|
45
46
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
46
47
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
47
48
|
*/
|
|
48
|
-
async getICollections(langCode = this.state.lang,
|
|
49
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
50
|
-
userQuery) {
|
|
49
|
+
async getICollections(langCode = this.state.lang, userQuery) {
|
|
51
50
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
52
51
|
const query = { ...this._defaultQuery, ...userQuery, langCode };
|
|
53
52
|
const result = await this._fetchGet(`?` + this._queryParamsToString(query));
|
|
@@ -55,39 +54,34 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
55
54
|
}
|
|
56
55
|
/**
|
|
57
56
|
* Get a single collection object by id.
|
|
58
|
-
*
|
|
59
57
|
* @handleName getICollectionById
|
|
60
|
-
*
|
|
61
|
-
* @param
|
|
62
|
-
* @
|
|
63
|
-
* @return {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
|
|
58
|
+
* @param {number} id - Collection id. Example: 1.
|
|
59
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
60
|
+
* @returns {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
|
|
64
61
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
65
62
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
66
63
|
*/
|
|
67
64
|
async getICollectionById(id, langCode = this.state.lang) {
|
|
68
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
69
65
|
const result = await this._fetchGet(`/${id}?` + this._queryParamsToString({ langCode }));
|
|
70
66
|
return this._dataPostProcess(result, langCode);
|
|
71
67
|
}
|
|
72
68
|
/**
|
|
73
69
|
* Get all records belonging to the collection by collection id.
|
|
74
|
-
*
|
|
75
70
|
* @handleName getICollectionRowsById
|
|
76
|
-
*
|
|
77
|
-
* @param
|
|
78
|
-
* @param
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
* @param
|
|
87
|
-
* @param
|
|
88
|
-
* @param
|
|
89
|
-
* @
|
|
90
|
-
* @return {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
|
|
71
|
+
* @param {number} id - Collection id. Example: 1.
|
|
72
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
73
|
+
* @param {any} [userQuery] - Optional set query parameters. Example:
|
|
74
|
+
{
|
|
75
|
+
"limit": 0,
|
|
76
|
+
"offset": 30,
|
|
77
|
+
"entityType": "orders",
|
|
78
|
+
"entityId": 1
|
|
79
|
+
}
|
|
80
|
+
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
|
|
81
|
+
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
|
|
82
|
+
* @param {number} [userQuery.entityType] - Entity type. Example: "orders".
|
|
83
|
+
* @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
|
|
84
|
+
* @returns {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
|
|
91
85
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
92
86
|
* @description Get all records belonging to the collection by collection id.
|
|
93
87
|
*/
|
|
@@ -102,14 +96,12 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
102
96
|
}
|
|
103
97
|
/**
|
|
104
98
|
* Check for the existence of a text identifier (marker).
|
|
105
|
-
*
|
|
106
99
|
* @handleName validateICollectionMarker
|
|
107
|
-
*
|
|
108
|
-
* @
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
}
|
|
100
|
+
* @param {string} marker - Collection marker. Example: "collection1".
|
|
101
|
+
* @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
|
|
102
|
+
{
|
|
103
|
+
"valid": true
|
|
104
|
+
}
|
|
113
105
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
114
106
|
* @description Check for the existence of a text identifier (marker).
|
|
115
107
|
*/
|
|
@@ -119,12 +111,10 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
119
111
|
}
|
|
120
112
|
/**
|
|
121
113
|
* Getting all records from the collection.
|
|
122
|
-
*
|
|
123
114
|
* @handleName getICollectionRowsByMarker
|
|
124
|
-
*
|
|
125
|
-
* @param
|
|
126
|
-
* @
|
|
127
|
-
* @return {ICollectionRowsResponce} Returns CollectionRowEntity object.
|
|
115
|
+
* @param {string} marker - Collection text identifier. Example: "collection1".
|
|
116
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
117
|
+
* @returns {ICollectionRowsResponce} Returns CollectionRowEntity object.
|
|
128
118
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
129
119
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
130
120
|
*/
|
|
@@ -134,13 +124,11 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
134
124
|
}
|
|
135
125
|
/**
|
|
136
126
|
* Getting one record from the collection.
|
|
137
|
-
*
|
|
138
127
|
* @handleName getICollectionRowByMarkerAndId
|
|
139
|
-
*
|
|
140
|
-
* @param
|
|
141
|
-
* @param
|
|
142
|
-
* @
|
|
143
|
-
* @return {ICollectionRow} Returns CollectionRowEntity object.
|
|
128
|
+
* @param {string} marker - Collection text identifier. Example: "collection1".
|
|
129
|
+
* @param {number} id - Collection record identifier. Example: 1.
|
|
130
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
131
|
+
* @returns {ICollectionRow} Returns CollectionRowEntity object.
|
|
144
132
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
145
133
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
146
134
|
*/
|
|
@@ -150,25 +138,23 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
150
138
|
}
|
|
151
139
|
/**
|
|
152
140
|
* Create a record in the collection.
|
|
153
|
-
*
|
|
154
141
|
* @handleName createICollectionRow
|
|
155
|
-
*
|
|
156
|
-
* @param
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
* @
|
|
171
|
-
* @return {ICollectionRow} Returns object of type ICollectionRow.
|
|
142
|
+
* @param {string} marker - Collection text identifier. Example: "collection1".
|
|
143
|
+
* @param {ICollectionFormObject} body - Object for creating a record. Example:
|
|
144
|
+
{
|
|
145
|
+
"formIdentifier": "collection-form",
|
|
146
|
+
"formData": {
|
|
147
|
+
"en_US": [
|
|
148
|
+
{
|
|
149
|
+
"marker": "collection_marker",
|
|
150
|
+
"type": "string",
|
|
151
|
+
"value": "Collection marker"
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
157
|
+
* @returns {ICollectionRow} Returns object of type ICollectionRow.
|
|
172
158
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
173
159
|
* @description Create a record in the collection.
|
|
174
160
|
*/
|
|
@@ -178,26 +164,26 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
178
164
|
}
|
|
179
165
|
/**
|
|
180
166
|
* Edit a record in the collection.
|
|
181
|
-
*
|
|
182
167
|
* @handleName updateICollectionRow
|
|
183
|
-
*
|
|
184
|
-
* @param
|
|
185
|
-
* @param
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
* @param
|
|
200
|
-
* @
|
|
168
|
+
* @param {string} marker - Text identifier of the collection. Example: "collection1".
|
|
169
|
+
* @param {number} id - Row identifier in the collection. Example: 12.
|
|
170
|
+
* @param {object} body - Object for updating a record in the collection. Example:
|
|
171
|
+
{
|
|
172
|
+
"formIdentifier": "collection-form",
|
|
173
|
+
"formData": {
|
|
174
|
+
"en_US": [
|
|
175
|
+
{
|
|
176
|
+
"marker": "collection_marker",
|
|
177
|
+
"type": "string",
|
|
178
|
+
"value": "Collection marker"
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
* @param {string} body.formIdentifier - Textual identifier of the form. Example: "collection-form".
|
|
184
|
+
* @param {any} body.formData - Object with the form data.
|
|
185
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
186
|
+
* @returns {ICollectionRow} Returns object of type ICollectionRow.
|
|
201
187
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
202
188
|
* @description Edit a record in the collection.
|
|
203
189
|
*/
|
|
@@ -207,12 +193,10 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
|
|
|
207
193
|
}
|
|
208
194
|
/**
|
|
209
195
|
* Deletion of collection record object
|
|
210
|
-
*
|
|
211
196
|
* @handleName deleteICollectionRowByMarkerAndId
|
|
212
|
-
*
|
|
213
|
-
* @param
|
|
214
|
-
* @
|
|
215
|
-
* @return {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
|
|
197
|
+
* @param {string} marker - text identifier of the collection Example: "collection1".
|
|
198
|
+
* @param {number} id - record identifier in the collection Example: 12.
|
|
199
|
+
* @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
|
|
216
200
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
217
201
|
* @description Deletion of collection record object
|
|
218
202
|
*/
|