oneentry 1.0.126 → 1.0.127

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 +30 -25
  4. package/dist/admins/adminsApi.js +30 -25
  5. package/dist/admins/adminsInterfaces.d.ts +45 -54
  6. package/dist/attribute-sets/attributeSetsApi.d.ts +26 -27
  7. package/dist/attribute-sets/attributeSetsApi.js +26 -27
  8. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +101 -109
  9. package/dist/auth-provider/authProviderApi.d.ts +132 -158
  10. package/dist/auth-provider/authProviderApi.js +131 -157
  11. package/dist/auth-provider/authProvidersInterfaces.d.ts +241 -237
  12. package/dist/base/asyncModules.d.ts +23 -21
  13. package/dist/base/asyncModules.js +30 -25
  14. package/dist/base/result.d.ts +31 -0
  15. package/dist/base/result.js +32 -1
  16. package/dist/base/stateModule.d.ts +10 -0
  17. package/dist/base/stateModule.js +50 -2
  18. package/dist/base/syncModules.d.ts +41 -49
  19. package/dist/base/syncModules.js +49 -48
  20. package/dist/base/utils.d.ts +38 -7
  21. package/dist/blocks/blocksApi.d.ts +27 -36
  22. package/dist/blocks/blocksApi.js +27 -36
  23. package/dist/blocks/blocksInterfaces.d.ts +92 -97
  24. package/dist/config.d.ts +13 -0
  25. package/dist/config.js +30 -0
  26. package/dist/events/eventsApi.d.ts +16 -33
  27. package/dist/events/eventsApi.js +32 -46
  28. package/dist/events/eventsInterfaces.d.ts +42 -37
  29. package/dist/file-uploading/fileUploadingApi.d.ts +42 -47
  30. package/dist/file-uploading/fileUploadingApi.js +44 -47
  31. package/dist/file-uploading/fileUploadingInterfaces.d.ts +49 -60
  32. package/dist/forms/formsApi.d.ts +15 -14
  33. package/dist/forms/formsApi.js +15 -14
  34. package/dist/forms/formsInterfaces.d.ts +36 -40
  35. package/dist/forms-data/formsDataApi.d.ts +40 -44
  36. package/dist/forms-data/formsDataApi.js +42 -44
  37. package/dist/forms-data/formsDataInterfaces.d.ts +231 -231
  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 +6 -9
  41. package/dist/index.d.ts +12 -13
  42. package/dist/index.js +12 -13
  43. package/dist/integration-collections/integrationCollectionsApi.d.ts +84 -98
  44. package/dist/integration-collections/integrationCollectionsApi.js +86 -102
  45. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +177 -169
  46. package/dist/locales/localesApi.d.ts +7 -3
  47. package/dist/locales/localesApi.js +7 -3
  48. package/dist/locales/localesInterfaces.d.ts +14 -13
  49. package/dist/menus/menusApi.d.ts +9 -5
  50. package/dist/menus/menusApi.js +9 -5
  51. package/dist/menus/menusInterfaces.d.ts +43 -48
  52. package/dist/menus/menusInterfaces.js +1 -0
  53. package/dist/orders/ordersApi.d.ts +62 -70
  54. package/dist/orders/ordersApi.js +62 -71
  55. package/dist/orders/ordersInterfaces.d.ts +238 -203
  56. package/dist/pages/pagesApi.d.ts +67 -80
  57. package/dist/pages/pagesApi.js +71 -81
  58. package/dist/pages/pagesInterfaces.d.ts +164 -160
  59. package/dist/payments/paymentsApi.d.ts +24 -34
  60. package/dist/payments/paymentsApi.js +24 -38
  61. package/dist/payments/paymentsInterfaces.d.ts +82 -76
  62. package/dist/product-statuses/productStatusesApi.d.ts +13 -13
  63. package/dist/product-statuses/productStatusesApi.js +13 -13
  64. package/dist/product-statuses/productStatusesInterfaces.d.ts +29 -27
  65. package/dist/products/productsApi.d.ts +246 -267
  66. package/dist/products/productsApi.js +247 -267
  67. package/dist/products/productsInterfaces.d.ts +333 -339
  68. package/dist/system/systemApi.d.ts +19 -21
  69. package/dist/system/systemApi.js +20 -21
  70. package/dist/system/systemInterfaces.d.ts +14 -3
  71. package/dist/templates/templatesApi.d.ts +13 -16
  72. package/dist/templates/templatesApi.js +13 -16
  73. package/dist/templates/templatesInterfaces.d.ts +30 -29
  74. package/dist/templates-preview/templatesPreviewApi.d.ts +10 -11
  75. package/dist/templates-preview/templatesPreviewApi.js +10 -11
  76. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +61 -64
  77. package/dist/users/usersApi.d.ts +36 -43
  78. package/dist/users/usersApi.js +36 -43
  79. package/dist/users/usersInterfaces.d.ts +92 -96
  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
