oneentry 1.0.122 → 1.0.124

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 (73) hide show
  1. package/dist/admins/adminsApi.d.ts +16 -8
  2. package/dist/admins/adminsApi.js +18 -10
  3. package/dist/admins/adminsInterfaces.d.ts +49 -25
  4. package/dist/attribute-sets/attributeSetsApi.d.ts +43 -21
  5. package/dist/attribute-sets/attributeSetsApi.js +49 -25
  6. package/dist/attribute-sets/attributeSetsInterfaces.d.ts +70 -24
  7. package/dist/auth-provider/authProviderApi.d.ts +94 -83
  8. package/dist/auth-provider/authProviderApi.js +96 -83
  9. package/dist/auth-provider/authProvidersInterfaces.d.ts +188 -10
  10. package/dist/base/asyncModules.d.ts +32 -28
  11. package/dist/base/asyncModules.js +62 -38
  12. package/dist/base/syncModules.d.ts +44 -44
  13. package/dist/base/syncModules.js +65 -63
  14. package/dist/blocks/blocksApi.d.ts +56 -25
  15. package/dist/blocks/blocksApi.js +56 -25
  16. package/dist/blocks/blocksInterfaces.d.ts +71 -22
  17. package/dist/events/eventsApi.d.ts +45 -11
  18. package/dist/events/eventsApi.js +47 -17
  19. package/dist/events/eventsInterfaces.d.ts +44 -2
  20. package/dist/file-uploading/fileUploadingApi.d.ts +44 -24
  21. package/dist/file-uploading/fileUploadingApi.js +46 -27
  22. package/dist/file-uploading/fileUploadingInterfaces.d.ts +63 -14
  23. package/dist/forms/formsApi.d.ts +23 -8
  24. package/dist/forms/formsApi.js +23 -8
  25. package/dist/forms/formsInterfaces.d.ts +62 -15
  26. package/dist/formsData/formsDataApi.d.ts +33 -33
  27. package/dist/formsData/formsDataApi.js +33 -33
  28. package/dist/formsData/formsDataInterfaces.d.ts +123 -35
  29. package/dist/general-types/generalTypesApi.d.ts +12 -1
  30. package/dist/general-types/generalTypesApi.js +12 -1
  31. package/dist/general-types/generalTypesInterfaces.d.ts +18 -5
  32. package/dist/index.d.ts +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/integration-collections/integrationCollectionsApi.d.ts +96 -70
  35. package/dist/integration-collections/integrationCollectionsApi.js +114 -81
  36. package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +152 -30
  37. package/dist/locales/localesApi.d.ts +6 -1
  38. package/dist/locales/localesApi.js +6 -1
  39. package/dist/locales/localesInterfaces.d.ts +20 -11
  40. package/dist/menus/menusApi.d.ts +8 -3
  41. package/dist/menus/menusApi.js +8 -3
  42. package/dist/menus/menusInterfaces.d.ts +30 -17
  43. package/dist/orders/ordersApi.d.ts +64 -64
  44. package/dist/orders/ordersApi.js +67 -65
  45. package/dist/orders/ordersInterfaces.d.ts +174 -60
  46. package/dist/pages/pagesApi.d.ts +89 -30
  47. package/dist/pages/pagesApi.js +181 -57
  48. package/dist/pages/pagesInterfaces.d.ts +117 -23
  49. package/dist/payments/paymentsApi.d.ts +56 -22
  50. package/dist/payments/paymentsApi.js +56 -22
  51. package/dist/payments/paymentsInterfaces.d.ts +119 -36
  52. package/dist/product-statuses/productStatusesApi.d.ts +21 -15
  53. package/dist/product-statuses/productStatusesApi.js +21 -18
  54. package/dist/product-statuses/productStatusesInterfaces.d.ts +37 -9
  55. package/dist/products/productsApi.d.ts +137 -157
  56. package/dist/products/productsApi.js +137 -157
  57. package/dist/products/productsInterfaces.d.ts +240 -57
  58. package/dist/system/systemApi.d.ts +29 -10
  59. package/dist/system/systemApi.js +29 -10
  60. package/dist/system/systemInterfaces.d.ts +8 -0
  61. package/dist/templates/templatesApi.d.ts +26 -16
  62. package/dist/templates/templatesApi.js +26 -19
  63. package/dist/templates/templatesInterfaces.d.ts +40 -14
  64. package/dist/templates-preview/templatesPreviewApi.d.ts +18 -14
  65. package/dist/templates-preview/templatesPreviewApi.js +18 -17
  66. package/dist/templates-preview/templatesPreviewInterfaces.d.ts +57 -29
  67. package/dist/users/usersApi.d.ts +37 -33
  68. package/dist/users/usersApi.js +37 -33
  69. package/dist/users/usersInterfaces.d.ts +80 -9
  70. package/dist/web-socket/wsApi.d.ts +6 -3
  71. package/dist/web-socket/wsApi.js +6 -3
  72. package/dist/web-socket/wsInterfaces.d.ts +3 -1
  73. package/package.json +11 -11
