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