oneentry 1.0.173 → 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 +23 -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 +29 -29
- package/dist/auth-provider/authProviderApi.js +29 -29
- package/dist/auth-provider/authProvidersInterfaces.d.ts +52 -52
- 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/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 +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 +29 -29
- package/esm/auth-provider/authProviderApi.js +29 -29
- package/esm/auth-provider/authProvidersInterfaces.d.ts +52 -52
- 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/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 +7 -7
- package/esm/users/usersApi.js +7 -7
- package/esm/users/usersInterfaces.d.ts +34 -34
- package/package.json +2 -2
|
@@ -11,8 +11,8 @@ interface IBlocks {
|
|
|
11
11
|
* @handleName getBlocks
|
|
12
12
|
* @param {BlockType} [type] - Optional type of blocks to retrieve. When omitted, blocks of all types are returned. Example: "product".
|
|
13
13
|
* @param {string} [langCode] - Optional language code for localization. Default: "en_US".
|
|
14
|
-
* @param {number} [offset] -
|
|
15
|
-
* @param {number} [limit] -
|
|
14
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
15
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
16
16
|
* @returns {IBlocksResponse} A promise that resolves to a blocks response or an error.
|
|
17
17
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
18
18
|
* @description This method retrieves all block objects of a specific type.
|
|
@@ -22,9 +22,9 @@ interface IBlocks {
|
|
|
22
22
|
* Retrieves a block object by its marker.
|
|
23
23
|
* @handleName getBlockByMarker
|
|
24
24
|
* @param {string} marker - The marker identifying the block. Example: "product_block".
|
|
25
|
-
* @param {string} langCode - Language code
|
|
26
|
-
* @param {number} [offset] -
|
|
27
|
-
* @param {number} [limit] -
|
|
25
|
+
* @param {string} langCode - Language code. Default: "en_US".
|
|
26
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
27
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
28
28
|
* @returns {IBlockEntity} A promise that resolves to a block entity or an error.
|
|
29
29
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
30
30
|
* @description This method retrieves a block object by its marker.
|
|
@@ -43,10 +43,10 @@ interface IBlocks {
|
|
|
43
43
|
/**
|
|
44
44
|
* Get frequently ordered products by block marker and product id.
|
|
45
45
|
* @handleName getFrequentlyOrderedProducts
|
|
46
|
-
* @param {number} productId - Product
|
|
47
|
-
* @param {string} marker -
|
|
46
|
+
* @param {number} productId - Product ID. Example: 1.
|
|
47
|
+
* @param {string} marker - Marker of the block. Example: "frequently_ordered_block".
|
|
48
48
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
49
|
-
* @param {string} [signPrice] -
|
|
49
|
+
* @param {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
50
50
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
51
51
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
52
52
|
* @returns {IProductsResponse} A promise that resolves to a products response (items + total) or an error.
|
|
@@ -56,9 +56,9 @@ interface IBlocks {
|
|
|
56
56
|
/**
|
|
57
57
|
* Get "complete your cart" products by the cart from context (auth user or guest).
|
|
58
58
|
* @handleName getCartComplement
|
|
59
|
-
* @param {string} marker -
|
|
59
|
+
* @param {string} marker - Marker of the block. Example: "cart_complement_block".
|
|
60
60
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
61
|
-
* @param {string} [signPrice] -
|
|
61
|
+
* @param {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
62
62
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
63
63
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
64
64
|
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
@@ -68,8 +68,8 @@ interface IBlocks {
|
|
|
68
68
|
/**
|
|
69
69
|
* Get "complete your cart" products by an explicit list of productIds (POST body).
|
|
70
70
|
* @handleName getCartComplementByProductIds
|
|
71
|
-
* @param {string} marker -
|
|
72
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
71
|
+
* @param {string} marker - Marker of the block. Example: "cart_complement_block".
|
|
72
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
73
73
|
* @example
|
|
74
74
|
{
|
|
75
75
|
"productIds": [1, 2],
|
|
@@ -82,9 +82,9 @@ interface IBlocks {
|
|
|
82
82
|
/**
|
|
83
83
|
* Get "similar to cart" products by the cart from context (auth user or guest).
|
|
84
84
|
* @handleName getCartSimilar
|
|
85
|
-
* @param {string} marker -
|
|
85
|
+
* @param {string} marker - Marker of the block. Example: "cart_similar_block".
|
|
86
86
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
87
|
-
* @param {string} [signPrice] -
|
|
87
|
+
* @param {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
88
88
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
89
89
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
90
90
|
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
@@ -94,8 +94,8 @@ interface IBlocks {
|
|
|
94
94
|
/**
|
|
95
95
|
* Get "similar to cart" products by an explicit list of productIds (POST body).
|
|
96
96
|
* @handleName getCartSimilarByProductIds
|
|
97
|
-
* @param {string} marker -
|
|
98
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
97
|
+
* @param {string} marker - Marker of the block. Example: "cart_similar_block".
|
|
98
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
99
99
|
* @example
|
|
100
100
|
{
|
|
101
101
|
"productIds": [1, 2],
|
|
@@ -108,9 +108,9 @@ interface IBlocks {
|
|
|
108
108
|
/**
|
|
109
109
|
* Get personal recommendations for the user.
|
|
110
110
|
* @handleName getPersonalRecommendations
|
|
111
|
-
* @param {string} marker -
|
|
111
|
+
* @param {string} marker - Marker of the block. Example: "personal_recommendations_block".
|
|
112
112
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
113
|
-
* @param {string} [signPrice] -
|
|
113
|
+
* @param {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
114
114
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
115
115
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
116
116
|
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
@@ -120,9 +120,9 @@ interface IBlocks {
|
|
|
120
120
|
/**
|
|
121
121
|
* Get recently viewed products.
|
|
122
122
|
* @handleName getRecentlyViewed
|
|
123
|
-
* @param {string} marker -
|
|
123
|
+
* @param {string} marker - Marker of the block. Example: "recently_viewed_block".
|
|
124
124
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
125
|
-
* @param {string} [signPrice] -
|
|
125
|
+
* @param {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
126
126
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
127
127
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
128
128
|
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
@@ -132,9 +132,9 @@ interface IBlocks {
|
|
|
132
132
|
/**
|
|
133
133
|
* Get products for repeat purchase.
|
|
134
134
|
* @handleName getRepeatPurchase
|
|
135
|
-
* @param {string} marker -
|
|
135
|
+
* @param {string} marker - Marker of the block. Example: "repeat_purchase_block".
|
|
136
136
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
137
|
-
* @param {string} [signPrice] -
|
|
137
|
+
* @param {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
138
138
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
139
139
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
140
140
|
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
@@ -144,7 +144,7 @@ interface IBlocks {
|
|
|
144
144
|
/**
|
|
145
145
|
* Get the block's slides tree as a flat pre-order array (slider_block only).
|
|
146
146
|
* @handleName getSlides
|
|
147
|
-
* @param {string} marker -
|
|
147
|
+
* @param {string} marker - Marker of the block. Example: "slider_block".
|
|
148
148
|
* @returns {IBlockSlidesResponse} A promise that resolves to the slides response or an error.
|
|
149
149
|
* @throws {IError} - If there is an error during the fetch operation, it will return an error object.
|
|
150
150
|
*/
|
|
@@ -152,9 +152,9 @@ interface IBlocks {
|
|
|
152
152
|
/**
|
|
153
153
|
* Get trending products of the block.
|
|
154
154
|
* @handleName getTrending
|
|
155
|
-
* @param {string} marker -
|
|
155
|
+
* @param {string} marker - Marker of the block. Example: "trending_block".
|
|
156
156
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
157
|
-
* @param {string} [signPrice] -
|
|
157
|
+
* @param {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
158
158
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
159
159
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
160
160
|
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
@@ -164,9 +164,9 @@ interface IBlocks {
|
|
|
164
164
|
/**
|
|
165
165
|
* Get "similar to wishlist" products by the wishlist from context (auth user or guest).
|
|
166
166
|
* @handleName getWishlistSimilar
|
|
167
|
-
* @param {string} marker -
|
|
167
|
+
* @param {string} marker - Marker of the block. Example: "wishlist_similar_block".
|
|
168
168
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
169
|
-
* @param {string} [signPrice] -
|
|
169
|
+
* @param {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
170
170
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
171
171
|
* @param {number} [limit] - Maximum number of products to return. When omitted, the block's own quantity setting applies. Example: 10.
|
|
172
172
|
* @returns {IProductsResponse} A promise that resolves to a products response (items + total + totalFound) or an error.
|
|
@@ -176,8 +176,8 @@ interface IBlocks {
|
|
|
176
176
|
/**
|
|
177
177
|
* Get "similar to wishlist" products by an explicit list of productIds (POST body).
|
|
178
178
|
* @handleName getWishlistSimilarByProductIds
|
|
179
|
-
* @param {string} marker -
|
|
180
|
-
* @param {IBlockProductsLookup} body - Lookup
|
|
179
|
+
* @param {string} marker - Marker of the block. Example: "wishlist_similar_block".
|
|
180
|
+
* @param {IBlockProductsLookup} body - Lookup parameters.
|
|
181
181
|
* @example
|
|
182
182
|
{
|
|
183
183
|
"productIds": [1, 2],
|
|
@@ -192,7 +192,7 @@ interface IBlocks {
|
|
|
192
192
|
* Represents a response from the blocks API.
|
|
193
193
|
* @interface IBlocksResponse
|
|
194
194
|
* @property {number} total - Total number of found records. Example: 100.
|
|
195
|
-
* @property {IBlockEntity[]} items -
|
|
195
|
+
* @property {IBlockEntity[]} items - Blocks in this response.
|
|
196
196
|
* @example
|
|
197
197
|
[
|
|
198
198
|
{
|
|
@@ -232,7 +232,7 @@ interface IBlocksResponse {
|
|
|
232
232
|
/**
|
|
233
233
|
* Represents a block entity with various attributes and properties.
|
|
234
234
|
* @interface IBlockEntity
|
|
235
|
-
* @property {IAttributeValues} attributeValues -
|
|
235
|
+
* @property {IAttributeValues} attributeValues - Attribute values keyed by marker; an empty object when there are none.
|
|
236
236
|
* @example
|
|
237
237
|
{
|
|
238
238
|
"block-text": {
|
|
@@ -244,27 +244,27 @@ interface IBlocksResponse {
|
|
|
244
244
|
"isProductPreview": false
|
|
245
245
|
}
|
|
246
246
|
}
|
|
247
|
-
* @property {number} id -
|
|
248
|
-
* @property {ILocalizeInfo} localizeInfos -
|
|
247
|
+
* @property {number} id - ID of the block. Example: 1234.
|
|
248
|
+
* @property {ILocalizeInfo} localizeInfos - Localized data of the block.
|
|
249
249
|
* @example
|
|
250
250
|
{
|
|
251
251
|
"key": "value"
|
|
252
252
|
}
|
|
253
|
-
* @property {number} version - Version of the block
|
|
254
|
-
* @property {string} identifier -
|
|
253
|
+
* @property {number} version - Version number of the block. Example: 1.
|
|
254
|
+
* @property {string} identifier - Marker of the block. Example: "block1".
|
|
255
255
|
* @property {BlockType} type - Type of the block. Example: "product".
|
|
256
|
-
* @property {number} position - Position of the block for sorting. Example: 1.
|
|
257
|
-
* @property {string | null} templateIdentifier -
|
|
258
|
-
* @property {boolean} isVisible -
|
|
259
|
-
* @property {number} [countElementsPerRow] - Number of
|
|
256
|
+
* @property {number} position - Position of the block, used for sorting. Example: 1.
|
|
257
|
+
* @property {string | null} templateIdentifier - Marker of the template used by the block, or `null`. Example: "template1".
|
|
258
|
+
* @property {boolean} isVisible - Whether the block is visible. Example: true.
|
|
259
|
+
* @property {number} [countElementsPerRow] - Number of items per row in the block, if set. Example: 3.
|
|
260
260
|
* @property {number} [quantity] - Quantity of items in the block, if applicable. Example: 5.
|
|
261
|
-
* @property {IProductsResponse} [similarProducts] -
|
|
261
|
+
* @property {IProductsResponse} [similarProducts] - Similar products for the block, as `total` and `items`.
|
|
262
262
|
* @example
|
|
263
263
|
{
|
|
264
264
|
"total": 10,
|
|
265
265
|
"items": []
|
|
266
266
|
}
|
|
267
|
-
* @property {IProductsEntity[]} [products] -
|
|
267
|
+
* @property {IProductsEntity[]} [products] - Products linked to the block.
|
|
268
268
|
* @example
|
|
269
269
|
[
|
|
270
270
|
{
|
|
@@ -296,8 +296,8 @@ interface IBlockEntity {
|
|
|
296
296
|
/**
|
|
297
297
|
* Represents a search block entity with an identifier, name, and ID.
|
|
298
298
|
* @interface ISearchBlock
|
|
299
|
-
* @property {number} id -
|
|
300
|
-
* @property {string} identifier -
|
|
299
|
+
* @property {number} id - ID of the search block. Example: 1.
|
|
300
|
+
* @property {string} identifier - Marker of the search block. Example: "search_block_1".
|
|
301
301
|
* @property {string} name - Name of the search block. Example: "Search Block 1".
|
|
302
302
|
* @description Represents a search block entity with an identifier, name, and ID.
|
|
303
303
|
*/
|
|
@@ -310,17 +310,17 @@ interface ISearchBlock {
|
|
|
310
310
|
* BlockType
|
|
311
311
|
* @type {BlockType}
|
|
312
312
|
* @description This type defines the possible values for block types used in the system: the types `GET /api/content/general-types` returns.
|
|
313
|
-
* `'none'` was dropped — the platform has no such type and a filter by it answers `400 type must be a valid enum value
|
|
314
|
-
* `'service'` is the platform's own name for the type, but the `type` filter of getBlocks and getTemplateByType currently refuses it with the same `400`; that is a platform defect
|
|
313
|
+
* `'none'` was dropped — the platform has no such type and a filter by it answers `400 type must be a valid enum value`.
|
|
314
|
+
* `'service'` is the platform's own name for the type, but the `type` filter of getBlocks and getTemplateByType currently refuses it with the same `400`; that is a platform defect.
|
|
315
315
|
*/
|
|
316
316
|
type BlockType = 'product' | 'error_page' | 'catalog_page' | 'product_preview' | 'similar_products_block' | 'product_block' | 'frequently_ordered_block' | 'trending_block' | 'recently_viewed_block' | 'repeat_purchase_block' | 'slider_block' | 'personal_recommendations_block' | 'cart_complement_block' | 'cart_similar_block' | 'wishlist_similar_block' | 'form' | 'common_page' | 'common_block' | 'order' | 'service' | 'external_page' | 'discount';
|
|
317
317
|
/**
|
|
318
318
|
* Lookup body for block product endpoints by explicit productIds.
|
|
319
319
|
* @interface IBlockProductsLookup
|
|
320
|
-
* @property {number[]} productIds -
|
|
320
|
+
* @property {number[]} productIds - IDs of the products to look up. Example: [1, 2, 3].
|
|
321
321
|
* @property {string} [langCode] - Language code. Default: "en_US".
|
|
322
|
-
* @property {number} [limit] -
|
|
323
|
-
* @property {string} [signPrice] -
|
|
322
|
+
* @property {number} [limit] - Maximum number of products to return. Example: 10.
|
|
323
|
+
* @property {string} [signPrice] - Marker of the order storage to fix prices for. When set, each product comes with a `signedPrice` that holds the price for a limited time.
|
|
324
324
|
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/#Fixing-the-price-signPrice Fixing the price} documentation.
|
|
325
325
|
* @description Body for the POST block product endpoints (cart-complement / cart-similar / wishlist-similar) that accept an explicit list of productIds.
|
|
326
326
|
*/
|
|
@@ -333,13 +333,13 @@ interface IBlockProductsLookup {
|
|
|
333
333
|
/**
|
|
334
334
|
* A single slide item of a slider block (flat pre-order tree node).
|
|
335
335
|
* @interface IBlockSlideItem
|
|
336
|
-
* @property {number} id - Slide
|
|
337
|
-
* @property {number | null} [parentId] -
|
|
336
|
+
* @property {number} id - Slide ID. Example: 1.
|
|
337
|
+
* @property {number | null} [parentId] - ID of the parent slide, or `null` for root slides. Example: null.
|
|
338
338
|
* @property {number} depth - Depth of the slide in the tree. Example: 0.
|
|
339
339
|
* @property {number} position - Position of the slide among its siblings. Example: 1.
|
|
340
340
|
* @property {boolean} visible - Whether the slide is visible. Example: true.
|
|
341
|
-
* @property {number} [time] -
|
|
342
|
-
* @property {'sec' | 'ms'} [timeInterval] - Unit of
|
|
341
|
+
* @property {number} [time] - How long the slide is shown, in `timeInterval` units. Absent when not set. Example: 5.
|
|
342
|
+
* @property {'sec' | 'ms'} [timeInterval] - Unit of `time`: `"sec"` or `"ms"`. Example: "sec".
|
|
343
343
|
* @property {IAttributeValues} attributeValues - Map of attribute values keyed by marker.
|
|
344
344
|
* @description A single slide item returned in the slides flat pre-order array.
|
|
345
345
|
*/
|
|
@@ -357,9 +357,9 @@ interface IBlockSlideItem {
|
|
|
357
357
|
* Slides response for a slider block.
|
|
358
358
|
* @interface IBlockSlidesResponse
|
|
359
359
|
* @property {number} total - Total number of slides. Example: 3.
|
|
360
|
-
* @property {number} [time] - Default
|
|
361
|
-
* @property {'sec' | 'ms'} [timeInterval] - Unit of
|
|
362
|
-
* @property {IBlockSlideItem[]} items -
|
|
360
|
+
* @property {number} [time] - Default time each slide is shown, in `timeInterval` units. Example: 5.
|
|
361
|
+
* @property {'sec' | 'ms'} [timeInterval] - Unit of `time`: `"sec"` or `"ms"`. Example: "sec".
|
|
362
|
+
* @property {IBlockSlideItem[]} items - Slide items as a flat array in pre-order.
|
|
363
363
|
* @description Response of the block slides endpoint (slider_block only).
|
|
364
364
|
*/
|
|
365
365
|
interface IBlockSlidesResponse {
|
|
@@ -26,9 +26,9 @@ export default class DiscountsApi extends AsyncModules implements IDiscountsApi
|
|
|
26
26
|
* Return all discounts.
|
|
27
27
|
* @handleName getAllDiscounts
|
|
28
28
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
29
|
-
* @param {number} [offset] -
|
|
30
|
-
* @param {number} [limit] -
|
|
31
|
-
* @param {IDiscountType} [type] -
|
|
29
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
30
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
31
|
+
* @param {IDiscountType} [type] - Discount type to filter by. Optional.
|
|
32
32
|
* @returns {Promise<IDiscountsResponse | IError>} Returns an object containing all discounts or an error object if there was an issue.
|
|
33
33
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
34
34
|
* @description Fetches all discounts from the server.
|
|
@@ -38,7 +38,7 @@ export default class DiscountsApi extends AsyncModules implements IDiscountsApi
|
|
|
38
38
|
/**
|
|
39
39
|
* Get discount by marker
|
|
40
40
|
* @handleName getDiscountByMarker
|
|
41
|
-
* @param {string} marker -
|
|
41
|
+
* @param {string} marker - Marker of the discount storage. Example: "discount_storage".
|
|
42
42
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
43
43
|
* @returns {Promise<IDiscountsEntity | IError>} Returns an object containing discount by marker or an error object if there was an issue.
|
|
44
44
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -57,12 +57,12 @@ export default class DiscountsApi extends AsyncModules implements IDiscountsApi
|
|
|
57
57
|
/**
|
|
58
58
|
* Get bonus transaction history of the current user.
|
|
59
59
|
* @handleName getBonusHistory
|
|
60
|
-
* @param {IBonusTransactionType} [type] - Transaction type filter.
|
|
61
|
-
* @param {string} [dateFrom] - Start date
|
|
62
|
-
* @param {string} [dateTo] - End date
|
|
63
|
-
* @param {number} [discountId] -
|
|
64
|
-
* @param {number} [moduleId] -
|
|
65
|
-
* @param {boolean} [isAdmin] -
|
|
60
|
+
* @param {IBonusTransactionType} [type] - Transaction type to filter by.
|
|
61
|
+
* @param {string} [dateFrom] - Start of the date range.
|
|
62
|
+
* @param {string} [dateTo] - End of the date range.
|
|
63
|
+
* @param {number} [discountId] - Return only transactions of this discount ID.
|
|
64
|
+
* @param {number} [moduleId] - Filter by module ID.
|
|
65
|
+
* @param {boolean} [isAdmin] - Filter by the transaction's `isAdmin` flag.
|
|
66
66
|
* @returns {Promise<IBonusHistoryResponse | IError>} Returns the container with the transactions and their total, or an error object.
|
|
67
67
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
68
68
|
* @see {@link https://js-sdk.oneentry.cloud/docs/discounts/getBonusHistory getBonusHistory} documentation.
|
|
@@ -71,7 +71,7 @@ export default class DiscountsApi extends AsyncModules implements IDiscountsApi
|
|
|
71
71
|
/**
|
|
72
72
|
* Validate discounts coupon
|
|
73
73
|
* @handleName validateDiscountsCoupon
|
|
74
|
-
* @param {string} code -
|
|
74
|
+
* @param {string} code - Coupon code to validate.
|
|
75
75
|
* @returns {Promise<ICouponValidationResult | IError>} Returns an coupon validation result or an error object if there was an issue.
|
|
76
76
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
77
77
|
* @description This function validates a coupon code and returns the result.
|
|
@@ -81,10 +81,10 @@ export default class DiscountsApi extends AsyncModules implements IDiscountsApi
|
|
|
81
81
|
/**
|
|
82
82
|
* Semantic (vector) search for discounts.
|
|
83
83
|
* @handleName getDiscountsByVectorSearch
|
|
84
|
-
* @param {IDiscountsVectorSearch} body - Vector search
|
|
84
|
+
* @param {IDiscountsVectorSearch} body - Vector search parameters. Example: `{ queryText: "winter sale" }`.
|
|
85
85
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
86
|
-
* @param {number} [offset] -
|
|
87
|
-
* @param {number} [limit] -
|
|
86
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
87
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
88
88
|
* @returns {Promise<IVectorSearchResponse<IDiscountsResponse> | IError>} Returns an object with an array of found discounts and total count.
|
|
89
89
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
90
90
|
* @description This method performs a semantic (vector) search for discounts.
|
|
@@ -24,9 +24,9 @@ export default class DiscountsApi extends AsyncModules {
|
|
|
24
24
|
* Return all discounts.
|
|
25
25
|
* @handleName getAllDiscounts
|
|
26
26
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
27
|
-
* @param {number} [offset] -
|
|
28
|
-
* @param {number} [limit] -
|
|
29
|
-
* @param {IDiscountType} [type] -
|
|
27
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
28
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
29
|
+
* @param {IDiscountType} [type] - Discount type to filter by. Optional.
|
|
30
30
|
* @returns {Promise<IDiscountsResponse | IError>} Returns an object containing all discounts or an error object if there was an issue.
|
|
31
31
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
32
32
|
* @description Fetches all discounts from the server.
|
|
@@ -45,7 +45,7 @@ export default class DiscountsApi extends AsyncModules {
|
|
|
45
45
|
/**
|
|
46
46
|
* Get discount by marker
|
|
47
47
|
* @handleName getDiscountByMarker
|
|
48
|
-
* @param {string} marker -
|
|
48
|
+
* @param {string} marker - Marker of the discount storage. Example: "discount_storage".
|
|
49
49
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
50
50
|
* @returns {Promise<IDiscountsEntity | IError>} Returns an object containing discount by marker or an error object if there was an issue.
|
|
51
51
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
@@ -74,12 +74,12 @@ export default class DiscountsApi extends AsyncModules {
|
|
|
74
74
|
/**
|
|
75
75
|
* Get bonus transaction history of the current user.
|
|
76
76
|
* @handleName getBonusHistory
|
|
77
|
-
* @param {IBonusTransactionType} [type] - Transaction type filter.
|
|
78
|
-
* @param {string} [dateFrom] - Start date
|
|
79
|
-
* @param {string} [dateTo] - End date
|
|
80
|
-
* @param {number} [discountId] -
|
|
81
|
-
* @param {number} [moduleId] -
|
|
82
|
-
* @param {boolean} [isAdmin] -
|
|
77
|
+
* @param {IBonusTransactionType} [type] - Transaction type to filter by.
|
|
78
|
+
* @param {string} [dateFrom] - Start of the date range.
|
|
79
|
+
* @param {string} [dateTo] - End of the date range.
|
|
80
|
+
* @param {number} [discountId] - Return only transactions of this discount ID.
|
|
81
|
+
* @param {number} [moduleId] - Filter by module ID.
|
|
82
|
+
* @param {boolean} [isAdmin] - Filter by the transaction's `isAdmin` flag.
|
|
83
83
|
* @returns {Promise<IBonusHistoryResponse | IError>} Returns the container with the transactions and their total, or an error object.
|
|
84
84
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
85
85
|
* @see {@link https://js-sdk.oneentry.cloud/docs/discounts/getBonusHistory getBonusHistory} documentation.
|
|
@@ -99,7 +99,7 @@ export default class DiscountsApi extends AsyncModules {
|
|
|
99
99
|
/**
|
|
100
100
|
* Validate discounts coupon
|
|
101
101
|
* @handleName validateDiscountsCoupon
|
|
102
|
-
* @param {string} code -
|
|
102
|
+
* @param {string} code - Coupon code to validate.
|
|
103
103
|
* @returns {Promise<ICouponValidationResult | IError>} Returns an coupon validation result or an error object if there was an issue.
|
|
104
104
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
105
105
|
* @description This function validates a coupon code and returns the result.
|
|
@@ -115,10 +115,10 @@ export default class DiscountsApi extends AsyncModules {
|
|
|
115
115
|
/**
|
|
116
116
|
* Semantic (vector) search for discounts.
|
|
117
117
|
* @handleName getDiscountsByVectorSearch
|
|
118
|
-
* @param {IDiscountsVectorSearch} body - Vector search
|
|
118
|
+
* @param {IDiscountsVectorSearch} body - Vector search parameters. Example: `{ queryText: "winter sale" }`.
|
|
119
119
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
120
|
-
* @param {number} [offset] -
|
|
121
|
-
* @param {number} [limit] -
|
|
120
|
+
* @param {number} [offset] - Number of records to skip. Default: 0.
|
|
121
|
+
* @param {number} [limit] - Maximum number of records to return. Default: 30.
|
|
122
122
|
* @returns {Promise<IVectorSearchResponse<IDiscountsResponse> | IError>} Returns an object with an array of found discounts and total count.
|
|
123
123
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
124
124
|
* @description This method performs a semantic (vector) search for discounts.
|