oneentry 1.0.126 → 1.0.128

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/README.md +0 -2
  2. package/configure.js +25 -18
  3. package/dist/admins/adminsApi.d.ts +18 -13
  4. package/dist/admins/adminsApi.js +18 -13
  5. package/dist/admins/adminsInterfaces.d.ts +16 -25
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +14 -15
  7. package/dist/attribute-sets/attributeSetsApi.js +14 -15
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +78 -84
  9. package/dist/auth-provider/authProviderApi.d.ts +53 -79
  10. package/dist/auth-provider/authProviderApi.js +52 -78
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +98 -94
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +39 -29
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -5
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +42 -50
  19. package/dist/base/syncModules.js +106 -58
  20. package/dist/base/utils.d.ts +33 -2
  21. package/dist/blocks/blocksApi.d.ts +9 -18
  22. package/dist/blocks/blocksApi.js +9 -18
  23. package/dist/blocks/blocksInterfaces.d.ts +41 -46
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +10 -27
  27. package/dist/events/eventsApi.js +26 -40
  28. package/dist/events/eventsInterfaces.d.ts +33 -28
  29. package/dist/file-uploading/fileUploadingApi.d.ts +12 -17
  30. package/dist/file-uploading/fileUploadingApi.js +14 -17
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +8 -19
  32. package/dist/forms/formsApi.d.ts +10 -9
  33. package/dist/forms/formsApi.js +10 -9
  34. package/dist/forms/formsInterfaces.d.ts +20 -12
  35. package/dist/forms-data/formsDataApi.d.ts +24 -28
  36. package/dist/forms-data/formsDataApi.js +25 -28
  37. package/dist/forms-data/formsDataInterfaces.d.ts +71 -71
  38. package/dist/general-types/generalTypesApi.d.ts +5 -5
  39. package/dist/general-types/generalTypesApi.js +5 -5
  40. package/dist/general-types/generalTypesInterfaces.d.ts +5 -8
  41. package/dist/index.d.ts +3 -4
  42. package/dist/index.js +3 -4
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +29 -47
  44. package/dist/integration-collections/integrationCollectionsApi.js +31 -51
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +62 -58
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +6 -5
  49. package/dist/menus/menusApi.d.ts +7 -3
  50. package/dist/menus/menusApi.js +7 -3
  51. package/dist/menus/menusInterfaces.d.ts +5 -10
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +17 -25
  54. package/dist/orders/ordersApi.js +17 -26
  55. package/dist/orders/ordersInterfaces.d.ts +94 -53
  56. package/dist/pages/pagesApi.d.ts +47 -60
  57. package/dist/pages/pagesApi.js +51 -61
  58. package/dist/pages/pagesInterfaces.d.ts +44 -48
  59. package/dist/payments/paymentsApi.d.ts +17 -27
  60. package/dist/payments/paymentsApi.js +17 -31
  61. package/dist/payments/paymentsInterfaces.d.ts +35 -29
  62. package/dist/product-statuses/productStatusesApi.d.ts +9 -9
  63. package/dist/product-statuses/productStatusesApi.js +9 -9
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +14 -12
  65. package/dist/products/productsApi.d.ts +23 -44
  66. package/dist/products/productsApi.js +24 -44
  67. package/dist/products/productsInterfaces.d.ts +51 -57
  68. package/dist/system/systemApi.d.ts +11 -13
  69. package/dist/system/systemApi.js +12 -13
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +8 -11
  72. package/dist/templates/templatesApi.js +8 -11
  73. package/dist/templates/templatesInterfaces.d.ts +13 -12
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +7 -8
  75. package/dist/templates-preview/templatesPreviewApi.js +7 -8
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +15 -18
  77. package/dist/users/usersApi.d.ts +13 -20
  78. package/dist/users/usersApi.js +13 -20
  79. package/dist/users/usersInterfaces.d.ts +26 -30
  80. package/dist/web-socket/wsApi.d.ts +5 -3
  81. package/dist/web-socket/wsApi.js +6 -3
  82. package/dist/web-socket/wsInterfaces.d.ts +7 -2
  83. package/package.json +16 -12
