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
@@ -3,17 +3,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
+ /* eslint-disable jsdoc/reject-any-type */
6
7
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
8
  /**
8
9
  * Controllers for working with attributes.
9
- *
10
10
  * @handle /api/content/integration-collections
11
11
  * @class IntegrationCollectionsApi
12
- * @extends AsyncModules
12
+ * @augments AsyncModules
13
13
  * @implements {ICollectionsApi}
14
14
  * @description This class provides methods to interact with integration collections, including retrieving all collections, getting a single collection by ID, and managing collection rows.
15
15
  */
16
16
  class IntegrationCollectionsApi extends asyncModules_1.default {
17
+ /**
18
+ *
19
+ */
17
20
  constructor(state) {
18
21
  super(state);
19
22
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -26,9 +29,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
26
29
  }
27
30
  /**
28
31
  * Get all collections.
29
- *
30
32
  * @handleName getICollections
31
- *
32
33
  * @param {string} [langCode] - Language code. Default: "en_US".
33
34
  * @param {object} [userQuery] - Optional set query parameters. Example:
34
35
  {
@@ -41,13 +42,11 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
41
42
  * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
42
43
  * @param {string} [userQuery.entityType] - Entity type. Example: "orders".
43
44
  * @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.
45
+ * @returns {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
45
46
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
46
47
  * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
47
48
  */
48
- async getICollections(langCode = this.state.lang,
49
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
50
- userQuery) {
49
+ async getICollections(langCode = this.state.lang, userQuery) {
51
50
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
52
51
  const query = { ...this._defaultQuery, ...userQuery, langCode };
53
52
  const result = await this._fetchGet(`?` + this._queryParamsToString(query));
@@ -55,25 +54,20 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
55
54
  }
56
55
  /**
57
56
  * Get a single collection object by id.
58
- *
59
57
  * @handleName getICollectionById
60
- *
61
58
  * @param {number} id - Collection id. Example: 1.
62
59
  * @param {string} [langCode] - Language code. Default: "en_US".
63
- * @return {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
60
+ * @returns {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
64
61
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
65
62
  * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
66
63
  */
67
64
  async getICollectionById(id, langCode = this.state.lang) {
68
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
69
65
  const result = await this._fetchGet(`/${id}?` + this._queryParamsToString({ langCode }));
70
66
  return this._dataPostProcess(result, langCode);
71
67
  }
72
68
  /**
73
69
  * Get all records belonging to the collection by collection id.
74
- *
75
70
  * @handleName getICollectionRowsById
76
- *
77
71
  * @param {number} id - Collection id. Example: 1.
78
72
  * @param {string} [langCode] - Language code. Default: "en_US".
79
73
  * @param {any} [userQuery] - Optional set query parameters. Example:
@@ -87,7 +81,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
87
81
  * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
88
82
  * @param {number} [userQuery.entityType] - Entity type. Example: "orders".
89
83
  * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
90
- * @return {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
84
+ * @returns {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
91
85
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
92
86
  * @description Get all records belonging to the collection by collection id.
93
87
  */
@@ -102,11 +96,9 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
102
96
  }
103
97
  /**
104
98
  * Check for the existence of a text identifier (marker).
105
- *
106
99
  * @handleName validateICollectionMarker
107
- *
108
100
  * @param {string} marker - Collection marker. Example: "collection1".
109
- * @return {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
101
+ * @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
110
102
  {
111
103
  "valid": true
112
104
  }
@@ -119,12 +111,10 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
119
111
  }
120
112
  /**
121
113
  * Getting all records from the collection.
122
- *
123
114
  * @handleName getICollectionRowsByMarker
124
- *
125
115
  * @param {string} marker - Collection text identifier. Example: "collection1".
126
116
  * @param {string} [langCode] - Language code. Default: "en_US".
127
- * @return {ICollectionRowsResponce} Returns CollectionRowEntity object.
117
+ * @returns {ICollectionRowsResponce} Returns CollectionRowEntity object.
128
118
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
129
119
  * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
130
120
  */
@@ -134,13 +124,11 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
134
124
  }
