oneentry 1.0.173 → 1.0.175
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 +35 -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 +30 -30
- package/dist/auth-provider/authProviderApi.js +30 -30
- package/dist/auth-provider/authProviderSchemas.d.ts +1 -1
- package/dist/auth-provider/authProvidersInterfaces.d.ts +54 -53
- 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 +3 -3
- package/dist/base/validation.d.ts +1 -1
- package/dist/base/validation.js +1 -1
- 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 +14 -14
- package/dist/file-uploading/fileUploadingApi.js +14 -14
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- 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/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/dist/integration-collections/integrationCollectionsApi.js +20 -20
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- 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 +99 -99
- 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 +96 -96
- 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/templates/templatesApi.d.ts +2 -2
- package/dist/templates/templatesApi.js +2 -2
- package/dist/templates/templatesInterfaces.d.ts +10 -10
- 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 +9 -9
- package/dist/users/usersApi.js +9 -9
- package/dist/users/usersInterfaces.d.ts +40 -39
- package/dist/users/usersSchemas.d.ts +1 -1
- 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 +30 -30
- package/esm/auth-provider/authProviderApi.js +30 -30
- package/esm/auth-provider/authProviderSchemas.d.ts +1 -1
- package/esm/auth-provider/authProvidersInterfaces.d.ts +54 -53
- 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 +3 -3
- package/esm/base/validation.d.ts +1 -1
- package/esm/base/validation.js +1 -1
- 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 +14 -14
- package/esm/file-uploading/fileUploadingApi.js +14 -14
- package/esm/file-uploading/fileUploadingInterfaces.d.ts +25 -25
- 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/integration-collections/integrationCollectionsApi.d.ts +20 -20
- package/esm/integration-collections/integrationCollectionsApi.js +20 -20
- package/esm/integration-collections/integrationCollectionsInterfaces.d.ts +44 -44
- 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 +99 -99
- 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 +96 -96
- 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/templates/templatesApi.d.ts +2 -2
- package/esm/templates/templatesApi.js +2 -2
- package/esm/templates/templatesInterfaces.d.ts +10 -10
- 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 +9 -9
- package/esm/users/usersApi.js +9 -9
- package/esm/users/usersInterfaces.d.ts +40 -39
- package/esm/users/usersSchemas.d.ts +1 -1
- package/package.json +2 -2
|
@@ -8,8 +8,8 @@ interface IOrdersApi {
|
|
|
8
8
|
* Getting all the order storage objects.
|
|
9
9
|
* @handleName getAllOrdersStorage
|
|
10
10
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
11
|
-
* @param {number} [offset] -
|
|
12
|
-
* @param {number} [limit] -
|
|
11
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
12
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
13
13
|
* @returns {Promise<IOrdersEntity[] | IError>} Returns an array of order storage objects.
|
|
14
14
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
15
15
|
* @description This method gets all the order storage objects. This method requires user authorization.
|
|
@@ -19,10 +19,10 @@ interface IOrdersApi {
|
|
|
19
19
|
/**
|
|
20
20
|
* Getting all orders from the orders storage object created by the user.
|
|
21
21
|
* @handleName getAllOrdersByMarker
|
|
22
|
-
* @param {string} marker -
|
|
22
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
23
23
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
24
|
-
* @param {number} [offset] -
|
|
25
|
-
* @param {number} [limit] -
|
|
24
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
25
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
26
26
|
* @returns {Promise<IOrdersByMarkerEntity | IError>} Returns an object with the orders.
|
|
27
27
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
28
28
|
* @description This method gets all orders from the orders storage object created by the user. This method requires user authorization.
|
|
@@ -32,7 +32,7 @@ interface IOrdersApi {
|
|
|
32
32
|
/**
|
|
33
33
|
* Retrieve one order storage object by marker.
|
|
34
34
|
* @handleName getOrdersStorageByMarker
|
|
35
|
-
* @param {string} marker - Marker of the order
|
|
35
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
36
36
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
37
37
|
* @returns {Promise<IOrdersEntity | IError>} Return object of order information.
|
|
38
38
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -43,8 +43,8 @@ interface IOrdersApi {
|
|
|
43
43
|
/**
|
|
44
44
|
* Getting a single order from the order storage object created by the user.
|
|
45
45
|
* @handleName getOrderByMarkerAndId
|
|
46
|
-
* @param {string} marker -
|
|
47
|
-
* @param {number} id - ID
|
|
46
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
47
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
48
48
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
49
49
|
* @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
|
|
50
50
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -55,7 +55,7 @@ interface IOrdersApi {
|
|
|
55
55
|
/**
|
|
56
56
|
* Getting a single order created by the user, by its own id.
|
|
57
57
|
* @handleName getOrderById
|
|
58
|
-
* @param {number} id - ID
|
|
58
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
59
59
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
60
60
|
* @returns {Promise<IOrderByMarkerEntity | IError>} Returns an object with the order.
|
|
61
61
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
@@ -66,8 +66,8 @@ interface IOrdersApi {
|
|
|
66
66
|
/**
|
|
67
67
|
* Creation of an order in the order storage.
|
|
68
68
|
* @handleName createOrder
|
|
69
|
-
* @param {string} marker -
|
|
70
|
-
* @param {IOrderData} body -
|
|
69
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
70
|
+
* @param {IOrderData} body - Data for the new order.
|
|
71
71
|
* @example
|
|
72
72
|
{
|
|
73
73
|
"formIdentifier": "bar-orders-form",
|
|
@@ -94,9 +94,9 @@ interface IOrdersApi {
|
|
|
94
94
|
/**
|
|
95
95
|
* Changing an order in the orders storage
|
|
96
96
|
* @handleName updateOrderByMarkerAndId
|
|
97
|
-
* @param {string} marker -
|
|
98
|
-
* @param {number} id - ID
|
|
99
|
-
* @param {IOrderData} body -
|
|
97
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
98
|
+
* @param {number} id - Order ID. Example: 12345.
|
|
99
|
+
* @param {IOrderData} body - Data for updating the order.
|
|
100
100
|
* @example
|
|
101
101
|
{
|
|
102
102
|
"formIdentifier": "bar-orders-form",
|
|
@@ -124,7 +124,7 @@ interface IOrdersApi {
|
|
|
124
124
|
/**
|
|
125
125
|
* Preview order calculation with discounts and coupons (without saving).
|
|
126
126
|
* @handleName previewOrder
|
|
127
|
-
* @param {ICreateOrderPreview} body - Order preview
|
|
127
|
+
* @param {ICreateOrderPreview} body - Order preview parameters.
|
|
128
128
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
129
129
|
* @returns {Promise<IOrderPreviewResponse | IError>} Returns an object with the order preview.
|
|
130
130
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -135,10 +135,10 @@ interface IOrdersApi {
|
|
|
135
135
|
/**
|
|
136
136
|
* Get all orders statuses by Storage marker
|
|
137
137
|
* @handleName getAllStatusesByStorageMarker
|
|
138
|
-
* @param {string} marker -
|
|
138
|
+
* @param {string} marker - Marker of the order storage. Example: "order_storage_1".
|
|
139
139
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
140
|
-
* @param {number} [offset] -
|
|
141
|
-
* @param {number} [limit] -
|
|
140
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
141
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
142
142
|
* @returns {Promise<IOrderStatus[] | IError>} Returns an object with the orders statuses.
|
|
143
143
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
144
144
|
* @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}.
|
|
@@ -147,7 +147,7 @@ interface IOrdersApi {
|
|
|
147
147
|
/**
|
|
148
148
|
* Get all refund requests for an order.
|
|
149
149
|
* @handleName getOrderRefunds
|
|
150
|
-
* @param {number} id - Order
|
|
150
|
+
* @param {number} id - Order ID.
|
|
151
151
|
* @returns {Promise<IRefundRequest[] | IError>} Returns array of refund requests.
|
|
152
152
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
153
153
|
*/
|
|
@@ -155,8 +155,8 @@ interface IOrdersApi {
|
|
|
155
155
|
/**
|
|
156
156
|
* Create a refund request for an order.
|
|
157
157
|
* @handleName createRefundRequest
|
|
158
|
-
* @param {number} id - Order
|
|
159
|
-
* @param {ICreateRefundRequest} body - Refund request
|
|
158
|
+
* @param {number} id - Order ID.
|
|
159
|
+
* @param {ICreateRefundRequest} body - Refund request data.
|
|
160
160
|
* @returns {Promise<boolean | IError>} Returns true if the refund request was created successfully.
|
|
161
161
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
162
162
|
*/
|
|
@@ -164,7 +164,7 @@ interface IOrdersApi {
|
|
|
164
164
|
/**
|
|
165
165
|
* Cancel a refund request for an order.
|
|
166
166
|
* @handleName cancelRefundRequest
|
|
167
|
-
* @param {number} id - Order
|
|
167
|
+
* @param {number} id - Order ID.
|
|
168
168
|
* @returns {Promise<boolean | IError>} Returns order entity.
|
|
169
169
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
170
170
|
*/
|
|
@@ -172,10 +172,10 @@ interface IOrdersApi {
|
|
|
172
172
|
/**
|
|
173
173
|
* Semantic (vector) search for the current user's orders.
|
|
174
174
|
* @handleName getOrdersByVectorSearch
|
|
175
|
-
* @param {IOrdersVectorSearch} body - Vector search
|
|
175
|
+
* @param {IOrdersVectorSearch} body - Vector search parameters. Example: `{ queryText: "winter jacket" }`.
|
|
176
176
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
177
|
-
* @param {number} [offset] -
|
|
178
|
-
* @param {number} [limit] -
|
|
177
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
178
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
179
179
|
* @returns {Promise<IVectorSearchResponse<IOrdersByMarkerEntity> | IError>} Returns an object with an array of found orders and total count.
|
|
180
180
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
181
181
|
*/
|
|
@@ -186,8 +186,8 @@ interface IOrdersApi {
|
|
|
186
186
|
* @interface IOrdersVectorSearch
|
|
187
187
|
* @property {string} queryText - Natural-language search query. Example: "winter jacket".
|
|
188
188
|
* @property {number} [vectorDistanceThreshold] - Override of the cosine distance threshold (0..2). Example: 0.3.
|
|
189
|
-
* @property {number} [maxHits] -
|
|
190
|
-
* @property {boolean} [debug] - When true
|
|
189
|
+
* @property {number} [maxHits] - Number of top candidates fetched before pagination. Default: 100. Maximum: 500. Example: 10.
|
|
190
|
+
* @property {boolean} [debug] - When `true`, each returned item gets a `distance` field. Example: false.
|
|
191
191
|
* @description Body for the orders vector/search endpoint.
|
|
192
192
|
*/
|
|
193
193
|
interface IOrdersVectorSearch {
|
|
@@ -199,7 +199,7 @@ interface IOrdersVectorSearch {
|
|
|
199
199
|
/**
|
|
200
200
|
* Interface for the orders storage object.
|
|
201
201
|
* @interface IOrdersByMarkerEntity
|
|
202
|
-
* @property {IOrderByMarkerEntity[]} items -
|
|
202
|
+
* @property {IOrderByMarkerEntity[]} items - Order storages in this response.
|
|
203
203
|
* @example
|
|
204
204
|
[
|
|
205
205
|
{
|
|
@@ -260,11 +260,11 @@ interface IPicture {
|
|
|
260
260
|
/**
|
|
261
261
|
* Interface representing a product in an order.
|
|
262
262
|
* @interface IOrderProducts
|
|
263
|
-
* @property {number} id - Product
|
|
263
|
+
* @property {number} id - Product ID. Example: 2957.
|
|
264
264
|
* @property {number} quantity - Product quantity. Example: 1.
|
|
265
265
|
* @property {string} title - Product title. Example: "Cosmo".
|
|
266
|
-
* @property {string | null} sku - Product
|
|
267
|
-
* @property {IPicture | null} previewImage -
|
|
266
|
+
* @property {string | null} sku - Product SKU. Example: "SKU".
|
|
267
|
+
* @property {IPicture | null} previewImage - Preview image of the product.
|
|
268
268
|
* @example
|
|
269
269
|
{
|
|
270
270
|
"filename": "image.jpg",
|
|
@@ -288,9 +288,9 @@ interface IOrderProducts {
|
|
|
288
288
|
/**
|
|
289
289
|
* Interface representing form data for orders.
|
|
290
290
|
* @interface IOrdersFormData
|
|
291
|
-
* @property {string} marker - Marker of form field. Example: "name_1".
|
|
292
|
-
* @property {string} type - Type of value
|
|
293
|
-
* @property {string} value -
|
|
291
|
+
* @property {string} marker - Marker of the form field. Example: "name_1".
|
|
292
|
+
* @property {string} type - Type of the field value, for example `"string"`. Example: "string".
|
|
293
|
+
* @property {string} value - Field value. Example: "Name".
|
|
294
294
|
* @description Represents a form data for orders.
|
|
295
295
|
*/
|
|
296
296
|
interface IOrdersFormData {
|
|
@@ -301,9 +301,9 @@ interface IOrdersFormData {
|
|
|
301
301
|
/**
|
|
302
302
|
* Interface representing product data in an order.
|
|
303
303
|
* @interface IOrderProductData
|
|
304
|
-
* @property {number} productId - Product
|
|
304
|
+
* @property {number} productId - Product ID. Example: 1.
|
|
305
305
|
* @property {number} quantity - Quantity of the product. Example: 2.
|
|
306
|
-
* @property {string} [signedPrice] -
|
|
306
|
+
* @property {string} [signedPrice] - Signed token (JWT) that fixes the product price for an order. Returned when `signPrice` is set. Example: "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...".
|
|
307
307
|
* @see {@link https://js-sdk.oneentry.cloud/docs/orders/#Fixed-product-price-signedPrice Fixed product price} documentation.
|
|
308
308
|
* @description Represents a product data in an order.
|
|
309
309
|
*/
|
|
@@ -315,7 +315,7 @@ interface IOrderProductData {
|
|
|
315
315
|
/**
|
|
316
316
|
* Interface representing product data in an order.
|
|
317
317
|
* @interface IOrderProductsData
|
|
318
|
-
* @property {number} productId - Product
|
|
318
|
+
* @property {number} productId - Product ID. Example: 1.
|
|
319
319
|
* @property {number} quantity - Quantity of the product. Example: 2.
|
|
320
320
|
* @description Represents a product data in an order.
|
|
321
321
|
*/
|
|
@@ -326,10 +326,10 @@ interface IOrderProductsData {
|
|
|
326
326
|
/**
|
|
327
327
|
* Interface representing an order storage object.
|
|
328
328
|
* @interface IBaseOrdersEntity
|
|
329
|
-
* @property {number} id - Object
|
|
330
|
-
* @property {string} formIdentifier -
|
|
331
|
-
* @property {string} paymentAccountIdentifier -
|
|
332
|
-
* @property {IOrdersFormData[]} formData - Data
|
|
329
|
+
* @property {number} id - Object ID. Example: 1.
|
|
330
|
+
* @property {string} formIdentifier - Marker of the form. Example: "bar-orders-form".
|
|
331
|
+
* @property {string} paymentAccountIdentifier - Marker of the payment account. Example: "payment-1".
|
|
332
|
+
* @property {IOrdersFormData[]} formData - Data from the form linked to the order storage.
|
|
333
333
|
* @example
|
|
334
334
|
[
|
|
335
335
|
{
|
|
@@ -338,7 +338,7 @@ interface IOrderProductsData {
|
|
|
338
338
|
"type": "string"
|
|
339
339
|
}
|
|
340
340
|
]
|
|
341
|
-
* @property {IOrderProductsData[]} products -
|
|
341
|
+
* @property {IOrderProductsData[]} products - Products in the order.
|
|
342
342
|
* @example
|
|
343
343
|
[
|
|
344
344
|
{
|
|
@@ -353,13 +353,13 @@ interface IOrderProductsData {
|
|
|
353
353
|
* @property {string} currency - Currency used to pay for the order. Example: "USD".
|
|
354
354
|
* @property {number} totalSum - Total order amount. Example: 150.
|
|
355
355
|
* @property {string} [createdDate] - Order creation date. Example: "2023-10-01T12:00:00Z".
|
|
356
|
-
* @property {string} [statusIdentifier] -
|
|
356
|
+
* @property {string} [statusIdentifier] - Marker of the order status. When omitted, the default status is assigned. Example: "status-1".
|
|
357
357
|
* @property {ILocalizeInfo} [statusLocalizeInfos] - Localized status name assigned to the created/updated order.
|
|
358
358
|
* @property {string} [couponCode] -
|
|
359
359
|
* @property {string[]} [additionalDiscountsMarkers] -
|
|
360
360
|
* @property {IOrderDiscountConfig} [discountConfig] - Resolved discount configuration applied to the order.
|
|
361
361
|
* @property {number} [bonusAmount] - Bonus amount applied to the order.
|
|
362
|
-
* @property {number} [bonusApplied] - Bonus applied to the order.
|
|
362
|
+
* @property {number} [bonusApplied] - Bonus amount applied to the order.
|
|
363
363
|
* @property {number} [totalDue] - Total due after bonuses.
|
|
364
364
|
*/
|
|
365
365
|
interface IBaseOrdersEntity {
|
|
@@ -418,14 +418,14 @@ interface IOrderDiscountSettings {
|
|
|
418
418
|
}
|
|
419
419
|
/**
|
|
420
420
|
* @interface IOrderDiscountConfig
|
|
421
|
-
* @property {IOrderDiscountBonus | null} [bonus] - Bonus calculation result
|
|
422
|
-
* @property {unknown | null} coupon -
|
|
421
|
+
* @property {IOrderDiscountBonus | null} [bonus] - Bonus calculation result: `null` when bonuses are not used; omitted when the order has no bonus context.
|
|
422
|
+
* @property {unknown | null} coupon - Applied coupon, or `null` when no coupon is applied.
|
|
423
423
|
* @property {unknown[]} orderDiscounts - Order-level discounts that were matched and applied.
|
|
424
424
|
* @property {unknown[]} productDiscounts - Product-level discounts that were matched and applied.
|
|
425
425
|
* @property {IOrderDiscountSettings} settings - Stacking and cap settings used during calculation.
|
|
426
|
-
* @property {string[]} [additionalDiscountsMarkers] - Markers of
|
|
427
|
-
* @property {number} [bonusApplied] - Bonus amount applied to the order
|
|
428
|
-
* @property {string[]} [excludedGiftProductIds] - Product
|
|
426
|
+
* @property {string[]} [additionalDiscountsMarkers] - Markers of additional discounts requested by the client. Omitted in preview responses.
|
|
427
|
+
* @property {number} [bonusApplied] - Bonus amount applied to the order. Omitted in preview responses. Example: 0.
|
|
428
|
+
* @property {string[]} [excludedGiftProductIds] - Product IDs excluded from gift selection. Omitted in preview responses.
|
|
429
429
|
* @property {number} [totalDue] - Total amount due after discounts and bonuses (omitted in preview responses). Example: 300.
|
|
430
430
|
* @property {number} [totalRaw] - Total amount before discounts (omitted in preview responses). Example: 300.
|
|
431
431
|
* @property {number} [totalSumWithDiscount] - Total amount after discounts but before bonuses (omitted in preview responses). Example: 300.
|
|
@@ -447,7 +447,7 @@ interface IOrderDiscountConfig {
|
|
|
447
447
|
/**
|
|
448
448
|
* Interface representing a response from the order storage.
|
|
449
449
|
* @interface IBaseOrdersEntityResponse
|
|
450
|
-
* @property {IBaseOrdersEntity[]} items -
|
|
450
|
+
* @property {IBaseOrdersEntity[]} items - Order storages in this response.
|
|
451
451
|
* @example
|
|
452
452
|
[
|
|
453
453
|
{
|
|
@@ -469,17 +469,17 @@ interface IBaseOrdersEntityResponse {
|
|
|
469
469
|
/**
|
|
470
470
|
* Interface representing an order storage object.
|
|
471
471
|
* @interface IOrdersEntity
|
|
472
|
-
* @property {number} id - Object
|
|
473
|
-
* @property {ILocalizeInfo} localizeInfos -
|
|
472
|
+
* @property {number} id - Object ID. Example: 1.
|
|
473
|
+
* @property {ILocalizeInfo} localizeInfos - Localized name of the order storage.
|
|
474
474
|
* @example
|
|
475
475
|
{
|
|
476
476
|
"title": "Cash"
|
|
477
477
|
}
|
|
478
|
-
* @property {number | null} position - Position
|
|
479
|
-
* @property {string} identifier -
|
|
480
|
-
* @property {string} formIdentifier -
|
|
481
|
-
* @property {number | null} generalTypeId -
|
|
482
|
-
* @property {IPaymentAccountIdentifiers[]} paymentAccountIdentifiers -
|
|
478
|
+
* @property {number | null} position - Position of the order storage, used for sorting. Example: 1.
|
|
479
|
+
* @property {string} identifier - Marker of the order storage. Example: "order_storage_1".
|
|
480
|
+
* @property {string} formIdentifier - Marker of the form used by the order storage. Example: "bar-orders-form".
|
|
481
|
+
* @property {number | null} generalTypeId - ID of the general type. Example: 1.
|
|
482
|
+
* @property {IPaymentAccountIdentifiers[]} paymentAccountIdentifiers - Markers of the payment accounts used by the order storage.
|
|
483
483
|
* @example
|
|
484
484
|
[
|
|
485
485
|
{
|
|
@@ -500,7 +500,7 @@ interface IOrdersEntity {
|
|
|
500
500
|
/**
|
|
501
501
|
* Interface representing an identifier for a payment account used in an order.
|
|
502
502
|
* @interface IPaymentAccountIdentifiers
|
|
503
|
-
* @property {string} identifier -
|
|
503
|
+
* @property {string} identifier - Marker of the payment account. Example: "payment-1".
|
|
504
504
|
* @description Represents an identifier for a payment account used in an order.
|
|
505
505
|
*/
|
|
506
506
|
interface IPaymentAccountIdentifiers {
|
|
@@ -509,9 +509,9 @@ interface IPaymentAccountIdentifiers {
|
|
|
509
509
|
/**
|
|
510
510
|
* Interface representing the data required to create or update an order in the order storage.
|
|
511
511
|
* @interface IOrderData
|
|
512
|
-
* @property {string} formIdentifier -
|
|
513
|
-
* @property {string} paymentAccountIdentifier -
|
|
514
|
-
* @property {IOrdersFormData | IOrdersFormData[]} formData -
|
|
512
|
+
* @property {string} formIdentifier - Marker of the form linked to the order storage. Example: "bar-orders-form".
|
|
513
|
+
* @property {string} paymentAccountIdentifier - Marker of the payment account linked to the order storage. Example: "payment-1".
|
|
514
|
+
* @property {IOrdersFormData | IOrdersFormData[]} formData - Data from the form linked to the order storage.
|
|
515
515
|
* @example
|
|
516
516
|
[
|
|
517
517
|
{
|
|
@@ -520,9 +520,9 @@ interface IPaymentAccountIdentifiers {
|
|
|
520
520
|
"type": "string"
|
|
521
521
|
}
|
|
522
522
|
]
|
|
523
|
-
* @property {IOrderProductData[]} products -
|
|
523
|
+
* @property {IOrderProductData[]} products - Ordered products. Example: [].
|
|
524
524
|
* @property {string} [couponCode] - Coupon code.
|
|
525
|
-
* @property {string[]} [additionalDiscountsMarkers] -
|
|
525
|
+
* @property {string[]} [additionalDiscountsMarkers] - Markers of additional discounts to apply.
|
|
526
526
|
* @property {number} [bonusAmount] - Bonus amount to apply.
|
|
527
527
|
* @description Represents the data required to create or update an order in the order storage.
|
|
528
528
|
*/
|
|
@@ -555,7 +555,7 @@ interface IOrderSplitStage {
|
|
|
555
555
|
}
|
|
556
556
|
/**
|
|
557
557
|
* @interface IOrderSplit
|
|
558
|
-
* @property {boolean} completed - Whether all split stages are completed. Example: false.
|
|
558
|
+
* @property {boolean} completed - Whether all split payment stages are completed. Example: false.
|
|
559
559
|
* @property {boolean} partial - Whether the split is partially paid. Example: false.
|
|
560
560
|
* @property {IOrderSplitStage[]} stages - Ordered list of split payment stages.
|
|
561
561
|
* @description Split (staged) payment configuration of an order; returned by the by-id order endpoint.
|
|
@@ -568,12 +568,12 @@ interface IOrderSplit {
|
|
|
568
568
|
/**
|
|
569
569
|
* Interface representing an order product data.
|
|
570
570
|
* @interface IOrderByMarkerEntity
|
|
571
|
-
* @property {number} id - Object
|
|
572
|
-
* @property {number} storageId -
|
|
571
|
+
* @property {number} id - Object ID. Example: 125.
|
|
572
|
+
* @property {number} storageId - ID of the order storage. Example: 1.
|
|
573
573
|
* @property {string} createdDate - Date when the order was created. Example: "2023-10-01T12:00:00Z".
|
|
574
|
-
* @property {string} [statusIdentifier] -
|
|
575
|
-
* @property {string} [formIdentifier] -
|
|
576
|
-
* @property {IOrdersFormData[]} formData - Data
|
|
574
|
+
* @property {string} [statusIdentifier] - Marker of the order status. Example: "order-status-1".
|
|
575
|
+
* @property {string} [formIdentifier] - Marker of the form. Example: "bar-orders-form".
|
|
576
|
+
* @property {IOrdersFormData[]} formData - Data from the form linked to the order storage.
|
|
577
577
|
* @example
|
|
578
578
|
[
|
|
579
579
|
{
|
|
@@ -582,17 +582,17 @@ interface IOrderSplit {
|
|
|
582
582
|
"type": "string"
|
|
583
583
|
}
|
|
584
584
|
]
|
|
585
|
-
* @property {string | null} [attributeSetIdentifier] -
|
|
585
|
+
* @property {string | null} [attributeSetIdentifier] - Marker of the attribute set. Example: "attribute-set-1".
|
|
586
586
|
* @property {string} totalSum - Total order amount. Example: "100.00".
|
|
587
587
|
* @property {string} [totalSumRaw] - Raw total order amount with full precision. Example: "100.00".
|
|
588
588
|
* @property {string} currency - Currency used to pay for the order. Example: "USD".
|
|
589
|
-
* @property {string | null} [paymentAccountIdentifier] -
|
|
590
|
-
* @property {ILocalizeInfo} [paymentAccountLocalizeInfos] -
|
|
589
|
+
* @property {string | null} [paymentAccountIdentifier] - Marker of the payment account. Example: "payment-1".
|
|
590
|
+
* @property {ILocalizeInfo} [paymentAccountLocalizeInfos] - Localized name of the payment account.
|
|
591
591
|
* @example
|
|
592
592
|
{
|
|
593
593
|
"title": "Cash"
|
|
594
594
|
}
|
|
595
|
-
* @property {IOrderProducts[]} products -
|
|
595
|
+
* @property {IOrderProducts[]} products - Products in the order.
|
|
596
596
|
* @example
|
|
597
597
|
[
|
|
598
598
|
{
|
|
@@ -601,16 +601,16 @@ interface IOrderSplit {
|
|
|
601
601
|
"quantity": 2
|
|
602
602
|
}
|
|
603
603
|
]
|
|
604
|
-
* @property {string | null} paymentUrl - Payment
|
|
605
|
-
* @property {boolean | null} isCompleted -
|
|
606
|
-
* @property {boolean | null} [isPartial] -
|
|
604
|
+
* @property {string | null} paymentUrl - Payment page URL. Example: "https://example.com/pay/123".
|
|
605
|
+
* @property {boolean | null} isCompleted - Whether the order has been completed. Example: true.
|
|
606
|
+
* @property {boolean | null} [isPartial] - Whether the order is partially paid; `null` on older orders where this was not tracked. Example: false.
|
|
607
607
|
* @property {string} [paymentStrategy] - Payment strategy of the order. Example: "once".
|
|
608
608
|
* @property {ILocalizeInfo} [statusLocalizeInfos] - Localized status name.
|
|
609
|
-
* @property {string | null} [fulfillmentStatusIdentifier] -
|
|
609
|
+
* @property {string | null} [fulfillmentStatusIdentifier] - Marker of the fulfillment (delivery) status; `null` while no fulfillment status is assigned. Example: "shipped".
|
|
610
610
|
* @property {ILocalizeInfo | null} [fulfillmentStatusLocalizeInfos] - Localized fulfillment status name; null while no fulfillment status is assigned.
|
|
611
|
-
* @property {string | null} [paymentStatusIdentifier] -
|
|
612
|
-
* @property {ILocalizeInfo | null} [paymentStatusLocalizeInfos] - Localized payment status
|
|
613
|
-
* @property {IOrderDiscountConfig | null} [discountConfig] -
|
|
611
|
+
* @property {string | null} [paymentStatusIdentifier] - Marker of the payment status; `null` while no payment status is assigned. Example: "inProgress-payment".
|
|
612
|
+
* @property {ILocalizeInfo | null} [paymentStatusLocalizeInfos] - Localized name of the payment status; `null` while no payment status is assigned.
|
|
613
|
+
* @property {IOrderDiscountConfig | null} [discountConfig] - Discount configuration resolved for the order: `orderDiscounts`, `productDiscounts`, `coupon`, `settings`, `bonus` and totals. `null` on older orders without a resolved configuration.
|
|
614
614
|
* @property {IOrderSplit} [split] - Split (staged) payment configuration; present on the by-id order endpoint.
|
|
615
615
|
* @property {number} [distance] - Cosine distance to the query. Returned only by the semantic (vector) search endpoint when `debug: true` is passed in the search body. Example: 0.12.
|
|
616
616
|
* @description Represents an order storage object created by the user.
|
|
@@ -645,12 +645,12 @@ interface IOrderByMarkerEntity {
|
|
|
645
645
|
/**
|
|
646
646
|
* Interface representing an order status object.
|
|
647
647
|
* @interface IOrderStatus
|
|
648
|
-
* @property {number} [id] - Status
|
|
649
|
-
* @property {ILocalizeInfo} [localizeInfos] - Localized
|
|
648
|
+
* @property {number} [id] - Status ID. Example: 1.
|
|
649
|
+
* @property {ILocalizeInfo} [localizeInfos] - Localized data of the status.
|
|
650
650
|
* @property {string} [identifier] - Text identifier of the status. Example: "inProgress-payment".
|
|
651
|
-
* @property {number} [position] - Position of the status. Example: 1.
|
|
651
|
+
* @property {number} [position] - Position of the status, used for sorting. Example: 1.
|
|
652
652
|
* @property {boolean} [isUsed] - Whether the status is in use. Example: true.
|
|
653
|
-
* @property {boolean} [isDefault] - Whether
|
|
653
|
+
* @property {boolean} [isDefault] - Whether this is the default status. Example: true.
|
|
654
654
|
* @property {string} [axis] - Status axis (pipeline) the status belongs to. Example: "payment".
|
|
655
655
|
* @property {boolean} [isCancelFinal] - Whether the status is a final cancellation status. Example: false.
|
|
656
656
|
* @property {boolean} [isFinalSuccess] - Whether the status is a final successful status. Example: true.
|
|
@@ -671,7 +671,7 @@ interface IOrderStatus {
|
|
|
671
671
|
/**
|
|
672
672
|
* Interface representing a product in an order preview.
|
|
673
673
|
* @interface IPreviewOrderProduct
|
|
674
|
-
* @property {number} [productId] - Product
|
|
674
|
+
* @property {number} [productId] - Product ID. Example: 1.
|
|
675
675
|
* @property {number} [quantity] - Quantity of the product. Example: 2.
|
|
676
676
|
*/
|
|
677
677
|
interface IPreviewOrderProduct {
|
|
@@ -681,9 +681,9 @@ interface IPreviewOrderProduct {
|
|
|
681
681
|
/**
|
|
682
682
|
* Interface representing the body for order preview calculation.
|
|
683
683
|
* @interface ICreateOrderPreview
|
|
684
|
-
* @property {IPreviewOrderProduct[]} [products] -
|
|
684
|
+
* @property {IPreviewOrderProduct[]} [products] - Products to include in the preview.
|
|
685
685
|
* @property {string} [couponCode] - Coupon code to apply.
|
|
686
|
-
* @property {string[]} [additionalDiscountsMarkers] -
|
|
686
|
+
* @property {string[]} [additionalDiscountsMarkers] - Markers of additional discounts to apply.
|
|
687
687
|
* @property {number} [bonusAmount] - Bonus amount to apply.
|
|
688
688
|
*/
|
|
689
689
|
interface ICreateOrderPreview {
|
|
@@ -694,11 +694,11 @@ interface ICreateOrderPreview {
|
|
|
694
694
|
}
|
|
695
695
|
/**
|
|
696
696
|
* @interface IOrderPreviewItem
|
|
697
|
-
* @property {number} id - Product
|
|
697
|
+
* @property {number} id - Product ID. Example: 2954.
|
|
698
698
|
* @property {number} price - Product unit price before discounts. Example: 51.
|
|
699
699
|
* @property {number} quantity - Quantity of the product. Example: 1.
|
|
700
700
|
* @property {number | null} discountPrice - Unit price after discounts, or null when no discount applies. Example: null.
|
|
701
|
-
* @property {boolean} isGift - Whether the product is
|
|
701
|
+
* @property {boolean} isGift - Whether the product is a gift. Example: false.
|
|
702
702
|
* @description A single line item in the order preview response.
|
|
703
703
|
*/
|
|
704
704
|
interface IOrderPreviewItem {
|
|
@@ -715,8 +715,8 @@ interface IOrderPreviewItem {
|
|
|
715
715
|
* @property {number} totalSumWithDiscount - Total order amount after discounts. Example: 250.
|
|
716
716
|
* @property {IOrderDiscountConfig} discountConfig - Discount configuration applied to the order.
|
|
717
717
|
* @property {string} currency - Currency of the order. Example: "USD".
|
|
718
|
-
* @property {IOrderPreviewItem[]} orderPreview -
|
|
719
|
-
* @property {number} bonusApplied - Bonus applied to the order.
|
|
718
|
+
* @property {IOrderPreviewItem[]} orderPreview - Preview of the order items.
|
|
719
|
+
* @property {number} bonusApplied - Bonus amount applied to the order.
|
|
720
720
|
* @property {number} totalDue - Total due after bonuses.
|
|
721
721
|
*/
|
|
722
722
|
interface IOrderPreviewResponse {
|
|
@@ -730,16 +730,16 @@ interface IOrderPreviewResponse {
|
|
|
730
730
|
}
|
|
731
731
|
/**
|
|
732
732
|
* @interface IRefundRequest
|
|
733
|
-
* @property {number} id - Refund request
|
|
733
|
+
* @property {number} id - Refund request ID.
|
|
734
734
|
* @property {string} createdDate - Creation date.
|
|
735
735
|
* @property {string} status - Refund status.
|
|
736
736
|
* @property {number} amount - Refund amount.
|
|
737
737
|
* @property {string} note - Refund note.
|
|
738
|
-
* @property {Record<string, IRefundProduct>} products -
|
|
739
|
-
* @property {number} orderId -
|
|
740
|
-
* @property {number} orderStorageId -
|
|
741
|
-
* @property {number} userId - User
|
|
742
|
-
* @property {unknown} orderStorage -
|
|
738
|
+
* @property {Record<string, IRefundProduct>} products - Refund details keyed by product ID.
|
|
739
|
+
* @property {number} orderId - ID of the order.
|
|
740
|
+
* @property {number} orderStorageId - ID of the order storage.
|
|
741
|
+
* @property {number} userId - User ID.
|
|
742
|
+
* @property {unknown} orderStorage - Data of the order storage.
|
|
743
743
|
* @property {unknown} user - User data.
|
|
744
744
|
*/
|
|
745
745
|
interface IRefundRequest {
|
|
@@ -766,8 +766,8 @@ interface IRefundProduct {
|
|
|
766
766
|
/**
|
|
767
767
|
* @interface ICreateRefundRequest
|
|
768
768
|
* @description Body for creating a refund request.
|
|
769
|
-
* @property {Record<string, IRefundProduct>} products -
|
|
770
|
-
* @property {string} [note] -
|
|
769
|
+
* @property {Record<string, IRefundProduct>} products - Refund details keyed by product ID. Example: `{ "146": { "quantity": 1 } }`.
|
|
770
|
+
* @property {string} [note] - Note attached to the refund request. Optional. Example: "test".
|
|
771
771
|
*/
|
|
772
772
|
interface ICreateRefundRequest {
|
|
773
773
|
products: Record<string, IRefundProduct>;
|
package/dist/pages/pagesApi.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
|
|
|
39
39
|
/**
|
|
40
40
|
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
41
41
|
* @handleName getPageById
|
|
42
|
-
* @param {number} id -
|
|
42
|
+
* @param {number} id - ID of the page to fetch. Example: 1.
|
|
43
43
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
44
44
|
* @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
|
|
45
45
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -61,7 +61,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
|
|
|
61
61
|
/**
|
|
62
62
|
* Get child pages object with information as an array.
|
|
63
63
|
* @handleName getChildPagesByParentUrl
|
|
64
|
-
* @param {string} url -
|
|
64
|
+
* @param {string} url - URL of the parent page whose child pages to fetch. Example: "about/our-team".
|
|
65
65
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
66
66
|
* @returns {Promise<IPagesEntity | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
|
|
67
67
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -83,7 +83,7 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
|
|
|
83
83
|
/**
|
|
84
84
|
* Quick search for page objects with limited output.
|
|
85
85
|
* @handleName searchPage
|
|
86
|
-
* @param {string} name - Text for
|
|
86
|
+
* @param {string} name - Text to search for in page titles (`localizeInfos.title`) in the requested language. Example: "About Us".
|
|
87
87
|
* @param {string} [url] - Page URL. Example: "catalog".
|
|
88
88
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
89
89
|
* @returns {Promise<IPagesEntity[] | IPageSearchResult[] | IError>} Returns found pages as an array of PageEntity objects, an array of short PageSearchResult cards when the traficLimit config option is enabled, or an empty array [] (if there is no data)
|
|
@@ -95,10 +95,10 @@ export default class PagesApi extends AsyncModules implements IPagesApi {
|
|
|
95
95
|
/**
|
|
96
96
|
* Semantic (vector) search for pages.
|
|
97
97
|
* @handleName getPagesByVectorSearch
|
|
98
|
-
* @param {IPagesVectorSearch} body - Vector search
|
|
98
|
+
* @param {IPagesVectorSearch} body - Vector search parameters. Example: `{ queryText: "winter sale" }`.
|
|
99
99
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
100
|
-
* @param {number} [offset] -
|
|
101
|
-
* @param {number} [limit] -
|
|
100
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
101
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
102
102
|
* @returns {Promise<IVectorSearchResponse<IPagesResponse> | IError>} Returns an object with an array of found pages and total count.
|
|
103
103
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
104
104
|
* @description This method performs a semantic (vector) search for pages.
|
package/dist/pages/pagesApi.js
CHANGED
|
@@ -98,7 +98,7 @@ class PagesApi extends asyncModules_1.default {
|
|
|
98
98
|
/**
|
|
99
99
|
* Get page object with information about forms, blocks, menus, linked to the page.
|
|
100
100
|
* @handleName getPageById
|
|
101
|
-
* @param {number} id -
|
|
101
|
+
* @param {number} id - ID of the page to fetch. Example: 1.
|
|
102
102
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
103
103
|
* @returns {Promise<IPagesEntity | IError>} Returns PageEntity object
|
|
104
104
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -138,7 +138,7 @@ class PagesApi extends asyncModules_1.default {
|
|
|
138
138
|
/**
|
|
139
139
|
* Get child pages object with information as an array.
|
|
140
140
|
* @handleName getChildPagesByParentUrl
|
|
141
|
-
* @param {string} url -
|
|
141
|
+
* @param {string} url - URL of the parent page whose child pages to fetch. Example: "about/our-team".
|
|
142
142
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
143
143
|
* @returns {Promise<IPagesEntity | IError>} Returns all created pages as an array of PageEntity objects or an empty array [] (if there is no data) for the selected parent
|
|
144
144
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -215,7 +215,7 @@ class PagesApi extends asyncModules_1.default {
|
|
|
215
215
|
/**
|
|
216
216
|
* Quick search for page objects with limited output.
|
|
217
217
|
* @handleName searchPage
|
|
218
|
-
* @param {string} name - Text for
|
|
218
|
+
* @param {string} name - Text to search for in page titles (`localizeInfos.title`) in the requested language. Example: "About Us".
|
|
219
219
|
* @param {string} [url] - Page URL. Example: "catalog".
|
|
220
220
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
221
221
|
* @returns {Promise<IPagesEntity[] | IPageSearchResult[] | IError>} Returns found pages as an array of PageEntity objects, an array of short PageSearchResult cards when the traficLimit config option is enabled, or an empty array [] (if there is no data)
|
|
@@ -249,10 +249,10 @@ class PagesApi extends asyncModules_1.default {
|
|
|
249
249
|
/**
|
|
250
250
|
* Semantic (vector) search for pages.
|
|
251
251
|
* @handleName getPagesByVectorSearch
|
|
252
|
-
* @param {IPagesVectorSearch} body - Vector search
|
|
252
|
+
* @param {IPagesVectorSearch} body - Vector search parameters. Example: `{ queryText: "winter sale" }`.
|
|
253
253
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
254
|
-
* @param {number} [offset] -
|
|
255
|
-
* @param {number} [limit] -
|
|
254
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
255
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
256
256
|
* @returns {Promise<IVectorSearchResponse<IPagesResponse> | IError>} Returns an object with an array of found pages and total count.
|
|
257
257
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
258
258
|
* @description This method performs a semantic (vector) search for pages.
|