oneentry 1.0.137 → 1.0.138

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 (70) hide show
  1. package/dist/admins/adminsApi.d.ts +2 -2
  2. package/dist/admins/adminsApi.js +2 -2
  3. package/dist/admins/adminsInterfaces.d.ts +1 -1
  4. package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
  5. package/dist/attribute-sets/attributeSetsApi.js +8 -8
  6. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +3 -3
  7. package/dist/auth-provider/authProviderApi.d.ts +33 -33
  8. package/dist/auth-provider/authProviderApi.js +33 -33
  9. package/dist/auth-provider/authProvidersInterfaces.d.ts +12 -62
  10. package/dist/base/asyncModules.js +4 -50
  11. package/dist/base/stateModule.d.ts +1 -0
  12. package/dist/base/stateModule.js +16 -15
  13. package/dist/base/syncModules.d.ts +6 -0
  14. package/dist/base/syncModules.js +48 -5
  15. package/dist/base/utils.d.ts +15 -8
  16. package/dist/blocks/blocksApi.d.ts +10 -10
  17. package/dist/blocks/blocksApi.js +10 -10
  18. package/dist/blocks/blocksInterfaces.d.ts +1 -0
  19. package/dist/events/eventsApi.d.ts +5 -5
  20. package/dist/events/eventsApi.js +5 -5
  21. package/dist/events/eventsInterfaces.d.ts +25 -15
  22. package/dist/file-uploading/fileUploadingApi.d.ts +6 -6
  23. package/dist/file-uploading/fileUploadingApi.js +6 -6
  24. package/dist/forms/formsApi.d.ts +4 -4
  25. package/dist/forms/formsApi.js +4 -4
  26. package/dist/forms/formsInterfaces.d.ts +1 -0
  27. package/dist/forms-data/formsDataApi.d.ts +10 -10
  28. package/dist/forms-data/formsDataApi.js +10 -10
  29. package/dist/forms-data/formsDataInterfaces.d.ts +24 -24
  30. package/dist/forms-data/formsDataSchemas.d.ts +36 -28
  31. package/dist/forms-data/formsDataSchemas.js +16 -13
  32. package/dist/general-types/generalTypesApi.d.ts +2 -2
  33. package/dist/general-types/generalTypesApi.js +2 -2
  34. package/dist/index.d.ts +23 -1
  35. package/dist/integration-collections/integrationCollectionsApi.d.ts +17 -17
  36. package/dist/integration-collections/integrationCollectionsApi.js +17 -17
  37. package/dist/locales/localesApi.d.ts +2 -2
  38. package/dist/locales/localesApi.js +2 -2
  39. package/dist/menus/menusApi.d.ts +2 -2
  40. package/dist/menus/menusApi.js +2 -2
  41. package/dist/menus/menusInterfaces.d.ts +2 -2
  42. package/dist/orders/ordersApi.d.ts +12 -12
  43. package/dist/orders/ordersApi.js +12 -12
  44. package/dist/orders/ordersInterfaces.d.ts +2 -1
  45. package/dist/pages/pagesApi.d.ts +20 -20
  46. package/dist/pages/pagesApi.js +20 -20
  47. package/dist/pages/pagesInterfaces.d.ts +10 -7
  48. package/dist/payments/paymentsApi.d.ts +13 -13
  49. package/dist/payments/paymentsApi.js +12 -12
  50. package/dist/payments/paymentsInterfaces.d.ts +8 -2
  51. package/dist/payments/paymentsSchemas.d.ts +22 -6
  52. package/dist/payments/paymentsSchemas.js +6 -3
  53. package/dist/product-statuses/productStatusesApi.d.ts +6 -6
  54. package/dist/product-statuses/productStatusesApi.js +6 -6
  55. package/dist/products/productsApi.d.ts +29 -28
  56. package/dist/products/productsApi.js +31 -30
  57. package/dist/products/productsInterfaces.d.ts +26 -21
  58. package/dist/system/systemApi.d.ts +10 -10
  59. package/dist/system/systemApi.js +10 -10
  60. package/dist/templates/templatesApi.d.ts +6 -6
  61. package/dist/templates/templatesApi.js +6 -6
  62. package/dist/templates-preview/templatesPreviewApi.d.ts +3 -3
  63. package/dist/templates-preview/templatesPreviewApi.js +3 -3
  64. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +1 -0
  65. package/dist/users/usersApi.d.ts +18 -18
  66. package/dist/users/usersApi.js +18 -18
  67. package/dist/users/usersInterfaces.d.ts +8 -10
  68. package/package.json +34 -11
  69. package/dist/config.d.ts +0 -21
  70. package/dist/config.js +0 -48