@@ -2,31 +2,28 @@ import type { IError } from '../base/utils';
2
2
  import type { IUploadingQuery } from '../file-uploading/fileUploadingInterfaces';
3
3
  /**
4
4
  * Interface for retrieving and posting form data in the system.
5
- *
6
5
  * @interface IFormsData
7
- *
8
- * @property {function} getFormsData - Get all forms data.
9
- * @property {function} postFormsData - Find all product page objects with pagination and multiple filtering.
10
- * @property {function} getFormsDataByMarker - Get one object of form data by marker.
6
+ * @property {Function} getFormsData - Get all forms data.
7
+ * @property {Function} postFormsData - Find all product page objects with pagination and multiple filtering.
8
+ * @property {Function} getFormsDataByMarker - Get one object of form data by marker.
11
9
  * @description This interface defines methods for retrieving and posting form data in the system.
12
10
  */
13
11
  interface IFormsData {
14
12
  /**
15
13
  * Retrieves all forms data.
16
- *
14
+ * @handleName getFormsData
17
15
  * @param {string} langCode - The language code for localization. Default: "en_US".
18
16
  * @param {number} [offset] - Optional offset for pagination. Default: 0.
19
- * @param {number} [limit] - Optional limit for pagination. Default: 30.
20
- * @return {IFormsDataEntity} A promise that resolves to a collection of form data entities or an error.
17
+ * @param {number} [limit] - Optional limit for pagination. Default: 30.
18
+ * @returns {IFormsDataEntity} A promise that resolves to a collection of form data entities or an error.
21
19
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
20
+ * @description This method retrieves all forms data.
22
21
  */
23
22
  getFormsData(langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
24
23
  /**
25
24
  * Creating an object of data save information by form
26
- *
27
25
  * @handleName postFormsData
28
- *
29
- * @param {IBodyPostFormData} body - Request body. Example:
26
+ * @param {IBodyPostFormData} body - Request body. Example
30
27
  {
31
28
  "formIdentifier": "form",
32
29
  "formData": [
@@ -38,7 +35,7 @@ interface IFormsData {
38
35
  ]
39
36
  }
40
37
  * @param {string} body.formIdentifier - The identifier for the form. Example: "form".
41
- * @param {FormDataType[]} body.formData - Example:
38
+ * @param {FormDataType[]} body.formData - Form data. Example:
42
39
  [
43
40
  {
44
41
  "marker": "name",
@@ -50,17 +47,17 @@ interface IFormsData {
50
47
  * @param {string} body.formData.type - The type of the form field. Example: "string".
51
48
  * @param {string} body.formData.value - The value of the form field. Example: "Jack".
52
49
  * @param {string} [langCode] - Language code. Default: "en_US".
53
- * @return {IPostFormResponse} Returns an object containing the created form data entry and message.
50
+ * @returns {IPostFormResponse} Returns an object containing the created form data entry and message.
54
51
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
55
52
  * @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.
56
53
  */
57
54
  postFormsData(body: IBodyPostFormData, langCode?: string): Promise<IPostFormResponse | IError>;
58
55
  /**
59
56
  * Retrieves form data by its marker.
60
- *
57
+ * @handleName getFormsDataByMarker
61
58
  * @param {string} marker - The marker identifying the form data. Example: "contact_form_data".
62
- * @param {number} formModuleConfigId - Example: 4.
63
- * @param {object} [body] - Default: {}. Example:
59
+ * @param {number} formModuleConfigId - The form module configuration ID. Example: 4.
60
+ * @param {object} [body] - Request body. Default: {}. Example:
64
61
  {
65
62
  "entityIdentifier": "test",
66
63
  "userIdentifier": "",
@@ -72,16 +69,15 @@ interface IFormsData {
72
69
  * @param {string} [langCode] - The language code for localization. Default: "en_US".
73
70
  * @param {number} [offset] - Optional offset for pagination. Default: 0.
74
71
  * @param {number} [limit] - Optional limit for pagination. Default: 30.
75
- * @returns {IFormsDataEntity} A promise that resolves to a form data entity or an error.
72
+ * @returns {IFormsByMarkerDataEntity} A promise that resolves to a form data entity or an error.
76
73
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
74
+ * @description This method retrieves form data by its marker.
77
75
  */
78
76
  getFormsDataByMarker(marker: string, formModuleConfigId: number, body?: object, isNested?: number, langCode?: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
79
77
  }
80
78
  /**
81
79
  * Represents the structure of a form data entity.
82
- *
83
80
  * @interface IFormDataEntity
84
- *
85
81
  * @property {number} id - The unique identifier of the form page. Example: 12345.
86
82
  * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
87
83
  * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
@@ -107,9 +103,7 @@ interface IFormDataEntity {
107
103
  }
108
104
  /**
109
105
  * Represents a collection of form data entities.
110
- *
111
106
  * @interface IFormsDataEntity
112
- *
113
107
  * @property {IFormDataEntity[]} items - Array of form data objects. Example:
114
108
  [
115
109
  {
@@ -130,14 +124,14 @@ interface IFormsDataEntity {
130
124
  }
131
125
  /**
132
126
  * Represents the structure of a form data entity.
133
- *
134
127
  * @interface IFormByMarkerDataEntity
135
- *
136
128
  * @property {number} id - The unique identifier of the form page. Example: 12345.
137
129
  * @property {null | number} parentId - The unique identifier of the parent form page. Example: 123.
138
130
  * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
139
- * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
140
131
  * @property {number} depth - Example: 1.
132
+ * @property {string | null} [ip] - Ip. Example: '127.0.0.1'.
133
+ * @property {string | null} [status] - Status. Example: 'approved'.
134
+ * @property {string | null} [userIdentifier] - Text identifier (marker) of the user. Example: "admin".
141
135
  * @property {FormDataType[]} formData - Form data. Example:
142
136
  [
143
137
  {
@@ -146,14 +140,11 @@ interface IFormsDataEntity {
146
140
  "value": "Test"
147
141
  }
148
142
  ]
149
- * @property {string | null} [actionMessage] - Action message for the form data. Example: "Form submitted successfully".
150
143
  * @property {string | null} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
151
- * @property {string | null} [ip] - Example: '127.0.0.1'.
152
- * @property {string | null} [status] - Example: ''.
153
- * @property {string | null} [userIdentifier] - Example: ''.
154
- * @property {string} [entityIdentifier] - Example: 'blog'.
155
- * @property {boolean} [isUserAdmin] - Example: false.
156
- * @property {number} [formModuleConfigId] - Example: 2.
144
+ * @property {Date | string} time - The identifier of the form. Example: "2023-10-01T12:00:00Z".
145
+ * @property {string} [entityIdentifier] - Text identifier (marker) of the entity. Example: "test".
146
+ * @property {boolean} [isUserAdmin] - Is user admin. Example: true.
147
+ * @property {number} [formModuleConfigId] - Form module config Id. Example: 2.
157
148
  * @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
158
149
  */
159
150
  interface IFormByMarkerDataEntity {
@@ -161,38 +152,41 @@ interface IFormByMarkerDataEntity {
161
152
  parentId: null | number;
162
153
  formIdentifier: string;
163
154
  depth: number;
164
- time: Date | string;
165
- formData: FormDataType[];
166
- actionMessage?: string | null;
167
- attributeSetIdentifier?: string | null;
168
155
  ip?: string | null;
169
156
  status?: string | null;
170
157
  userIdentifier?: string | null;
158
+ formData: FormDataType[];
159
+ attributeSetIdentifier?: string | null;
160
+ time: Date | string;
171
161
  entityIdentifier: string;
172
162
  isUserAdmin: boolean;
173
163
  formModuleConfigId: number;
174
164
  }
175
165
  /**
176
166
  * Represents a collection of form data entities.
177
- *
178
167
  * @interface IFormsByMarkerDataEntity
179
- *
180
168
  * @property {IFormByMarkerDataEntity[]} items - Array of form data objects. Example:
181
169
  [
182
170
  {
183
- id: 42,
184
- parentId: null,
185
- formIdentifier: 'test-form',
186
- depth: 0,
187
- ip: null,
188
- status: null,
189
- userIdentifier: null,
190
- formData: [{ marker: 'name', type: 'string', value: 'Test' }],
191
- attributeSetIdentifier: 'form',
192
- time: '2025-03-03T15:51:17.458Z',
193
- entityIdentifier: 'blog',
194
- isUserAdmin: false,
195
- formModuleConfigId: 2
171
+ "id": 42,
172
+ "parentId": null,
173
+ "formIdentifier": "test-form",
174
+ "depth": 0,
175
+ "ip": null,
176
+ "status": null,
177
+ "userIdentifier": null,
178
+ "formData": [
179
+ {
180
+ "marker": "name",
181
+ "type": "string",
182
+ "value": "Test"
183
+ }
184
+ ],
185
+ "attributeSetIdentifier": "form",
186
+ "time": "2025-03-03T15:51:17.458Z",
187
+ "entityIdentifier": "blog",
188
+ "isUserAdmin": false,
189
+ "formModuleConfigId": 2
196
190
  }
197
191
  ]
198
192
  * @property {number} total - Total number of found records. Example: 100.
@@ -202,6 +196,28 @@ interface IFormsByMarkerDataEntity {
202
196
  items: IFormByMarkerDataEntity[];
203
197
  total: number;
204
198
  }
199
+ /**
200
+ * Represents the structure of the response after posting form data.
201
+ * @interface IPostFormResponse
202
+ * @property {string} actionMessage - Action message for the form data. Example: "Form submitted successfully".
203
+ * @property {object} formData - Form data. Example:
204
+ * @property {number} formData.id - The unique identifier of the form page. Example: 12345.
205
+ * @property {string} formData.formIdentifier - The identifier of the form. Example: "contact_form".
206
+ * @property {string} formData.time - The time of the form submit. Example: "2023-10-01T12:00:00Z".
207
+ * @property {string} formData.entityIdentifier - The entity identifier. Example: "blog".
208
+ * @property {boolean} formData.isUserAdmin - Is user admin. Example: false.
209
+ * @property {number} formData.formModuleId - The form module identifier. Example: 2.
210
+ * @property {any} formData.parentId - The parent identifier. Example: null.
211
+ * @property {any} formData.userIdentifier - The user identifier. Example: null.
212
+ * @property {FormDataType[]} formData.formData - Form fields data. Example:
213
+ [
214
+ {
215
+ "marker": "name",
216
+ "type": "string",
217
+ "value": "Jack"
218
+ }
219
+ ]
220
+ */
205
221
  interface IPostFormResponse {
206
222
  actionMessage: string;
207
223
  formData: {
@@ -222,14 +238,12 @@ interface IPostFormResponse {
222
238
  type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | Record<string, any>;
223
239
  /**
224
240
  * Represents the structure of the body for posting form data.
225
- *
226
241
  * @interface IBodyPostFormData
227
- *
228
242
  * @property {string} formIdentifier - Text identifier (marker) of the form. Example: "form".
229
- * @property {number} formModuleConfigId - Example: 2.
230
- * @property {string} moduleEntityIdentifier - Example: "blog".
231
- * @property {string | null} replayTo - Example: "".
232
- * @property {string} status - Example: "sent".
243
+ * @property {number} formModuleConfigId - The unique identifier of the form module configuration. Example: 2.
244
+ * @property {string} moduleEntityIdentifier - Text identifier (marker) of the module entity. Example: "blog".
245
+ * @property {string | null} replayTo - Email to reply to. Example: "some@email.com".
246
+ * @property {string} status - Status of the form. Example: "sent".
233
247
  * @property {FormDataType[]} formData - Array of form data objects. Example:
234
248
  [
235
249
  {
@@ -260,9 +274,7 @@ interface IBodyPostFormData {
260
274
  }
261
275
  /**
262
276
  * Represents a form data entity with a simple value.
263
- *
264
277
  * @interface IBodyTypeStringNumberFloat
265
- *
266
278
  * @property {string} marker - marker name. Example: "some_marker".
267
279
  * @property {string} type - Type value. "string" | "number" | "float". Example: "string".
268
280
  * @property {string} value - Value of the form data entity, which can be a "string", "number", or "float". Example: "string".
@@ -275,9 +287,7 @@ interface IBodyTypeStringNumberFloat {
275
287
  }
276
288
  /**
277
289
  * Represents a date/time form data entity.
278
- *
279
290
  * @interface IBodyTypeTimeDate
280
- *
281
291
  * @property {string} marker - marker name. Example: "ome_marker".
282
292
  * @property {string} type - Type value. 'date' | 'dateTime' | 'time' Example: "date".
283
293
  * @property {object} value - Date object. Contains fullDate, formattedValue, formatString. Example:
@@ -299,9 +309,7 @@ interface IBodyTypeTimeDate {
299
309
  }
300
310
  /**
301
311
  * Represents a text form data entity.
302
- *
303
312
  * @interface IBodyTypeText
304
- *
305
313
  * @property {string} marker - marker name. Example: "some_marker".
306
314
  * @property {string} type - Type value. Example: "text".
307
315
  * @property {object} value - Text Object. Contains html as string, plain text and params. Example:
@@ -329,9 +337,7 @@ interface IBodyTypeText {
329
337
  }
330
338
  /**
331
339
  * Represents a text with header form data entity.
332
- *
333
340
  * @interface IBodyTypeTextWithHeader
334
- *
335
341
  * @property {string} marker - marker name. Example: "about".
336
342
  * @property {string} type - Type value. Example: "textWithHeader".
337
343
  * @property {object} value - Text Object. Contains html as string, header and params. Example:
@@ -361,9 +367,7 @@ interface IBodyTypeTextWithHeader {
361
367
  }
362
368
  /**
363
369
  * Represents an image or group of images form data entity.
364
- *
365
370
  * @interface IBodyTypeImageGroupOfImages
366
- *
367
371
  * @property {string} marker - marker name. Example: "avatar".
368
372
  * @property {'image' | 'groupOfImage'} type - Type value. Example: "image".
369
373
  * @property {object} value - Image Object. Contains image information. Example:
@@ -403,9 +407,7 @@ interface IBodyTypeImageGroupOfImages {
403
407
  }
404
408
  /**
405
409
  * Represents a file form data entity.
406
- *
407
410
  * @interface IBodyTypeFile
408
- *
409
411
  * @property {string} marker - marker name. Example: "picture".
410
412
  * @property {'file'} type - Type value. Example: "file".
411
413
  * @property {object} value - File Object. Contains file information. Example:
@@ -429,12 +431,10 @@ interface IBodyTypeFile {
429
431
  }
430
432
  /**
431
433
  * Represents a radio button or list selection form data entity.
432
- *
433
434
  * @interface IBodyTypeRadioButtonList
434
- *
435
435
  * @property {string} marker - marker name. Example: "selector".
436
436
  * @property {string} type - Type value. Example: 'list'.
437
- * @property {array} value - Array of list or radioButton bojects. Example:
437
+ * @property {Array} value - Array of list or radioButton bojects. Example:
438
438
  [
439
439
  {
440
440
  "title": "red",
@@ -4,23 +4,23 @@ import type { IError } from '../base/utils';
4
4
  import type { IGeneralTypes, IGeneralTypesEntity } from './generalTypesInterfaces';
5
5
  /**
6
6
  * Controllers for working with types
7
- *
8
7
  * @handle /api/content/general-types
9
8
  * @class GeneralTypesApi
10
- * @extends AsyncModules
9
+ * @augments AsyncModules
11
10
  * @implements {IGeneralTypes}
12
11
  * @description This class provides methods to interact with general types, including retrieving all types.
13
12
  */
14
13
  export default class GeneralTypesApi extends AsyncModules implements IGeneralTypes {
15
14
  protected state: StateModule;
16
15
  protected _url: string;
16
+ /**
17
+ * Constructor for the GeneralTypesApi class.
18
+ */
17
19
  constructor(state: StateModule);
18
20
  /**
19
21
  * Get all types.
20
- *
21
22
  * @handleName getAllTypes
22
- *
23
- * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
23
+ * @returns {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
24
24
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
25
25
  * @description This method retrieves all general types available in the system.
26
26
  */
@@ -6,24 +6,24 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
7
  /**
8
8
  * Controllers for working with types
9
- *
10
9
  * @handle /api/content/general-types
11
10
  * @class GeneralTypesApi
12
- * @extends AsyncModules
11
+ * @augments AsyncModules
13
12
  * @implements {IGeneralTypes}
14
13
  * @description This class provides methods to interact with general types, including retrieving all types.
15
14
  */
16
15
  class GeneralTypesApi extends asyncModules_1.default {
16
+ /**
17
+ * Constructor for the GeneralTypesApi class.
18
+ */
17
19
  constructor(state) {
18
20
  super(state);
19
21
  this._url = state.url + '/api/content/general-types';
20
22
  }
21
23
  /**
22
24
  * Get all types.
23
- *
24
25
  * @handleName getAllTypes
25
- *
26
- * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
26
+ * @returns {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
27
27
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
28
28
  * @description This method retrieves all general types available in the system.
29
29
  */
@@ -2,29 +2,26 @@ import type { BlockType } from 'blocks/blocksInterfaces';
2
2
  import type { IError } from '../base/utils';
3
3
  /**
4
4
  * Interface for retrieving all general types in the system.
5
- *
6
5
  * @interface IGeneralTypes
7
- *
8
- * @property {function} getAllTypes - Get all types.
6
+ * @property {Function} getAllTypes - Get all types.
9
7
  * @description This interface defines a method for retrieving all general types in the system.
10
8
  */
11
9
  interface IGeneralTypes {
12
10
  /**
13
11
  * Get all types.
14
- *
15
- * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
12
+ * @handleName getAllTypes
13
+ * @returns {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
16
14
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
15
+ * @description This method gets all types.
17
16
  */
18
17
  getAllTypes(): Promise<IGeneralTypesEntity[] | IError>;
19
18
  }
20
19
  /**
21
20
  * Represents a general type entity.
22
- *
23
21
  * @interface IGeneralTypesEntity
24
- *
22
+ * @description Represents a general type entity with an identifier and a type.
25
23
  * @property {number} id - Type id. Example: 1.
26
24
  * @property {Types} type - Types enum. Example: "product", "category", "etc".
27
- * @description Represents a general type entity with an identifier and a type.
28
25
  */
29
26
  interface IGeneralTypesEntity {
30
27
  id: number;
package/dist/index.d.ts CHANGED
@@ -54,8 +54,7 @@ interface IDefineApi {
54
54
  }
55
55
  /**
56
56
  * Define API.
57
- *
58
- * @function
57
+ * @function defineOneEntry
59
58
  * @param {string} url - URl of your project.
60
59
  * @param {IConfig} config - Custom configuration settings
61
60
  * @param {string} [config.token] - Optional token parameter
@@ -65,8 +64,8 @@ interface IDefineApi {
65
64
  * @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
66
65
  * @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
67
66
  * @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
68
- *
69
- * @return List of methods set.
67
+ * @returns {IDefineApi} List of methods set.
68
+ * @description Define API.
70
69
  */
71
70
  export declare function defineOneEntry(url: string, config: IConfig): IDefineApi;
72
71
  export {};
package/dist/index.js CHANGED
@@ -32,8 +32,7 @@ const usersApi_1 = __importDefault(require("./users/usersApi"));
32
32
  const wsApi_1 = __importDefault(require("./web-socket/wsApi"));
33
33
  /**
34
34
  * Define API.
35
- *
36
- * @function
35
+ * @function defineOneEntry
37
36
  * @param {string} url - URl of your project.
38
37
  * @param {IConfig} config - Custom configuration settings
39
38
  * @param {string} [config.token] - Optional token parameter
@@ -43,8 +42,8 @@ const wsApi_1 = __importDefault(require("./web-socket/wsApi"));
43
42
  * @param {boolean} [config.auth.customAuth] - Set this flag to true if you want to configure the authorization process yourself. Set the flag to false, or do not pass it at all to have automatic authorization and token renewal.
44
43
  * @param {string} [config.auth.refreshToken] - Transfer the refresh token here, for example from the local storage, to resume the user's session. Otherwise, the user will need to log in every time a new session is created.
45
44
  * @param {string} [config.auth.saveFunction] - If you want to store the token between sessions, for example in local storage, create a custom function that takes refreshToken as a parameter and executes the necessary instructions. This function will be called every time the tokens are updated.
46
- *
47
- * @return List of methods set.
45
+ * @returns {IDefineApi} List of methods set.
46
+ * @description Define API.
48
47
  */
49
48
  function defineOneEntry(url, config) {
50
49
  const stateModule = new stateModule_1.default(url.endsWith('/') ? url.slice(0, -1) : url, config);
@@ -4,23 +4,23 @@ import type { IError } from '../base/utils';
4
4
  import type { ICollectionEntity, ICollectionFormObject, ICollectionIsValid, ICollectionRow, ICollectionRowsResponce, ICollectionsApi } from './integrationCollectionsInterfaces';
5
5
  /**
6
6
  * Controllers for working with attributes.
7
- *
8
7
  * @handle /api/content/integration-collections
9
8
  * @class IntegrationCollectionsApi
10
- * @extends AsyncModules
9
+ * @augments AsyncModules
11
10
  * @implements {ICollectionsApi}
12
11
  * @description This class provides methods to interact with integration collections, including retrieving all collections, getting a single collection by ID, and managing collection rows.
13
12
  */
14
13
  export default class IntegrationCollectionsApi extends AsyncModules implements ICollectionsApi {
15
14
  protected state: StateModule;
16
15
  protected _url: string;
16
+ /**
17
+ *
18
+ */
17
19
  constructor(state: StateModule);
18
20
  private _defaultQuery;
19
21
  /**
20
22
  * Get all collections.
21
- *
22
23
  * @handleName getICollections
23
- *
24
24
  * @param {string} [langCode] - Language code. Default: "en_US".
25
25
  * @param {object} [userQuery] - Optional set query parameters. Example:
26
26
  {
@@ -33,7 +33,7 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
33
33
  * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
34
34
  * @param {string} [userQuery.entityType] - Entity type. Example: "orders".
35
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.
36
+ * @returns {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
37
37
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
38
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.
39
39
  */
@@ -45,21 +45,17 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
45
45
  }): Promise<ICollectionEntity[] | IError>;
46
46
  /**
47
47
  * Get a single collection object by id.
48
- *
49
48
  * @handleName getICollectionById
50
- *
51
49
  * @param {number} id - Collection id. Example: 1.
52
50
  * @param {string} [langCode] - Language code. Default: "en_US".
53
- * @return {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
51
+ * @returns {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
54
52
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
55
53
  * @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.
56
54
  */
57
55
  getICollectionById(id: number, langCode?: string): Promise<ICollectionEntity | IError>;
58
56
  /**
59
57
  * Get all records belonging to the collection by collection id.
60
- *
61
58
  * @handleName getICollectionRowsById
62
- *
63
59
  * @param {number} id - Collection id. Example: 1.
64
60
  * @param {string} [langCode] - Language code. Default: "en_US".
65
61
  * @param {any} [userQuery] - Optional set query parameters. Example:
@@ -73,7 +69,7 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
73
69
  * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
74
70
  * @param {number} [userQuery.entityType] - Entity type. Example: "orders".
75
71
  * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
76
- * @return {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
72
+ * @returns {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
77
73
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
78
74
  * @description Get all records belonging to the collection by collection id.
79
75
  */
@@ -85,11 +81,9 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
85
81
  }): Promise<ICollectionRowsResponce | IError>;
86
82
  /**
87
83
  * Check for the existence of a text identifier (marker).
88
- *
89
84
  * @handleName validateICollectionMarker
90
- *
91
85
  * @param {string} marker - Collection marker. Example: "collection1".
92
- * @return {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
86
+ * @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
93
87
  {
94
88
  "valid": true
95
89
  }
@@ -99,76 +93,66 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
99
93
  validateICollectionMarker(marker: string): Promise<ICollectionIsValid | IError>;
100
94
  /**
101
95
  * Getting all records from the collection.
102
- *
103
96
  * @handleName getICollectionRowsByMarker
104
- *
105
97
  * @param {string} marker - Collection text identifier. Example: "collection1".
106
98
  * @param {string} [langCode] - Language code. Default: "en_US".
107
- * @return {ICollectionRowsResponce} Returns CollectionRowEntity object.
99
+ * @returns {ICollectionRowsResponce} Returns CollectionRowEntity object.
108
100
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
109
101
  * @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.
110
102
  */
111
103
  getICollectionRowsByMarker(marker: string, langCode?: string): Promise<ICollectionRowsResponce | IError>;
112
104
  /**
113
105
  * Getting one record from the collection.
114
- *
115
106
  * @handleName getICollectionRowByMarkerAndId
116
- *
117
107
  * @param {string} marker - Collection text identifier. Example: "collection1".
118
108
  * @param {number} id - Collection record identifier. Example: 1.
119
109
  * @param {string} [langCode] - Language code. Default: "en_US".
120
- * @return {ICollectionRow} Returns CollectionRowEntity object.
110
+ * @returns {ICollectionRow} Returns CollectionRowEntity object.
121
111
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
122
112
  * @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.
123
113
  */
124
114
  getICollectionRowByMarkerAndId(marker: string, id: number, langCode?: string): Promise<ICollectionRow | IError>;
125
115
  /**
126
116
  * Create a record in the collection.
127
- *
128
117
  * @handleName createICollectionRow
129
- *
130
118
  * @param {string} marker - Collection text identifier. Example: "collection1".
131
119
  * @param {ICollectionFormObject} body - Object for creating a record. Example:
132
120
  {
133
121
  "formIdentifier": "collection-form",
134
- "formData": {
135
- "en_US": [
136
- {
137
- "marker": "collection_marker",
138
- "type": "string",
139
- "value": "Collection marker"
140
- }
141
- ]
142
- }
122
+ "formData": [
123
+ {
124
+ "marker": "collection_marker",
125
+ "type": "string",
126
+ "value": "Collection marker"
127
+ }
128
+ ]
143
129
  }
144
130
  * @param {string} [langCode] - Language code. Default: "en_US".
145
- * @return {ICollectionRow} Returns object of type ICollectionRow.
131
+ * @returns {ICollectionRow} Returns object of type ICollectionRow.
146
132
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
147
133
  * @description Create a record in the collection.
148
134
  */
149
135
  createICollectionRow(marker: string, body: ICollectionFormObject, langCode?: string): Promise<ICollectionRow | IError>;
150
136
  /**
151
137
  * Edit a record in the collection.
152
- *
153
138
  * @handleName updateICollectionRow
154
- *
155
139
  * @param {string} marker - Text identifier of the collection. Example: "collection1".
156
140
  * @param {number} id - Row identifier in the collection. Example: 12.
157
141
  * @param {object} body - Object for updating a record in the collection. Example:
158
142
  {
159
143
  "formIdentifier": "collection-form",
160
- "formData": {
161
- "en_US": [
162
- {
163
- "marker": "collection_marker",
164
- "type": "string",
165
- "value": "Collection marker"
166
- }
167
- ]
168
- }
144
+ "formData": [
145
+ {
146
+ "marker": "collection_marker",
147
+ "type": "string",
148
+ "value": "Collection marker"
149
+ }
150
+ ]
169
151
  }
152
+ * @param {string} body.formIdentifier - Textual identifier of the form. Example: "collection-form".
153
+ * @param {any} body.formData - Object with the form data.
170
154
  * @param {string} [langCode] - Language code. Default: "en_US".
171
- * @return {ICollectionRow} Returns object of type ICollectionRow.
155
+ * @returns {ICollectionRow} Returns object of type ICollectionRow.
172
156
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
173
157
  * @description Edit a record in the collection.
174
158
  */
@@ -178,12 +162,10 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
178
162
  }, langCode?: string): Promise<ICollectionRow | IError>;
179
163
  /**
180
164
  * Deletion of collection record object
181
- *
182
165
  * @handleName deleteICollectionRowByMarkerAndId
183
- *
184
166
  * @param {string} marker - text identifier of the collection Example: "collection1".
185
167
  * @param {number} id - record identifier in the collection Example: 12.
186
- * @return {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
168
+ * @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
187
169
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
188
170
  * @description Deletion of collection record object
189
171
  */