135
125
  /**
136
126
  * Getting one record from the collection.
137
- *
138
127
  * @handleName getICollectionRowByMarkerAndId
139
- *
140
128
  * @param {string} marker - Collection text identifier. Example: "collection1".
141
129
  * @param {number} id - Collection record identifier. Example: 1.
142
130
  * @param {string} [langCode] - Language code. Default: "en_US".
143
- * @return {ICollectionRow} Returns CollectionRowEntity object.
131
+ * @returns {ICollectionRow} Returns CollectionRowEntity object.
144
132
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
145
133
  * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
146
134
  */
@@ -150,25 +138,21 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
150
138
  }
151
139
  /**
152
140
  * Create a record in the collection.
153
- *
154
141
  * @handleName createICollectionRow
155
- *
156
142
  * @param {string} marker - Collection text identifier. Example: "collection1".
157
143
  * @param {ICollectionFormObject} body - Object for creating a record. Example:
158
144
  {
159
145
  "formIdentifier": "collection-form",
160
- "formData": {
161
- "en_US": [
162
- {
163
- "marker": "collection_marker",
164
- "type": "string",
165
- "value": "Collection marker"
166
- }
167
- ]
168
- }
146
+ "formData": [
147
+ {
148
+ "marker": "collection_marker",
149
+ "type": "string",
150
+ "value": "Collection marker"
151
+ }
152
+ ]
169
153
  }
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 Create a record in the collection.
174
158
  */
@@ -178,26 +162,24 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
178
162
  }
179
163
  /**
180
164
  * Edit a record in the collection.
181
- *
182
165
  * @handleName updateICollectionRow
183
- *
184
166
  * @param {string} marker - Text identifier of the collection. Example: "collection1".
185
167
  * @param {number} id - Row identifier in the collection. Example: 12.
186
168
  * @param {object} body - Object for updating a record in the collection. Example:
187
169
  {
188
170
  "formIdentifier": "collection-form",
189
- "formData": {
190
- "en_US": [
191
- {
192
- "marker": "collection_marker",
193
- "type": "string",
194
- "value": "Collection marker"
195
- }
196
- ]
197
- }
171
+ "formData": [
172
+ {
173
+ "marker": "collection_marker",
174
+ "type": "string",
175
+ "value": "Collection marker"
176
+ }
177
+ ]
198
178
  }
179
+ * @param {string} body.formIdentifier - Textual identifier of the form. Example: "collection-form".
180
+ * @param {any} body.formData - Object with the form data.
199
181
  * @param {string} [langCode] - Language code. Default: "en_US".
200
- * @return {ICollectionRow} Returns object of type ICollectionRow.
182
+ * @returns {ICollectionRow} Returns object of type ICollectionRow.
201
183
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
202
184
  * @description Edit a record in the collection.
203
185
  */
@@ -207,12 +189,10 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
207
189
  }
208
190
  /**
209
191
  * Deletion of collection record object
210
- *
211
192
  * @handleName deleteICollectionRowByMarkerAndId
212
- *
213
193
  * @param {string} marker - text identifier of the collection Example: "collection1".
214
194
  * @param {number} id - record identifier in the collection Example: 12.
215
- * @return {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
195
+ * @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
216
196
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
217
197
  * @description Deletion of collection record object
218
198
  */
@@ -1,22 +1,21 @@
1
1
  import type { IError, ILocalizeInfo } from '../base/utils';
2
2
  /**
3
3
  * @interface ICollectionsApi
4
- *
5
- * @property {function} getICollections - Get all collections.
6
- * @property {function} getICollectionById - Get a single collection object.
7
- * @property {function} getICollectionRowsById - Get all records belonging to the collection by collection id.
8
- * @property {function} validateICollectionMarker - Check for the existence of a text identifier (marker).
9
- * @property {function} getICollectionRowsByMarker - Getting all records (row) from the collection.
10
- * @property {function} getICollectionRowByMarkerAndId - Getting one record (rows) from the collection.
11
- * @property {function} createICollectionRow - Create a record (row) in the collection.
12
- * @property {function} updateICollectionRow - Edit a record (row) in the collection.
13
- * @property {function} deleteICollectionRowByMarkerAndId - Deletion of collection record object (row).
4
+ * @property {Function} getICollections - Get all collections.
5
+ * @property {Function} getICollectionById - Get a single collection object.
6
+ * @property {Function} getICollectionRowsById - Get all records belonging to the collection by collection id.
7
+ * @property {Function} validateICollectionMarker - Check for the existence of a text identifier (marker).
8
+ * @property {Function} getICollectionRowsByMarker - Getting all records (row) from the collection.
9
+ * @property {Function} getICollectionRowByMarkerAndId - Getting one record (rows) from the collection.
10
+ * @property {Function} createICollectionRow - Create a record (row) in the collection.
11
+ * @property {Function} updateICollectionRow - Edit a record (row) in the collection.
12
+ * @property {Function} deleteICollectionRowByMarkerAndId - Deletion of collection record object (row).
14
13
  * @description This interface defines methods for managing collections and their records in the system.
15
14
  */
