oneentry 1.0.172 → 1.0.174
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/changelog.md +48 -0
- package/dist/admins/adminsApi.d.ts +7 -7
- package/dist/admins/adminsApi.js +7 -7
- package/dist/admins/adminsInterfaces.d.ts +22 -22
- package/dist/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/dist/attribute-sets/attributeSetsApi.js +8 -8
- package/dist/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/dist/auth-provider/authProviderApi.d.ts +31 -31
- package/dist/auth-provider/authProviderApi.js +31 -31
- package/dist/auth-provider/authProvidersInterfaces.d.ts +54 -54
- package/dist/base/asyncModules.d.ts +6 -6
- package/dist/base/asyncModules.js +6 -6
- package/dist/base/syncModules.d.ts +1 -1
- package/dist/base/syncModules.js +1 -1
- package/dist/base/utils.d.ts +4 -4
- package/dist/blocks/blocksApi.d.ts +35 -35
- package/dist/blocks/blocksApi.js +35 -35
- package/dist/blocks/blocksInterfaces.d.ts +55 -55
- package/dist/discounts/discountsApi.d.ts +14 -14
- package/dist/discounts/discountsApi.js +14 -14
- package/dist/discounts/discountsInterfaces.d.ts +52 -52
- package/dist/events/eventsApi.d.ts +13 -13
- package/dist/events/eventsApi.js +13 -13
- package/dist/events/eventsInterfaces.d.ts +18 -18
- package/dist/file-uploading/fileUploadingApi.d.ts +16 -16
- package/dist/file-uploading/fileUploadingApi.js +14 -17
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +30 -30
- package/dist/filters/filtersApi.d.ts +1 -1
- package/dist/filters/filtersApi.js +1 -1
- package/dist/filters/filtersInterfaces.d.ts +7 -7
- package/dist/forms/formsApi.d.ts +3 -3
- package/dist/forms/formsApi.js +3 -3
- package/dist/forms/formsInterfaces.d.ts +42 -42
- package/dist/forms-data/formsDataApi.d.ts +14 -14
- package/dist/forms-data/formsDataApi.js +14 -14
- package/dist/forms-data/formsDataInterfaces.d.ts +67 -68
- package/dist/general-types/generalTypesInterfaces.d.ts +2 -2
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/integration-collections/integrationCollectionsApi.d.ts +26 -30
- package/dist/integration-collections/integrationCollectionsApi.js +24 -28
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +61 -60
- package/dist/locales/localesInterfaces.d.ts +8 -8
- package/dist/menus/menusApi.d.ts +1 -1
- package/dist/menus/menusApi.js +1 -1
- package/dist/menus/menusInterfaces.d.ts +12 -12
- package/dist/orders/ordersApi.d.ts +26 -26
- package/dist/orders/ordersApi.js +26 -26
- package/dist/orders/ordersInterfaces.d.ts +101 -101
- package/dist/pages/pagesApi.d.ts +6 -6
- package/dist/pages/pagesApi.js +6 -6
- package/dist/pages/pagesInterfaces.d.ts +46 -46
- package/dist/payments/paymentsApi.d.ts +8 -8
- package/dist/payments/paymentsApi.js +8 -8
- package/dist/payments/paymentsInterfaces.d.ts +31 -31
- package/dist/product-statuses/productStatusesApi.d.ts +2 -2
- package/dist/product-statuses/productStatusesApi.js +2 -2
- package/dist/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/dist/products/productsApi.d.ts +37 -37
- package/dist/products/productsApi.js +36 -36
- package/dist/products/productsInterfaces.d.ts +100 -100
- package/dist/search/searchApi.d.ts +3 -3
- package/dist/search/searchApi.js +3 -3
- package/dist/search/searchInterfaces.d.ts +4 -4
- package/dist/sitemap/sitemapApi.d.ts +1 -1
- package/dist/sitemap/sitemapApi.js +1 -1
- package/dist/sitemap/sitemapInterfaces.d.ts +2 -2
- package/dist/subscriptions/subscriptionsApi.d.ts +3 -3
- package/dist/subscriptions/subscriptionsApi.js +3 -3
- package/dist/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/dist/system/systemApi.d.ts +4 -4
- package/dist/system/systemApi.js +2 -2
- package/dist/system/systemInterfaces.d.ts +11 -5
- package/dist/templates/templatesApi.d.ts +5 -5
- package/dist/templates/templatesApi.js +5 -5
- package/dist/templates/templatesInterfaces.d.ts +13 -13
- package/dist/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/dist/templates-preview/templatesPreviewApi.js +1 -1
- package/dist/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/dist/user-activity/userActivityApi.d.ts +1 -1
- package/dist/user-activity/userActivityApi.js +1 -1
- package/dist/user-activity/userActivityInterfaces.d.ts +4 -4
- package/dist/user-groups/userGroupsApi.d.ts +1 -1
- package/dist/user-groups/userGroupsApi.js +1 -1
- package/dist/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/dist/users/usersApi.d.ts +7 -7
- package/dist/users/usersApi.js +7 -7
- package/dist/users/usersInterfaces.d.ts +34 -34
- package/esm/admins/adminsApi.d.ts +7 -7
- package/esm/admins/adminsApi.js +7 -7
- package/esm/admins/adminsInterfaces.d.ts +22 -22
- package/esm/attribute-sets/attributeSetsApi.d.ts +8 -8
- package/esm/attribute-sets/attributeSetsApi.js +8 -8
- package/esm/attribute-sets/attributeSetsInterfaces.d.ts +31 -31
- package/esm/auth-provider/authProviderApi.d.ts +31 -31
- package/esm/auth-provider/authProviderApi.js +31 -31
- package/esm/auth-provider/authProvidersInterfaces.d.ts +54 -54
- package/esm/base/asyncModules.d.ts +6 -6
- package/esm/base/asyncModules.js +6 -6
- package/esm/base/syncModules.d.ts +1 -1
- package/esm/base/syncModules.js +1 -1
- package/esm/base/utils.d.ts +4 -4
- package/esm/blocks/blocksApi.d.ts +35 -35
- package/esm/blocks/blocksApi.js +35 -35
- package/esm/blocks/blocksInterfaces.d.ts +55 -55
- package/esm/discounts/discountsApi.d.ts +14 -14
- package/esm/discounts/discountsApi.js +14 -14
- package/esm/discounts/discountsInterfaces.d.ts +52 -52
- package/esm/events/eventsApi.d.ts +13 -13
- package/esm/events/eventsApi.js +13 -13
- package/esm/events/eventsInterfaces.d.ts +18 -18
- package/esm/file-uploading/fileUploadingApi.d.ts +16 -16
- package/esm/file-uploading/fileUploadingApi.js +14 -17
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +30 -30
- package/esm/filters/filtersApi.d.ts +1 -1
- package/esm/filters/filtersApi.js +1 -1
- package/esm/filters/filtersInterfaces.d.ts +7 -7
- package/esm/forms/formsApi.d.ts +3 -3
- package/esm/forms/formsApi.js +3 -3
- package/esm/forms/formsInterfaces.d.ts +42 -42
- package/esm/forms-data/formsDataApi.d.ts +14 -14
- package/esm/forms-data/formsDataApi.js +14 -14
- package/esm/forms-data/formsDataInterfaces.d.ts +67 -68
- package/esm/general-types/generalTypesInterfaces.d.ts +2 -2
- package/esm/index.d.ts +1 -1
- package/esm/index.js +1 -1
- package/esm/integration-collections/integrationCollectionsApi.d.ts +26 -30
- package/esm/integration-collections/integrationCollectionsApi.js +24 -28
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +61 -60
- package/esm/locales/localesInterfaces.d.ts +8 -8
- package/esm/menus/menusApi.d.ts +1 -1
- package/esm/menus/menusApi.js +1 -1
- package/esm/menus/menusInterfaces.d.ts +12 -12
- package/esm/orders/ordersApi.d.ts +26 -26
- package/esm/orders/ordersApi.js +26 -26
- package/esm/orders/ordersInterfaces.d.ts +101 -101
- package/esm/pages/pagesApi.d.ts +6 -6
- package/esm/pages/pagesApi.js +6 -6
- package/esm/pages/pagesInterfaces.d.ts +46 -46
- package/esm/payments/paymentsApi.d.ts +8 -8
- package/esm/payments/paymentsApi.js +8 -8
- package/esm/payments/paymentsInterfaces.d.ts +31 -31
- package/esm/product-statuses/productStatusesApi.d.ts +2 -2
- package/esm/product-statuses/productStatusesApi.js +2 -2
- package/esm/product-statuses/productStatusesInterfaces.d.ts +8 -8
- package/esm/products/productsApi.d.ts +37 -37
- package/esm/products/productsApi.js +36 -36
- package/esm/products/productsInterfaces.d.ts +100 -100
- package/esm/search/searchApi.d.ts +3 -3
- package/esm/search/searchApi.js +3 -3
- package/esm/search/searchInterfaces.d.ts +4 -4
- package/esm/sitemap/sitemapApi.d.ts +1 -1
- package/esm/sitemap/sitemapApi.js +1 -1
- package/esm/sitemap/sitemapInterfaces.d.ts +2 -2
- package/esm/subscriptions/subscriptionsApi.d.ts +3 -3
- package/esm/subscriptions/subscriptionsApi.js +3 -3
- package/esm/subscriptions/subscriptionsInterfaces.d.ts +11 -11
- package/esm/system/systemApi.d.ts +4 -4
- package/esm/system/systemApi.js +2 -2
- package/esm/system/systemInterfaces.d.ts +11 -5
- package/esm/templates/templatesApi.d.ts +5 -5
- package/esm/templates/templatesApi.js +5 -5
- package/esm/templates/templatesInterfaces.d.ts +13 -13
- package/esm/templates-preview/templatesPreviewApi.d.ts +1 -1
- package/esm/templates-preview/templatesPreviewApi.js +1 -1
- package/esm/templates-preview/templatesPreviewInterfaces.d.ts +17 -17
- package/esm/user-activity/userActivityApi.d.ts +1 -1
- package/esm/user-activity/userActivityApi.js +1 -1
- package/esm/user-activity/userActivityInterfaces.d.ts +4 -4
- package/esm/user-groups/userGroupsApi.d.ts +1 -1
- package/esm/user-groups/userGroupsApi.js +1 -1
- package/esm/user-groups/userGroupsInterfaces.d.ts +5 -5
- package/esm/users/usersApi.d.ts +7 -7
- package/esm/users/usersApi.js +7 -7
- package/esm/users/usersInterfaces.d.ts +34 -34
- package/package.json +2 -2
|
@@ -22,8 +22,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
22
22
|
* Getting all the order storage objects.
|
|
23
23
|
* @handleName getAllOrdersStorage
|
|
24
24
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
25
|
-
* @param {number} [offset] -
|
|
26
|
-
* @param {number} [limit] -
|
|
25
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
26
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
27
27
|
* @returns {Promise<IOrdersEntity[] | IError>} Returns an array of order storage objects.
|
|
28
28
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
29
29
|
* @description This method requires user authorization.
|
|
@@ -34,10 +34,10 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
34
34
|
/**
|
|
35
35
|
* Getting all orders from the orders storage object created by the user.
|
|
36
36
|
* @handleName getAllOrdersByMarker
|
|
37
|
-
* @param {string} marker -
|
|
37
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
38
38
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
39
|
-
* @param {number} [offset] -
|
|
40
|
-
* @param {number} [limit] -
|
|
39
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
40
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
41
41
|
* @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with the orders.
|
|
42
42
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
43
43
|
* @description This method requires user authorization.
|
|
@@ -48,7 +48,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
48
48
|
/**
|
|
49
49
|
* Retrieve one order storage object by marker.
|
|
50
50
|
* @handleName getOrdersStorageByMarker
|
|
51
|
-
* @param {string} marker - Marker of the order
|
|
51
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
52
52
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
53
53
|
* @returns {Promise<IOrdersEntity | IError>} Return object of order information.
|
|
54
54
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -60,8 +60,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
60
60
|
/**
|
|
61
61
|
* Getting a single order from the order storage object created by the user.
|
|
62
62
|
* @handleName getOrderByMarkerAndId
|
|
63
|
-
* @param {string} marker -
|
|
64
|
-
* @param {number} id - ID
|
|
63
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
64
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
65
65
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
66
66
|
* @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
|
|
67
67
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -73,7 +73,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
73
73
|
/**
|
|
74
74
|
* Getting a single order created by the user, by its own id.
|
|
75
75
|
* @handleName getOrderById
|
|
76
|
-
* @param {number} id - ID
|
|
76
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
77
77
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
78
78
|
* @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
|
|
79
79
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -87,7 +87,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
87
87
|
/**
|
|
88
88
|
* Preview order calculation with discounts and coupons (without saving).
|
|
89
89
|
* @handleName previewOrder
|
|
90
|
-
* @param {ICreateOrderPreview} body - Order preview
|
|
90
|
+
* @param {ICreateOrderPreview} body - Order preview parameters.
|
|
91
91
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
92
92
|
* @returns {Promise<IOrderPreviewResponse | IError>} Returns an object with the order preview.
|
|
93
93
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -99,8 +99,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
99
99
|
/**
|
|
100
100
|
* Creation of an order in the order storage.
|
|
101
101
|
* @handleName createOrder
|
|
102
|
-
* @param {string} marker -
|
|
103
|
-
* @param {IOrderData} body -
|
|
102
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
103
|
+
* @param {IOrderData} body - Data for the new order.
|
|
104
104
|
* @example
|
|
105
105
|
{
|
|
106
106
|
"formIdentifier": "bar-orders-form",
|
|
@@ -128,9 +128,9 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
128
128
|
/**
|
|
129
129
|
* Changing an order in the orders storage
|
|
130
130
|
* @handleName updateOrderByMarkerAndId
|
|
131
|
-
* @param {string} marker -
|
|
132
|
-
* @param {number} id - ID
|
|
133
|
-
* @param {IOrderData} body -
|
|
131
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
132
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
133
|
+
* @param {IOrderData} body - Data for updating the order.
|
|
134
134
|
* @example
|
|
135
135
|
{
|
|
136
136
|
"formIdentifier": "bar-orders-form",
|
|
@@ -159,10 +159,10 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
159
159
|
/**
|
|
160
160
|
* Get all orders statuses by Storage marker
|
|
161
161
|
* @handleName getAllStatusesByStorageMarker
|
|
162
|
-
* @param {string} marker -
|
|
162
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
163
163
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
164
|
-
* @param {number} [offset] -
|
|
165
|
-
* @param {number} [limit] -
|
|
164
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
165
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
166
166
|
* @returns {Promise<IOrderStatus[] | IError>} Returns an object with the orders statuses.
|
|
167
167
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
168
168
|
* @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}.
|
|
@@ -172,7 +172,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
172
172
|
/**
|
|
173
173
|
* Get all refund requests for an order.
|
|
174
174
|
* @handleName getRefunds
|
|
175
|
-
* @param {number} id - Order
|
|
175
|
+
* @param {number} id - Order ID. Example: 1.
|
|
176
176
|
* @returns {Promise<IRefundRequest[] | IError>} Returns array of refund requests.
|
|
177
177
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
178
178
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/getRefunds getRefunds} documentation.
|
|
@@ -181,8 +181,8 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
181
181
|
/**
|
|
182
182
|
* Create a refund request for an order.
|
|
183
183
|
* @handleName createRefundRequest
|
|
184
|
-
* @param {number} id - Order
|
|
185
|
-
* @param {ICreateRefundRequest} body - Refund request
|
|
184
|
+
* @param {number} id - Order ID. Example: 1.
|
|
185
|
+
* @param {ICreateRefundRequest} body - Refund request data.
|
|
186
186
|
* @returns {Promise<boolean | IError>} Returns true if the refund request was created successfully.
|
|
187
187
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
188
188
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/createRefundRequest createRefundRequest} documentation.
|
|
@@ -191,7 +191,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
191
191
|
/**
|
|
192
192
|
* Cancel a refund request for an order.
|
|
193
193
|
* @handleName cancelRefundRequest
|
|
194
|
-
* @param {number} id - Order
|
|
194
|
+
* @param {number} id - Order ID. Example: 1.
|
|
195
195
|
* @returns {Promise<boolean | IError>} Returns true if the refund request was cancelled successfully.
|
|
196
196
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
197
197
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/cancelRefundRequest cancelRefundRequest} documentation.
|
|
@@ -200,10 +200,10 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
200
200
|
/**
|
|
201
201
|
* Semantic (vector) search for the current user's orders.
|
|
202
202
|
* @handleName getOrdersByVectorSearch
|
|
203
|
-
* @param {IOrdersVectorSearch} body - Vector search
|
|
203
|
+
* @param {IOrdersVectorSearch} body - Vector search parameters. Example: `{ queryText: "winter jacket" }`.
|
|
204
204
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
205
|
-
* @param {number} [offset] -
|
|
206
|
-
* @param {number} [limit] -
|
|
205
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
206
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
207
207
|
* @returns {Promise<IVectorSearchResponse<IOrdersByMarkerEntity> | IError>} Returns an object with an array of found orders and total count.
|
|
208
208
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
209
209
|
* @description This method performs a semantic (vector) search over the orders of the authorized user. It requires user authorization.
|
|
@@ -231,7 +231,7 @@ export default class OrdersApi extends AsyncModules implements IOrdersApi {
|
|
|
231
231
|
* a reused body — a retry, a shared template — arrive wrapped twice: `createOrder`
|
|
232
232
|
* answered `400 formData's marker '#0' marker is required`, and
|
|
233
233
|
* `updateOrderByMarkerAndId` answered `200` and stored the broken `formData` in
|
|
234
|
-
* the order
|
|
234
|
+
* the order.
|
|
235
235
|
* @param {IOrderData} body - Order body as the caller passed it. Left unchanged.
|
|
236
236
|
* @param {string} langCode - Locale key to wrap `formData` into.
|
|
237
237
|
* @returns {object} A new body with `formData` as `{ [langCode]: [...] }`.
|
package/dist/orders/ordersApi.js
CHANGED
|
@@ -60,8 +60,8 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
60
60
|
* Getting all the order storage objects.
|
|
61
61
|
* @handleName getAllOrdersStorage
|
|
62
62
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
63
|
-
* @param {number} [offset] -
|
|
64
|
-
* @param {number} [limit] -
|
|
63
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
64
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
65
65
|
* @returns {Promise<IOrdersEntity[] | IError>} Returns an array of order storage objects.
|
|
66
66
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
67
67
|
* @description This method requires user authorization.
|
|
@@ -75,10 +75,10 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
75
75
|
/**
|
|
76
76
|
* Getting all orders from the orders storage object created by the user.
|
|
77
77
|
* @handleName getAllOrdersByMarker
|
|
78
|
-
* @param {string} marker -
|
|
78
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
79
79
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
80
|
-
* @param {number} [offset] -
|
|
81
|
-
* @param {number} [limit] -
|
|
80
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
81
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
82
82
|
* @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with the orders.
|
|
83
83
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
84
84
|
* @description This method requires user authorization.
|
|
@@ -94,7 +94,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
94
94
|
/**
|
|
95
95
|
* Retrieve one order storage object by marker.
|
|
96
96
|
* @handleName getOrdersStorageByMarker
|
|
97
|
-
* @param {string} marker - Marker of the order
|
|
97
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
98
98
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
99
99
|
* @returns {Promise<IOrdersEntity | IError>} Return object of order information.
|
|
100
100
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -109,8 +109,8 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
109
109
|
/**
|
|
110
110
|
* Getting a single order from the order storage object created by the user.
|
|
111
111
|
* @handleName getOrderByMarkerAndId
|
|
112
|
-
* @param {string} marker -
|
|
113
|
-
* @param {number} id - ID
|
|
112
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
113
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
114
114
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
115
115
|
* @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
|
|
116
116
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -127,7 +127,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
127
127
|
/**
|
|
128
128
|
* Getting a single order created by the user, by its own id.
|
|
129
129
|
* @handleName getOrderById
|
|
130
|
-
* @param {number} id - ID
|
|
130
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
131
131
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
132
132
|
* @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
|
|
133
133
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -146,7 +146,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
146
146
|
/**
|
|
147
147
|
* Preview order calculation with discounts and coupons (without saving).
|
|
148
148
|
* @handleName previewOrder
|
|
149
|
-
* @param {ICreateOrderPreview} body - Order preview
|
|
149
|
+
* @param {ICreateOrderPreview} body - Order preview parameters.
|
|
150
150
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
151
151
|
* @returns {Promise<IOrderPreviewResponse | IError>} Returns an object with the order preview.
|
|
152
152
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -161,8 +161,8 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
161
161
|
/**
|
|
162
162
|
* Creation of an order in the order storage.
|
|
163
163
|
* @handleName createOrder
|
|
164
|
-
* @param {string} marker -
|
|
165
|
-
* @param {IOrderData} body -
|
|
164
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
165
|
+
* @param {IOrderData} body - Data for the new order.
|
|
166
166
|
* @example
|
|
167
167
|
{
|
|
168
168
|
"formIdentifier": "bar-orders-form",
|
|
@@ -195,9 +195,9 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
195
195
|
/**
|
|
196
196
|
* Changing an order in the orders storage
|
|
197
197
|
* @handleName updateOrderByMarkerAndId
|
|
198
|
-
* @param {string} marker -
|
|
199
|
-
* @param {number} id - ID
|
|
200
|
-
* @param {IOrderData} body -
|
|
198
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
199
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
200
|
+
* @param {IOrderData} body - Data for updating the order.
|
|
201
201
|
* @example
|
|
202
202
|
{
|
|
203
203
|
"formIdentifier": "bar-orders-form",
|
|
@@ -231,10 +231,10 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
231
231
|
/**
|
|
232
232
|
* Get all orders statuses by Storage marker
|
|
233
233
|
* @handleName getAllStatusesByStorageMarker
|
|
234
|
-
* @param {string} marker -
|
|
234
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
235
235
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
236
|
-
* @param {number} [offset] -
|
|
237
|
-
* @param {number} [limit] -
|
|
236
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
237
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
238
238
|
* @returns {Promise<IOrderStatus[] | IError>} Returns an object with the orders statuses.
|
|
239
239
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
240
240
|
* @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}.
|
|
@@ -252,7 +252,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
252
252
|
/**
|
|
253
253
|
* Get all refund requests for an order.
|
|
254
254
|
* @handleName getRefunds
|
|
255
|
-
* @param {number} id - Order
|
|
255
|
+
* @param {number} id - Order ID. Example: 1.
|
|
256
256
|
* @returns {Promise<IRefundRequest[] | IError>} Returns array of refund requests.
|
|
257
257
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
258
258
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/getRefunds getRefunds} documentation.
|
|
@@ -264,8 +264,8 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
264
264
|
/**
|
|
265
265
|
* Create a refund request for an order.
|
|
266
266
|
* @handleName createRefundRequest
|
|
267
|
-
* @param {number} id - Order
|
|
268
|
-
* @param {ICreateRefundRequest} body - Refund request
|
|
267
|
+
* @param {number} id - Order ID. Example: 1.
|
|
268
|
+
* @param {ICreateRefundRequest} body - Refund request data.
|
|
269
269
|
* @returns {Promise<boolean | IError>} Returns true if the refund request was created successfully.
|
|
270
270
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
271
271
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/createRefundRequest createRefundRequest} documentation.
|
|
@@ -277,7 +277,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
277
277
|
/**
|
|
278
278
|
* Cancel a refund request for an order.
|
|
279
279
|
* @handleName cancelRefundRequest
|
|
280
|
-
* @param {number} id - Order
|
|
280
|
+
* @param {number} id - Order ID. Example: 1.
|
|
281
281
|
* @returns {Promise<boolean | IError>} Returns true if the refund request was cancelled successfully.
|
|
282
282
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
283
283
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/cancelRefundRequest cancelRefundRequest} documentation.
|
|
@@ -289,10 +289,10 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
289
289
|
/**
|
|
290
290
|
* Semantic (vector) search for the current user's orders.
|
|
291
291
|
* @handleName getOrdersByVectorSearch
|
|
292
|
-
* @param {IOrdersVectorSearch} body - Vector search
|
|
292
|
+
* @param {IOrdersVectorSearch} body - Vector search parameters. Example: `{ queryText: "winter jacket" }`.
|
|
293
293
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
294
|
-
* @param {number} [offset] -
|
|
295
|
-
* @param {number} [limit] -
|
|
294
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
295
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
296
296
|
* @returns {Promise<IVectorSearchResponse<IOrdersByMarkerEntity> | IError>} Returns an object with an array of found orders and total count.
|
|
297
297
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
298
298
|
* @description This method performs a semantic (vector) search over the orders of the authorized user. It requires user authorization.
|
|
@@ -337,7 +337,7 @@ class OrdersApi extends asyncModules_1.default {
|
|
|
337
337
|
* a reused body — a retry, a shared template — arrive wrapped twice: `createOrder`
|
|
338
338
|
* answered `400 formData's marker '#0' marker is required`, and
|
|
339
339
|
* `updateOrderByMarkerAndId` answered `200` and stored the broken `formData` in
|
|
340
|
-
* the order
|
|
340
|
+
* the order.
|
|
341
341
|
* @param {IOrderData} body - Order body as the caller passed it. Left unchanged.
|
|
342
342
|
* @param {string} langCode - Locale key to wrap `formData` into.
|
|
343
343
|
* @returns {object} A new body with `formData` as `{ [langCode]: [...] }`.
|