@@ -1,23 +1,35 @@
1
1
  import type { IError, ILocalizeInfo } from '../base/utils';
2
2
  /**
3
- * Represents an interface object of Menus Api.
3
+ * @interface IMenus
4
4
  *
5
- * @property {function} getAdminsInfo - Get pages includes in menu by marker.
5
+ * @property {function} getMenusByMarker - Get pages includes in menu by marker.
6
+ *
7
+ * @description This interface defines a method for retrieving menu pages by a specific marker and language code.
6
8
  */
7
9
  interface IMenus {
10
+ /**
11
+ * Get pages includes in menu by marker.
12
+ *
13
+ * @param {string} marker - Menu marker. Example: "main_menu".
14
+ * @param {string} [langCode] - Language code. Default: "en_US".
15
+ *
16
+ * @return {IMenusEntity} Returns a single menu object as a ContentMenu object with included pages.
17
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
18
+ */
8
19
  getMenusByMarker(marker: string, langCode: string): Promise<IMenusEntity | IError>;
9
20
  }
10
21
  /**
11
- * Represents a position object.
22
+ * @interface IMenusPages
23
+ *
24
+ * @property {Array<IMenusPages>} [children] - The optional parameter. Contains array with child page objects.
25
+ * @property {number} id - The unique identifier of the menu. Example: 1.
26
+ * @property {string} pageUrl - The page url string. Example: "about".
27
+ * @property {ILocalizeInfo} localizeInfos - The menu data, taking into account localization. Example: .
28
+ * @property {IAttributesSets} attributeValues - Attributes sets. Example: { "color": "red", "size": "large" }.
29
+ * @property {number} position - The menu position. Example: 1.
30
+ * @property {number | null} parentId - The menu parent id. Example: null.
12
31
  *
13
- * @interface
14
- * @property {Array<IMenusPages>} children - The optional parameter. Contains array with child page objects.
15
- * @property {number} id - The unique identifier of the menu.
16
- * @property {string} pageUrl - The page url string.
17
- * @property {ILocalizeInfo} localizeInfos - The menu data, taking into account localization.
18
- * @property {IAttributesSets} attributeValues - Attributes sets
19
- * @property {number} position - The menu position.
20
- * @property {number | null} parentId - The menu parent id.
32
+ * @description This interface defines the structure of a menu page entity, including its identifiers, localization information, attributes, and hierarchical relationships.
21
33
  */
