oneentry 1.0.124 → 1.0.126

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