@@ -1,36 +1,36 @@
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
- *
20
- * @param {string} [langCode] - Language code. Default: "en_US".
21
- * @param {any} [userQuery] - Query parameters. Example:
22
- {
23
- "limit": 30,
24
- "offset": 0,
25
- "entityType": "orders",
26
- "entityId": 1
27
- }
28
- * @param {number} [userQuery.limit] - Parameter for pagination. Default: 0.
29
- * @param {number} [userQuery.offset] - Parameter for pagination. Default: 30.
30
- * @param {string} [userQuery.entityType] - Entity type. Example: "orders".
31
- * @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.
18
+ * @handleName getICollections
19
+ * @param {string} [langCode] - Language code. Default: "en_US".
20
+ * @param {any} [userQuery] - Query parameters. Example:
21
+ {
22
+ "limit": 30,
23
+ "offset": 0,
24
+ "entityType": "orders",
25
+ "entityId": 1
26
+ }
27
+ * @param {number} [userQuery.limit] - Parameter for pagination. Default: 0.
28
+ * @param {number} [userQuery.offset] - Parameter for pagination. Default: 30.
29
+ * @param {string} [userQuery.entityType] - Entity type. Example: "orders".
30
+ * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
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,129 +40,137 @@ interface ICollectionsApi {
40
40
  }): Promise<ICollectionEntity[] | IError>;