22
34
  interface IMenusPages {
23
35
  children?: Array<IMenusPages> | IMenusPages;
@@ -29,13 +41,14 @@ interface IMenusPages {
29
41
  parentId: number | null;
30
42
  }
31
43
  /**
32
- * Represents a position object.
44
+ * @interface IMenusEntity
45
+ *
46
+ * @property {number} id - The unique identifier of the menu. Example: 1.
47
+ * @property {string} identifier - The menu identifier. Example: "main_menu".
48
+ * @property {Record<string, any>} localizeInfos - The menu data, taking into account localization. Example: .
49
+ * @property {Array<IMenusPages>} pages - Array of menu pages. Example: .
33
50
  *
34
- * @interface
35
- * @property {number} id - The unique identifier of the menu.
36
- * @property {string} identifier - The menu identifier.
37
- * @property {Record<string, any>} localizeInfos - The menu data, taking into account localization.
38
- * @property {Array<IMenusPages>} pages - Array of menu pages.
51
+ * @description This interface defines the structure of a menu entity, including its identifiers, localization information, and associated pages.
39
52
  */
40
53
  interface IMenusEntity {
41
54
  id: number;
@@ -3,106 +3,106 @@ import type StateModule from '../base/stateModule';
3
3
  import type { IError } from '../base/utils';
4
4
  import type { IBaseOrdersEntity, IOrderByMarkerEntity, IOrderData, IOrdersApi, IOrdersByMarkerEntity, IOrdersEntity } from './ordersInterfaces';
5
5
  /**
6
- * Controllers for working with orders
6
+ * Controllers for working with orders.
7
+ *
7
8
  * @handle /api/content/orders-storage
9
+ * @module OrdersApi
10
+ *
11
+ * @description This module provides methods for working with orders, including retrieving, creating, and updating orders in the order storage.
8
12
  */
9
13
  export default class OrdersApi extends AsyncModules implements IOrdersApi {
10
14
  protected state: StateModule;
11
15
  protected _url: string;
12
16
  constructor(state: StateModule);
13
17
  /**
14
- * Getting all the order storage objects
15
- * @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.
18
+ * Getting all the order storage objects.
16
19
  *
17
- * @param {number} [langCode] - Optional language field
18
- * @param {number} [offset] - Optional parameter for pagination, default is 0
19
- * @param {number} [limit] - Optional parameter for pagination, default is 30
20
- */
20
+ * @handleName getAllOrdersStorage
21
+ *
22
+ * @param {number} [langCode] - Language code. Default: "en_US".
23
+ * @param {number} [offset] - Optional parameter for pagination. Default: 0.
24
+ * @param {number} [limit] - Optional parameter for pagination. Default: 30.
25
+ *
26
+ * @return {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.
28
+ *
29
+ * @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.
30
+ **/
21
31
  getAllOrdersStorage(langCode?: string, offset?: number, limit?: number): Promise<Array<IOrdersEntity> | IError>;
22
32
  /**
23
- * Getting all orders from the orders storage object created by the user
33
+ * Getting all orders from the orders storage object created by the user.
34
+ *
35
+ * @handleName getAllOrdersByMarker
36
+ *
37
+ * @param {string} marker - Textual identifier of the order storage object. Example: "order_storage_1".
38
+ * @param {string} [langCode] - Language code. Default: "en_US".
39
+ * @param {number} [offset] - Offset parameter. Default: 0.
40
+ * @param {number} [limit] - Limit parameter. Default: 30.
41
+ *
42
+ * @return {IOrdersByMarkerEntity} Returns an object with the orders.
43
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
24
44
  *
25
45
  * @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.
26
- * @param {string} [marker] - Textual identifier of the order storage object
27
- * @param {string} [langCode] - Optional language field
28
- * @param {number} [offset] - Offset parameter. Default 0
29
- * @param {number} [limit] - Limit parameter. Default 30
30
46
  */
31
47
  getAllOrdersByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IOrdersByMarkerEntity | IError>;
32
48
  /**
33
49
  * Retrieve one order storage object by marker.
34
50
  *
35
- * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
36
- * @param {string} [marker] - Marker of the order object
37
- * @param {string} [langCode] - Language code
51
+ * @handleName getOrderByMarker
52
+ *
53
+ * @param {string} marker - Marker of the order object. Example: "order_storage_1".
54
+ * @param {string} [langCode] - Language code. Default: "en_US".
38
55
  *
39
- * @returns Return object of order information.
56
+ * @return {IOrdersEntity} Return object of order information.
57
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
58
+ *
59
+ * @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.
40
60
  */
41
61
  getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity | IError>;
42
62
  /**
43
- * Getting a single order from the order storage object created by the user
63
+ * Getting a single order from the order storage object created by the user.
64
+ *
65
+ * @handleName getOrderByMarkerAndId
44
66
  *
45
- * @param {string} [marker] - The text identifier of the order storage object
46
- * @param {number} [id] - ID of the order object
47
- * @param {string} [langCode] - Optional language field
67
+ * @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
68
+ * @param {number} id - ID of the order object. Example: 12345.
69
+ * @param {string} [langCode] - Language code. Default: "en_US".
48
70
  *
71
+ * @return {IOrderByMarkerEntity} Returns an object with the order.
72
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
73
+ *
74
+ * @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.
49
75
  */
50
76
  getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity | IError>;
51
77
  /**
52
78
  * Creation of an order in the order storage.
53
79
  *
54
- * @param {string} marker - Textual identifier of the order storage object
55
- * @param {IOrderData} data - Object for creating an order
56
- * @param {String} langCode - Optional language field
80
+ * @handleName createOrder
57
81
  *
58
- * @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.
82
+ * @param {string} marker - Textual identifier of the order storage object. Example: "order_storage_1".
83
+ * @param {IOrderData} data - Object for creating an order. Example: "formIdentifier": "bar-orders-form", "paymentAccountIdentifier": "usd-payment", "formData": { "marker": "name_1", "value": "Name", "type": "string" }, "products": [ { "productId": 1, "quantity": 2 } ] }.
84
+ * @param {String} [langCode] - Language code. Default: "en_US".
59
85
  *
60
- * @example
61
- * const body = {
62
- * "formIdentifier": "bar-orders-form",
63
- * "paymentAccountIdentifier": "usd-payment",
64
- * "formData": {
65
- * "marker": "name_1",
66
- * "value": "Name",
67
- * "type": "string"
68
- * },
69
- * "products": [
70
- * {
71
- * "productId": 1,
72
- * "quantity": 2,
73
- * }
74
- * ],
75
- * }
76
- *
77
- * @returns Returns object for creating an order.
86
+ * @return {IBaseOrdersEntity} Returns an object with the created order.
87
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
88
+ *
89
+ * @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.
78
90
  */
79
91
  createOrder(marker: string, data: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
80
92
  /**
81
93
  * Changing an order in the orders storage
82
94
  *
95
+ * @handleName updateOrderByMarkerAndId
96
+ *
97
+ * @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
98
+ * @param {number} id - ID of the order object. Example: 12345.
99
+ * @param {IOrderData} body - Object for updating an order. Example: { "formIdentifier": "bar-orders-form", "paymentAccountIdentifier": "usd-payment", "formData": { "marker": "name_1", "value": "Name", "type": "string" }, "products": [ { "productId": 1, "quantity": 2 } ], "currency": "USD" }.
100
+ * @param {string} [langCode] - Language code. Default: "en_US".
101
+ *
102
+ * @return {IBaseOrdersEntity} Returns an object with the updated order.
103
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
104
+ *
83
105
  * @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.
84
- * @param {string} [marker] - The text identifier of the order storage object
85
- * @param {number} [id] - ID of the order object
86
- * @param {IOrderData} [body] - Object for updating an order
87
- * @param {string} [langCode] - Optional language field
88
- *
89
- * @example
90
- * const body = {
91
- * "formIdentifier": "bar-orders-form",
92
- * "paymentAccountIdentifier": "usd-payment",
93
- * "formData": {
94
- * "marker": "name_1",
95
- * "value": "Name",
96
- * "type": "string"
97
- * },
98
- * "products": [
99
- * {
100
- * "productId": 1,
101
- * "quantity": 2
102
- * }
103
- * ],
104
- * "currency": "USD"
105
- * }
106
106
  */
107
107
  updateOrderByMarkerAndId(marker: string, id: number, body: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
108
108
  }
@@ -3,11 +3,14 @@ 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 @typescript-eslint/no-explicit-any */
7
6
  const asyncModules_1 = __importDefault(require("../base/asyncModules"));
8
7
  /**
9
- * Controllers for working with orders
8
+ * Controllers for working with orders.
9
+ *
10
10
  * @handle /api/content/orders-storage
11
+ * @module OrdersApi
12
+ *
13
+ * @description This module provides methods for working with orders, including retrieving, creating, and updating orders in the order storage.
11
14
  */
12
15
  class OrdersApi extends asyncModules_1.default {
13
16
  constructor(state) {
@@ -15,50 +18,73 @@ class OrdersApi extends asyncModules_1.default {
15
18
  this._url = state.url + '/api/content/orders-storage';
16
19
  }
17
20
  /**
18
- * Getting all the order storage objects
19
- * @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.
21
+ * Getting all the order storage objects.
20
22
  *
21
- * @param {number} [langCode] - Optional language field
22
- * @param {number} [offset] - Optional parameter for pagination, default is 0
23
- * @param {number} [limit] - Optional parameter for pagination, default is 30
24
- */
23
+ * @handleName getAllOrdersStorage
24
+ *
25
+ * @param {number} [langCode] - Language code. Default: "en_US".
26
+ * @param {number} [offset] - Optional parameter for pagination. Default: 0.
27
+ * @param {number} [limit] - Optional parameter for pagination. Default: 30.
28
+ *
29
+ * @return {IOrdersEntity[]} Returns an array of order storage objects.
30
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
31
+ *
32
+ * @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.
33
+ **/
25
34
  async getAllOrdersStorage(langCode = this.state.lang, offset = 0, limit = 30) {
26
35
  const result = await this._fetchGet(`?langCode=${langCode}&limit=${limit}&offset=${offset}`);
27
36
  return this._normalizeData(result);
28
37
  }
29
38
  /**
30
- * Getting all orders from the orders storage object created by the user
39
+ * Getting all orders from the orders storage object created by the user.
40
+ *
41
+ * @handleName getAllOrdersByMarker
42
+ *
43
+ * @param {string} marker - Textual identifier of the order storage object. Example: "order_storage_1".
44
+ * @param {string} [langCode] - Language code. Default: "en_US".
45
+ * @param {number} [offset] - Offset parameter. Default: 0.
46
+ * @param {number} [limit] - Limit parameter. Default: 30.
47
+ *
48
+ * @return {IOrdersByMarkerEntity} Returns an object with the orders.
49
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
31
50
  *
32
51
  * @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.
33
- * @param {string} [marker] - Textual identifier of the order storage object
34
- * @param {string} [langCode] - Optional language field
35
- * @param {number} [offset] - Offset parameter. Default 0
36
- * @param {number} [limit] - Limit parameter. Default 30
37
52
  */
38
53
  async getAllOrdersByMarker(marker, langCode = this.state.lang, offset = 0, limit = 30) {
54
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
39
55
  const result = await this._fetchGet(`/marker/${marker}/orders?langCode=${langCode}&limit=${limit}&offset=${offset}`);
40
56
  return this._normalizeData(result);
41
57
  }
42
58
  /**
43
59
  * Retrieve one order storage object by marker.
44
60
  *
45
- * @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.
46
- * @param {string} [marker] - Marker of the order object
47
- * @param {string} [langCode] - Language code
61
+ * @handleName getOrderByMarker
62
+ *
63
+ * @param {string} marker - Marker of the order object. Example: "order_storage_1".
64
+ * @param {string} [langCode] - Language code. Default: "en_US".
48
65
  *
49
- * @returns Return object of order information.
66
+ * @return {IOrdersEntity} Return object of order information.
67
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
68
+ *
69
+ * @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
50
70
  */
51
71
  async getOrderByMarker(marker, langCode = this.state.lang) {
52
72
  const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
53
73
  return this._normalizeData(result);
54
74
  }
55
75
  /**
56
- * Getting a single order from the order storage object created by the user
76
+ * Getting a single order from the order storage object created by the user.
77
+ *
78
+ * @handleName getOrderByMarkerAndId
57
79
  *
58
- * @param {string} [marker] - The text identifier of the order storage object
59
- * @param {number} [id] - ID of the order object
60
- * @param {string} [langCode] - Optional language field
80
+ * @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
81
+ * @param {number} id - ID of the order object. Example: 12345.
82
+ * @param {string} [langCode] - Language code. Default: "en_US".
61
83
  *
84
+ * @return {IOrderByMarkerEntity} Returns an object with the order.
85
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
86
+ *
87
+ * @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.
62
88
  */
63
89
  async getOrderByMarkerAndId(marker, id, langCode = this.state.lang) {
64
90
  const result = await this._fetchGet(`/marker/${marker}/orders/${id}?langCode=${langCode}`);
@@ -67,32 +93,19 @@ class OrdersApi extends asyncModules_1.default {
67
93
  /**
68
94
  * Creation of an order in the order storage.
69
95
  *
70
- * @param {string} marker - Textual identifier of the order storage object
71
- * @param {IOrderData} data - Object for creating an order
72
- * @param {String} langCode - Optional language field
96
+ * @handleName createOrder
73
97
  *
74
- * @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.
98
+ * @param {string} marker - Textual identifier of the order storage object. Example: "order_storage_1".
99
+ * @param {IOrderData} data - Object for creating an order. Example: "formIdentifier": "bar-orders-form", "paymentAccountIdentifier": "usd-payment", "formData": { "marker": "name_1", "value": "Name", "type": "string" }, "products": [ { "productId": 1, "quantity": 2 } ] }.
100
+ * @param {String} [langCode] - Language code. Default: "en_US".
75
101
  *
76
- * @example
77
- * const body = {
78
- * "formIdentifier": "bar-orders-form",
79
- * "paymentAccountIdentifier": "usd-payment",
80
- * "formData": {
81
- * "marker": "name_1",
82
- * "value": "Name",
83
- * "type": "string"
84
- * },
85
- * "products": [
86
- * {
87
- * "productId": 1,
88
- * "quantity": 2,
89
- * }
90
- * ],
91
- * }
92
- *
93
- * @returns Returns object for creating an order.
102
+ * @return {IBaseOrdersEntity} Returns an object with the created order.
103
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
104
+ *
105
+ * @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.
94
106
  */
95
107
  async createOrder(marker, data, langCode = this.state.lang) {
108
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
96
109
  const formData = {};
97
110
  formData[langCode] = Array.isArray(data.formData)
98
111
  ? data.formData
@@ -104,31 +117,20 @@ class OrdersApi extends asyncModules_1.default {
104
117
  /**
105
118
  * Changing an order in the orders storage
106
119
  *
120
+ * @handleName updateOrderByMarkerAndId
121
+ *
122
+ * @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
123
+ * @param {number} id - ID of the order object. Example: 12345.
124
+ * @param {IOrderData} body - Object for updating an order. Example: { "formIdentifier": "bar-orders-form", "paymentAccountIdentifier": "usd-payment", "formData": { "marker": "name_1", "value": "Name", "type": "string" }, "products": [ { "productId": 1, "quantity": 2 } ], "currency": "USD" }.
125
+ * @param {string} [langCode] - Language code. Default: "en_US".
126
+ *
127
+ * @return {IBaseOrdersEntity} Returns an object with the updated order.
128
+ * @throws {IError} - If there is an error during the fetch operation, it will return an error object.
129
+ *
107
130
  * @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.
108
- * @param {string} [marker] - The text identifier of the order storage object
109
- * @param {number} [id] - ID of the order object
110
- * @param {IOrderData} [body] - Object for updating an order
111
- * @param {string} [langCode] - Optional language field
112
- *
113
- * @example
114
- * const body = {
115
- * "formIdentifier": "bar-orders-form",
116
- * "paymentAccountIdentifier": "usd-payment",
117
- * "formData": {
118
- * "marker": "name_1",
119
- * "value": "Name",
120
- * "type": "string"
121
- * },
122
- * "products": [
123
- * {
124
- * "productId": 1,
125
- * "quantity": 2
126
- * }
127
- * ],
128
- * "currency": "USD"
129
- * }
130
131
  */
131
132
  async updateOrderByMarkerAndId(marker, id, body, langCode = this.state.lang) {
133
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
132
134
  const formData = {};
133
135
  formData[langCode] = Array.isArray(body.formData)
134
136
  ? body.formData