@@ -43,7 +43,7 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
43
43
  * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
44
44
  * @param {string} [userQuery.entityType] - Entity type. Example: "orders".
45
45
  * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
46
- * @returns {ICollectionEntity[]} Returns an array of ICollection objects or an error object if there was an issue.
46
+ * @returns {Promise<ICollectionEntity[] | IError>} Returns an array of ICollection objects or an error object if there was an issue.
47
47
  */
48
48
  async getICollections(langCode = this.state.lang, userQuery) {
49
49
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -58,8 +58,8 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
58
58
  * @handleName getICollectionById
59
59
  * @param {number} id - Collection id. Example: 1.
60
60
  * @param {string} [langCode] - Language code. Default: "en_US".
61
- * @returns {ICollectionEntity} Returns an ICollection object or an error object if there was an issue.
62
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
61
+ * @returns {Promise<ICollectionEntity | IError>} Returns an ICollection object or an error object if there was an issue.
62
+ * @throws {IError} When isShell=false and an error occurs during the fetch
63
63
  */
64
64
  async getICollectionById(id, langCode = this.state.lang) {
65
65
  const result = await this._fetchGet(`/${id}?` + this._queryParamsToString({ langCode }));
@@ -84,8 +84,8 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
84
84
  * @param {number} [userQuery.offset] - Optional parameter for pagination. Default: 30.
85
85
  * @param {number} [userQuery.entityType] - Entity type. Example: "orders".
86
86
  * @param {number} [userQuery.entityId] - Entity identifier. Example: 1.
87
- * @returns {ICollectionRowsResponce} Returns object ItemsWithTotal, where items is an array of requested objects.
88
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
87
+ * @returns {Promise<ICollectionRowsResponce | IError>} Returns object ItemsWithTotal, where items is an array of requested objects.
88
+ * @throws {IError} When isShell=false and an error occurs during the fetch
89
89
  * @description Get all records belonging to the collection by collection id.
90
90
  */
91
91
  async getICollectionRowsById(id, langCode = this.state.lang, userQuery) {
@@ -103,12 +103,12 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
103
103
  * Check for the existence of a text identifier (marker).
104
104
  * @handleName validateICollectionMarker
105
105
  * @param {string} marker - Collection marker. Example: "collection1".
106
- * @returns {ICollectionIsValid} Returns an object with a boolean property `valid` indicating whether the marker is valid or not.
106
+ * @returns {Promise<ICollectionIsValid | IError>} Returns an object with a boolean property `valid` indicating whether the marker is valid or not.
107
107
  * @example
108
108
  {
109
109
  "valid": true
110
110
  }
111
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
111
+ * @throws {IError} When isShell=false and an error occurs during the fetch
112
112
  * @description Check for the existence of a text identifier (marker).
113
113
  */
114
114
  async validateICollectionMarker(marker) {
@@ -122,8 +122,8 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
122
122
  * @handleName getICollectionRowsByMarker
123
123
  * @param {string} marker - Collection text identifier. Example: "collection1".
124
124
  * @param {string} [langCode] - Language code. Default: "en_US".
125
- * @returns {ICollectionRowsResponce} Returns CollectionRowEntity object.
126
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
125
+ * @returns {Promise<ICollectionRowsResponce | IError>} Returns CollectionRowEntity object.
126
+ * @throws {IError} When isShell=false and an error occurs during the fetch
127
127
  */
128
128
  async getICollectionRowsByMarker(marker, langCode = this.state.lang) {
129
129
  const result = await this._fetchGet(`/marker/${marker}/rows?langCode=${langCode}`);
@@ -137,8 +137,8 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
137
137
  * @param {string} marker - Collection text identifier. Example: "collection1".
138
138
  * @param {number} id - Collection record identifier. Example: 1.
139
139
  * @param {string} [langCode] - Language code. Default: "en_US".
140
- * @returns {ICollectionRow} Returns CollectionRowEntity object.
141
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
140
+ * @returns {Promise<ICollectionRow | IError>} Returns CollectionRowEntity object.
141
+ * @throws {IError} When isShell=false and an error occurs during the fetch
142
142
  */
143
143
  async getICollectionRowByMarkerAndId(marker, id, langCode = this.state.lang) {
144
144
  const result = await this._fetchGet(`/marker/${marker}/rows/${id}?langCode=${langCode}`);
@@ -163,8 +163,8 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
163
163
  ]
164
164
  }
165
165
  * @param {string} [langCode] - Language code. Default: "en_US".
166
- * @returns {ICollectionRow} Returns object of type ICollectionRow.
167
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
166
+ * @returns {Promise<ICollectionRow | IError>} Returns object of type ICollectionRow.
167
+ * @throws {IError} When isShell=false and an error occurs during the fetch
168
168
  * @description Create a record in the collection.
169
169
  */
170
170
  async createICollectionRow(marker, body, langCode = this.state.lang) {
@@ -193,8 +193,8 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
193
193
  * @param {string} body.formIdentifier - Textual identifier of the form. Example: "collection-form".
194
194
  * @param {any} body.formData - Object with the form data.
195
195
  * @param {string} [langCode] - Language code. Default: "en_US".
196
- * @returns {ICollectionRow} Returns object of type ICollectionRow.
197
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
196
+ * @returns {Promise<ICollectionRow | IError>} Returns object of type ICollectionRow.
197
+ * @throws {IError} When isShell=false and an error occurs during the fetch
198
198
  * @description Edit a record in the collection.
199
199
  */
200
200
  async updateICollectionRow(marker, id, body, langCode = this.state.lang) {
@@ -208,8 +208,8 @@ class IntegrationCollectionsApi extends asyncModules_1.default {
208
208
  * @handleName deleteICollectionRowByMarkerAndId
209
209
  * @param {string} marker - text identifier of the collection Example: "collection1".
210
210
  * @param {number} id - record identifier in the collection Example: 12.
211
- * @returns {boolean} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
212
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
211
+ * @returns {Promise<boolean | IError>} Returns true (in case of successful deletion) or false (in case of unsuccessful deletion) (permission "collections.row.delete" required for access)
212
+ * @throws {IError} When isShell=false and an error occurs during the fetch
213
213
  * @description Deletion of collection record object
214
214
  */
215
215
  async deleteICollectionRowByMarkerAndId(marker, id) {
@@ -19,8 +19,8 @@ export default class LocalesApi extends AsyncModules implements ILocales {
19
19
  /**
20
20
  * Find all active language localization objects.
21
21
  * @handleName getLocales
22
- * @returns {ILocalEntity[]} Returns an array of LocaleEntity objects.
23
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
22
+ * @returns {Promise<ILocalEntity[] | IError>} Returns an array of LocaleEntity objects.
23
+ * @throws {IError} When isShell=false and an error occurs during the fetch
24
24
  * @description Find all active language localization objects.
25
25
  */
26
26
  getLocales(): Promise<Array<ILocalEntity> | IError>;
@@ -23,8 +23,8 @@ class LocalesApi extends asyncModules_1.default {
23
23
  /**
24
24
  * Find all active language localization objects.
25
25
  * @handleName getLocales
26
- * @returns {ILocalEntity[]} Returns an array of LocaleEntity objects.
27
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
26
+ * @returns {Promise<ILocalEntity[] | IError>} Returns an array of LocaleEntity objects.
27
+ * @throws {IError} When isShell=false and an error occurs during the fetch
28
28
  * @description Find all active language localization objects.
29
29
  */
30
30
  async getLocales() {
@@ -21,8 +21,8 @@ export default class MenusApi extends AsyncModules implements IMenus {
21
21
  * @handleName getMenusByMarker
22
22
  * @param {string} marker - Menu marker. Example: "main_menu".
23
23
  * @param {string} [langCode] - Language code. Default: "en_US".
24
- * @returns {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
25
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
24
+ * @returns {Promise<IMenusEntity | IError>} Returns a single menu object as a ContentMenu object with included pages.
25
+ * @throws {IError} When isShell=false and an error occurs during the fetch
26
26
  * @description Get pages includes in menu by marker.
27
27
  */
28
28
  getMenusByMarker(marker: string, langCode?: string): Promise<IMenusEntity | IError>;
@@ -25,8 +25,8 @@ class MenusApi extends asyncModules_1.default {
25
25
  * @handleName getMenusByMarker
26
26
  * @param {string} marker - Menu marker. Example: "main_menu".
27
27
  * @param {string} [langCode] - Language code. Default: "en_US".
28
- * @returns {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
29
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
28
+ * @returns {Promise<IMenusEntity | IError>} Returns a single menu object as a ContentMenu object with included pages.
29
+ * @throws {IError} When isShell=false and an error occurs during the fetch
30
30
  * @description Get pages includes in menu by marker.
31
31
  */
32
32
  async getMenusByMarker(marker, langCode = this.state.lang) {
@@ -30,8 +30,8 @@ interface IMenus {
30
30
  "position": 1
31
31
  }
32
32
  ]
33
- * @property {number} id - The unique identifier of the menu. Example: 1.
34
- * @property {string} pageUrl - The page url string. Example: "about".
33
+ * @property {number | null} id - The unique identifier of the menu. Example: 1.
34
+ * @property {string | null} pageUrl - The page url string. Example: "about".
35
35
  * @property {ILocalizeInfo} localizeInfos - The menu data, taking into account localization.
36
36
  * @example
37
37
  {
@@ -23,8 +23,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
23
23
  * @param {string} [langCode] - Language code. Default: "en_US".
24
24
  * @param {number} [offset] - Optional parameter for pagination. Default: 0.
25
25
  * @param {number} [limit] - Optional parameter for pagination. Default: 30.
26
- * @returns {IOrdersEntity[]} Returns an array of order storage objects.
27
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
26
+ * @returns {Promise<IOrdersEntity[] | IError>} Returns an array of order storage objects.
27
+ * @throws {IError} When isShell=false and an error occurs during the fetch
28
28
  * @description This method requires user authorization.
29
29
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
30
30
  */
@@ -36,8 +36,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
36
36
  * @param {string} [langCode] - Language code. Default: "en_US".
37
37
  * @param {number} [offset] - Offset parameter. Default: 0.
38
38
  * @param {number} [limit] - Limit parameter. Default: 30.
39
- * @returns {IOrdersByMarkerEntity} Returns an object with the orders.
40
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
39
+ * @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with the orders.
40
+ * @throws {IError} When isShell=false and an error occurs during the fetch
41
41
  * @description This method requires user authorization.
42
42
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
43
43
  */
@@ -47,8 +47,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
47
47
  * @handleName getOrderByMarker
48
48
  * @param {string} marker - Marker of the order object. Example: "order_storage_1".
49
49
  * @param {string} [langCode] - Language code. Default: "en_US".
50
- * @returns {IOrdersEntity} Return object of order information.
51
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
50
+ * @returns {Promise<IOrdersEntity | IError>} Return object of order information.
51
+ * @throws {IError} When isShell=false and an error occurs during the fetch
52
52
  * @description This method requires user authorization.
53
53
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
54
54
  */
@@ -59,8 +59,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
59
59
  * @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
60
60
  * @param {number} id - ID of the order object. Example: 12345.
61
61
  * @param {string} [langCode] - Language code. Default: "en_US".
62
- * @returns {IOrderByMarkerEntity} Returns an object with the order.
63
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
62
+ * @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
63
+ * @throws {IError} When isShell=false and an error occurs during the fetch
64
64
  * @description This method requires user authorization.
65
65
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
66
66
  */
@@ -87,8 +87,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
87
87
  ]
88
88
  }
89
89
  * @param {string} [langCode] - Language code. Default: "en_US".
90
- * @returns {IBaseOrdersEntity} Returns an object with the created order.
91
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
90
+ * @returns {Promise<IBaseOrdersEntity | IError>} Returns an object with the created order.
91
+ * @throws {IError} When isShell=false and an error occurs during the fetch
92
92
  * @description This method requires user authorization.
93
93
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
94
94
  */
@@ -117,8 +117,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
117
117
  "currency": "USD"
118
118
  }
119
119
  * @param {string} [langCode] - Language code. Default: "en_US".
120
- * @returns {IBaseOrdersEntity} Returns an object with the updated order.
121
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
120
+ * @returns {Promise<IBaseOrdersEntity | IError>} Returns an object with the updated order.
121
+ * @throws {IError} When isShell=false and an error occurs during the fetch
122
122
  * @description This method requires user authorization.
123
123
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
124
124
  */
@@ -27,8 +27,8 @@ class OrdersApi extends asyncModules_1.default {
27
27
  * @param {string} [langCode] - Language code. Default: "en_US".
28
28
  * @param {number} [offset] - Optional parameter for pagination. Default: 0.
29
29
  * @param {number} [limit] - Optional parameter for pagination. Default: 30.
30
- * @returns {IOrdersEntity[]} Returns an array of order storage objects.
31
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
30
+ * @returns {Promise<IOrdersEntity[] | IError>} Returns an array of order storage objects.
31
+ * @throws {IError} When isShell=false and an error occurs during the fetch
32
32
  * @description This method requires user authorization.
33
33
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
34
34
  */
@@ -43,8 +43,8 @@ class OrdersApi extends asyncModules_1.default {
43
43
  * @param {string} [langCode] - Language code. Default: "en_US".
44
44
  * @param {number} [offset] - Offset parameter. Default: 0.
45
45
  * @param {number} [limit] - Limit parameter. Default: 30.
46
- * @returns {IOrdersByMarkerEntity} Returns an object with the orders.
47
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
46
+ * @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with the orders.
47
+ * @throws {IError} When isShell=false and an error occurs during the fetch
48
48
  * @description This method requires user authorization.
49
49
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
50
50
  */
@@ -59,8 +59,8 @@ class OrdersApi extends asyncModules_1.default {
59
59
  * @handleName getOrderByMarker
60
60
  * @param {string} marker - Marker of the order object. Example: "order_storage_1".
61
61
  * @param {string} [langCode] - Language code. Default: "en_US".
62
- * @returns {IOrdersEntity} Return object of order information.
63
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
62
+ * @returns {Promise<IOrdersEntity | IError>} Return object of order information.
63
+ * @throws {IError} When isShell=false and an error occurs during the fetch
64
64
  * @description This method requires user authorization.
65
65
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
66
66
  */
@@ -74,8 +74,8 @@ class OrdersApi extends asyncModules_1.default {
74
74
  * @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
75
75
  * @param {number} id - ID of the order object. Example: 12345.
76
76
  * @param {string} [langCode] - Language code. Default: "en_US".
77
- * @returns {IOrderByMarkerEntity} Returns an object with the order.
78
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
77
+ * @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
78
+ * @throws {IError} When isShell=false and an error occurs during the fetch
79
79
  * @description This method requires user authorization.
80
80
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
81
81
  */
@@ -107,8 +107,8 @@ class OrdersApi extends asyncModules_1.default {
107
107
  ]
108
108
  }
109
109
  * @param {string} [langCode] - Language code. Default: "en_US".
110
- * @returns {IBaseOrdersEntity} Returns an object with the created order.
111
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
110
+ * @returns {Promise<IBaseOrdersEntity | IError>} Returns an object with the created order.
111
+ * @throws {IError} When isShell=false and an error occurs during the fetch
112
112
  * @description This method requires user authorization.
113
113
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
114
114
  */
@@ -148,8 +148,8 @@ class OrdersApi extends asyncModules_1.default {
148
148
  "currency": "USD"
149
149
  }
150
150
  * @param {string} [langCode] - Language code. Default: "en_US".
151
- * @returns {IBaseOrdersEntity} Returns an object with the updated order.
152
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
151
+ * @returns {Promise<IBaseOrdersEntity | IError>} Returns an object with the updated order.
152
+ * @throws {IError} When isShell=false and an error occurs during the fetch
153
153
  * @description This method requires user authorization.
154
154
  * @see For more information about configuring the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider authorization module}, see the documentation in the {@link https://js-sdk.oneentry.cloud/docs/category/authprovider configuration settings section of the SDK}.
155
155
  */
@@ -404,7 +404,8 @@ interface IOrderData {
404
404
  "quantity": 2
405
405
  }
406
406
  ]
407
- * @property {boolean} isCompleted - Indicates that the order has been completed. Example: true.
407
+ * @property {string | null} paymentUrl - Payment link. Example: "https://example.com/pay/123".
408
+ * @property {boolean | null} isCompleted - Indicates that the order has been completed. Example: true.
408
409
  * @description Represents an order storage object created by the user.
409
410
  */
410
411
  interface IOrderByMarkerEntity {
@@ -20,8 +20,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
20
20
  * Get all top-level page objects.
21
21
  * @handleName getRootPages
22
22
  * @param {string} [langCode] - Language code. Default: "en_US".
23
- * @returns {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
24
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
23
+ * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
24
+ * @throws {IError} When isShell=false and an error occurs during the fetch
25
25
  * @description Get all top-level page objects.
26
26
  */
27
27
  getRootPages(langCode?: string): Promise<IPagesEntity[] | IError>;
@@ -29,8 +29,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
29
29
  * Get all page objects with product information as an array.
30
30
  * @handleName getPages
31
31
  * @param {string} [langCode] - Language code. Default: "en_US".
32
- * @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
33
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
32
+ * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
33
+ * @throws {IError} When isShell=false and an error occurs during the fetch
34
34
  * @description Get all page objects with product information as an array.
35
35
  */
36
36
  getPages(langCode?: string): Promise<IPagesEntity[] | IError>;
@@ -39,8 +39,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
39
39
  * @handleName getPageById
40
40
  * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
41
41
  * @param {string} [langCode] - Language code. Default: "en_US".
42
- * @returns {IPagesEntity} Returns PageEntity object
43
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
42
+ * @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
43
+ * @throws {IError} When isShell=false and an error occurs during the fetch
44
44
  * @description Get page object with information about forms, blocks, menus, linked to the page.
45
45
  */
46
46
  getPageById(id: number, langCode?: string): Promise<IPagesEntity | IError>;
@@ -49,8 +49,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
49
49
  * @handleName getPageByUrl
50
50
  * @param {string} url - Page URL. Example: "about".
51
51
  * @param {string} [langCode] - Language code. Default: "en_US".
52
- * @returns {IPagesEntity} Returns PageEntity object
53
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
52
+ * @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
53
+ * @throws {IError} When isShell=false and an error occurs during the fetch
54
54
  * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
55
55
  */
56
56
  getPageByUrl(url: string, langCode?: string): Promise<IPagesEntity | IError>;
@@ -59,8 +59,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
59
59
  * @handleName getChildPagesByParentUrl
60
60
  * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
61
61
  * @param {string} [langCode] - Language code. Default: "en_US".
62
- * @returns {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
63
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
62
+ * @returns {Promise<IPagesEntity | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
63
+ * @throws {IError} When isShell=false and an error occurs during the fetch
64
64
  * @description Get child pages object with information as an array.
65
65
  */
66
66
  getChildPagesByParentUrl(url: string, langCode?: string): Promise<IPagesEntity[] | IError>;
@@ -69,8 +69,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
69
69
  * @handleName getBlocksByPageUrl
70
70
  * @param {string} url - Page URL. Example: "about".
71
71
  * @param {string} [langCode] - Language code. Default: "en_US".
72
- * @returns {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
73
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
72
+ * @returns {Promise<IPositionBlock[] | IError>} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
73
+ * @throws {IError} When isShell=false and an error occurs during the fetch
74
74
  * @description Get all blocks by page url.
75
75
  */
76
76
  getBlocksByPageUrl(url: string, langCode?: string): Promise<IPositionBlock[] | IError>;
@@ -78,8 +78,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
78
78
  * Get settings for the page.
79
79
  * @handleName getConfigPageByUrl
80
80
  * @param {string} url - Page URL. Example: "about".
81
- * @returns {IPageConfig} Returns a ConfigPage object with page display settings
82
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
81
+ * @returns {Promise<IPageConfig | IError>} Returns a ConfigPage object with page display settings
82
+ * @throws {IError} When isShell=false and an error occurs during the fetch
83
83
  * @description Get settings for the page.
84
84
  */
85
85
  getConfigPageByUrl(url: string): Promise<IPageConfig | IError>;
@@ -89,8 +89,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
89
89
  * @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
90
90
  * @param {string} [url] - Page URL. Example: "catalog".
91
91
  * @param {string} [langCode] - Language code. Default: "en_US".
92
- * @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
93
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
92
+ * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
93
+ * @throws {IError} When isShell=false and an error occurs during the fetch
94
94
  * @description Quick search for page objects with limited output.
95
95
  */
96
96
  searchPage(name: string, url?: string, langCode?: string): Promise<IPagesEntity[] | IError>;
@@ -133,8 +133,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
133
133
  }
134
134
  }
135
135
  ]
136
- * @returns {any} An array of page objects with template data added
137
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
136
+ * @returns {Promise<any | IError>} An array of page objects with template data added
137
+ * @throws {IError} When isShell=false and an error occurs during the fetch
138
138
  * @description Add template data to pages. Optimized to avoid N+1 query problem by fetching only unique templates in parallel.
139
139
  * For example, if 100 pages use 3 different templates, this method makes 3 requests instead of 100.
140
140
  */
@@ -143,8 +143,8 @@ export default class PageApi extends AsyncModules implements IPageApi {
143
143
  * Add template data to page by page templateIdentifier
144
144
  * @handleName addTemplateToPage
145
145
  * @param {IPagesEntity} data - Page object (IPagesEntity) to which template data will be added.
146
- * @returns {any} An array of page objects with template data added
147
- * @throws {IError} If there is an error during the fetch operation, it will return an error object.
146
+ * @returns {Promise<any | IError>} An array of page objects with template data added
147
+ * @throws {IError} When isShell=false and an error occurs during the fetch
148
148
  * @description Add template data to page by page templateIdentifier
149
149
  */
150
150
  protected addTemplateToPage(data: IPagesEntity): Promise<any | IError>;
@@ -27,8 +27,8 @@ class PageApi extends asyncModules_1.default {
27
27
  * Get all top-level page objects.
28
28
  * @handleName getRootPages
29
29
  * @param {string} [langCode] - Language code. Default: "en_US".
30
- * @returns {IPagesEntity[]} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
31
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
30
+ * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages without parents as an array of PageEntity objects or an empty array [] (if there is no data)
31
+ * @throws {IError} When isShell=false and an error occurs during the fetch
32
32
  * @description Get all top-level page objects.
33
33
  */
34
34
  async getRootPages(langCode = this.state.lang) {
@@ -45,8 +45,8 @@ class PageApi extends asyncModules_1.default {
45
45
  * Get all page objects with product information as an array.
46
46
  * @handleName getPages
47
47
  * @param {string} [langCode] - Language code. Default: "en_US".
48
- * @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
49
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
48
+ * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data).
49
+ * @throws {IError} When isShell=false and an error occurs during the fetch
50
50
  * @description Get all page objects with product information as an array.
51
51
  */
52
52
  async getPages(langCode = this.state.lang) {
@@ -64,8 +64,8 @@ class PageApi extends asyncModules_1.default {
64
64
  * @handleName getPageById
65
65
  * @param {number} id - The unique identifier of the page to be fetched. Example: 1.
66
66
  * @param {string} [langCode] - Language code. Default: "en_US".
67
- * @returns {IPagesEntity} Returns PageEntity object
68
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
67
+ * @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
68
+ * @throws {IError} When isShell=false and an error occurs during the fetch
69
69
  * @description Get page object with information about forms, blocks, menus, linked to the page.
70
70
  */
71
71
  async getPageById(id, langCode = this.state.lang) {
@@ -83,8 +83,8 @@ class PageApi extends asyncModules_1.default {
83
83
  * @handleName getPageByUrl
84
84
  * @param {string} url - Page URL. Example: "about".
85
85
  * @param {string} [langCode] - Language code. Default: "en_US".
86
- * @returns {IPagesEntity} Returns PageEntity object
87
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
86
+ * @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
87
+ * @throws {IError} When isShell=false and an error occurs during the fetch
88
88
  * @description Get page object with information about forms, blocks, menus, linked to the page by URL.
89
89
  */
90
90
  async getPageByUrl(url, langCode = this.state.lang) {
@@ -102,8 +102,8 @@ class PageApi extends asyncModules_1.default {
102
102
  * @handleName getChildPagesByParentUrl
103
103
  * @param {string} url - The URL of the parent page for which child pages are to be fetched. Example: "about/our-team".
104
104
  * @param {string} [langCode] - Language code. Default: "en_US".
105
- * @returns {IPagesEntity} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
106
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
105
+ * @returns {Promise<IPagesEntity | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
106
+ * @throws {IError} When isShell=false and an error occurs during the fetch
107
107
  * @description Get child pages object with information as an array.
108
108
  */
109
109
  async getChildPagesByParentUrl(url, langCode = this.state.lang) {
@@ -121,8 +121,8 @@ class PageApi extends asyncModules_1.default {
121
121
  * @handleName getBlocksByPageUrl
122
122
  * @param {string} url - Page URL. Example: "about".
123
123
  * @param {string} [langCode] - Language code. Default: "en_US".
124
- * @returns {IPositionBlock[]} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
125
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
124
+ * @returns {Promise<IPositionBlock[] | IError>} Returns all blocks as an array of PositionBlock objects or an empty array [] (if there is no data) for the selected parent
125
+ * @throws {IError} When isShell=false and an error occurs during the fetch
126
126
  * @description Get all blocks by page url.
127
127
  */
128
128
  async getBlocksByPageUrl(url, langCode = this.state.lang) {
@@ -189,8 +189,8 @@ class PageApi extends asyncModules_1.default {
189
189
  * Get settings for the page.
190
190
  * @handleName getConfigPageByUrl
191
191
  * @param {string} url - Page URL. Example: "about".
192
- * @returns {IPageConfig} Returns a ConfigPage object with page display settings
193
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
192
+ * @returns {Promise<IPageConfig | IError>} Returns a ConfigPage object with page display settings
193
+ * @throws {IError} When isShell=false and an error occurs during the fetch
194
194
  * @description Get settings for the page.
195
195
  */
196
196
  async getConfigPageByUrl(url) {
@@ -207,8 +207,8 @@ class PageApi extends asyncModules_1.default {
207
207
  * @param {string} name - Text for searching page objects (search is performed on the title field of the localizeInfos object with the language taken into account). Example: "About Us".
208
208
  * @param {string} [url] - Page URL. Example: "catalog".
209
209
  * @param {string} [langCode] - Language code. Default: "en_US".
210
- * @returns {IPagesEntity[]} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
211
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
210
+ * @returns {Promise<IPagesEntity[] | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data)
211
+ * @throws {IError} When isShell=false and an error occurs during the fetch
212
212
  * @description Quick search for page objects with limited output.
213
213
  */
214
214
  async searchPage(name, url, langCode = this.state.lang) {
@@ -275,8 +275,8 @@ class PageApi extends asyncModules_1.default {
275
275
  }
276
276
  }
277
277
  ]
278
- * @returns {any} An array of page objects with template data added
279
- * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
278
+ * @returns {Promise<any | IError>} An array of page objects with template data added
279
+ * @throws {IError} When isShell=false and an error occurs during the fetch
280
280
  * @description Add template data to pages. Optimized to avoid N+1 query problem by fetching only unique templates in parallel.
281
281
  * For example, if 100 pages use 3 different templates, this method makes 3 requests instead of 100.
282
282
  */
@@ -329,8 +329,8 @@ class PageApi extends asyncModules_1.default {
329
329
  * Add template data to page by page templateIdentifier
330
330
  * @handleName addTemplateToPage
331
331
  * @param {IPagesEntity} data - Page object (IPagesEntity) to which template data will be added.
332
- * @returns {any} An array of page objects with template data added
333
- * @throws {IError} If there is an error during the fetch operation, it will return an error object.
332
+ * @returns {Promise<any | IError>} An array of page objects with template data added
333
+ * @throws {IError} When isShell=false and an error occurs during the fetch
334
334
  * @description Add template data to page by page templateIdentifier
335
335
  */
336
336
  async addTemplateToPage(data) {
@@ -1,7 +1,7 @@
1
- import type { IBlockEntity } from 'blocks/blocksInterfaces';
2
- import type { IFormConfig } from 'forms/formsInterfaces';
3
- import type { ITemplateEntity } from 'templates/templatesInterfaces';
4
1
  import type { AttributeType, IAttributes, IError, ILocalizeInfo, LangType, Types } from '../base/utils';
2
+ import type { IBlockEntity } from '../blocks/blocksInterfaces';
3
+ import type { IFormConfig } from '../forms/formsInterfaces';
4
+ import type { ITemplateEntity } from '../templates/templatesInterfaces';
5
5
  /**
6
6
  * @interface IPageApi
7
7
  * @property {Function} getRootPages - Get all top-level page objects.
@@ -239,17 +239,17 @@ interface IPositionBlock {
239
239
  }
240
240
  }
241
241
  * @property {boolean} isSync - Indication of page indexing. Example: true.
242
- * @property {any} [template] - Template object. Example: {}.
242
+ * @property {object} [template] - Template object. Example: {}.
243
243
  * @property {number} [position] - Item number (for sorting). Example: 2.
244
- * @property {any} [config] - Output settings for catalog pages.
244
+ * @property {Record<string, number>} [config] - Output settings for catalog pages.
245
245
  * @example
246
246
  {
247
247
  "rowsPerPage": 1,
248
248
  "productsPerRow": 1
249
249
  }
250
250
  * @property {number} [products] - The number of products linked to the page. Example: 0.
251
- * @property {number} [childrenCount] - Children count. Example: 1.
252
- * @property {any} [blocks] - blocks.
251
+ * @property {string} [childrenCount] - Children count. Example: 1.
252
+ * @property {IBlockEntity[] | string[]} [blocks] - blocks.
253
253
  * @example
254
254
  {
255
255
  "id": 4,
@@ -262,6 +262,9 @@ interface IPositionBlock {
262
262
  "attributeValues": {},
263
263
  "position": 1
264
264
  }
265
+ * @property {Array<IFormConfig>} [moduleFormConfigs] - Module form configurations linked to the page.
266
+ * @property {string} [total] - Total number of products linked to the page. Example: "10".
267
+ * @property {string} [categoryPath] - Category path string. Example: "catalog".
265
268
  * @description This interface defines the structure of a page entity, including its identifiers, attributes, and hierarchical relationships.
266
269
  */
267
270
  interface IPagesEntity {