oneentry 1.0.123 → 1.0.124

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 (73) hide show
  1. package/dist/admins/adminsApi.d.ts +16 -8
  2. package/dist/admins/adminsApi.js +17 -9
  3. package/dist/admins/adminsInterfaces.d.ts +49 -25
  4. package/dist/attribute-sets/attributeSetsApi.d.ts +43 -21
  5. package/dist/attribute-sets/attributeSetsApi.js +49 -25
  6. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +70 -24
  7. package/dist/auth-provider/authProviderApi.d.ts +94 -83
  8. package/dist/auth-provider/authProviderApi.js +96 -83
  9. package/dist/auth-provider/authProvidersInterfaces.d.ts +188 -10
  10. package/dist/base/asyncModules.d.ts +32 -28
  11. package/dist/base/asyncModules.js +61 -36
  12. package/dist/base/syncModules.d.ts +44 -44
  13. package/dist/base/syncModules.js +65 -63
  14. package/dist/blocks/blocksApi.d.ts +56 -25
  15. package/dist/blocks/blocksApi.js +56 -25
  16. package/dist/blocks/blocksInterfaces.d.ts +71 -22
  17. package/dist/events/eventsApi.d.ts +45 -11
  18. package/dist/events/eventsApi.js +47 -17
  19. package/dist/events/eventsInterfaces.d.ts +44 -2
  20. package/dist/file-uploading/fileUploadingApi.d.ts +44 -24
  21. package/dist/file-uploading/fileUploadingApi.js +46 -27
  22. package/dist/file-uploading/fileUploadingInterfaces.d.ts +63 -14
  23. package/dist/forms/formsApi.d.ts +23 -8
  24. package/dist/forms/formsApi.js +23 -8
  25. package/dist/forms/formsInterfaces.d.ts +62 -15
  26. package/dist/formsData/formsDataApi.d.ts +33 -33
  27. package/dist/formsData/formsDataApi.js +33 -33
  28. package/dist/formsData/formsDataInterfaces.d.ts +123 -35
  29. package/dist/general-types/generalTypesApi.d.ts +12 -1
  30. package/dist/general-types/generalTypesApi.js +12 -1
  31. package/dist/general-types/generalTypesInterfaces.d.ts +18 -5
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/integration-collections/integrationCollectionsApi.d.ts +96 -70
  35. package/dist/integration-collections/integrationCollectionsApi.js +114 -81
  36. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +152 -30
  37. package/dist/locales/localesApi.d.ts +6 -1
  38. package/dist/locales/localesApi.js +6 -1
  39. package/dist/locales/localesInterfaces.d.ts +20 -11
  40. package/dist/menus/menusApi.d.ts +8 -3
  41. package/dist/menus/menusApi.js +8 -3
  42. package/dist/menus/menusInterfaces.d.ts +30 -17
  43. package/dist/orders/ordersApi.d.ts +64 -64
  44. package/dist/orders/ordersApi.js +67 -65
  45. package/dist/orders/ordersInterfaces.d.ts +174 -60
  46. package/dist/pages/pagesApi.d.ts +87 -28
  47. package/dist/pages/pagesApi.js +87 -28
  48. package/dist/pages/pagesInterfaces.d.ts +117 -23
  49. package/dist/payments/paymentsApi.d.ts +56 -22
  50. package/dist/payments/paymentsApi.js +56 -22
  51. package/dist/payments/paymentsInterfaces.d.ts +119 -36
  52. package/dist/product-statuses/productStatusesApi.d.ts +21 -15
  53. package/dist/product-statuses/productStatusesApi.js +21 -18
  54. package/dist/product-statuses/productStatusesInterfaces.d.ts +37 -9
  55. package/dist/products/productsApi.d.ts +137 -157
  56. package/dist/products/productsApi.js +137 -157
  57. package/dist/products/productsInterfaces.d.ts +240 -57
  58. package/dist/system/systemApi.d.ts +29 -10
  59. package/dist/system/systemApi.js +29 -10
  60. package/dist/system/systemInterfaces.d.ts +8 -0
  61. package/dist/templates/templatesApi.d.ts +26 -16
  62. package/dist/templates/templatesApi.js +26 -19
  63. package/dist/templates/templatesInterfaces.d.ts +40 -14
  64. package/dist/templates-preview/templatesPreviewApi.d.ts +18 -14
  65. package/dist/templates-preview/templatesPreviewApi.js +18 -17
  66. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +54 -26
  67. package/dist/users/usersApi.d.ts +37 -33
  68. package/dist/users/usersApi.js +37 -33
  69. package/dist/users/usersInterfaces.d.ts +80 -9
  70. package/dist/web-socket/wsApi.d.ts +6 -3
  71. package/dist/web-socket/wsApi.js +6 -3
  72. package/dist/web-socket/wsInterfaces.d.ts +3 -1
  73. package/package.json +11 -11
