oneentry 1.0.124 → 1.0.125
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 +24 -22
- package/dist/admins/adminsApi.d.ts +17 -4
- package/dist/admins/adminsApi.js +16 -3
- package/dist/admins/adminsInterfaces.d.ts +47 -26
- package/dist/attribute-sets/attributeSetsApi.d.ts +10 -18
- package/dist/attribute-sets/attributeSetsApi.js +9 -17
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +92 -44
- package/dist/auth-provider/authProviderApi.d.ts +146 -36
- package/dist/auth-provider/authProviderApi.js +163 -37
- package/dist/auth-provider/authProvidersInterfaces.d.ts +189 -40
- package/dist/base/asyncModules.d.ts +7 -1
- package/dist/base/asyncModules.js +127 -21
- package/dist/base/result.js +23 -0
- package/dist/base/syncModules.d.ts +4 -0
- package/dist/base/syncModules.js +19 -1
- package/dist/base/utils.d.ts +1 -1
- package/dist/blocks/blocksApi.d.ts +7 -17
- package/dist/blocks/blocksApi.js +7 -17
- package/dist/blocks/blocksInterfaces.d.ts +77 -32
- package/dist/events/eventsApi.d.ts +7 -8
- package/dist/events/eventsApi.js +12 -7
- package/dist/events/eventsInterfaces.d.ts +16 -11
- package/dist/file-uploading/fileUploadingApi.d.ts +22 -14
- package/dist/file-uploading/fileUploadingApi.js +20 -12
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +42 -18
- package/dist/forms/formsApi.d.ts +3 -7
- package/dist/forms/formsApi.js +2 -6
- package/dist/forms/formsInterfaces.d.ts +44 -28
- package/dist/formsData/formsDataApi.d.ts +21 -9
- package/dist/formsData/formsDataApi.js +21 -9
- package/dist/formsData/formsDataInterfaces.d.ts +128 -45
- package/dist/general-types/generalTypesApi.d.ts +1 -3
- package/dist/general-types/generalTypesApi.js +0 -2
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +74 -47
- package/dist/integration-collections/integrationCollectionsApi.js +64 -45
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +144 -63
- package/dist/locales/localesApi.d.ts +1 -2
- package/dist/locales/localesApi.js +1 -2
- package/dist/locales/localesInterfaces.d.ts +2 -4
- package/dist/menus/menusApi.d.ts +1 -3
- package/dist/menus/menusApi.js +1 -3
- package/dist/menus/menusInterfaces.d.ts +39 -13
- package/dist/orders/ordersApi.d.ts +36 -18
- package/dist/orders/ordersApi.js +40 -22
- package/dist/orders/ordersInterfaces.d.ts +163 -81
- package/dist/pages/pagesApi.d.ts +48 -48
- package/dist/pages/pagesApi.js +40 -45
- package/dist/pages/pagesInterfaces.d.ts +147 -98
- package/dist/payments/paymentsApi.d.ts +25 -45
- package/dist/payments/paymentsApi.js +27 -46
- package/dist/payments/paymentsInterfaces.d.ts +42 -60
- package/dist/product-statuses/productStatusesApi.d.ts +6 -12
- package/dist/product-statuses/productStatusesApi.js +5 -11
- package/dist/product-statuses/productStatusesInterfaces.d.ts +16 -15
- package/dist/products/productsApi.d.ts +256 -104
- package/dist/products/productsApi.js +263 -97
- package/dist/products/productsInterfaces.d.ts +343 -160
- package/dist/system/systemApi.d.ts +21 -10
- package/dist/system/systemApi.js +22 -8
- package/dist/system/systemInterfaces.d.ts +0 -1
- package/dist/templates/templatesApi.d.ts +6 -12
- package/dist/templates/templatesApi.js +4 -10
- package/dist/templates/templatesInterfaces.d.ts +20 -20
- package/dist/templates-preview/templatesPreviewApi.d.ts +2 -6
- package/dist/templates-preview/templatesPreviewApi.js +1 -5
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +50 -25
- package/dist/users/usersApi.d.ts +33 -13
- package/dist/users/usersApi.js +38 -15
- package/dist/users/usersInterfaces.d.ts +78 -27
- package/dist/web-socket/wsApi.d.ts +1 -5
- package/dist/web-socket/wsApi.js +1 -5
- package/dist/web-socket/wsInterfaces.d.ts +0 -1
- package/package.json +18 -16
|
@@ -8,7 +8,6 @@ import type { IError } from '../base/utils';
|
|
|
8
8
|
* @property {function} getFormsData - Get all forms data.
|
|
9
9
|
* @property {function} postFormsData - Find all product page objects with pagination and multiple filtering.
|
|
10
10
|
* @property {function} getFormsDataByMarker - Get one object of form data by marker.
|
|
11
|
-
*
|
|
12
11
|
* @description This interface defines methods for retrieving and posting form data in the system.
|
|
13
12
|
*/
|
|
14
13
|
interface IFormsData {
|
|
@@ -18,7 +17,6 @@ interface IFormsData {
|
|
|
18
17
|
* @param {string} langCode - The language code for localization. Default: "en_US".
|
|
19
18
|
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
20
19
|
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
21
|
-
*
|
|
22
20
|
* @return {IFormsDataEntity} A promise that resolves to a collection of form data entities or an error.
|
|
23
21
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
24
22
|
*/
|
|
@@ -26,9 +24,20 @@ interface IFormsData {
|
|
|
26
24
|
/**
|
|
27
25
|
* Posts form data to the system.
|
|
28
26
|
*
|
|
29
|
-
* @param {IFormsPost} data - The form data to be posted.
|
|
27
|
+
* @param {IFormsPost} data - The form data to be posted. Example:
|
|
28
|
+
{
|
|
29
|
+
"id": 1,
|
|
30
|
+
"formIdentifier": "string",
|
|
31
|
+
"time": "string",
|
|
32
|
+
"formData": [],
|
|
33
|
+
"fileQuery": {
|
|
34
|
+
"type": null;
|
|
35
|
+
"entity": null;
|
|
36
|
+
"id": null;
|
|
37
|
+
"key": null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
30
40
|
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
31
|
-
*
|
|
32
41
|
* @return {IFormDataEntity} A promise that resolves to a form data entity or an error.
|
|
33
42
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
34
43
|
*/
|
|
@@ -40,7 +49,6 @@ interface IFormsData {
|
|
|
40
49
|
* @param {string} langCode - The language code for localization. Default: "en_US".
|
|
41
50
|
* @param {number} [offset] - Optional offset for pagination. Default: 0.
|
|
42
51
|
* @param {number} [limit] - Optional limit for pagination. Default: 30.
|
|
43
|
-
*
|
|
44
52
|
* @returns {IFormsDataEntity} A promise that resolves to a form data entity or an error.
|
|
45
53
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
46
54
|
*/
|
|
@@ -54,10 +62,21 @@ interface IFormsData {
|
|
|
54
62
|
* @property {number} id - The unique identifier of the form page. Example: 12345.
|
|
55
63
|
* @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
|
|
56
64
|
* @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
|
|
57
|
-
* @property {IFormsPost} formData - The identifier of the position. Example:
|
|
65
|
+
* @property {IFormsPost} formData - The identifier of the position. Example:
|
|
66
|
+
{
|
|
67
|
+
"id": 1,
|
|
68
|
+
"formIdentifier": "string",
|
|
69
|
+
"time": "string",
|
|
70
|
+
"formData": [],
|
|
71
|
+
"fileQuery": {
|
|
72
|
+
"type": null;
|
|
73
|
+
"entity": null;
|
|
74
|
+
"id": null;
|
|
75
|
+
"key": null;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
58
78
|
* @property {string} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
|
|
59
79
|
* @property {string} [actionMessage] - Action message for the form data. Example: "Form submitted successfully".
|
|
60
|
-
*
|
|
61
80
|
* @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
|
|
62
81
|
*/
|
|
63
82
|
interface IFormDataEntity {
|
|
@@ -74,13 +93,22 @@ interface IFormDataEntity {
|
|
|
74
93
|
* @interface IFormsDataEntity
|
|
75
94
|
*
|
|
76
95
|
* @property {number} total - Total number of found records. Example: 100.
|
|
77
|
-
* @property {
|
|
78
|
-
|
|
96
|
+
* @property {IFormDataEntity[]} items - Array of form data objects. Example:
|
|
97
|
+
[
|
|
98
|
+
{
|
|
99
|
+
"id": 1,
|
|
100
|
+
"formIdentifier": "string",
|
|
101
|
+
"time": "string",
|
|
102
|
+
"formData": "IFormsPost",
|
|
103
|
+
"attributeSetIdentifier": "string",
|
|
104
|
+
"actionMessage": "string"
|
|
105
|
+
}
|
|
106
|
+
]
|
|
79
107
|
* @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
|
|
80
108
|
*/
|
|
81
109
|
interface IFormsDataEntity {
|
|
82
110
|
total: number;
|
|
83
|
-
items:
|
|
111
|
+
items: IFormDataEntity[];
|
|
84
112
|
}
|
|
85
113
|
/**
|
|
86
114
|
* Contains an array of data form objects with the following values
|
|
@@ -91,19 +119,31 @@ type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeTe
|
|
|
91
119
|
*
|
|
92
120
|
* @interface IFormsPost
|
|
93
121
|
*
|
|
94
|
-
* @property {number} [id] - Optional identifier of the form post.
|
|
95
|
-
* @property {string} formIdentifier - The identifier of the page.
|
|
96
|
-
* @property {Date | string} [time] - Date and time of form modification.
|
|
97
|
-
* @property {
|
|
98
|
-
|
|
99
|
-
|
|
122
|
+
* @property {number} [id] - Optional identifier of the form post. Example: 1.
|
|
123
|
+
* @property {string} formIdentifier - The identifier of the page. Example: "string".
|
|
124
|
+
* @property {Date | string} [time] - Date and time of form modification. Example: "string".
|
|
125
|
+
* @property {FormDataType[]} formData - The form data object. Example:
|
|
126
|
+
[
|
|
127
|
+
{
|
|
128
|
+
"marker": "string",
|
|
129
|
+
"type": "string",
|
|
130
|
+
"value": "string"
|
|
131
|
+
}
|
|
132
|
+
]
|
|
133
|
+
* @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files. Example:
|
|
134
|
+
{
|
|
135
|
+
"type": null,
|
|
136
|
+
"entity": null,
|
|
137
|
+
"id": null,
|
|
138
|
+
"key": null,
|
|
139
|
+
}
|
|
100
140
|
* @description This interface defines the structure of a form post object, including its identifiers, time, form data, and optional file query.
|
|
101
141
|
*/
|
|
102
142
|
interface IFormsPost {
|
|
103
143
|
id?: number;
|
|
104
144
|
formIdentifier: string;
|
|
105
145
|
time?: Date | string;
|
|
106
|
-
formData:
|
|
146
|
+
formData: FormDataType[];
|
|
107
147
|
fileQuery?: IUploadingQuery;
|
|
108
148
|
}
|
|
109
149
|
/**
|
|
@@ -111,10 +151,9 @@ interface IFormsPost {
|
|
|
111
151
|
*
|
|
112
152
|
* @interface IBodyTypeStringNumberFloat
|
|
113
153
|
*
|
|
114
|
-
* @property {string} marker - marker name.
|
|
115
|
-
* @property {
|
|
116
|
-
* @property {string} value - Value of the form data entity, which can be a string, number, or float.
|
|
117
|
-
*
|
|
154
|
+
* @property {string} marker - marker name. Example: "some_marker".
|
|
155
|
+
* @property {string} type - Type value. "string" | "number" | "float". Example: "string".
|
|
156
|
+
* @property {string} value - Value of the form data entity, which can be a "string", "number", or "float". Example: "string".
|
|
118
157
|
* @description Represents a form data entity with a marker, type, and value.
|
|
119
158
|
*/
|
|
120
159
|
interface IBodyTypeStringNumberFloat {
|
|
@@ -127,10 +166,14 @@ interface IBodyTypeStringNumberFloat {
|
|
|
127
166
|
*
|
|
128
167
|
* @interface IBodyTypeTimeDate
|
|
129
168
|
*
|
|
130
|
-
* @property {string} marker - marker name.
|
|
131
|
-
* @property {'date' | 'dateTime' | 'time'
|
|
132
|
-
* @property {object} value - Date object. Contains fullDate, formattedValue, formatString.
|
|
133
|
-
|
|
169
|
+
* @property {string} marker - marker name. Example: "ome_marker".
|
|
170
|
+
* @property {string} type - Type value. 'date' | 'dateTime' | 'time' Example: "date".
|
|
171
|
+
* @property {object} value - Date object. Contains fullDate, formattedValue, formatString. Example:
|
|
172
|
+
{
|
|
173
|
+
"fullDate": "2024-05-07T21:02:00.000Z",
|
|
174
|
+
"formattedValue": "08-05-2024 00:02",
|
|
175
|
+
"formatString": "DD-MM-YYYY HH:mm"
|
|
176
|
+
}
|
|
134
177
|
* @description Represents a date, dateTime, or time value in a structured format.
|
|
135
178
|
*/
|
|
136
179
|
interface IBodyTypeTimeDate {
|
|
@@ -147,10 +190,17 @@ interface IBodyTypeTimeDate {
|
|
|
147
190
|
*
|
|
148
191
|
* @interface IBodyTypeText
|
|
149
192
|
*
|
|
150
|
-
* @property {string} marker - marker name.
|
|
151
|
-
* @property {
|
|
152
|
-
* @property {object} value - Text Object. Contains html as string, plain text and params.
|
|
153
|
-
|
|
193
|
+
* @property {string} marker - marker name. Example: "some_marker".
|
|
194
|
+
* @property {string} type - Type value. Example: "text".
|
|
195
|
+
* @property {object} value - Text Object. Contains html as string, plain text and params. Example:
|
|
196
|
+
{
|
|
197
|
+
"htmlValue": "<p>Hello world</p>",
|
|
198
|
+
"plainValue": "",
|
|
199
|
+
"params": {
|
|
200
|
+
"isEditorDisabled": false,
|
|
201
|
+
"isImageCompressed": true
|
|
202
|
+
}
|
|
203
|
+
}
|
|
154
204
|
* @description Represents a text value with HTML and plain text representations, along with parameters for editor and image compression settings.
|
|
155
205
|
*/
|
|
156
206
|
interface IBodyTypeText {
|
|
@@ -170,10 +220,18 @@ interface IBodyTypeText {
|
|
|
170
220
|
*
|
|
171
221
|
* @interface IBodyTypeTextWithHeader
|
|
172
222
|
*
|
|
173
|
-
* @property {string} marker - marker name.
|
|
174
|
-
* @property {
|
|
175
|
-
* @property {object} value - Text Object. Contains html as string, header and params.
|
|
176
|
-
|
|
223
|
+
* @property {string} marker - marker name. Example: "about".
|
|
224
|
+
* @property {string} type - Type value. Example: "textWithHeader".
|
|
225
|
+
* @property {object} value - Text Object. Contains html as string, header and params. Example:
|
|
226
|
+
{
|
|
227
|
+
"header": "Headline",
|
|
228
|
+
"htmlValue": "<p>Hello World</p>",
|
|
229
|
+
"plainValue": "",
|
|
230
|
+
"params": {
|
|
231
|
+
"isEditorDisabled": false,
|
|
232
|
+
"isImageCompressed": true
|
|
233
|
+
}
|
|
234
|
+
}
|
|
177
235
|
* @description Represents a text value with a header, HTML and plain text representations, along with parameters for editor and image compression settings.
|
|
178
236
|
*/
|
|
179
237
|
interface IBodyTypeTextWithHeader {
|
|
@@ -194,10 +252,20 @@ interface IBodyTypeTextWithHeader {
|
|
|
194
252
|
*
|
|
195
253
|
* @interface IBodyTypeImageGroupOfImages
|
|
196
254
|
*
|
|
197
|
-
* @property {string} marker - marker name.
|
|
198
|
-
* @property {'image' | 'groupOfImage'} type - Type value.
|
|
199
|
-
* @property {object} value - Image Object. Contains image information.
|
|
200
|
-
|
|
255
|
+
* @property {string} marker - marker name. Example: "avatar".
|
|
256
|
+
* @property {'image' | 'groupOfImage'} type - Type value. Example: "image".
|
|
257
|
+
* @property {object} value - Image Object. Contains image information. Example:
|
|
258
|
+
[
|
|
259
|
+
{
|
|
260
|
+
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
261
|
+
"downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
262
|
+
"size": 392585,
|
|
263
|
+
"previewLink": "",
|
|
264
|
+
"params": {
|
|
265
|
+
"isImageCompressed": true
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
]
|
|
201
269
|
* @description Represents an image or a group of images with their details, including filename, download link, size, preview link, and parameters for image compression.
|
|
202
270
|
*/
|
|
203
271
|
interface IBodyTypeImageGroupOfImages {
|
|
@@ -226,10 +294,16 @@ interface IBodyTypeImageGroupOfImages {
|
|
|
226
294
|
*
|
|
227
295
|
* @interface IBodyTypeFile
|
|
228
296
|
*
|
|
229
|
-
* @property {string} marker - marker name.
|
|
230
|
-
* @property {'file'} type - Type value.
|
|
231
|
-
* @property {object} value - File Object. Contains file information.
|
|
232
|
-
|
|
297
|
+
* @property {string} marker - marker name. Example: "picture".
|
|
298
|
+
* @property {'file'} type - Type value. Example: "file".
|
|
299
|
+
* @property {object} value - File Object. Contains file information. Example:
|
|
300
|
+
[
|
|
301
|
+
{
|
|
302
|
+
"filename": "files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
303
|
+
"downloadLink": "http://my-site.com/cloud-static/files/project/page/10/image/Screenshot-from-2024-05-02-15-23-14.png",
|
|
304
|
+
"size": 392585
|
|
305
|
+
}
|
|
306
|
+
]
|
|
233
307
|
* @description Represents a file with its details, including filename, download link, and size.
|
|
234
308
|
*/
|
|
235
309
|
interface IBodyTypeFile {
|
|
@@ -246,10 +320,19 @@ interface IBodyTypeFile {
|
|
|
246
320
|
*
|
|
247
321
|
* @interface IBodyTypeRadioButtonList
|
|
248
322
|
*
|
|
249
|
-
* @property {string} marker - marker name.
|
|
250
|
-
* @property {
|
|
251
|
-
* @property {array} value - Array of list or radioButton bojects.
|
|
252
|
-
|
|
323
|
+
* @property {string} marker - marker name. Example: "selector".
|
|
324
|
+
* @property {string} type - Type value. Example: 'list'.
|
|
325
|
+
* @property {array} value - Array of list or radioButton bojects. Example:
|
|
326
|
+
[
|
|
327
|
+
{
|
|
328
|
+
"title": "red",
|
|
329
|
+
"value": "1",
|
|
330
|
+
"extended": {
|
|
331
|
+
"value": "red",
|
|
332
|
+
"type": "string"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
]
|
|
253
336
|
* @description Represents a list or radio button selection with multiple options, each containing a title, value, and extended information.
|
|
254
337
|
*/
|
|
255
338
|
interface IBodyTypeRadioButtonList {
|
|
@@ -9,7 +9,6 @@ import type { IGeneralTypes, IGeneralTypesEntity } from './generalTypesInterface
|
|
|
9
9
|
* @class GeneralTypesApi
|
|
10
10
|
* @extends AsyncModules
|
|
11
11
|
* @implements {IGeneralTypes}
|
|
12
|
-
*
|
|
13
12
|
* @description This class provides methods to interact with general types, including retrieving all types.
|
|
14
13
|
*/
|
|
15
14
|
export default class GeneralTypesApi extends AsyncModules implements IGeneralTypes {
|
|
@@ -23,8 +22,7 @@ export default class GeneralTypesApi extends AsyncModules implements IGeneralTyp
|
|
|
23
22
|
*
|
|
24
23
|
* @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
|
|
25
24
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
26
|
-
*
|
|
27
25
|
* @description This method retrieves all general types available in the system.
|
|
28
26
|
*/
|
|
29
|
-
getAllTypes(): Promise<
|
|
27
|
+
getAllTypes(): Promise<IGeneralTypesEntity[] | IError>;
|
|
30
28
|
}
|
|
@@ -11,7 +11,6 @@ const asyncModules_1 = __importDefault(require("../base/asyncModules"));
|
|
|
11
11
|
* @class GeneralTypesApi
|
|
12
12
|
* @extends AsyncModules
|
|
13
13
|
* @implements {IGeneralTypes}
|
|
14
|
-
*
|
|
15
14
|
* @description This class provides methods to interact with general types, including retrieving all types.
|
|
16
15
|
*/
|
|
17
16
|
class GeneralTypesApi extends asyncModules_1.default {
|
|
@@ -26,7 +25,6 @@ class GeneralTypesApi extends asyncModules_1.default {
|
|
|
26
25
|
*
|
|
27
26
|
* @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
|
|
28
27
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
29
|
-
*
|
|
30
28
|
* @description This method retrieves all general types available in the system.
|
|
31
29
|
*/
|
|
32
30
|
async getAllTypes() {
|
|
@@ -6,7 +6,6 @@ import type { IError } from '../base/utils';
|
|
|
6
6
|
* @interface IGeneralTypes
|
|
7
7
|
*
|
|
8
8
|
* @property {function} getAllTypes - Get all types.
|
|
9
|
-
*
|
|
10
9
|
* @description This interface defines a method for retrieving all general types in the system.
|
|
11
10
|
*/
|
|
12
11
|
interface IGeneralTypes {
|
|
@@ -16,7 +15,7 @@ interface IGeneralTypes {
|
|
|
16
15
|
* @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
|
|
17
16
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
18
17
|
*/
|
|
19
|
-
getAllTypes(): Promise<
|
|
18
|
+
getAllTypes(): Promise<IGeneralTypesEntity[] | IError>;
|
|
20
19
|
}
|
|
21
20
|
/**
|
|
22
21
|
* Represents a general type entity.
|
|
@@ -24,8 +23,7 @@ interface IGeneralTypes {
|
|
|
24
23
|
* @interface IGeneralTypesEntity
|
|
25
24
|
*
|
|
26
25
|
* @property {number} id - Type id. Example: 1.
|
|
27
|
-
* @property {Types} type - Types enum. Example:
|
|
28
|
-
*
|
|
26
|
+
* @property {Types} type - Types enum. Example: "product", "category", "etc".
|
|
29
27
|
* @description Represents a general type entity with an identifier and a type.
|
|
30
28
|
*/
|
|
31
29
|
interface IGeneralTypesEntity {
|
package/dist/index.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import BlocksApi from './blocks/blocksApi';
|
|
|
9
9
|
import EventsApi from './events/eventsApi';
|
|
10
10
|
import FileUploadingApi from './file-uploading/fileUploadingApi';
|
|
11
11
|
import FormsApi from './forms/formsApi';
|
|
12
|
-
import FormsDataApi from './
|
|
12
|
+
import FormsDataApi from './forms-data/formsDataApi';
|
|
13
13
|
import GeneralTypesApi from './general-types/generalTypesApi';
|
|
14
14
|
import IntegrationCollectionsApi from './integration-collections/integrationCollectionsApi';
|
|
15
15
|
import LocalesApi from './locales/localesApi';
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ const blocksApi_1 = __importDefault(require("./blocks/blocksApi"));
|
|
|
15
15
|
const eventsApi_1 = __importDefault(require("./events/eventsApi"));
|
|
16
16
|
const fileUploadingApi_1 = __importDefault(require("./file-uploading/fileUploadingApi"));
|
|
17
17
|
const formsApi_1 = __importDefault(require("./forms/formsApi"));
|
|
18
|
-
const formsDataApi_1 = __importDefault(require("./
|
|
18
|
+
const formsDataApi_1 = __importDefault(require("./forms-data/formsDataApi"));
|
|
19
19
|
const generalTypesApi_1 = __importDefault(require("./general-types/generalTypesApi"));
|
|
20
20
|
const integrationCollectionsApi_1 = __importDefault(require("./integration-collections/integrationCollectionsApi"));
|
|
21
21
|
const localesApi_1 = __importDefault(require("./locales/localesApi"));
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import AsyncModules from '../base/asyncModules';
|
|
2
2
|
import type StateModule from '../base/stateModule';
|
|
3
3
|
import type { IError } from '../base/utils';
|
|
4
|
-
import type {
|
|
4
|
+
import type { ICollectionEntity, ICollectionFormObject, ICollectionIsValid, ICollectionRow, ICollectionRowsResponce, ICollectionsApi } from './integrationCollectionsInterfaces';
|
|
5
5
|
/**
|
|
6
6
|
* Controllers for working with attributes.
|
|
7
7
|
*
|
|
@@ -9,7 +9,6 @@ import type { ICollection, ICollectionFormObject, ICollectionResponce, ICollecti
|
|
|
9
9
|
* @class IntegrationCollectionsApi
|
|
10
10
|
* @extends AsyncModules
|
|
11
11
|
* @implements {ICollectionsApi}
|
|
12
|
-
*
|
|
13
12
|
* @description This class provides methods to interact with integration collections, including retrieving all collections, getting a single collection by ID, and managing collection rows.
|
|
14
13
|
*/
|
|
15
14
|
export default class IntegrationCollectionsApi extends AsyncModules implements ICollectionsApi {
|
|
@@ -23,18 +22,27 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
23
22
|
* @handleName getICollections
|
|
24
23
|
*
|
|
25
24
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
26
|
-
* @param {
|
|
25
|
+
* @param {object} [userQuery] - Optional set query parameters. Example:
|
|
26
|
+
{
|
|
27
|
+
"limit": 0,
|
|
28
|
+
"offset": 30,
|
|
29
|
+
"entityType": "orders",
|
|
30
|
+
"entityId": 1
|
|
31
|
+
}
|
|
27
32
|
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
|
|
28
33
|
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {number} [userQuery.entityId] - Entity identifier. Example:
|
|
31
|
-
*
|
|
32
|
-
* @return {ICollection[]} Returns an array of ICollection objects or an error object if there was an issue.
|
|
34
|
+
* @param {string} [userQuery.entityType] - Entity type. Example: "orders".
|
|
35
|
+
* @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
|
|
36
|
+
* @return {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
|
|
33
37
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
34
|
-
*
|
|
35
38
|
* @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.
|
|
36
39
|
*/
|
|
37
|
-
getICollections(langCode?: string, userQuery?:
|
|
40
|
+
getICollections(langCode?: string, userQuery?: {
|
|
41
|
+
limit: number;
|
|
42
|
+
offset: number;
|
|
43
|
+
entityType: string;
|
|
44
|
+
entityId: number;
|
|
45
|
+
}): Promise<ICollectionEntity[] | IError>;
|
|
38
46
|
/**
|
|
39
47
|
* Get a single collection object by id.
|
|
40
48
|
*
|
|
@@ -42,13 +50,11 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
42
50
|
*
|
|
43
51
|
* @param {number} id - Collection id. Example: 1.
|
|
44
52
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
45
|
-
*
|
|
46
|
-
* @return {ICollection} Returns an ICollection object or an error object if there was an issue.
|
|
53
|
+
* @return {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
|
|
47
54
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
48
|
-
*
|
|
49
55
|
* @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.
|
|
50
56
|
*/
|
|
51
|
-
getICollectionById(id: number, langCode?: string): Promise<
|
|
57
|
+
getICollectionById(id: number, langCode?: string): Promise<ICollectionEntity | IError>;
|
|
52
58
|
/**
|
|
53
59
|
* Get all records belonging to the collection by collection id.
|
|
54
60
|
*
|
|
@@ -56,34 +62,41 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
56
62
|
*
|
|
57
63
|
* @param {number} id - Collection id. Example: 1.
|
|
58
64
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
59
|
-
* @param {any} [userQuery] - Optional set query parameters. Example:
|
|
60
|
-
|
|
65
|
+
* @param {any} [userQuery] - Optional set query parameters. Example:
|
|
66
|
+
{
|
|
67
|
+
"limit": 0,
|
|
68
|
+
"offset": 30,
|
|
69
|
+
"entityType": "orders",
|
|
70
|
+
"entityId": 1
|
|
71
|
+
}
|
|
61
72
|
* @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
|
|
62
73
|
* @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
|
|
63
|
-
* @param {number} [userQuery.entityType] - Entity type. Example:
|
|
64
|
-
* @param {number} [userQuery.entityId] - Entity identifier. Example:
|
|
65
|
-
*
|
|
66
|
-
* @return {ICollectionResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
|
|
74
|
+
* @param {number} [userQuery.entityType] - Entity type. Example: "orders".
|
|
75
|
+
* @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
|
|
76
|
+
* @return {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
|
|
67
77
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
68
|
-
*
|
|
69
78
|
* @description Get all records belonging to the collection by collection id.
|
|
70
79
|
*/
|
|
71
|
-
getICollectionRowsById(id: number, langCode?: string, userQuery?:
|
|
80
|
+
getICollectionRowsById(id: number, langCode?: string, userQuery?: {
|
|
81
|
+
limit: number;
|
|
82
|
+
offset: number;
|
|
83
|
+
entityType: string;
|
|
84
|
+
entityId: number;
|
|
85
|
+
}): Promise<ICollectionRowsResponce | IError>;
|
|
72
86
|
/**
|
|
73
87
|
* Check for the existence of a text identifier (marker).
|
|
74
88
|
*
|
|
75
89
|
* @handleName validateICollectionMarker
|
|
76
90
|
*
|
|
77
91
|
* @param {string} marker - Collection marker. Example: "collection1".
|
|
78
|
-
*
|
|
79
|
-
|
|
92
|
+
* @return {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
|
|
93
|
+
{
|
|
94
|
+
"valid": true
|
|
95
|
+
}
|
|
80
96
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
81
|
-
*
|
|
82
|
-
* @description
|
|
97
|
+
* @description Check for the existence of a text identifier (marker).
|
|
83
98
|
*/
|
|
84
|
-
validateICollectionMarker(marker: string): Promise<
|
|
85
|
-
valid: boolean;
|
|
86
|
-
} | IError>;
|
|
99
|
+
validateICollectionMarker(marker: string): Promise<ICollectionIsValid | IError>;
|
|
87
100
|
/**
|
|
88
101
|
* Getting all records from the collection.
|
|
89
102
|
*
|
|
@@ -91,13 +104,11 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
91
104
|
*
|
|
92
105
|
* @param {string} marker - Collection text identifier. Example: "collection1".
|
|
93
106
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
94
|
-
*
|
|
95
|
-
* @return {any} Returns CollectionRowEntity object.
|
|
107
|
+
* @return {ICollectionRowsResponce} Returns CollectionRowEntity object.
|
|
96
108
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
97
|
-
*
|
|
98
109
|
* @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.
|
|
99
110
|
*/
|
|
100
|
-
getICollectionRowsByMarker(marker: string, langCode?: string): Promise<
|
|
111
|
+
getICollectionRowsByMarker(marker: string, langCode?: string): Promise<ICollectionRowsResponce | IError>;
|
|
101
112
|
/**
|
|
102
113
|
* Getting one record from the collection.
|
|
103
114
|
*
|
|
@@ -106,28 +117,36 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
106
117
|
* @param {string} marker - Collection text identifier. Example: "collection1".
|
|
107
118
|
* @param {number} id - Collection record identifier. Example: 1.
|
|
108
119
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
109
|
-
*
|
|
110
|
-
* @return {any} Returns CollectionRowEntity object.
|
|
120
|
+
* @return {ICollectionRow} Returns CollectionRowEntity object.
|
|
111
121
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
112
|
-
*
|
|
113
122
|
* @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.
|
|
114
123
|
*/
|
|
115
|
-
getICollectionRowByMarkerAndId(marker: string, id: number, langCode?: string): Promise<
|
|
124
|
+
getICollectionRowByMarkerAndId(marker: string, id: number, langCode?: string): Promise<ICollectionRow | IError>;
|
|
116
125
|
/**
|
|
117
126
|
* Create a record in the collection.
|
|
118
127
|
*
|
|
119
128
|
* @handleName createICollectionRow
|
|
120
129
|
*
|
|
121
130
|
* @param {string} marker - Collection text identifier. Example: "collection1".
|
|
122
|
-
* @param {ICollectionFormObject} body - Object for creating a record. Example:
|
|
131
|
+
* @param {ICollectionFormObject} body - Object for creating a record. Example:
|
|
132
|
+
{
|
|
133
|
+
"formIdentifier": "collection-form",
|
|
134
|
+
"formData": {
|
|
135
|
+
"en_US": [
|
|
136
|
+
{
|
|
137
|
+
"marker": "collection_marker",
|
|
138
|
+
"type": "string",
|
|
139
|
+
"value": "Collection marker"
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
}
|
|
143
|
+
}
|
|
123
144
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
124
|
-
*
|
|
125
|
-
* @return {any} Returns object of type ICollectionRow.
|
|
145
|
+
* @return {ICollectionRow} Returns object of type ICollectionRow.
|
|
126
146
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
127
|
-
*
|
|
128
147
|
* @description Create a record in the collection.
|
|
129
148
|
*/
|
|
130
|
-
createICollectionRow(marker: string, body: ICollectionFormObject, langCode?: string): Promise<
|
|
149
|
+
createICollectionRow(marker: string, body: ICollectionFormObject, langCode?: string): Promise<ICollectionRow | IError>;
|
|
131
150
|
/**
|
|
132
151
|
* Edit a record in the collection.
|
|
133
152
|
*
|
|
@@ -135,12 +154,22 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
135
154
|
*
|
|
136
155
|
* @param {string} marker - Text identifier of the collection. Example: "collection1".
|
|
137
156
|
* @param {number} id - Row identifier in the collection. Example: 12.
|
|
138
|
-
* @param {object} body - Object for updating a record in the collection. Example:
|
|
157
|
+
* @param {object} body - Object for updating a record in the collection. Example:
|
|
158
|
+
{
|
|
159
|
+
"formIdentifier": "collection-form",
|
|
160
|
+
"formData": {
|
|
161
|
+
"en_US": [
|
|
162
|
+
{
|
|
163
|
+
"marker": "collection_marker",
|
|
164
|
+
"type": "string",
|
|
165
|
+
"value": "Collection marker"
|
|
166
|
+
}
|
|
167
|
+
]
|
|
168
|
+
}
|
|
169
|
+
}
|
|
139
170
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
140
|
-
*
|
|
141
171
|
* @return {ICollectionRow} Returns object of type ICollectionRow.
|
|
142
172
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
143
|
-
*
|
|
144
173
|
* @description Edit a record in the collection.
|
|
145
174
|
*/
|
|
146
175
|
updateICollectionRow(marker: string, id: number, body: {
|
|
@@ -154,11 +183,9 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
|
|
|
154
183
|
*
|
|
155
184
|
* @param {string} marker - text identifier of the collection Example: "collection1".
|
|
156
185
|
* @param {number} id - record identifier in the collection Example: 12.
|
|
157
|
-
*
|
|
158
186
|
* @return {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
|
|
159
187
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
160
|
-
*
|
|
161
|
-
* @description
|
|
188
|
+
* @description Deletion of collection record object
|
|
162
189
|
*/
|
|
163
190
|
deleteICollectionRowByMarkerAndId(marker: string, id: number): Promise<boolean | IError>;
|
|
164
191
|
}
|