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
@@ -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,28 +29,24 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
26
29
  }
27
30
  /**
28
31
  * Get all collections.
29
- *
30
32
  * @handleName getICollections
31
- *
32
- * @param {string} [langCode] - Language code. Default: "en_US".
33
- * @param {object} [userQuery] - Optional set query parameters. Example:
34
- {
35
- "limit": 0,
36
- "offset": 30,
37
- "entityType": "orders",
38
- "entityId": 1
39
- }
40
- * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
41
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
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.
33
+ * @param {string} [langCode] - Language code. Default: "en_US".
34
+ * @param {object} [userQuery] - Optional set query parameters. Example:
35
+ {
36
+ "limit": 0,
37
+ "offset": 30,
38
+ "entityType": "orders",
39
+ "entityId": 1
40
+ }
41
+ * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
42
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
43
+ * @param {string} [userQuery.entityType] - Entity type. Example: "orders".
44
+ * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
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,39 +54,34 @@ 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
- * @param {number} id - Collection id. Example: 1.
62
- * @param {string} [langCode] - Language code. Default: "en_US".
63
- * @return {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
58
+ * @param {number} id - Collection id. Example: 1.
59
+ * @param {string} [langCode] - Language code. Default: "en_US".
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
- * @param {number} id - Collection id. Example: 1.
78
- * @param {string} [langCode] - Language code. Default: "en_US".
79
- * @param {any} [userQuery] - Optional set query parameters. Example:
80
- {
81
- "limit": 0,
82
- "offset": 30,
83
- "entityType": "orders",
84
- "entityId": 1
85
- }
86
- * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
87
- * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
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.
71
+ * @param {number} id - Collection id. Example: 1.
72
+ * @param {string} [langCode] - Language code. Default: "en_US".
73
+ * @param {any} [userQuery] - Optional set query parameters. Example:
74
+ {
75
+ "limit": 0,
76
+ "offset": 30,
77
+ "entityType": "orders",
78
+ "entityId": 1
79
+ }
80
+ * @param {number} [userQuery.limit] - Optional parameter for pagination. Default: 0.
81
+ * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
82
+ * @param {number} [userQuery.entityType] - Entity type. Example: "orders".
83
+ * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
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,14 +96,12 @@ 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
- * @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:
110
- {
111
- "valid": true
112
- }
100
+ * @param {string} marker - Collection marker. Example: "collection1".
101
+ * @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not. Example:
102
+ {
103
+ "valid": true
104
+ }
113
105
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
114
106
  * @description Check for the existence of a text identifier (marker).
115
107
  */
@@ -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
- * @param {string} marker - Collection text identifier. Example: "collection1".
126
- * @param {string} [langCode] - Language code. Default: "en_US".
127
- * @return {ICollectionRowsResponce} Returns CollectionRowEntity object.
115
+ * @param {string} marker - Collection text identifier. Example: "collection1".
116
+ * @param {string} [langCode] - Language code. Default: "en_US".
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
- * @param {string} marker - Collection text identifier. Example: "collection1".
141
- * @param {number} id - Collection record identifier. Example: 1.
142
- * @param {string} [langCode] - Language code. Default: "en_US".
143
- * @return {ICollectionRow} Returns CollectionRowEntity object.
128
+ * @param {string} marker - Collection text identifier. Example: "collection1".
129
+ * @param {number} id - Collection record identifier. Example: 1.
130
+ * @param {string} [langCode] - Language code. Default: "en_US".
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,23 @@ 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
- * @param {string} marker - Collection text identifier. Example: "collection1".
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
- }
170
- * @param {string} [langCode] - Language code. Default: "en_US".
171
- * @return {ICollectionRow} Returns object of type ICollectionRow.
142
+ * @param {string} marker - Collection text identifier. Example: "collection1".
143
+ * @param {ICollectionFormObject} body - Object for creating a record. Example:
144
+ {
145
+ "formIdentifier": "collection-form",
146
+ "formData": {
147
+ "en_US": [
148
+ {
149
+ "marker": "collection_marker",
150
+ "type": "string",
151
+ "value": "Collection marker"
152
+ }
153
+ ]
154
+ }
155
+ }
156
+ * @param {string} [langCode] - Language code. Default: "en_US".
157
+ * @returns {ICollectionRow} Returns object of type ICollectionRow.
172
158
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
173
159
  * @description Create a record in the collection.
174
160
  */
@@ -178,26 +164,26 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
178
164
  }
179
165
  /**
180
166
  * Edit a record in the collection.
181
- *
182
167
  * @handleName updateICollectionRow
183
- *
184
- * @param {string} marker - Text identifier of the collection. Example: "collection1".
185
- * @param {number} id - Row identifier in the collection. Example: 12.
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
- }
199
- * @param {string} [langCode] - Language code. Default: "en_US".
200
- * @return {ICollectionRow} Returns object of type ICollectionRow.
168
+ * @param {string} marker - Text identifier of the collection. Example: "collection1".
169
+ * @param {number} id - Row identifier in the collection. Example: 12.
170
+ * @param {object} body - Object for updating a record in the collection. Example:
171
+ {
172
+ "formIdentifier": "collection-form",
173
+ "formData": {
174
+ "en_US": [
175
+ {
176
+ "marker": "collection_marker",
177
+ "type": "string",
178
+ "value": "Collection marker"
179
+ }
180
+ ]
181
+ }
182
+ }
183
+ * @param {string} body.formIdentifier - Textual identifier of the form. Example: "collection-form".
184
+ * @param {any} body.formData - Object with the form data.
185
+ * @param {string} [langCode] - Language code. Default: "en_US".
186
+ * @returns {ICollectionRow} Returns object of type ICollectionRow.
201
187
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
202
188
  * @description Edit a record in the collection.
203
189
  */
@@ -207,12 +193,10 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
207
193
  }
208
194
  /**
209
195
  * Deletion of collection record object
210
- *
211
196
  * @handleName deleteICollectionRowByMarkerAndId
212
- *
213
- * @param {string} marker - text identifier of the collection Example: "collection1".
214
- * @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)
197
+ * @param {string} marker - text identifier of the collection Example: "collection1".
198
+ * @param {number} id - record identifier in the collection Example: 12.
199
+ * @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
216
200
  * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
217
201
  * @description Deletion of collection record object
218
202
  */