16
15
  interface ICollectionsApi {
17
16
  /**
18
17
  * Get all collections.
19
- *
18
+ * @handleName getICollections
20
19
  * @param {string} [langCode] - Language code. Default: "en_US".
21
20
  * @param {any} [userQuery] - Query parameters. Example:
22
21
  {
@@ -29,8 +28,9 @@ interface ICollectionsApi {
29
28
  * @param {number} [userQuery.offset] - Parameter for pagination. Default: 30.
30
29
  * @param {string} [userQuery.entityType] - Entity type. Example: "orders".
31
30
  * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
32
- * @return {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
31
+ * @returns {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
33
32
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
33
+ * @description This method gets all collections.
34
34
  */
35
35
  getICollections(langCode: string, userQuery?: {
36
36
  limit: number;
@@ -40,16 +40,17 @@ interface ICollectionsApi {
40
40
  }): Promise<ICollectionEntity[] | IError>;
41
41
  /**
42
42
  * Get a single collection object by id.
43
- *
43
+ * @handleName getICollectionById
44
44
  * @param {number} id - Collection id. Example: 1.
45
45
  * @param {string} [langCode] - Language code. Default: "en_US".
46
- * @return {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
46
+ * @returns {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
47
47
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
48
+ * @description This method gets a single collection object by id.
48
49
  */
49
50
  getICollectionById(id: number, langCode: string): Promise<ICollectionEntity | IError>;
50
51
  /**
51
52
  * Get all records belonging to the collection by collection id.
52
- *
53
+ * @handleName getICollectionRowsById
53
54
  * @param {number} id - Collection id.
54
55
  * @param {string} [langCode] - Language code. Default: "en_US".
55
56
  * @param {any} [userQuery] - Optional set query parameters. Example:
@@ -63,98 +64,101 @@ interface ICollectionsApi {
63
64
  * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
64
65
  * @param {number} [userQuery.entityType] - Entity type. Example: "orders".
65
66
  * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
66
- * @return {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
67
+ * @returns {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
67
68
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
69
+ * @description This method gets all records belonging to the collection by collection id.
68
70
  */
69
71
  getICollectionRowsById(id: number, langCode: string, userQuery?: any): Promise<ICollectionRowsResponce | IError>;
70
72
  /**
71
73
  * Check for the existence of a text identifier (marker).
72
- *
74
+ * @handleName validateICollectionMarker
73
75
  * @param {string} marker - Collection marker. Example: "collection1".
74
- * @return {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
76
+ * @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
75
77
  {
76
78
  "valid": true
77
79
  }
78
80
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
81
+ * @description This method checks for the existence of a text identifier (marker).
79
82
  */
80
- validateICollectionMarker(marker: string): Promise<any | IError>;
83
+ validateICollectionMarker(marker: string): Promise<ICollectionIsValid | IError>;
81
84
  /**
82
85
  * Getting all records from the collection.
83
- *
86
+ * @handleName getICollectionRowsByMarker
84
87
  * @param {string} marker - Collection text identifier. Example: "collection1".
85
88
  * @param {string} [langCode] - Language code. Default: "en_US".
86
- * @return {ICollectionRowsResponce} Returns collection row entity object.
89
+ * @returns {ICollectionRowsResponce} Returns collection row entity object.
87
90
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
91
+ * @description This method gets all records from the collection.
88
92
  */
89
93
  getICollectionRowsByMarker(marker: string, langCode?: string): Promise<ICollectionRowsResponce | IError>;
90
94
  /**
91
95
  * Getting one record from the collection.
92
- *
96
+ * @handleName getICollectionRowByMarkerAndId
93
97
  * @param {string} marker - Collection text identifier. Example: "collection1".
94
98
  * @param {number} id - Collection record identifier. Example: 1.
95
99
  * @param {string} [langCode] - Language code. Default: "en_US".
96
- * @return {ICollectionRow} Returns collection row entity object.
100
+ * @returns {ICollectionRow} Returns collection row entity object.
97
101
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
102
+ * @description This method gets one record from the collection.
98
103
  */
99
104
  getICollectionRowByMarkerAndId(marker: string, id: number, langCode: string): Promise<ICollectionRow | IError>;
100
105
  /**
101
106
  * Create a record in the collection.
102
- *
107
+ * @handleName createICollectionRow
103
108
  * @param {string} marker - Collection text identifier. Example: "collection1".
104
109
  * @param {ICollectionFormObject} body - Object for creating a record. Example:
105
110
  {
106
111
  "formIdentifier": "collection-form",
107
- "formData": {
108
- "en_US": [
109
- {
110
- "marker": "collection_marker",
111
- "type": "string",
112
- "value": "Collection marker"
113
- }
114
- ]
115
- }
112
+ "formData": [
113
+ {
114
+ "marker": "collection_marker",
115
+ "type": "string",
116
+ "value": "Collection marker"
117
+ }
118
+ ]
116
119
  }
117
120
  * @param {string} [langCode] - Language code. Default: "en_US".
118
- * @return {any} Returns object of type ICollectionRow.
121
+ * @returns {any} Returns object of type ICollectionRow.
119
122
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
123
+ * @description This method creates a record in the collection.
120
124
  */
121
125
  createICollectionRow(marker: string, body: ICollectionFormObject, langCode: string): Promise<any | IError>;
122
126
  /**
123
127
  * Edit a record in the collection.
124
- *
128
+ * @handleName updateICollectionRow
125
129
  * @param {string} marker - Text identifier of the collection. Example: "collection1".
126
130
  * @param {number} id - Row id. Example: 12.
127
131
  * @param {ICollectionFormObject} body - Object for updating a record in the collection. Example:
128
132
  {
129
133
  "formIdentifier": "collection-form",
130
- "formData": {
131
- "en_US": [
132
- {
133
- "marker": "collection_marker",
134
- "type": "string",
135
- "value": "Collection marker"
136
- }
137
- ]
138
- }
134
+ "formData": [
135
+ {
136
+ "marker": "collection_marker",
137
+ "type": "string",
138
+ "value": "Collection marker"
139
+ }
140
+ ]
139
141
  }
140
142
  * @param {string} [langCode] - Language code. Default: "en_US".
141
- * @return {ICollectionRow} Returns object of type ICollectionRow.
143
+ * @returns {ICollectionRow} Returns object of type ICollectionRow.
142
144
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
145
+ * @description This method edits a record in the collection.
143
146
  */
144
147
  updateICollectionRow(marker: string, id: number, body: ICollectionFormObject, langCode: string): Promise<any | IError>;
145
148
  /**
146
149
  * Deletion of collection record object
147
- *
150
+ * @handleName deleteICollectionRowByMarkerAndId
148
151
  * @param {string} marker - text identifier of the collection Example: "collection1".
149
152
  * @param {number} id - record identifier in the collection Example: 12.
150
- * @return {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
153
+ * @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
151
154
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
155
+ * @description This method deletes a collection record object.
152
156
  */
153
157
  deleteICollectionRowByMarkerAndId(marker: string, id: number): Promise<any | IError>;
154
158
  }
155
159
  /**
160
+ * Collection object
156
161
  * @interface ICollectionEntity
157
- *
158
162
  * @property {number} id - Object identifier. Example: 1.
159
163
  * @property {string | null} identifier - Text identifier for record field. Example: "collection1".
160
164
  * @property {number | null} formId - Identifier for the form used by the order storage. Example: 1234.
@@ -175,8 +179,8 @@ interface ICollectionEntity {
175
179
  selectedAttributeMarkers: string | null;
176
180
  }
177
181
  /**
182
+ * Collection response object
178
183
  * @interface ICollectionResponce
179
- *
180
184
  * @property {ICollectionEntity[]} items - Array of collection objects. Example:
181
185
  [
182
186
  {
@@ -192,8 +196,8 @@ interface ICollectionResponce {
192
196
  total: number;
193
197
  }
194
198
  /**
199
+ * Collection form data object
195
200
  * @interface ICollectionFormData
196
- *
197
201
  * @property {string} marker - Text identifier (marker) of the form field. Example: "collection_marker".
198
202
  * @property {string} type - Type of the form field, such as "text", "number", "date", "etc". Example: "number".
199
203
  * @property {string} value - Value of the form field, which can be a "string", "number", "date", "etc". Example: "Collection marker".
@@ -205,8 +209,8 @@ interface ICollectionFormData {
205
209
  value: string;
206
210
  }
207
211
  /**
212
+ * Collection form object
208
213
  * @interface ICollectionFormObject
209
- *
210
214
  * @property {string} formIdentifier - Text identifier (marker) of the form. Example: "collection-form".
211
215
  * @property {Record<string, ICollectionFormData>} formData - An object where keys are form field markers and values are arrays of ICollectionFormData objects. Example:
212
216
  [
@@ -228,8 +232,8 @@ interface ICollectionFormObject {
228
232
  };
229
233
  }
230
234
  /**
235
+ * Collection row object
231
236
  * @interface ICollectionRow
232
- *
233
237
  * @property {number} id - Object identifier. Example: 1.
234
238
  * @property {string} createdDate - Date of creation of the record. Example: "2023-01-01T00:00:00Z".
235
239
  * @property {string} updatedDate - Date of last update of the record. Example: "2023-01-02T00:00:00Z".
@@ -257,11 +261,11 @@ interface ICollectionRow {
257
261
  entityType: string | null;
258
262
  entityId: number | null;
259
263
  attributeSetIdentifier?: string | null;
260
- total: string;
264
+ total?: string;
261
265
  }
262
266
  /**
267
+ * Collection rows response object
263
268
  * @interface ICollectionRowsResponce
264
- *
265
269
  * @property {ICollectionRow[]} items - Array of collection row objects. Example:
266
270
  [
267
271
  {
@@ -272,9 +276,9 @@ interface ICollectionRow {
272
276
  "entityType": null,
273
277
  "formData": [
274
278
  {
275
- "marker": "name_1",
276
- "type": "string",
277
- "value": "Value"
279
+ "marker": "name_1",
280
+ "type": "string",
281
+ "value": "Value"
278
282
  }
279
283
  ],
280
284
  "attributeSetIdentifier": null
@@ -288,8 +292,8 @@ interface ICollectionRowsResponce {
288
292
  total: number;
289
293
  }
290
294
  /**
295
+ * Collection is valid object
291
296
  * @interface ICollectionIsValid
292
- *
293
297
  * @property {boolean} valid - Valid marker object. Example: true.
294
298
  * @description Represents a response from the validateICollectionMarker.
295
299
  */
@@ -5,17 +5,21 @@ import type { ILocalEntity, ILocales } from './localesInterfaces';
5
5
  /**
6
6
  * Controllers for working with localizations (content language)
7
7
  * @handle /api/content/locales
8
+ * @description Controllers for working with localizations (content language)
8
9
  */
9
10
  export default class LocalesApi extends AsyncModules implements ILocales {
10
11
  protected state: StateModule;
11
12
  protected _url: string;
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - StateModule instance
16
+ * @description Constructor initializes the LocalesApi with a given state.
17
+ */
12
18
  constructor(state: StateModule);
13
19
  /**
14
20
  * Find all active language localization objects.
15
- *
16
21
  * @handleName getLocales
17
- *
18
- * @return {ILocalEntity[]} Returns an array of LocaleEntity objects.
22
+ * @returns {ILocalEntity[]} Returns an array of LocaleEntity objects.
19
23
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
20
24
  * @description Find all active language localization objects.
21
25
  */
@@ -7,18 +7,22 @@ const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
7
  /**
8
8
  * Controllers for working with localizations (content language)
9
9
  * @handle /api/content/locales
10
+ * @description Controllers for working with localizations (content language)
10
11
  */
11
12
  class LocalesApi extends asyncModules_1.default {
13
+ /**
14
+ * Constructor
15
+ * @param {StateModule} state - StateModule instance
16
+ * @description Constructor initializes the LocalesApi with a given state.
17
+ */
12
18
  constructor(state) {
13
19
  super(state);
14
20
  this._url = state.url + '/api/content/locales';
15
21
  }
16
22
  /**
17
23
  * Find all active language localization objects.
18
- *
19
24
  * @handleName getLocales
20
- *
21
- * @return {ILocalEntity[]} Returns an array of LocaleEntity objects.
25
+ * @returns {ILocalEntity[]} Returns an array of LocaleEntity objects.
22
26
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
23
27
  * @description Find all active language localization objects.
24
28
  */
@@ -1,22 +1,23 @@
1
1
  import type { IError } from '../base/utils';
2
2
  /**
3
+ * The `ILocales` interface defines methods for working with language localization objects in the system.
3
4
  * @interface ILocales
4
- *
5
- * @property {function} getLocales - Find all active language localization objects.
5
+ * @property {Function} getLocales - Find all active language localization objects.
6
6
  * @description This interface defines a method for retrieving all active language localization objects in the system.
7
7
  */
8
8
  interface ILocales {
9
9
  /**
10
10
  * Find all active language localization objects.
11
- *
12
- * @return {ILocalEntity[]} Returns an array of LocaleEntity objects.
11
+ * @handleName getLocales
12
+ * @returns {ILocalEntity[]} Returns an array of LocaleEntity objects.
13
13
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
14
+ * @description This method finds all active language localization objects.
14
15
  */
15
16
  getLocales(): Promise<ILocalEntity[] | IError>;
16
17
  }
17
18
  /**
19
+ * The `ILocalEntity` interface defines the structure of a locales entity, including its identifiers, name, and other properties.
18
20
  * @interface ILocalEntity
19
- *
20
21
  * @property {number} id - The unique identifier of the locales. Example: 1.
21
22
  * @property {string} shortCode - The shortCode of locales. Example: "en".
22
23
  * @property {string} code - The full language code. Example: "en_US".
@@ -5,19 +5,23 @@ import type { IMenus, IMenusEntity } from './menusInterfaces';
5
5
  /**
6
6
  * Controllers for working with menu objects
7
7
  * @handle /api/content/menus
8
+ * @description Controllers for working with menu objects
8
9
  */
9
10
  export default class MenusApi extends AsyncModules implements IMenus {
10
11
  protected state: StateModule;
11
12
  protected _url: string;
13
+ /**
14
+ * Constructor initializes the MenusApi with a given state.
15
+ * @param {StateModule} state - The state module.
16
+ * @description Constructor initializes the MenusApi with a given state.
17
+ */
12
18
  constructor(state: StateModule);
13
19
  /**
14
20
  * Get pages includes in menu by marker.
15
- *
16
21
  * @handleName getMenusByMarker
17
- *
18
22
  * @param {string} marker - Menu marker. Example: "main_menu".
19
23
  * @param {string} [langCode] - Language code. Default: "en_US".
20
- * @return {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
24
+ * @returns {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
21
25
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
22
26
  * @description Get pages includes in menu by marker.
23
27
  */
@@ -7,20 +7,24 @@ const asyncModules_1 = __importDefault(require("../base/asyncModules"));
7
7
  /**
8
8
  * Controllers for working with menu objects
9
9
  * @handle /api/content/menus
10
+ * @description Controllers for working with menu objects
10
11
  */
11
12
  class MenusApi extends asyncModules_1.default {
13
+ /**
14
+ * Constructor initializes the MenusApi with a given state.
15
+ * @param {StateModule} state - The state module.
16
+ * @description Constructor initializes the MenusApi with a given state.
17
+ */
12
18
  constructor(state) {
13
19
  super(state);
14
20
  this._url = state.url + '/api/content/menus';
15
21
  }
16
22
  /**
17
23
  * Get pages includes in menu by marker.
18
- *
19
24
  * @handleName getMenusByMarker
20
- *
21
25
  * @param {string} marker - Menu marker. Example: "main_menu".
22
26
  * @param {string} [langCode] - Language code. Default: "en_US".
23
- * @return {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
27
+ * @returns {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
24
28
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
25
29
  * @description Get pages includes in menu by marker.
26
30
  */