41
41
  /**
42
42
  * Get a single collection object by id.
43
- *
44
- * @param {number} id - Collection id. Example: 1.
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.
43
+ * @handleName getICollectionById
44
+ * @param {number} id - Collection id. Example: 1.
45
+ * @param {string} [langCode] - Language code. Default: "en_US".
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
- * @param {number} id - Collection id.
54
- * @param {string} [langCode] - Language code. Default: "en_US".
55
- * @param {any} [userQuery] - Optional set query parameters. Example:
56
- {
57
- "limit": 30,
58
- "offset": 0,
59
- "entityType": "orders",
60
- "entityId": 1
61
- }
62
- * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
63
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
64
- * @param {number} [userQuery.entityType] - Entity type. Example: "orders".
65
- * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
66
- * @return {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
53
+ * @handleName getICollectionRowsById
54
+ * @param {number} id - Collection id.
55
+ * @param {string} [langCode] - Language code. Default: "en_US".
56
+ * @param {any} [userQuery] - Optional set query parameters. Example:
57
+ {
58
+ "limit": 30,
59
+ "offset": 0,
60
+ "entityType": "orders",
61
+ "entityId": 1
62
+ }
63
+ * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 30.
64
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 0.
65
+ * @param {number} [userQuery.entityType] - Entity type. Example: "orders".
66
+ * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
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
- *
73
- * @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:
75
- {
76
- "valid": true
77
- }
74
+ * @handleName validateICollectionMarker
75
+ * @param {string} marker - Collection marker. Example: "collection1".
76
+ * @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
77
+ {
78
+ "valid": true
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
- *
84
- * @param {string} marker - Collection text identifier. Example: "collection1".
85
- * @param {string} [langCode] - Language code. Default: "en_US".
86
- * @return {ICollectionRowsResponce} Returns collection row entity object.
86
+ * @handleName getICollectionRowsByMarker
87
+ * @param {string} marker - Collection text identifier. Example: "collection1".
88
+ * @param {string} [langCode] - Language code. Default: "en_US".
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
- *
93
- * @param {string} marker - Collection text identifier. Example: "collection1".
94
- * @param {number} id - Collection record identifier. Example: 1.
95
- * @param {string} [langCode] - Language code. Default: "en_US".
96
- * @return {ICollectionRow} Returns collection row entity object.
96
+ * @handleName getICollectionRowByMarkerAndId
97
+ * @param {string} marker - Collection text identifier. Example: "collection1".
98
+ * @param {number} id - Collection record identifier. Example: 1.
99
+ * @param {string} [langCode] - Language code. Default: "en_US".
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
- *
103
- * @param {string} marker - Collection text identifier. Example: "collection1".
104
- * @param {ICollectionFormObject} body - Object for creating a record. Example:
105
- {
106
- "formIdentifier": "collection-form",
107
- "formData": {
108
- "en_US": [
109
- {
110
- "marker": "collection_marker",
111
- "type": "string",
112
- "value": "Collection marker"
113
- }
114
- ]
115
- }
116
- }
117
- * @param {string} [langCode] - Language code. Default: "en_US".
118
- * @return {any} Returns object of type ICollectionRow.
107
+ * @handleName createICollectionRow
108
+ * @param {string} marker - Collection text identifier. Example: "collection1".
109
+ * @param {ICollectionFormObject} body - Object for creating a record. Example:
110
+ {
111
+ "formIdentifier": "collection-form",
112
+ "formData": {
113
+ "en_US": [
114
+ {
115
+ "marker": "collection_marker",
116
+ "type": "string",
117
+ "value": "Collection marker"
118
+ }
119
+ ]
120
+ }
121
+ }
122
+ * @param {string} [langCode] - Language code. Default: "en_US".
123
+ * @returns {any} Returns object of type ICollectionRow.
119
124
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
125
+ * @description This method creates a record in the collection.
120
126
  */
121
127
  createICollectionRow(marker: string, body: ICollectionFormObject, langCode: string): Promise<any | IError>;
122
128
  /**
123
129
  * Edit a record in the collection.
124
- *
125
- * @param {string} marker - Text identifier of the collection. Example: "collection1".
126
- * @param {number} id - Row id. Example: 12.
127
- * @param {ICollectionFormObject} body - Object for updating a record in the collection. Example:
128
- {
129
- "formIdentifier": "collection-form",
130
- "formData": {
131
- "en_US": [
132
- {
133
- "marker": "collection_marker",
134
- "type": "string",
135
- "value": "Collection marker"
136
- }
137
- ]
138
- }
139
- }
140
- * @param {string} [langCode] - Language code. Default: "en_US".
141
- * @return {ICollectionRow} Returns object of type ICollectionRow.
130
+ * @handleName updateICollectionRow
131
+ * @param {string} marker - Text identifier of the collection. Example: "collection1".
132
+ * @param {number} id - Row id. Example: 12.
133
+ * @param {ICollectionFormObject} body - Object for updating a record in the collection. Example:
134
+ {
135
+ "formIdentifier": "collection-form",
136
+ "formData": {
137
+ "en_US": [
138
+ {
139
+ "marker": "collection_marker",
140
+ "type": "string",
141
+ "value": "Collection marker"
142
+ }
143
+ ]
144
+ }
145
+ }
146
+ * @param {string} [langCode] - Language code. Default: "en_US".
147
+ * @returns {ICollectionRow} Returns object of type ICollectionRow.
142
148
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
149
+ * @description This method edits a record in the collection.
143
150
  */
144
151
  updateICollectionRow(marker: string, id: number, body: ICollectionFormObject, langCode: string): Promise<any | IError>;
