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,151 +1,154 @@
|
|
|
1
1
|
import type { IError, ILocalizeInfo } from '../base/utils';
|
|
2
2
|
/**
|
|
3
3
|
* @interface IOrdersApi
|
|
4
|
-
*
|
|
5
|
-
* @property {
|
|
6
|
-
* @property {
|
|
7
|
-
* @property {
|
|
8
|
-
* @property {
|
|
9
|
-
* @property {
|
|
10
|
-
* @property {
|
|
11
|
-
* @property {function} setAccessToken - Only for custom authorization. An intermediate method for setting up an access token.
|
|
4
|
+
* @property {Function} getOrderByMarker - Retrieve one order storage object by marker.
|
|
5
|
+
* @property {Function} createOrder - Creation of an order in the order storage.
|
|
6
|
+
* @property {Function} updateOrderByMarkerAndId - Changing an order in the order store.
|
|
7
|
+
* @property {Function} getOrderByMarkerAndId - Getting a single order from the order storage object created by the user.
|
|
8
|
+
* @property {Function} getAllOrders - Getting all the order storage objects.
|
|
9
|
+
* @property {Function} getAllOrdersByMarker - Getting one order storage object by marker.
|
|
10
|
+
* @property {Function} setAccessToken - Only for custom authorization. An intermediate method for setting up an access token.
|
|
12
11
|
* @description Represents the API for managing orders in the order storage.
|
|
13
12
|
*/
|
|
14
13
|
interface IOrdersApi {
|
|
15
14
|
/**
|
|
16
15
|
* Getting all the order storage objects.
|
|
17
|
-
*
|
|
18
|
-
* @param
|
|
19
|
-
* @param
|
|
20
|
-
* @param
|
|
21
|
-
* @
|
|
16
|
+
* @handleName getAllOrdersStorage
|
|
17
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
18
|
+
* @param {number} [offset] - Optional parameter for pagination. Default: 0.
|
|
19
|
+
* @param {number} [limit] - Optional parameter for pagination. Default: 30.
|
|
20
|
+
* @returns {Promise<IOrdersEntity[] | IError>} Returns an array of order storage objects.
|
|
22
21
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
22
|
+
* @description This method gets all the order storage objects.
|
|
23
23
|
*/
|
|
24
24
|
getAllOrdersStorage(langCode?: string, offset?: number, limit?: number): Promise<IOrdersEntity[] | IError>;
|
|
25
25
|
/**
|
|
26
26
|
* Getting all orders from the orders storage object created by the user.
|
|
27
|
-
*
|
|
28
|
-
* @param
|
|
29
|
-
* @param
|
|
30
|
-
* @param
|
|
31
|
-
* @param
|
|
32
|
-
* @
|
|
27
|
+
* @handleName getAllOrdersByMarker
|
|
28
|
+
* @param {string} marker - Textual identifier of the order storage object. Example: "order_storage_1".
|
|
29
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
30
|
+
* @param {number} [offset] - Offset parameter. Default: 0.
|
|
31
|
+
* @param {number} [limit] - Limit parameter. Default: 30.
|
|
32
|
+
* @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with the orders.
|
|
33
33
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
34
|
+
* @description This method gets all orders from the orders storage object created by the user.
|
|
34
35
|
*/
|
|
35
36
|
getAllOrdersByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IOrdersByMarkerEntity | IError>;
|
|
36
37
|
/**
|
|
37
38
|
* Retrieve one order storage object by marker.
|
|
38
|
-
*
|
|
39
|
-
* @param
|
|
40
|
-
* @param
|
|
41
|
-
* @
|
|
39
|
+
* @handleName getOrderByMarker
|
|
40
|
+
* @param {string} marker - Marker of the order object. Example: "order_storage_1".
|
|
41
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
42
|
+
* @returns {Promise<IOrdersEntity | IError>} Return object of order information.
|
|
42
43
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
44
|
+
* @description This method retrieves one order storage object by marker.
|
|
43
45
|
*/
|
|
44
46
|
getOrderByMarker(marker: string, langCode?: string): Promise<IOrdersEntity | IError>;
|
|
45
47
|
/**
|
|
46
48
|
* Getting a single order from the order storage object created by the user.
|
|
47
|
-
*
|
|
48
|
-
* @param
|
|
49
|
-
* @param
|
|
50
|
-
* @param
|
|
51
|
-
* @
|
|
49
|
+
* @handleName getOrderByMarkerAndId
|
|
50
|
+
* @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
|
|
51
|
+
* @param {number} id - ID of the order object. Example: 12345.
|
|
52
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
53
|
+
* @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
|
|
52
54
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
55
|
+
* @description This method gets a single order from the order storage object created by the user.
|
|
53
56
|
*/
|
|
54
57
|
getOrderByMarkerAndId(marker: string, id: number, langCode?: string): Promise<IOrderByMarkerEntity | IError>;
|
|
55
58
|
/**
|
|
56
59
|
* Creation of an order in the order storage.
|
|
57
|
-
*
|
|
58
|
-
* @param
|
|
59
|
-
* @param
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
* @param
|
|
76
|
-
* @
|
|
60
|
+
* @handleName createOrder
|
|
61
|
+
* @param {string} marker - Textual identifier of the order storage object. Example: "order_storage_1".
|
|
62
|
+
* @param {IOrderData} body - Object for creating an order. Example:
|
|
63
|
+
{
|
|
64
|
+
"formIdentifier": "bar-orders-form",
|
|
65
|
+
"paymentAccountIdentifier": "usd-payment",
|
|
66
|
+
"formData": {
|
|
67
|
+
"marker": "name_1",
|
|
68
|
+
"value": "Name",
|
|
69
|
+
"type": "string"
|
|
70
|
+
},
|
|
71
|
+
"products": [
|
|
72
|
+
{
|
|
73
|
+
"productId": 1,
|
|
74
|
+
"quantity": 2
|
|
75
|
+
}
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
79
|
+
* @returns {Promise<IBaseOrdersEntity | IError>} Returns an object with the created order.
|
|
77
80
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
78
81
|
* @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
82
|
*/
|
|
80
83
|
createOrder(marker: string, body: IOrderData, langCode: string): Promise<IBaseOrdersEntity | IError>;
|
|
81
84
|
/**
|
|
82
85
|
* Changing an order in the orders storage
|
|
83
|
-
*
|
|
84
|
-
* @param
|
|
85
|
-
* @param
|
|
86
|
-
* @param
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
* @param
|
|
104
|
-
* @
|
|
86
|
+
* @handleName updateOrderByMarkerAndId
|
|
87
|
+
* @param {string} marker - The text identifier of the order storage object. Example: "order_storage_1".
|
|
88
|
+
* @param {number} id - ID of the order object. Example: 12345.
|
|
89
|
+
* @param {IOrderData} body - Object for updating an order. Example:
|
|
90
|
+
{
|
|
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
|
+
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
107
|
+
* @returns {Promise<IBaseOrdersEntity | IError>} Returns an object with the updated order.
|
|
105
108
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
106
109
|
* @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.
|
|
107
110
|
*/
|
|
108
111
|
updateOrderByMarkerAndId(marker: string, id: number, body: IOrderData, langCode?: string): Promise<IBaseOrdersEntity | IError>;
|
|
109
112
|
}
|
|
110
113
|
/**
|
|
114
|
+
* Interface for the orders storage object.
|
|
111
115
|
* @interface IOrdersByMarkerEntity
|
|
112
|
-
*
|
|
113
116
|
* @property {IOrderByMarkerEntity[]} items - Array of order storage objects. Example:
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
* @property {number}
|
|
117
|
+
[
|
|
118
|
+
{
|
|
119
|
+
"id": 55,
|
|
120
|
+
"storageId": 1,
|
|
121
|
+
"createdDate": "2025-03-22T21:12:42.371Z",
|
|
122
|
+
"statusIdentifier": "inProgress",
|
|
123
|
+
"formIdentifier": "orderForm",
|
|
124
|
+
"formData": [
|
|
125
|
+
{
|
|
126
|
+
"marker": "order_name",
|
|
127
|
+
"value": "Ivan",
|
|
128
|
+
"type": "string"
|
|
129
|
+
}
|
|
130
|
+
],
|
|
131
|
+
"attributeSetIdentifier": "order_form",
|
|
132
|
+
"totalSum": "300.00",
|
|
133
|
+
"currency": "",
|
|
134
|
+
"paymentAccountIdentifier": "cash",
|
|
135
|
+
"paymentAccountLocalizeInfos": {
|
|
136
|
+
"title": "Cash"
|
|
137
|
+
},
|
|
138
|
+
"products": [
|
|
139
|
+
{
|
|
140
|
+
"id": 2957,
|
|
141
|
+
"title": "Cosmo",
|
|
142
|
+
"sku": null,
|
|
143
|
+
"previewImage": null,
|
|
144
|
+
"price": 150,
|
|
145
|
+
"quantity": 2
|
|
146
|
+
}
|
|
147
|
+
],
|
|
148
|
+
"isCompleted": false
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
* @property {number} total - Total number of found records. Example: 100.
|
|
149
152
|
* @description Represents a response from the order storage by marker.
|
|
150
153
|
*/
|
|
151
154
|
interface IOrdersByMarkerEntity {
|
|
@@ -154,13 +157,11 @@ interface IOrdersByMarkerEntity {
|
|
|
154
157
|
}
|
|
155
158
|
/**
|
|
156
159
|
* Interface representing a picture entity.
|
|
157
|
-
*
|
|
158
160
|
* @interface IPicture
|
|
159
|
-
*
|
|
160
|
-
* @property {string} filename - The name of the file. Example: "image.jpg".
|
|
161
|
+
* @property {string} filename - The name of the file. Example: "image.jpg".
|
|
161
162
|
* @property {string} downloadLink - The URL link to download the picture. Example: "https://example.com/image.jpg".
|
|
162
|
-
* @property {number} size
|
|
163
|
-
* @property {string} previewLink
|
|
163
|
+
* @property {number} size - The size of the picture in bytes. Example: 102400.
|
|
164
|
+
* @property {string} previewLink - The URL link to preview the picture. Example: "https://example.com/image-preview.jpg".
|
|
164
165
|
* @description This interface defines the structure for a picture entity, including its filename, download link, size, and preview link.
|
|
165
166
|
*/
|
|
166
167
|
interface IPicture {
|
|
@@ -170,22 +171,36 @@ interface IPicture {
|
|
|
170
171
|
previewLink: string;
|
|
171
172
|
}
|
|
172
173
|
/**
|
|
174
|
+
* Interface representing a product in an order.
|
|
173
175
|
* @interface IOrderProducts
|
|
174
|
-
*
|
|
175
|
-
* @property {number}
|
|
176
|
-
* @property {
|
|
176
|
+
* @property {number} id - Product id. Example: 2957.
|
|
177
|
+
* @property {number} quantity - Product quantity. Example: 1.
|
|
178
|
+
* @property {string} title - Product title. Example: "Cosmo".
|
|
179
|
+
* @property {string | null} sku - Product sku. Example: "SKU".
|
|
180
|
+
* @property {any} previewImage - Product previewImage. Example:
|
|
181
|
+
{
|
|
182
|
+
"filename": "image.jpg",
|
|
183
|
+
"downloadLink": "https://example.com/image.jpg",
|
|
184
|
+
"size": 102400,
|
|
185
|
+
"previewLink": "https://example.com/image-preview.jpg"
|
|
186
|
+
}
|
|
187
|
+
* @property {number} price - Product price. Example: 150.
|
|
177
188
|
* @description Represents a product in an order.
|
|
178
189
|
*/
|
|
179
190
|
interface IOrderProducts {
|
|
180
|
-
|
|
191
|
+
id: number;
|
|
181
192
|
quantity: number;
|
|
193
|
+
title: string;
|
|
194
|
+
sku: string | null;
|
|
195
|
+
previewImage: any;
|
|
196
|
+
price: number;
|
|
182
197
|
}
|
|
183
198
|
/**
|
|
199
|
+
* Interface representing form data for orders.
|
|
184
200
|
* @interface IOrdersFormData
|
|
185
|
-
*
|
|
186
201
|
* @property {string} marker - Marker of form field. Example: "name_1".
|
|
187
|
-
* @property {string} type
|
|
188
|
-
* @property {string} value
|
|
202
|
+
* @property {string} type - Type of value. Example: "string".
|
|
203
|
+
* @property {string} value - Value. Example: "Name".
|
|
189
204
|
* @description Represents a form data for orders.
|
|
190
205
|
*/
|
|
191
206
|
interface IOrdersFormData {
|
|
@@ -194,10 +209,10 @@ interface IOrdersFormData {
|
|
|
194
209
|
value: any;
|
|
195
210
|
}
|
|
196
211
|
/**
|
|
212
|
+
* Interface representing product data in an order.
|
|
197
213
|
* @interface IOrderProductData
|
|
198
|
-
*
|
|
199
214
|
* @property {number} productId - Product identifier. Example: 1.
|
|
200
|
-
* @property {number} quantity
|
|
215
|
+
* @property {number} quantity - Quantity of the product. Example: 2.
|
|
201
216
|
* @description Represents a product data in an order.
|
|
202
217
|
*/
|
|
203
218
|
interface IOrderProductData {
|
|
@@ -205,61 +220,80 @@ interface IOrderProductData {
|
|
|
205
220
|
quantity: number;
|
|
206
221
|
}
|
|
207
222
|
/**
|
|
223
|
+
* Interface representing product data in an order.
|
|
224
|
+
* @interface IOrderProductsData
|
|
225
|
+
* @property {number} id - Product identifier. Example: 1.
|
|
226
|
+
* @property {any} previewImage - Product preview image.
|
|
227
|
+
* @property {number} price - Product price. Example: 10.
|
|
228
|
+
* @property {number} quantity - Quantity of the product. Example: 2.
|
|
229
|
+
* @property {string} sku - Product SKU. Example: "sku_1".
|
|
230
|
+
* @property {string} title - Product title. Example: "Product 1".
|
|
231
|
+
* @description Represents a product data in an order.
|
|
232
|
+
*/
|
|
233
|
+
interface IOrderProductsData {
|
|
234
|
+
id: number;
|
|
235
|
+
previewImage: any;
|
|
236
|
+
price: number;
|
|
237
|
+
quantity: number;
|
|
238
|
+
sku: string;
|
|
239
|
+
title: string;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* Interface representing an order storage object.
|
|
208
243
|
* @interface IBaseOrdersEntity
|
|
209
|
-
*
|
|
210
|
-
* @property {
|
|
211
|
-
* @property {string}
|
|
212
|
-
* @property {
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
* @property {
|
|
233
|
-
* @property {
|
|
234
|
-
* @property {string}
|
|
235
|
-
* @property {string} [statusIdentifier] - Text identifier of order status object (if not set, default status will be assigned). Example: "status-1".
|
|
244
|
+
* @property {number} id - Object identifier. Example: 1.
|
|
245
|
+
* @property {string} formIdentifier - Text identifier of the form. Example: "bar-orders-form".
|
|
246
|
+
* @property {string} paymentAccountIdentifier - Text identifier of the order payment. Example: "payment-1".
|
|
247
|
+
* @property {IOrdersFormData[]} formData - Data submitted by the form linked to the order store. Example:
|
|
248
|
+
[
|
|
249
|
+
{
|
|
250
|
+
"marker": "name_1",
|
|
251
|
+
"value": "Name",
|
|
252
|
+
"type": "string"
|
|
253
|
+
}
|
|
254
|
+
]
|
|
255
|
+
* @property {IOrderProductsData[]} products - Array of products added to order. Example:
|
|
256
|
+
[
|
|
257
|
+
{
|
|
258
|
+
"id": 2957,
|
|
259
|
+
"title": "Cosmo",
|
|
260
|
+
"sku": null,
|
|
261
|
+
"previewImage": null,
|
|
262
|
+
"price": 150,
|
|
263
|
+
"quantity": 2
|
|
264
|
+
}
|
|
265
|
+
]
|
|
266
|
+
* @property {string} currency - Currency used to pay for the order. Example: "USD".
|
|
267
|
+
* @property {number} totalSum - Total order amount. Example: "150".
|
|
268
|
+
* @property {string} [createdDate] - Order creation date. Example: "2023-10-01T12:00:00Z".
|
|
269
|
+
* @property {string} [statusIdentifier] - Text identifier of order status object (if not set, default status will be assigned). Example: "status-1".
|
|
236
270
|
*/
|
|
237
271
|
interface IBaseOrdersEntity {
|
|
238
272
|
id: number;
|
|
239
273
|
formIdentifier: string;
|
|
240
274
|
paymentAccountIdentifier: string;
|
|
241
275
|
formData: IOrdersFormData[];
|
|
242
|
-
products:
|
|
276
|
+
products: IOrderProductsData[];
|
|
243
277
|
currency: string;
|
|
244
278
|
totalSum: number;
|
|
245
279
|
createdDate?: string;
|
|
246
280
|
statusIdentifier?: string;
|
|
247
281
|
}
|
|
248
282
|
/**
|
|
283
|
+
* Interface representing a response from the order storage.
|
|
249
284
|
* @interface IBaseOrdersEntityResponse
|
|
250
|
-
*
|
|
251
285
|
* @property {IBaseOrdersEntity[]} items - Array of order storage objects. Example:
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
* @property {string | number}
|
|
286
|
+
[
|
|
287
|
+
{
|
|
288
|
+
"id": 2957,
|
|
289
|
+
"title": "Cosmo",
|
|
290
|
+
"sku": null,
|
|
291
|
+
"previewImage": null,
|
|
292
|
+
"price": 150,
|
|
293
|
+
"quantity": 2
|
|
294
|
+
}
|
|
295
|
+
]
|
|
296
|
+
* @property {string | number} total - Total number of found records. Example: 100.
|
|
263
297
|
* @description Represents a response from the order storage.
|
|
264
298
|
*/
|
|
265
299
|
interface IBaseOrdersEntityResponse {
|
|
@@ -267,17 +301,17 @@ interface IBaseOrdersEntityResponse {
|
|
|
267
301
|
total: string | number;
|
|
268
302
|
}
|
|
269
303
|
/**
|
|
304
|
+
* Interface representing an order storage object.
|
|
270
305
|
* @interface IOrdersEntity
|
|
271
|
-
*
|
|
272
|
-
* @property {
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
* @property {
|
|
278
|
-
* @property {string}
|
|
279
|
-
* @property {
|
|
280
|
-
* @property {number | null} generalTypeId - Type identifier. Example: 1.
|
|
306
|
+
* @property {number} id - Object identifier. Example: 1.
|
|
307
|
+
* @property {ILocalizeInfo} localizeInfos - Name considering localization. Example:
|
|
308
|
+
{
|
|
309
|
+
"title": "Cash"
|
|
310
|
+
}
|
|
311
|
+
* @property {number | null} position - Position in orders storage. Example: 1.
|
|
312
|
+
* @property {string} identifier - Textual identifier for the record field. Example: "order_storage_1".
|
|
313
|
+
* @property {string} formIdentifier - Textual identifier for the form used by the order storage. Example: "bar-orders-form".
|
|
314
|
+
* @property {number | null} generalTypeId - Type identifier. Example: 1.
|
|
281
315
|
* @property {IPaymentAccountIdentifiers[]} paymentAccountIdentifiers - Array of textual identifiers of payment accounts used by the order storage. Example: [{ "identifier": "payment-1" }].
|
|
282
316
|
* @description Represents an order storage object.
|
|
283
317
|
*/
|
|
@@ -291,8 +325,8 @@ interface IOrdersEntity {
|
|
|
291
325
|
paymentAccountIdentifiers: IPaymentAccountIdentifiers[];
|
|
292
326
|
}
|
|
293
327
|
/**
|
|
328
|
+
* Interface representing an identifier for a payment account used in an order.
|
|
294
329
|
* @interface IPaymentAccountIdentifiers
|
|
295
|
-
*
|
|
296
330
|
* @property {string} identifier - Textual identifier of the payment account. Example: "payment-1".
|
|
297
331
|
* @description Represents an identifier for a payment account used in an order.
|
|
298
332
|
*/
|
|
@@ -300,19 +334,19 @@ interface IPaymentAccountIdentifiers {
|
|
|
300
334
|
identifier: string;
|
|
301
335
|
}
|
|
302
336
|
/**
|
|
337
|
+
* Interface representing the data required to create or update an order in the order storage.
|
|
303
338
|
* @interface IOrderData
|
|
304
|
-
*
|
|
305
|
-
* @property {string}
|
|
306
|
-
* @property {
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
* @property {IOrderProductData[]} products - An array of ordered products. Example: .
|
|
339
|
+
* @property {string} formIdentifier - Text identifier of the form object linked to the order repository. Example: "bar-orders-form".
|
|
340
|
+
* @property {string} paymentAccountIdentifier - Text identifier of the payment object linked to the order repository. Example: "payment-1".
|
|
341
|
+
* @property {IOrdersFormData | IOrdersFormData[]} formData - Form data linked to the order repository. Example:
|
|
342
|
+
[
|
|
343
|
+
{
|
|
344
|
+
"marker": "name_1",
|
|
345
|
+
"value": "Name",
|
|
346
|
+
"type": "string"
|
|
347
|
+
}
|
|
348
|
+
]
|
|
349
|
+
* @property {IOrderProductData[]} products - An array of ordered products. Example: .
|
|
316
350
|
* @description Represents the data required to create or update an order in the order storage.
|
|
317
351
|
*/
|
|
318
352
|
interface IOrderData {
|
|
@@ -322,28 +356,29 @@ interface IOrderData {
|
|
|
322
356
|
products: IOrderProductData[];
|
|
323
357
|
}
|
|
324
358
|
/**
|
|
359
|
+
* Interface representing an order product data.
|
|
325
360
|
* @interface IOrderByMarkerEntity
|
|
326
|
-
*
|
|
327
|
-
* @property {number}
|
|
328
|
-
* @property {
|
|
329
|
-
* @property {string}
|
|
330
|
-
* @property {string}
|
|
331
|
-
* @property {
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
* @property {string
|
|
341
|
-
* @property {string}
|
|
342
|
-
* @property {string
|
|
343
|
-
* @property {string | null} [paymentAccountIdentifier] - Textual identifier for the order payment. Example: "payment-1".
|
|
361
|
+
* @property {number} id - Object identifier. Example: 125.
|
|
362
|
+
* @property {number} storageId - Identifier of the order storage object. Example: 1.
|
|
363
|
+
* @property {string} createdDate - Date when the order was created. Example: "2023-10-01T12:00:00Z".
|
|
364
|
+
* @property {string} [statusIdentifier] - Text identifier of the order status. Example: "order-status-1".
|
|
365
|
+
* @property {string} [formIdentifier] - Text identifier of the form. Example: "bar-orders-form".
|
|
366
|
+
* @property {IOrdersFormData[]} formData - Data submitted by the form linked to the order store. Example:
|
|
367
|
+
[
|
|
368
|
+
{
|
|
369
|
+
"marker": "order_name",
|
|
370
|
+
"value": "Ivan",
|
|
371
|
+
"type": "string"
|
|
372
|
+
}
|
|
373
|
+
]
|
|
374
|
+
* @property {string | null} [attributeSetIdentifier] - Text identifier of the attribute set. Example: "attribute-set-1".
|
|
375
|
+
* @property {string} totalSum - Total order amount. Example: "100.00".
|
|
376
|
+
* @property {string} currency - Currency used to pay for the order. Example: "USD".
|
|
377
|
+
* @property {string | null} [paymentAccountIdentifier] - Textual identifier for the order payment. Example: "payment-1".
|
|
344
378
|
* @property {Record<string, any>} paymentAccountLocalizeInfos - Payment account name considering localization. Example: { "en_US": "USD Payment", "ru_RU": "Оплата в долларах США" }.
|
|
345
|
-
* @property {IOrderProducts[]}
|
|
346
|
-
|
|
379
|
+
* @property {IOrderProducts[]} products - Array of products added to order. Example:
|
|
380
|
+
[{ "id": 1, "name": "Product 1", "quantity": 2 }].
|
|
381
|
+
* @property {boolean} isCompleted - Indicates that the order has been completed. Example: true.
|
|
347
382
|
* @description Represents an order storage object created by the user.
|
|
348
383
|
*/
|
|
349
384
|
interface IOrderByMarkerEntity {
|