@@ -1,26 +1,64 @@
1
1
  import type { IUploadingQuery } from 'file-uploading/fileUploadingInterfaces';
2
2
  import type { IError } from '../base/utils';
3
3
  /**
4
- * Represents a interface object of Forms Api.
4
+ * Interface for retrieving and posting form data in the system.
5
+ *
6
+ * @interface IFormsData
5
7
  *
6
8
  * @property {function} getFormsData - Get all forms data.
7
9
  * @property {function} postFormsData - Find all product page objects with pagination and multiple filtering.
8
10
  * @property {function} getFormsDataByMarker - Get one object of form data by marker.
11
+ *
12
+ * @description This interface defines methods for retrieving and posting form data in the system.
9
13
  */
10
14
  interface IFormsData {
15
+ /**
16
+ * Retrieves all forms data.
17
+ *
18
+ * @param {string} langCode - The language code for localization. Default: "en_US".
19
+ * @param {number} [offset] - Optional offset for pagination. Default: 0.
20
+ * @param {number} [limit] - Optional limit for pagination. Default: 30.
21
+ *
22
+ * @return {IFormsDataEntity} A promise that resolves to a collection of form data entities or an error.
23
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
24
+ */
11
25
  getFormsData(langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
26
+ /**
27
+ * Posts form data to the system.
28
+ *
29
+ * @param {IFormsPost} data - The form data to be posted.
30
+ * @param {string} [langCode] - Optional language code for localization. Default: "en_US".
31
+ *
32
+ * @return {IFormDataEntity} A promise that resolves to a form data entity or an error.
33
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
34
+ */
12
35
  postFormsData(data: IFormsPost, langCode?: string): Promise<IFormDataEntity | IError>;
36
+ /**
37
+ * Retrieves form data by its marker.
38
+ *
39
+ * @param {string} marker - The marker identifying the form data. Example: "contact_form_data".
40
+ * @param {string} langCode - The language code for localization. Default: "en_US".
41
+ * @param {number} [offset] - Optional offset for pagination. Default: 0.
42
+ * @param {number} [limit] - Optional limit for pagination. Default: 30.
43
+ *
44
+ * @returns {IFormsDataEntity} A promise that resolves to a form data entity or an error.
45
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
46
+ */
13
47
  getFormsDataByMarker(marker: string, langCode: string, offset?: number, limit?: number): Promise<IFormsDataEntity | IError>;
14
48
  }
15
49
  /**
16
- * Represents a form data.
50
+ * Represents the structure of a form data entity.
17
51
  *
18
- * @interface
19
- * @property {number} id - The unique identifier of the form page.
20
- * @property {string} formIdentifier - The identifier of the page.
21
- * @property {Date | string} time - The identifier of the form.
22
- * @property {IFormsPost} formData - The identifier of the position.
23
- * @property {string} attributeSetIdentifier - Text identifier (marker) of the used attribute set.
52
+ * @interface IFormDataEntity
53
+ *
54
+ * @property {number} id - The unique identifier of the form page. Example: 12345.
55
+ * @property {string} formIdentifier - The identifier of the page. Example: "contact_form".
56
+ * @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: .
58
+ * @property {string} [attributeSetIdentifier] - Text identifier (marker) of the used attribute set. Example: "product_attributes".
59
+ * @property {string} [actionMessage] - Action message for the form data. Example: "Form submitted successfully".
60
+ *
61
+ * @description This interface defines the structure of a form data entity, including its identifiers, form data, and optional attributes.
24
62
  */
25
63
  interface IFormDataEntity {
26
64
  id: number;
@@ -31,11 +69,14 @@ interface IFormDataEntity {
31
69
  actionMessage?: string;
32
70
  }
33
71
  /**
34
- * Represents a form data.
72
+ * Represents a collection of form data entities.
73
+ *
74
+ * @interface IFormsDataEntity
35
75
  *
36
- * @interface
37
- * @property {number} total - Total number of found records.
38
- * @property {Array<IFormDataEntity>} items
76
+ * @property {number} total - Total number of found records. Example: 100.
77
+ * @property {Array<IFormDataEntity>} items - Array of form data objects. Example: .
78
+ *
79
+ * @description This interface defines the structure of a collection of form data entities, including a total count and an array of items.
39
80
  */
40
81
  interface IFormsDataEntity {
41
82
  total: number;
@@ -46,12 +87,17 @@ interface IFormsDataEntity {
46
87
  */
47
88
  type FormDataType = IBodyTypeStringNumberFloat | IBodyTypeTimeDate | IBodyTypeText | IBodyTypeTextWithHeader | IBodyTypeImageGroupOfImages | IBodyTypeFile | IBodyTypeRadioButtonList | Record<string, any>;
48
89
  /**
49
- * interface to create an object of information about saving data using the form
90
+ * Represents the structure of a form post object.
91
+ *
92
+ * @interface IFormsPost
50
93
  *
51
- * @property {number} id
94
+ * @property {number} [id] - Optional identifier of the form post.
52
95
  * @property {string} formIdentifier - The identifier of the page.
53
- * @property {Date | string} time - Date and time of form modification
96
+ * @property {Date | string} [time] - Date and time of form modification.
54
97
  * @property {Array<FormDataType>} formData - The identifier of the page.
98
+ * @property {IUploadingQuery} [fileQuery] - Optional file query for uploading files.
99
+ *
100
+ * @description This interface defines the structure of a form post object, including its identifiers, time, form data, and optional file query.
55
101
  */
56
102
  interface IFormsPost {
57
103
  id?: number;
@@ -61,9 +107,15 @@ interface IFormsPost {
61
107
  fileQuery?: IUploadingQuery;
62
108
  }
63
109
  /**
64
- * @property {string} marker - marker name
65
- * @property {'string' | 'number' | 'float'} type - Type value
66
- * @property {string} value
110
+ * Represents a form data entity with a simple value.
111
+ *
112
+ * @interface IBodyTypeStringNumberFloat
113
+ *
114
+ * @property {string} marker - marker name.
115
+ * @property {'string' | 'number' | 'float'} type - Type value.
116
+ * @property {string} value - Value of the form data entity, which can be a string, number, or float.
117
+ *
118
+ * @description Represents a form data entity with a marker, type, and value.
67
119
  */
68
120
  interface IBodyTypeStringNumberFloat {
69
121
  marker: string;
@@ -71,9 +123,15 @@ interface IBodyTypeStringNumberFloat {
71
123
  value: string;
72
124
  }
73
125
  /**
74
- * @property {string} marker - marker name
75
- * @property {'date' | 'dateTime' | 'time'} type - Type value
76
- * @property {object} value - Date object. Contains fullDate, formattedValue, formatString
126
+ * Represents a date/time form data entity.
127
+ *
128
+ * @interface IBodyTypeTimeDate
129
+ *
130
+ * @property {string} marker - marker name.
131
+ * @property {'date' | 'dateTime' | 'time'} type - Type value.
132
+ * @property {object} value - Date object. Contains fullDate, formattedValue, formatString.
133
+ *
134
+ * @description Represents a date, dateTime, or time value in a structured format.
77
135
  */
78
136
  interface IBodyTypeTimeDate {
79
137
  marker: string;
@@ -85,9 +143,15 @@ interface IBodyTypeTimeDate {
85
143
  };
86
144
  }
87
145
  /**
88
- * @property {string} marker - marker name
89
- * @property {'text'} type - Type value
90
- * @property {object} value - Text Object. Contains html as string and params
146
+ * Represents a text form data entity.
147
+ *
148
+ * @interface IBodyTypeText
149
+ *
150
+ * @property {string} marker - marker name.
151
+ * @property {'text'} type - Type value.
152
+ * @property {object} value - Text Object. Contains html as string, plain text and params.
153
+ *
154
+ * @description Represents a text value with HTML and plain text representations, along with parameters for editor and image compression settings.
91
155
  */
92
156
  interface IBodyTypeText {
93
157
  marker: string;
@@ -102,9 +166,15 @@ interface IBodyTypeText {
102
166
  };
103
167
  }
104
168
  /**
105
- * @property {string} marker - marker name
106
- * @property {'textWithHeader'} type - Type value
107
- * @property {object} value - Text Object. Contains html as string, header and params
169
+ * Represents a text with header form data entity.
170
+ *
171
+ * @interface IBodyTypeTextWithHeader
172
+ *
173
+ * @property {string} marker - marker name.
174
+ * @property {'textWithHeader'} type - Type value.
175
+ * @property {object} value - Text Object. Contains html as string, header and params.
176
+ *
177
+ * @description Represents a text value with a header, HTML and plain text representations, along with parameters for editor and image compression settings.
108
178
  */
109
179
  interface IBodyTypeTextWithHeader {
110
180
  marker: string;
@@ -120,9 +190,15 @@ interface IBodyTypeTextWithHeader {
120
190
  };
121
191
  }
122
192
  /**
123
- * @property {string} marker - marker name
124
- * @property {'image' | 'groupOfImage'} type - Type value
125
- * @property {object} value - Image Object. Contains image information
193
+ * Represents an image or group of images form data entity.
194
+ *
195
+ * @interface IBodyTypeImageGroupOfImages
196
+ *
197
+ * @property {string} marker - marker name.
198
+ * @property {'image' | 'groupOfImage'} type - Type value.
199
+ * @property {object} value - Image Object. Contains image information.
200
+ *
201
+ * @description Represents an image or a group of images with their details, including filename, download link, size, preview link, and parameters for image compression.
126
202
  */
127
203
  interface IBodyTypeImageGroupOfImages {
128
204
  marker: string;
@@ -146,9 +222,15 @@ interface IBodyTypeImageGroupOfImages {
146
222
  }>;
147
223
  }
148
224
  /**
149
- * @property {string} marker - marker name
150
- * @property {'file'} type - Type value
151
- * @property {object} value - File Object. Contains file information
225
+ * Represents a file form data entity.
226
+ *
227
+ * @interface IBodyTypeFile
228
+ *
229
+ * @property {string} marker - marker name.
230
+ * @property {'file'} type - Type value.
231
+ * @property {object} value - File Object. Contains file information.
232
+ *
233
+ * @description Represents a file with its details, including filename, download link, and size.
152
234
  */
153
235
  interface IBodyTypeFile {
154
236
  marker: string;
@@ -160,9 +242,15 @@ interface IBodyTypeFile {
160
242
  };
161
243
  }
162
244
  /**
163
- * @property {string} marker - marker name
164
- * @property {'file'} type - Type value
245
+ * Represents a radio button or list selection form data entity.
246
+ *
247
+ * @interface IBodyTypeRadioButtonList
248
+ *
249
+ * @property {string} marker - marker name.
250
+ * @property {'file'} type - Type value.
165
251
  * @property {array} value - Array of list or radioButton bojects.
252
+ *
253
+ * @description Represents a list or radio button selection with multiple options, each containing a title, value, and extended information.
166
254
  */
167
255
  interface IBodyTypeRadioButtonList {
168
256
  marker: string;
@@ -4,7 +4,13 @@ import type { IError } from '../base/utils';
4
4
  import type { IGeneralTypes, IGeneralTypesEntity } from './generalTypesInterfaces';
5
5
  /**
6
6
  * Controllers for working with types
7
+ *
7
8
  * @handle /api/content/general-types
9
+ * @class GeneralTypesApi
10
+ * @extends AsyncModules
11
+ * @implements {IGeneralTypes}
12
+ *
13
+ * @description This class provides methods to interact with general types, including retrieving all types.
8
14
  */
9
15
  export default class GeneralTypesApi extends AsyncModules implements IGeneralTypes {
10
16
  protected state: StateModule;
@@ -13,7 +19,12 @@ export default class GeneralTypesApi extends AsyncModules implements IGeneralTyp
13
19
  /**
14
20
  * Get all types.
15
21
  *
16
- * @returns Returns all objects of type GeneralTypeEntity
22
+ * @handleName getAllTypes
23
+ *
24
+ * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
25
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
26
+ *
27
+ * @description This method retrieves all general types available in the system.
17
28
  */
18
29
  getAllTypes(): Promise<Array<IGeneralTypesEntity> | IError>;
19
30
  }
@@ -6,7 +6,13 @@ 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
+ *
9
10
  * @handle /api/content/general-types
11
+ * @class GeneralTypesApi
12
+ * @extends AsyncModules
13
+ * @implements {IGeneralTypes}
14
+ *
15
+ * @description This class provides methods to interact with general types, including retrieving all types.
10
16
  */
11
17
  class GeneralTypesApi extends asyncModules_1.default {
12
18
  constructor(state) {
@@ -16,7 +22,12 @@ class GeneralTypesApi extends asyncModules_1.default {
16
22
  /**
17
23
  * Get all types.
18
24
  *
19
- * @returns Returns all objects of type GeneralTypeEntity
25
+ * @handleName getAllTypes
26
+ *
27
+ * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
28
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
29
+ *
30
+ * @description This method retrieves all general types available in the system.
20
31
  */
21
32
  async getAllTypes() {
22
33
  const result = await this._fetchGet('');
@@ -1,19 +1,32 @@
1
1
  import type { BlockType } from 'blocks/blocksInterfaces';
2
2
  import type { IError } from '../base/utils';
3
3
  /**
4
- * Represents an interface object of General Type Api.
4
+ * Interface for retrieving all general types in the system.
5
+ *
6
+ * @interface IGeneralTypes
5
7
  *
6
8
  * @property {function} getAllTypes - Get all types.
9
+ *
10
+ * @description This interface defines a method for retrieving all general types in the system.
7
11
  */
8
12
  interface IGeneralTypes {
13
+ /**
14
+ * Get all types.
15
+ *
16
+ * @return {IGeneralTypesEntity[]} Returns an array of general types or an error object if there was an issue.
17
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
18
+ */
9
19
  getAllTypes(): Promise<Array<IGeneralTypesEntity> | IError>;
10
20
  }
11
21
  /**
12
- * Represents a general types object.
22
+ * Represents a general type entity.
23
+ *
24
+ * @interface IGeneralTypesEntity
25
+ *
26
+ * @property {number} id - Type id. Example: 1.
27
+ * @property {Types} type - Types enum. Example: 'product', 'category', etc.
13
28
  *
14
- * @interface
15
- * @property {number} id - Type id.
16
- * @property {Types} type - Types enum.
29
+ * @description Represents a general type entity with an identifier and a type.
17
30
  */
18
31
  interface IGeneralTypesEntity {
19
32
  id: number;
package/dist/index.d.ts CHANGED
@@ -66,7 +66,7 @@ interface IDefineApi {
66
66
  * @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
67
  * @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
68
  *
69
- * @returns {IDefineApi} - List of methods set.
69
+ * @return List of methods set.
70
70
  */
71
71
  export declare function defineOneEntry(url: string, config: IConfig): IDefineApi;
72
72
  export {};
package/dist/index.js CHANGED
@@ -44,7 +44,7 @@ const wsApi_1 = __importDefault(require("./web-socket/wsApi"));
44
44
  * @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
45
  * @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
46
  *
47
- * @returns {IDefineApi} - List of methods set.
47
+ * @return List of methods set.
48
48
  */
49
49
  function defineOneEntry(url, config) {
50
50
  const stateModule = new stateModule_1.default(url.endsWith('/') ? url.slice(0, -1) : url, config);
@@ -4,7 +4,13 @@ import type { IError } from '../base/utils';
4
4
  import type { ICollection, ICollectionFormObject, ICollectionResponce, ICollectionRow, ICollectionsApi } from './integrationCollectionsInterfaces';
5
5
  /**
6
6
  * Controllers for working with attributes.
7
+ *
7
8
  * @handle /api/content/integration-collections
9
+ * @class IntegrationCollectionsApi
10
+ * @extends AsyncModules
11
+ * @implements {ICollectionsApi}
12
+ *
13
+ * @description This class provides methods to interact with integration collections, including retrieving all collections, getting a single collection by ID, and managing collection rows.
8
14
  */
9
15
  export default class IntegrationCollectionsApi extends AsyncModules implements ICollectionsApi {
10
16
  protected state: StateModule;
@@ -12,47 +18,68 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
12
18
  constructor(state: StateModule);
13
19
  private _defaultQuery;
14
20
  /**
15
- * Get all collections
21
+ * Get all collections.
16
22
  *
17
- * @param {string} [langCode] - Language code.
23
+ * @handleName getICollections
24
+ *
25
+ * @param {string} [langCode] - Language code. Default: "en_US".
18
26
  * @param {any} [userQuery] - Optional set query parameters.
27
+ * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
28
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
29
+ * @param {number} [userQuery.entityType] - Entity type. Example: 1.
30
+ * @param {number} [userQuery.entityId] - Entity identifier. Example: orders.
19
31
  *
20
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
21
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
32
+ * @return {ICollection[]} Returns an array of ICollection objects or an error object if there was an issue.
33
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
22
34
  *
23
- * @returns Returns an array of ICollections objects.
35
+ * @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.
24
36
  */
25
37
  getICollections(langCode?: string, userQuery?: any): Promise<Array<ICollection> | IError>;
26
38
  /**
27
39
  * Get a single collection object by id.
28
40
  *
29
- * @param {number} [id] - Collection id.
30
- * @param {string} [langCode] - Language code.
41
+ * @handleName getICollectionById
42
+ *
43
+ * @param {number} id - Collection id. Example: 1.
44
+ * @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.
47
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
31
48
  *
32
- * @returns Returns single ICollection object.
49
+ * @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.
33
50
  */
34
51
  getICollectionById(id: number, langCode?: string): Promise<ICollection | IError>;
35
52
  /**
36
53
  * Get all records belonging to the collection by collection id.
37
54
  *
38
- * @param {number} [id] - Collection id.
39
- * @param {string} [langCode] - Language code.
40
- * @param {any} [userQuery] - Optional set query parameters.
55
+ * @handleName getICollectionRowsById
56
+ *
57
+ * @param {number} id - Collection id. Example: 1.
58
+ * @param {string} [langCode] - Language code. Default: "en_US".
59
+ * @param {any} [userQuery] - Optional set query parameters. Example: .
60
+ *
61
+ * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
62
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
63
+ * @param {number} [userQuery.entityType] - Entity type. Example: 1.
64
+ * @param {number} [userQuery.entityId] - Entity identifier. Example: "orders".
41
65
  *
42
- * @param {number} [userQuery.limit] - Optional parameter for pagination, default is 0
43
- * @param {number} [userQuery.offset] - Optional parameter for pagination, default is 30
44
- * @param {number} [userQuery.entityType] - Entity type. Example: 1
45
- * @param {number} [userQuery.entityId] - Entity identifier. Example: orders
66
+ * @return {ICollectionResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
67
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
46
68
  *
47
- * @returns Returns object ItemsWithTotal, where items is an array of requested objects
69
+ * @description Get all records belonging to the collection by collection id.
48
70
  */
49
71
  getICollectionRowsById(id: number, langCode?: string, userQuery?: any): Promise<ICollectionResponce | IError>;
50
72
  /**
51
- * Check for the existence of a text identifier (marker)
73
+ * Check for the existence of a text identifier (marker).
52
74
  *
53
- * @param {string} [marker] - Collection marker.
75
+ * @handleName validateICollectionMarker
54
76
  *
55
- * @returns Returns object with value true if text identifier (marker) exists or false if not
77
+ * @param {string} marker - Collection marker. Example: "collection1".
78
+ *
79
+ * @return {any} Returns an object with a boolean property `valid` indicating whether the marker is valid or not.
80
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
81
+ *
82
+ * @description
56
83
  */
57
84
  validateICollectionMarker(marker: string): Promise<{
58
85
  valid: boolean;
@@ -60,67 +87,61 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
60
87
  /**
61
88
  * Getting all records from the collection.
62
89
  *
63
- * @param {string} [marker] - Collection text identifier
64
- * @param {string} [langCode] - Language code.
90
+ * @handleName getICollectionRowsByMarker
91
+ *
92
+ * @param {string} marker - Collection text identifier. Example: "collection1".
93
+ * @param {string} [langCode] - Language code. Default: "en_US".
65
94
  *
66
- * @returns Returns CollectionRowEntity object.
95
+ * @return {any} Returns CollectionRowEntity object.
96
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
97
+ *
98
+ * @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.
67
99
  */
68
100
  getICollectionRowsByMarker(marker: string, langCode?: string): Promise<any | IError>;
69
101
  /**
70
102
  * Getting one record from the collection.
71
103
  *
72
- * @param {string} [marker] - Collection text identifier
73
- * @param {number} [id] - Collection record identifier
74
- * @param {string} [langCode] - Language code.
104
+ * @handleName getICollectionRowByMarkerAndId
105
+ *
106
+ * @param {string} marker - Collection text identifier. Example: "collection1".
107
+ * @param {number} id - Collection record identifier. Example: 1.
108
+ * @param {string} [langCode] - Language code. Default: "en_US".
75
109
  *
76
- * @returns Returns CollectionRowEntity object.
110
+ * @return {any} Returns CollectionRowEntity object.
111
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
112
+ *
113
+ * @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.
77
114
  */
78
115
  getICollectionRowByMarkerAndId(marker: string, id: number, langCode?: string): Promise<any | IError>;
79
116
  /**
80
- * Create a record in the collection
81
- *
82
- * @param {string} [marker] - Collection text identifier. Example : collection1
83
- * @param {ICollectionFormObject} [body] - Object for creating a record
84
- * const body: ICollectionFormObject = {
85
- "formIdentifier": "collection-form",
86
- "formData": {
87
- "en_US": [
88
- {
89
- "marker": "collection_marker",
90
- "type": "string",
91
- "value": "Collection marker"
92
- }
93
- ]
94
- }
95
- }
96
- * @param {string} [langCode] - Language code.
97
- *
98
- * @description Create a record in the collection
117
+ * Create a record in the collection.
118
+ *
119
+ * @handleName createICollectionRow
120
+ *
121
+ * @param {string} marker - Collection text identifier. Example: "collection1".
122
+ * @param {ICollectionFormObject} body - Object for creating a record. Example: { "formIdentifier": "collection-form", "formData": { "en_US": [ { "marker": "collection_marker", "type": "string", "value": "Collection marker" } ] } }
123
+ * @param {string} [langCode] - Language code. Default: "en_US".
124
+ *
125
+ * @return {any} Returns object of type ICollectionRow.
126
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
127
+ *
128
+ * @description Create a record in the collection.
99
129
  */
100
130
  createICollectionRow(marker: string, body: ICollectionFormObject, langCode?: string): Promise<any | IError>;
101
131
  /**
102
- * Edit a record in the collection
103
- *
104
- * @param {string} [marker] - text identifier of the collection
105
- * @param {number} [id] - row id
106
- * @param {any} [body] - Object for updating a record in the collection
107
- *
108
- * const body = {
109
- "formIdentifier": "collection-form",
110
- "formData": {
111
- "en_US": [
112
- {
113
- "marker": "collection_marker",
114
- "type": "string",
115
- "value": "Collection marker"
116
- }
117
- ]
118
- }
119
- }
120
- *
121
- * @param {string} [langCode] - language code
122
- *
123
- * @returns Returns object
132
+ * Edit a record in the collection.
133
+ *
134
+ * @handleName updateICollectionRow
135
+ *
136
+ * @param {string} marker - Text identifier of the collection. Example: "collection1".
137
+ * @param {number} id - Row identifier in the collection. Example: 12.
138
+ * @param {object} body - Object for updating a record in the collection. Example: { "formIdentifier": "collection-form", "formData": { "en_US": [ { "marker": "collection_marker", "type": "string", "value": "Collection marker" } ] } }
139
+ * @param {string} [langCode] - Language code. Default: "en_US".
140
+ *
141
+ * @return {ICollectionRow} Returns object of type ICollectionRow.
142
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
143
+ *
144
+ * @description Edit a record in the collection.
124
145
  */
125
146
  updateICollectionRow(marker: string, id: number, body: {
126
147
  formIdentifier: string;
@@ -129,10 +150,15 @@ export default class IntegrationCollectionsApi extends AsyncModules implements I
129
150
  /**
130
151
  * Deletion of collection record object
131
152
  *
132
- * @param {string} [marker] - text identifier of the collection Example : collection1
133
- * @param {number} [id] - record identifier in the collection Example : 12
153
+ * @handleName deleteICollectionRowByMarkerAndId
154
+ *
155
+ * @param {string} marker - text identifier of the collection Example: "collection1".
156
+ * @param {number} id - record identifier in the collection Example: 12.
157
+ *
158
+ * @return {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
159
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
134
160
  *
135
- * @returns Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
161
+ * @description
136
162
  */
137
163
  deleteICollectionRowByMarkerAndId(marker: string, id: number): Promise<boolean | IError>;
138
164
  }