145
152
  /**
146
153
  * Deletion of collection record object
147
- *
148
- * @param {string} marker - text identifier of the collection Example: "collection1".
149
- * @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)
154
+ * @handleName deleteICollectionRowByMarkerAndId
155
+ * @param {string} marker - text identifier of the collection Example: "collection1".
156
+ * @param {number} id - record identifier in the collection Example: 12.
157
+ * @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
151
158
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
159
+ * @description This method deletes a collection record object.
152
160
  */
153
161
  deleteICollectionRowByMarkerAndId(marker: string, id: number): Promise<any | IError>;
154
162
  }
155
163
  /**
164
+ * Collection object
156
165
  * @interface ICollectionEntity
157
- *
158
- * @property {number} id - Object identifier. Example: 1.
159
- * @property {string | null} identifier - Text identifier for record field. Example: "collection1".
160
- * @property {number | null} formId - Identifier for the form used by the order storage. Example: 1234.
161
- * @property {ILocalizeInfo} localizeInfos - Localized information about the collection. Example:
162
- {
163
- "title": "Admins text"
164
- }
165
- * @property {string | null} attributeSetId - Identifier of the set of attributes used by the form attached to the collection. Example: "attributeSet1" or null if not applicable.
166
+ * @property {number} id - Object identifier. Example: 1.
167
+ * @property {string | null} identifier - Text identifier for record field. Example: "collection1".
168
+ * @property {number | null} formId - Identifier for the form used by the order storage. Example: 1234.
169
+ * @property {ILocalizeInfo} localizeInfos - Localized information about the collection. Example:
170
+ {
171
+ "title": "Admins text"
172
+ }
173
+ * @property {string | null} attributeSetId - Identifier of the set of attributes used by the form attached to the collection. Example: "attributeSet1" or null if not applicable.
166
174
  * @property {string | null} selectedAttributeMarkers - Text identifiers of form object attributes for display in the data table. Example: "collection_marker".
167
175
  * @description Represents a collection object with various properties, including identifiers, form information, and localized data.
168
176
  */
@@ -175,16 +183,16 @@ interface ICollectionEntity {
175
183
  selectedAttributeMarkers: string | null;
176
184
  }
177
185
  /**
186
+ * Collection response object
178
187
  * @interface ICollectionResponce
179
- *
180
188
  * @property {ICollectionEntity[]} items - Array of collection objects. Example:
181
- [
182
- {
183
- "id": 1,
184
- "identifier": "collection1"
185
- }
186
- ]
187
- * @property {number} total - Total number of found records. Example: 10.
189
+ [
190
+ {
191
+ "id": 1,
192
+ "identifier": "collection1"
193
+ }
194
+ ]
195
+ * @property {number} total - Total number of found records. Example: 10.
188
196
  * @description Represents a response from the collections API containing a total count and an array of collection objects.
189
197
  */
190
198
  interface ICollectionResponce {
@@ -192,11 +200,11 @@ interface ICollectionResponce {
192
200
  total: number;
193
201
  }
194
202
  /**
203
+ * Collection form data object
195
204
  * @interface ICollectionFormData
196
- *
197
205
  * @property {string} marker - Text identifier (marker) of the form field. Example: "collection_marker".
198
- * @property {string} type - Type of the form field, such as "text", "number", "date", "etc". Example: "number".
199
- * @property {string} value - Value of the form field, which can be a "string", "number", "date", "etc". Example: "Collection marker".
206
+ * @property {string} type - Type of the form field, such as "text", "number", "date", "etc". Example: "number".
207
+ * @property {string} value - Value of the form field, which can be a "string", "number", "date", "etc". Example: "Collection marker".
200
208
  * @description Represents a form data object within a collection, containing a marker, type, and value.
201
209
  */
202
210
  interface ICollectionFormData {
@@ -205,20 +213,20 @@ interface ICollectionFormData {
205
213
  value: string;
206
214
  }
207
215
  /**
216
+ * Collection form object
208
217
  * @interface ICollectionFormObject
209
- *
210
- * @property {string} formIdentifier - Text identifier (marker) of the form. Example: "collection-form".
211
- * @property {Record<string, ICollectionFormData>} formData - An object where keys are form field markers and values are arrays of ICollectionFormData objects. Example:
212
- [
213
- {
214
- "marker": "name_1",
215
- "type": "string",
216
- "value": "Value"
217
- }
218
- ]
219
- * @property {string} formData[index].marker - Text identifier (marker) of the form field. Example: "name_1".
220
- * @property {string} formData[index].type - Type of the form field. Example: "string".
221
- * @property {string} formData[index].value - Value of the form field. Example: "Value".
218
+ * @property {string} formIdentifier - Text identifier (marker) of the form. Example: "collection-form".
219
+ * @property {Record<string, ICollectionFormData>} formData - An object where keys are form field markers and values are arrays of ICollectionFormData objects. Example:
220
+ [
221
+ {
222
+ "marker": "name_1",
223
+ "type": "string",
224
+ "value": "Value"
225
+ }
226
+ ]
227
+ * @property {string} formData[index].marker - Text identifier (marker) of the form field. Example: "name_1".
228
+ * @property {string} formData[index].type - Type of the form field. Example: "string".
229
+ * @property {string} formData[index].value - Value of the form field. Example: "Value".
222
230
  * @description Represents a collection form object that contains a form identifier and associated form data. This interface defines the structure of a collection form object, which includes a form identifier and a set of form data organized by markers.
223
231
  */
224
232
  interface ICollectionFormObject {
@@ -228,24 +236,24 @@ interface ICollectionFormObject {
228
236
  };
229
237
  }
230
238
  /**
239
+ * Collection row object
231
240
  * @interface ICollectionRow
232
- *
233
- * @property {number} id - Object identifier. Example: 1.
234
- * @property {string} createdDate - Date of creation of the record. Example: "2023-01-01T00:00:00Z".
235
- * @property {string} updatedDate - Date of last update of the record. Example: "2023-01-02T00:00:00Z".
236
- * @property {number | null} [collectionId] - collectionId associated with the collection row. Example: "product", "order", "etc".
237
- * @property {ICollectionFormData[]} formData - Array of form data objects associated with the collection row. Example:
238
- [
239
- {
240
- "marker": "name_1",
241
- "type": "string",
242
- "value": "Value"
243
- }
244
- ]
245
- * @property {string | null} entityType - Type of the entity associated with the collection row. Example: "product", "order", "etc".
246
- * @property {number | null} entityId - Identifier of the entity associated with the collection row. Example: 12345.
247
- * @property {string | null} [attributeSetIdentifier] - Identifier of the attribute set used by the form attached to the collection row, or null if not applicable. Example: "attributeSet1" or null.
248
- * @property {string} total - Total count. Example: "1".
241
+ * @property {number} id - Object identifier. Example: 1.
242
+ * @property {string} createdDate - Date of creation of the record. Example: "2023-01-01T00:00:00Z".
243
+ * @property {string} updatedDate - Date of last update of the record. Example: "2023-01-02T00:00:00Z".
244
+ * @property {number | null} [collectionId] - collectionId associated with the collection row. Example: "product", "order", "etc".
245
+ * @property {ICollectionFormData[]} formData - Array of form data objects associated with the collection row. Example:
246
+ [
247
+ {
248
+ "marker": "name_1",
249
+ "type": "string",
250
+ "value": "Value"
251
+ }
252
+ ]
253
+ * @property {string | null} entityType - Type of the entity associated with the collection row. Example: "product", "order", "etc".
254
+ * @property {number | null} entityId - Identifier of the entity associated with the collection row. Example: 12345.
255
+ * @property {string | null} [attributeSetIdentifier] - Identifier of the attribute set used by the form attached to the collection row, or null if not applicable. Example: "attributeSet1" or null.
256
+ * @property {string} total - Total count. Example: "1".
249
257
  * @description Represents a row in a collection, containing various properties such as identifiers, dates, form data, and an optional total value.
250
258
  */
251
259
  interface ICollectionRow {
@@ -257,30 +265,30 @@ interface ICollectionRow {
257
265
  entityType: string | null;
258
266
  entityId: number | null;
259
267
  attributeSetIdentifier?: string | null;
260
- total: string;
268
+ total?: string;
261
269
  }
262
270
  /**
271
+ * Collection rows response object
263
272
  * @interface ICollectionRowsResponce
264
- *
265
273
  * @property {ICollectionRow[]} items - Array of collection row objects. Example:
266
- [
267
- {
268
- "id": 1,
269
- "createdDate": "2025-06-06T19:08:54.616Z",
270
- "updatedDate": "2025-06-06T19:08:54.616Z",
271
- "entityId": null,
272
- "entityType": null,
273
- "formData": [
274
- {
275
- "marker": "name_1",
276
- "type": "string",
277
- "value": "Value"
278
- }
279
- ],
280
- "attributeSetIdentifier": null
281
- }
282
- ]
283
- * @property {number} total - Total number of found records. Example: 10.
274
+ [
275
+ {
276
+ "id": 1,
277
+ "createdDate": "2025-06-06T19:08:54.616Z",
278
+ "updatedDate": "2025-06-06T19:08:54.616Z",
279
+ "entityId": null,
280
+ "entityType": null,
281
+ "formData": [
282
+ {
283
+ "marker": "name_1",
284
+ "type": "string",
285
+ "value": "Value"
286
+ }
287
+ ],
288
+ "attributeSetIdentifier": null
289
+ }
290
+ ]
291
+ * @property {number} total - Total number of found records. Example: 10.
284
292
  * @description Represents a response from the collections API containing a total count and an array of collection row objects.
285
293
  */
286
294
  interface ICollectionRowsResponce {
@@ -288,8 +296,8 @@ interface ICollectionRowsResponce {
288
296
  total: number;
289
297
  }
290
298
  /**
299
+ * Collection is valid object
291
300
  * @interface ICollectionIsValid
292
- *
293
301
  * @property {boolean} valid - Valid marker object. Example: true.
294
302
  * @description Represents a response from the validateICollectionMarker.
295
303
  */
@@ -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,30 +1,31 @@
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
- * @property {number} id - The unique identifier of the locales. Example: 1.
21
- * @property {string} shortCode - The shortCode of locales. Example: "en".
22
- * @property {string} code - The full language code. Example: "en_US".
23
- * @property {string} name - The language name. Example: "English".
24
- * @property {string} nativeName - The native language name. Example: "English".
25
- * @property {boolean} isActive - Active language flag. Example: true.
26
- * @property {string | null} image - The language image. Example: "https://example.com/images/en.png".
27
- * @property {number} position - The language position. Example: 1.
21
+ * @property {number} id - The unique identifier of the locales. Example: 1.
22
+ * @property {string} shortCode - The shortCode of locales. Example: "en".
23
+ * @property {string} code - The full language code. Example: "en_US".
24
+ * @property {string} name - The language name. Example: "English".
25
+ * @property {string} nativeName - The native language name. Example: "English".
26
+ * @property {boolean} isActive - Active language flag. Example: true.
27
+ * @property {string | null} image - The language image. Example: "https://example.com/images/en.png".
28
+ * @property {number} position - The language position. Example: 1.
28
29
  * @description This interface defines the structure of a locales entity, including its identifiers, name, and other properties.
29
30
  */
30
31
  interface ILocalEntity {
@@ -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
- * @param {string} marker - Menu marker. Example: "main_menu".
19
- * @param {string} [langCode] - Language code. Default: "en_US".
20
- * @return {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
22
+ * @param {string} marker - Menu marker. Example: "main_menu".
23
+ * @param {string} [langCode] - Language code. Default: "en_US".
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
- * @param {string} marker - Menu marker. Example: "main_menu".
22
- * @param {string} [langCode] - Language code. Default: "en_US".
23
- * @return {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
25
+ * @param {string} marker - Menu marker. Example: "main_menu".
26
+ * @param {string} [langCode] - Language code. Default: "en_US".
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
  */