oneentry 1.0.152 → 1.0.153
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 +12 -0
- package/dist/admins/adminsApi.d.ts +2 -1
- package/dist/admins/adminsApi.js +2 -1
- package/dist/admins/adminsInterfaces.d.ts +1 -1
- package/dist/attribute-sets/attributeSetsApi.d.ts +4 -0
- package/dist/attribute-sets/attributeSetsApi.js +4 -0
- package/dist/auth-provider/authProviderApi.d.ts +14 -1
- package/dist/auth-provider/authProviderApi.js +14 -1
- package/dist/base/asyncModules.d.ts +11 -0
- package/dist/base/asyncModules.js +19 -0
- package/dist/blocks/blocksApi.d.ts +34 -1
- package/dist/blocks/blocksApi.js +69 -62
- package/dist/discounts/discountsApi.d.ts +5 -0
- package/dist/discounts/discountsApi.js +5 -0
- package/dist/events/eventsApi.d.ts +7 -0
- package/dist/events/eventsApi.js +11 -28
- package/dist/file-uploading/fileUploadingApi.d.ts +4 -1
- package/dist/file-uploading/fileUploadingApi.js +4 -1
- package/dist/file-uploading/fileUploadingInterfaces.d.ts +1 -1
- package/dist/filters/filtersApi.d.ts +1 -0
- package/dist/filters/filtersApi.js +1 -0
- package/dist/forms/formsApi.d.ts +2 -0
- package/dist/forms/formsApi.js +2 -0
- package/dist/forms-data/formsDataApi.d.ts +5 -0
- package/dist/forms-data/formsDataApi.js +5 -0
- package/dist/general-types/generalTypesApi.d.ts +1 -0
- package/dist/general-types/generalTypesApi.js +1 -0
- package/dist/integration-collections/integrationCollectionsApi.d.ts +10 -1
- package/dist/integration-collections/integrationCollectionsApi.js +10 -1
- package/dist/integration-collections/integrationCollectionsInterfaces.d.ts +1 -1
- package/dist/locales/localesApi.d.ts +1 -0
- package/dist/locales/localesApi.js +1 -0
- package/dist/menus/menusApi.d.ts +1 -0
- package/dist/menus/menusApi.js +1 -0
- package/dist/orders/ordersApi.d.ts +25 -1
- package/dist/orders/ordersApi.js +36 -12
- package/dist/orders/ordersInterfaces.d.ts +4 -2
- package/dist/pages/pagesApi.d.ts +9 -0
- package/dist/pages/pagesApi.js +33 -38
- package/dist/pages/pagesInterfaces.d.ts +5 -0
- package/dist/payments/paymentsApi.d.ts +6 -0
- package/dist/payments/paymentsApi.js +6 -0
- package/dist/product-statuses/productStatusesApi.d.ts +3 -0
- package/dist/product-statuses/productStatusesApi.js +3 -0
- package/dist/products/productsApi.d.ts +14 -0
- package/dist/products/productsApi.js +14 -0
- package/dist/products/productsInterfaces.d.ts +2 -2
- package/dist/sitemap/sitemapApi.d.ts +2 -0
- package/dist/sitemap/sitemapApi.js +2 -0
- package/dist/subscriptions/subscriptionsApi.d.ts +5 -0
- package/dist/subscriptions/subscriptionsApi.js +7 -14
- package/dist/system/systemApi.d.ts +3 -0
- package/dist/system/systemApi.js +3 -0
- package/dist/templates/templatesApi.d.ts +3 -0
- package/dist/templates/templatesApi.js +3 -0
- package/dist/templates-preview/templatesPreviewApi.d.ts +2 -0
- package/dist/templates-preview/templatesPreviewApi.js +2 -0
- package/dist/user-activity/userActivityApi.d.ts +1 -0
- package/dist/user-activity/userActivityApi.js +1 -0
- package/dist/users/usersApi.d.ts +14 -0
- package/dist/users/usersApi.js +14 -0
- package/dist/web-socket/wsApi.d.ts +1 -1
- package/dist/web-socket/wsApi.js +1 -1
- package/package.json +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# SDK Change Log
|
|
2
2
|
|
|
3
|
+
## v.1.0.153
|
|
4
|
+
|
|
5
|
+
### What's New
|
|
6
|
+
|
|
7
|
+
- Pages > `IPositionBlock` — new optional `similarProducts` (`IProductsResponse`) and `products` (`IProductsEntity[]`) fields, populated for `similar_products_block` / `product_block` page blocks (when traffic-saving mode is off).
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
- Pages > `getBlocksByPageUrl` — related products are now actually loaded for `product_block` (`products`) and `similar_products_block` (`similarProducts`) blocks. The block-type check ran against the response array instead of each block, so product loading never executed; it now runs per block. `similarProducts` is returned as the full `{ total, items }` response, consistent with `Blocks` block enrichment.
|
|
12
|
+
|
|
13
|
+
- Orders > `getRefunds`, `createRefundRequest`, `cancelRefundRequest` — the base URL is now restored even if the refund request throws (wrapped in `try/finally`). Previously an exception left `_url` switched to `/orders`, which could misroute subsequent calls on the same instance.
|
|
14
|
+
|
|
3
15
|
## v.1.0.152
|
|
4
16
|
|
|
5
17
|
### Bug Fixes
|
|
@@ -40,12 +40,13 @@ export default class AdminsApi extends AsyncModules implements IAdmins {
|
|
|
40
40
|
]
|
|
41
41
|
* @param {string} [body.attributeMarker] - Text identifier (marker) of the attribute in the set. Example: "num".
|
|
42
42
|
* @param {string} [body.conditionMarker] - Text identifier (marker) of the condition in the set. Example: "mth".
|
|
43
|
-
* @param {string} [body.conditionValue] - Value of the condition. Example:
|
|
43
|
+
* @param {number | string | null} [body.conditionValue] - Value of the condition. Example: "new".
|
|
44
44
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
45
45
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
46
46
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
47
47
|
* @returns {Promise<IAdminEntity[] | IError>} Returns an array of admin objects.
|
|
48
48
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
49
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/admins/getAdminsInfo getAdminsInfo} documentation.
|
|
49
50
|
*/
|
|
50
51
|
getAdminsInfo(body?: IFilterParams[], langCode?: string, offset?: number, limit?: number): Promise<IAdminEntity[] | IError>;
|
|
51
52
|
}
|
package/dist/admins/adminsApi.js
CHANGED
|
@@ -43,12 +43,13 @@ class AdminsApi extends asyncModules_1.default {
|
|
|
43
43
|
]
|
|
44
44
|
* @param {string} [body.attributeMarker] - Text identifier (marker) of the attribute in the set. Example: "num".
|
|
45
45
|
* @param {string} [body.conditionMarker] - Text identifier (marker) of the condition in the set. Example: "mth".
|
|
46
|
-
* @param {string} [body.conditionValue] - Value of the condition. Example:
|
|
46
|
+
* @param {number | string | null} [body.conditionValue] - Value of the condition. Example: "new".
|
|
47
47
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
48
48
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
49
49
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
50
50
|
* @returns {Promise<IAdminEntity[] | IError>} Returns an array of admin objects.
|
|
51
51
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
52
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/admins/getAdminsInfo getAdminsInfo} documentation.
|
|
52
53
|
*/
|
|
53
54
|
async getAdminsInfo(body = [], langCode = this.state.lang, offset = 0, limit = 30) {
|
|
54
55
|
const query = {
|
|
@@ -25,7 +25,7 @@ interface IAdmins {
|
|
|
25
25
|
]
|
|
26
26
|
* @param {string} [body.attributeMarker] - Text identifier (marker) of the attribute in the set. Example: "num".
|
|
27
27
|
* @param {string} [body.conditionMarker] - Text identifier (marker) of the condition in the set. Example: "mth".
|
|
28
|
-
* @param {string} [body.conditionValue] - Value of the condition. Example:
|
|
28
|
+
* @param {number | string | null} [body.conditionValue] - Value of the condition. Example: "new".
|
|
29
29
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
30
30
|
* @param {number} [offset] - Parameter for pagination. Default: 0.
|
|
31
31
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
@@ -30,6 +30,7 @@ export default class AttributesSetsApi extends AsyncModules implements IAttribut
|
|
|
30
30
|
* @param {string} [sortBy] - identifier of the attribute set type. Default: "id".
|
|
31
31
|
* @returns {Promise<IAttributesSetsResponse | IError>} Returns object with array of IAttributeSetsEntity and total items count.
|
|
32
32
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
33
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributes getAttributes} documentation.
|
|
33
34
|
*/
|
|
34
35
|
getAttributes(langCode?: string, offset?: number, limit?: number, typeId?: any, sortBy?: string): Promise<IAttributesSetsResponse | IError>;
|
|
35
36
|
/**
|
|
@@ -39,6 +40,7 @@ export default class AttributesSetsApi extends AsyncModules implements IAttribut
|
|
|
39
40
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
40
41
|
* @returns {Promise<IAttributeSetsEntity[] | IError>} Returns an array of Attributes objects.
|
|
41
42
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
43
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributesByMarker getAttributesByMarker} documentation.
|
|
42
44
|
*/
|
|
43
45
|
getAttributesByMarker(marker: string, langCode?: string): Promise<IAttributeSetsEntity[] | IError>;
|
|
44
46
|
/**
|
|
@@ -49,6 +51,7 @@ export default class AttributesSetsApi extends AsyncModules implements IAttribut
|
|
|
49
51
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
50
52
|
* @returns {Promise<IAttributesSetsEntity | IError>} Returns a single attribute object from the attribute set.
|
|
51
53
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
54
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getSingleAttributeByMarkerSet getSingleAttributeByMarkerSet} documentation.
|
|
52
55
|
*/
|
|
53
56
|
getSingleAttributeByMarkerSet(setMarker: string, attributeMarker: string, langCode?: string): Promise<IAttributesSetsEntity | IError>;
|
|
54
57
|
/**
|
|
@@ -58,6 +61,7 @@ export default class AttributesSetsApi extends AsyncModules implements IAttribut
|
|
|
58
61
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
59
62
|
* @returns {Promise<IAttributeSetsEntity | IError>} Returns one object of the attribute set.
|
|
60
63
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
64
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributeSetByMarker getAttributeSetByMarker} documentation.
|
|
61
65
|
*/
|
|
62
66
|
getAttributeSetByMarker(marker: string, langCode?: string): Promise<IAttributeSetsEntity | IError>;
|
|
63
67
|
}
|
|
@@ -34,6 +34,7 @@ class AttributesSetsApi extends asyncModules_1.default {
|
|
|
34
34
|
* @param {string} [sortBy] - identifier of the attribute set type. Default: "id".
|
|
35
35
|
* @returns {Promise<IAttributesSetsResponse | IError>} Returns object with array of IAttributeSetsEntity and total items count.
|
|
36
36
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
37
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributes getAttributes} documentation.
|
|
37
38
|
*/
|
|
38
39
|
async getAttributes(langCode = this.state.lang, offset = 0, limit = 30,
|
|
39
40
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -58,6 +59,7 @@ class AttributesSetsApi extends asyncModules_1.default {
|
|
|
58
59
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
59
60
|
* @returns {Promise<IAttributeSetsEntity[] | IError>} Returns an array of Attributes objects.
|
|
60
61
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
62
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributesByMarker getAttributesByMarker} documentation.
|
|
61
63
|
*/
|
|
62
64
|
async getAttributesByMarker(marker, langCode = this.state.lang) {
|
|
63
65
|
const result = await this._fetchGet(`/${marker}/attributes?langCode=${langCode}`);
|
|
@@ -73,6 +75,7 @@ class AttributesSetsApi extends asyncModules_1.default {
|
|
|
73
75
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
74
76
|
* @returns {Promise<IAttributesSetsEntity | IError>} Returns a single attribute object from the attribute set.
|
|
75
77
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
78
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getSingleAttributeByMarkerSet getSingleAttributeByMarkerSet} documentation.
|
|
76
79
|
*/
|
|
77
80
|
async getSingleAttributeByMarkerSet(setMarker, attributeMarker, langCode = this.state.lang) {
|
|
78
81
|
const result = await this._fetchGet(`/${setMarker}/attributes/${attributeMarker}?langCode=${langCode}`);
|
|
@@ -87,6 +90,7 @@ class AttributesSetsApi extends asyncModules_1.default {
|
|
|
87
90
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
88
91
|
* @returns {Promise<IAttributeSetsEntity | IError>} Returns one object of the attribute set.
|
|
89
92
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
93
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/attribute-sets/getAttributeSetByMarker getAttributeSetByMarker} documentation.
|
|
90
94
|
*/
|
|
91
95
|
async getAttributeSetByMarker(marker, langCode = this.state.lang) {
|
|
92
96
|
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
@@ -82,6 +82,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
82
82
|
* @returns {Promise<ISignUpEntity | IError>} Returns a user object.
|
|
83
83
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
84
84
|
* @description User registration (❗️For a provider with user activation, the activation code is sent through the corresponding user notification method).
|
|
85
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/signUp signUp} documentation.
|
|
85
86
|
*/
|
|
86
87
|
signUp(marker: string, body: ISignUpData, langCode?: string): Promise<ISignUpEntity | IError>;
|
|
87
88
|
/**
|
|
@@ -93,6 +94,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
93
94
|
* @returns {Promise<void | IError>} Returns void if the code is successfully generated, or an error object if there was an issue.
|
|
94
95
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
95
96
|
* @description Obtaining a code to activate the user.
|
|
97
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/generateCode generateCode} documentation.
|
|
96
98
|
*/
|
|
97
99
|
generateCode(marker: string, userIdentifier: string, eventIdentifier: string): Promise<void | IError>;
|
|
98
100
|
/**
|
|
@@ -105,6 +107,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
105
107
|
* @returns {Promise<boolean | IError>} Returns true if the code is correct, or an error object if there was an issue.
|
|
106
108
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
107
109
|
* @description Checking the user activation code
|
|
110
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/checkCode checkCode} documentation.
|
|
108
111
|
*/
|
|
109
112
|
checkCode(marker: string, userIdentifier: string, eventIdentifier: string, code: string): Promise<boolean | IError>;
|
|
110
113
|
/**
|
|
@@ -116,6 +119,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
116
119
|
* @returns {Promise<boolean | IError>} Returns true if the user was successfully activated, or an error object if there was an issue.
|
|
117
120
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
118
121
|
* @description User activation.
|
|
122
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/activateUser activateUser} documentation.
|
|
119
123
|
*/
|
|
120
124
|
activateUser(marker: string, userIdentifier: string, code: string): Promise<boolean | IError>;
|
|
121
125
|
/**
|
|
@@ -149,6 +153,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
149
153
|
* @returns {Promise<IAuthEntity | IError>} Returns an auth entity object.
|
|
150
154
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
151
155
|
* @description User authorization.
|
|
156
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/auth auth} documentation.
|
|
152
157
|
*/
|
|
153
158
|
auth(marker: string, body: IAuthPostBody): Promise<IAuthEntity | IError>;
|
|
154
159
|
/**
|
|
@@ -159,6 +164,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
159
164
|
* @returns {Promise<IAuthEntity | IError>} Returns an auth entity object with the following values: accessToken, refreshToken, user, and other auth-related data.
|
|
160
165
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
161
166
|
* @description User token refresh.
|
|
167
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/refresh refresh} documentation.
|
|
162
168
|
*/
|
|
163
169
|
refresh(marker: string, token: string): Promise<IAuthEntity | IError>;
|
|
164
170
|
/**
|
|
@@ -170,6 +176,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
170
176
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
171
177
|
* @description This method requires user authorization.
|
|
172
178
|
* @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}.
|
|
179
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/logout logout} documentation.
|
|
173
180
|
*/
|
|
174
181
|
logout(marker: string, token: string): Promise<boolean | IError>;
|
|
175
182
|
/**
|
|
@@ -180,6 +187,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
180
187
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
181
188
|
* @description This method requires user authorization.
|
|
182
189
|
* @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}.
|
|
190
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/logoutAll logoutAll} documentation.
|
|
183
191
|
*/
|
|
184
192
|
logoutAll(marker: string): Promise<boolean | IError>;
|
|
185
193
|
/**
|
|
@@ -188,13 +196,14 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
188
196
|
* @param {string} marker - The text identifier of the authorization provider. Example: "email".
|
|
189
197
|
* @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
|
|
190
198
|
* @param {string} eventIdentifier - The text identifier of the event. Example: "reg".
|
|
191
|
-
* @param {
|
|
199
|
+
* @param {number} type - Operation type (1 - for changing password, 2 - for recovery). Example: 1.
|
|
192
200
|
* @param {string} code - Service code. Example: "123456".
|
|
193
201
|
* @param {string} newPassword - New password. Example: "newPassword123".
|
|
194
202
|
* @param {string} [repeatPassword] - Optional variable contains repeat new password for validation. Example: "newPassword123".
|
|
195
203
|
* @returns {Promise<boolean | IError>} Returns true if the password was successfully changed, or an error object if there was an issue.
|
|
196
204
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
197
205
|
* @description User password change (only for tariffs with account activation and the Activation feature enabled).
|
|
206
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/changePassword changePassword} documentation.
|
|
198
207
|
*/
|
|
199
208
|
changePassword(marker: string, userIdentifier: string, eventIdentifier: string, type: number, code: string, newPassword: string, repeatPassword?: string): Promise<boolean | IError>;
|
|
200
209
|
/**
|
|
@@ -206,6 +215,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
206
215
|
* @returns {Promise<IAuthProvidersEntity[] | IError>} Returns an array of auth provider objects.
|
|
207
216
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
208
217
|
* @description Getting all objects of authorization providers.
|
|
218
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/getAuthProviders getAuthProviders} documentation.
|
|
209
219
|
*/
|
|
210
220
|
getAuthProviders(langCode?: string, offset?: number, limit?: number): Promise<IAuthProvidersEntity[] | IError>;
|
|
211
221
|
/**
|
|
@@ -216,6 +226,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
216
226
|
* @returns {Promise<IAuthProvidersEntity | IError>} Returns an auth provider object.
|
|
217
227
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
218
228
|
* @description Getting a single authorization provider object by marker.
|
|
229
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/getAuthProviderByMarker getAuthProviderByMarker} documentation.
|
|
219
230
|
*/
|
|
220
231
|
getAuthProviderByMarker(marker: string, langCode?: string): Promise<IAuthProvidersEntity | IError>;
|
|
221
232
|
/**
|
|
@@ -225,6 +236,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
225
236
|
* @returns {Promise<IActiveSession[] | IError>} Returns an auth provider object.
|
|
226
237
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
227
238
|
* @description Getting a single authorization provider object by marker.
|
|
239
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/getActiveSessionsByMarker getActiveSessionsByMarker} documentation.
|
|
228
240
|
*/
|
|
229
241
|
getActiveSessionsByMarker(marker: string): Promise<IActiveSession[] | IError>;
|
|
230
242
|
/**
|
|
@@ -244,6 +256,7 @@ export default class AuthProviderApi extends AsyncModules implements IAuthProvid
|
|
|
244
256
|
* @returns {Promise<ISignUpEntity | IError>} Returns a user object.
|
|
245
257
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
246
258
|
* @description User registration (authorization) via OAUTH.
|
|
259
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/oauth oauth} documentation.
|
|
247
260
|
*/
|
|
248
261
|
oauth(marker: string, body: IOauthData, langCode?: string): Promise<IAuthEntity | IError>;
|
|
249
262
|
}
|
|
@@ -87,6 +87,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
87
87
|
* @returns {Promise<ISignUpEntity | IError>} Returns a user object.
|
|
88
88
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
89
89
|
* @description User registration (❗️For a provider with user activation, the activation code is sent through the corresponding user notification method).
|
|
90
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/signUp signUp} documentation.
|
|
90
91
|
*/
|
|
91
92
|
async signUp(marker, body, langCode = this.state.lang) {
|
|
92
93
|
body['langCode'] = langCode;
|
|
@@ -104,6 +105,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
104
105
|
* @returns {Promise<void | IError>} Returns void if the code is successfully generated, or an error object if there was an issue.
|
|
105
106
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
106
107
|
* @description Obtaining a code to activate the user.
|
|
108
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/generateCode generateCode} documentation.
|
|
107
109
|
*/
|
|
108
110
|
async generateCode(marker, userIdentifier, eventIdentifier) {
|
|
109
111
|
const data = {
|
|
@@ -123,6 +125,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
123
125
|
* @returns {Promise<boolean | IError>} Returns true if the code is correct, or an error object if there was an issue.
|
|
124
126
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
125
127
|
* @description Checking the user activation code
|
|
128
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/checkCode checkCode} documentation.
|
|
126
129
|
*/
|
|
127
130
|
async checkCode(marker, userIdentifier, eventIdentifier, code) {
|
|
128
131
|
const data = {
|
|
@@ -142,6 +145,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
142
145
|
* @returns {Promise<boolean | IError>} Returns true if the user was successfully activated, or an error object if there was an issue.
|
|
143
146
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
144
147
|
* @description User activation.
|
|
148
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/activateUser activateUser} documentation.
|
|
145
149
|
*/
|
|
146
150
|
async activateUser(marker, userIdentifier, code) {
|
|
147
151
|
const data = {
|
|
@@ -182,6 +186,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
182
186
|
* @returns {Promise<IAuthEntity | IError>} Returns an auth entity object.
|
|
183
187
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
184
188
|
* @description User authorization.
|
|
189
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/auth auth} documentation.
|
|
185
190
|
*/
|
|
186
191
|
async auth(marker, body) {
|
|
187
192
|
const result = await this._fetchPost(`/marker/${marker}/users/auth`, body);
|
|
@@ -204,6 +209,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
204
209
|
* @returns {Promise<IAuthEntity | IError>} Returns an auth entity object with the following values: accessToken, refreshToken, user, and other auth-related data.
|
|
205
210
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
206
211
|
* @description User token refresh.
|
|
212
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/refresh refresh} documentation.
|
|
207
213
|
*/
|
|
208
214
|
async refresh(marker, token) {
|
|
209
215
|
const data = { refreshToken: token };
|
|
@@ -226,6 +232,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
226
232
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
227
233
|
* @description This method requires user authorization.
|
|
228
234
|
* @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}.
|
|
235
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/logout logout} documentation.
|
|
229
236
|
*/
|
|
230
237
|
async logout(marker, token) {
|
|
231
238
|
const data = {
|
|
@@ -249,6 +256,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
249
256
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
250
257
|
* @description This method requires user authorization.
|
|
251
258
|
* @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}.
|
|
259
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/logoutAll logoutAll} documentation.
|
|
252
260
|
*/
|
|
253
261
|
async logoutAll(marker) {
|
|
254
262
|
const result = await this._fetchPost(`/marker/${marker}/users/logout-all`);
|
|
@@ -267,13 +275,14 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
267
275
|
* @param {string} marker - The text identifier of the authorization provider. Example: "email".
|
|
268
276
|
* @param {string} userIdentifier - The text identifier of the user's object (user login). Example: "example@oneentry.cloud".
|
|
269
277
|
* @param {string} eventIdentifier - The text identifier of the event. Example: "reg".
|
|
270
|
-
* @param {
|
|
278
|
+
* @param {number} type - Operation type (1 - for changing password, 2 - for recovery). Example: 1.
|
|
271
279
|
* @param {string} code - Service code. Example: "123456".
|
|
272
280
|
* @param {string} newPassword - New password. Example: "newPassword123".
|
|
273
281
|
* @param {string} [repeatPassword] - Optional variable contains repeat new password for validation. Example: "newPassword123".
|
|
274
282
|
* @returns {Promise<boolean | IError>} Returns true if the password was successfully changed, or an error object if there was an issue.
|
|
275
283
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
276
284
|
* @description User password change (only for tariffs with account activation and the Activation feature enabled).
|
|
285
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/changePassword changePassword} documentation.
|
|
277
286
|
*/
|
|
278
287
|
async changePassword(marker, userIdentifier, eventIdentifier, type, code, newPassword, repeatPassword) {
|
|
279
288
|
const data = {
|
|
@@ -296,6 +305,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
296
305
|
* @returns {Promise<IAuthProvidersEntity[] | IError>} Returns an array of auth provider objects.
|
|
297
306
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
298
307
|
* @description Getting all objects of authorization providers.
|
|
308
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/getAuthProviders getAuthProviders} documentation.
|
|
299
309
|
*/
|
|
300
310
|
async getAuthProviders(langCode = this.state.lang, offset = 0, limit = 30) {
|
|
301
311
|
const result = await this._fetchGet(`?langCode=${langCode}&offset=${offset}&limit=${limit}`);
|
|
@@ -311,6 +321,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
311
321
|
* @returns {Promise<IAuthProvidersEntity | IError>} Returns an auth provider object.
|
|
312
322
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
313
323
|
* @description Getting a single authorization provider object by marker.
|
|
324
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/getAuthProviderByMarker getAuthProviderByMarker} documentation.
|
|
314
325
|
*/
|
|
315
326
|
async getAuthProviderByMarker(marker, langCode = this.state.lang) {
|
|
316
327
|
const result = await this._fetchGet(`/marker/${marker}?langCode=${langCode}`);
|
|
@@ -323,6 +334,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
323
334
|
* @returns {Promise<IActiveSession[] | IError>} Returns an auth provider object.
|
|
324
335
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
325
336
|
* @description Getting a single authorization provider object by marker.
|
|
337
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/getActiveSessionsByMarker getActiveSessionsByMarker} documentation.
|
|
326
338
|
*/
|
|
327
339
|
async getActiveSessionsByMarker(marker) {
|
|
328
340
|
const result = await this._fetchGet(`/marker/${marker}/users/sessions`);
|
|
@@ -345,6 +357,7 @@ class AuthProviderApi extends asyncModules_1.default {
|
|
|
345
357
|
* @returns {Promise<ISignUpEntity | IError>} Returns a user object.
|
|
346
358
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
347
359
|
* @description User registration (authorization) via OAUTH.
|
|
360
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/auth-provider/oauth oauth} documentation.
|
|
348
361
|
*/
|
|
349
362
|
async oauth(marker, body, langCode = this.state.lang) {
|
|
350
363
|
const result = await this._fetchPost(`/marker/${marker}/oauth`, this._normalizePostBody(body, langCode));
|
|
@@ -56,6 +56,17 @@ export default abstract class AsyncModules extends SyncModules {
|
|
|
56
56
|
* @description Define a protected asynchronous method '_fetchDelete' that performs a DELETE request
|
|
57
57
|
*/
|
|
58
58
|
protected _fetchDelete<T = unknown>(path: string, body?: unknown): Promise<T>;
|
|
59
|
+
/**
|
|
60
|
+
* Wraps a fetch call whose only meaningful outcome is success or failure.
|
|
61
|
+
*
|
|
62
|
+
* Several endpoints (cancel/recover subscription, subscribe/unsubscribe to
|
|
63
|
+
* events) return no useful body — callers only care whether the request
|
|
64
|
+
* succeeded. This helper resolves to `true` on success and to the caught
|
|
65
|
+
* error (as IError) on failure, centralizing the repeated try/catch.
|
|
66
|
+
* @param {() => Promise<unknown>} request - Thunk performing the fetch call.
|
|
67
|
+
* @returns {Promise<boolean | IError>} `true` on success, IError on failure.
|
|
68
|
+
*/
|
|
69
|
+
protected _fetchBoolean(request: () => Promise<unknown>): Promise<boolean | IError>;
|
|
59
70
|
/**
|
|
60
71
|
* Refreshes the authentication token (single-flight).
|
|
61
72
|
* @returns {Promise<boolean>} A promise resolving to a boolean indicating success or failure.
|
|
@@ -281,6 +281,25 @@ class AsyncModules extends syncModules_1.default {
|
|
|
281
281
|
});
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
|
+
/**
|
|
285
|
+
* Wraps a fetch call whose only meaningful outcome is success or failure.
|
|
286
|
+
*
|
|
287
|
+
* Several endpoints (cancel/recover subscription, subscribe/unsubscribe to
|
|
288
|
+
* events) return no useful body — callers only care whether the request
|
|
289
|
+
* succeeded. This helper resolves to `true` on success and to the caught
|
|
290
|
+
* error (as IError) on failure, centralizing the repeated try/catch.
|
|
291
|
+
* @param {() => Promise<unknown>} request - Thunk performing the fetch call.
|
|
292
|
+
* @returns {Promise<boolean | IError>} `true` on success, IError on failure.
|
|
293
|
+
*/
|
|
294
|
+
async _fetchBoolean(request) {
|
|
295
|
+
try {
|
|
296
|
+
await request();
|
|
297
|
+
return true;
|
|
298
|
+
}
|
|
299
|
+
catch (e) {
|
|
300
|
+
return e;
|
|
301
|
+
}
|
|
302
|
+
}
|
|
284
303
|
/**
|
|
285
304
|
* Refreshes the authentication token (single-flight).
|
|
286
305
|
* @returns {Promise<boolean>} A promise resolving to a boolean indicating success or failure.
|
|
@@ -27,6 +27,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
27
27
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
28
28
|
* @returns {Promise<IBlocksResponse | IError>} Returns BlocksEntity object.
|
|
29
29
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
30
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getBlocks getBlocks} documentation.
|
|
30
31
|
*/
|
|
31
32
|
getBlocks(type?: BlockType, langCode?: string, offset?: number, limit?: number): Promise<IBlocksResponse | IError>;
|
|
32
33
|
/**
|
|
@@ -39,8 +40,25 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
39
40
|
* @returns {Promise<IBlockEntity | IError>} - Returns a BlockEntity object.
|
|
40
41
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
41
42
|
* @description This method retrieves a block by its marker and includes additional information such as similar products or products associated with the block.
|
|
43
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getBlockByMarker getBlockByMarker} documentation.
|
|
42
44
|
*/
|
|
43
45
|
getBlockByMarker(marker: string, langCode?: string, offset?: number, limit?: number): Promise<IBlockEntity | IError>;
|
|
46
|
+
/**
|
|
47
|
+
* Enrich a single block in place.
|
|
48
|
+
*
|
|
49
|
+
* Lifts product display settings from `customSettings.productConfig` to
|
|
50
|
+
* numeric top-level fields, strips internal-only fields, and — when
|
|
51
|
+
* `loadProducts` is true — fetches the related products for
|
|
52
|
+
* `similar_products_block` / `product_block` blocks. Shared by `getBlocks`
|
|
53
|
+
* (array) and `getBlockByMarker` (single block). Mutates `block` in place.
|
|
54
|
+
* @param {any} block - Normalized block to enrich (mutated in place).
|
|
55
|
+
* @param {string} langCode - Language code passed to product sub-requests.
|
|
56
|
+
* @param {number} offset - Pagination offset for product sub-requests.
|
|
57
|
+
* @param {number} limit - Pagination limit for product sub-requests.
|
|
58
|
+
* @param {boolean} loadProducts - Whether to fetch related products.
|
|
59
|
+
* @returns {Promise<void>} Resolves when enrichment (incl. sub-requests) is done.
|
|
60
|
+
*/
|
|
61
|
+
private _enrichBlock;
|
|
44
62
|
/**
|
|
45
63
|
* Get similar products by block marker.
|
|
46
64
|
* @handleName getSimilarProducts
|
|
@@ -50,8 +68,9 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
50
68
|
* @param {number} [limit] - Parameter for pagination. Default: 30.
|
|
51
69
|
* @param {string} [signPrice] - Sign price.
|
|
52
70
|
* @param {number} [productId] - Optional product id to find similar products for.
|
|
53
|
-
* @returns {Promise<IProductsResponse | IError>}
|
|
71
|
+
* @returns {Promise<IProductsResponse | IError>} Returns the total count and an array of product items in object by specified block marker.
|
|
54
72
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
73
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getSimilarProducts getSimilarProducts} documentation.
|
|
55
74
|
*/
|
|
56
75
|
private getSimilarProducts;
|
|
57
76
|
/**
|
|
@@ -64,6 +83,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
64
83
|
* @param {string} [signPrice] - Sign price.
|
|
65
84
|
* @returns {Promise<IProductsEntity[] | IError>} Return array of BlocksEntity object.
|
|
66
85
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
86
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getProductsByBlockMarker getProductsByBlockMarker} documentation.
|
|
67
87
|
*/
|
|
68
88
|
private getProductsByBlockMarker;
|
|
69
89
|
/**
|
|
@@ -75,6 +95,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
75
95
|
* @param {string} [signPrice] - Sign price.
|
|
76
96
|
* @returns {Promise<IProductsResponse | IError>} Returns a products response with items and total.
|
|
77
97
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
98
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getFrequentlyOrderedProducts getFrequentlyOrderedProducts} documentation.
|
|
78
99
|
*/
|
|
79
100
|
getFrequentlyOrderedProducts(productId: number, marker: string, langCode?: string, signPrice?: string): Promise<IProductsResponse | IError>;
|
|
80
101
|
/**
|
|
@@ -84,6 +105,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
84
105
|
* @param {string} [langCode] - Language code. Default: "en_US".
|
|
85
106
|
* @returns {Promise<ISearchBlock[] | IError>} Returns an array of ISearchBlock objects.
|
|
86
107
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
108
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/searchBlock searchBlock} documentation.
|
|
87
109
|
*/
|
|
88
110
|
searchBlock(name: string, langCode?: string): Promise<ISearchBlock[] | IError>;
|
|
89
111
|
/**
|
|
@@ -94,6 +116,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
94
116
|
* @param {string} [signPrice] - Sign price.
|
|
95
117
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
96
118
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
119
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplement getCartComplement} documentation.
|
|
97
120
|
*/
|
|
98
121
|
getCartComplement(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
|
|
99
122
|
/**
|
|
@@ -108,6 +131,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
108
131
|
}
|
|
109
132
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
110
133
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
134
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartComplementByProductIds getCartComplementByProductIds} documentation.
|
|
111
135
|
*/
|
|
112
136
|
getCartComplementByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
|
|
113
137
|
/**
|
|
@@ -118,6 +142,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
118
142
|
* @param {string} [signPrice] - Sign price.
|
|
119
143
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
120
144
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
145
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilar getCartSimilar} documentation.
|
|
121
146
|
*/
|
|
122
147
|
getCartSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
|
|
123
148
|
/**
|
|
@@ -132,6 +157,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
132
157
|
}
|
|
133
158
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
134
159
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
160
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getCartSimilarByProductIds getCartSimilarByProductIds} documentation.
|
|
135
161
|
*/
|
|
136
162
|
getCartSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
|
|
137
163
|
/**
|
|
@@ -142,6 +168,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
142
168
|
* @param {string} [signPrice] - Sign price.
|
|
143
169
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
144
170
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
171
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getPersonalRecommendations getPersonalRecommendations} documentation.
|
|
145
172
|
*/
|
|
146
173
|
getPersonalRecommendations(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
|
|
147
174
|
/**
|
|
@@ -152,6 +179,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
152
179
|
* @param {string} [signPrice] - Sign price.
|
|
153
180
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
154
181
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
182
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRecentlyViewed getRecentlyViewed} documentation.
|
|
155
183
|
*/
|
|
156
184
|
getRecentlyViewed(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
|
|
157
185
|
/**
|
|
@@ -162,6 +190,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
162
190
|
* @param {string} [signPrice] - Sign price.
|
|
163
191
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
164
192
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
193
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getRepeatPurchase getRepeatPurchase} documentation.
|
|
165
194
|
*/
|
|
166
195
|
getRepeatPurchase(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
|
|
167
196
|
/**
|
|
@@ -170,6 +199,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
170
199
|
* @param {string} marker - Block marker. Example: "slider_block".
|
|
171
200
|
* @returns {Promise<IBlockSlidesResponse | IError>} Returns the slides response.
|
|
172
201
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
202
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getSlides getSlides} documentation.
|
|
173
203
|
*/
|
|
174
204
|
getSlides(marker: string): Promise<IBlockSlidesResponse | IError>;
|
|
175
205
|
/**
|
|
@@ -180,6 +210,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
180
210
|
* @param {string} [signPrice] - Sign price.
|
|
181
211
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
182
212
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
213
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getTrending getTrending} documentation.
|
|
183
214
|
*/
|
|
184
215
|
getTrending(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
|
|
185
216
|
/**
|
|
@@ -190,6 +221,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
190
221
|
* @param {string} [signPrice] - Sign price.
|
|
191
222
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
192
223
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
224
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilar getWishlistSimilar} documentation.
|
|
193
225
|
*/
|
|
194
226
|
getWishlistSimilar(marker: string, langCode?: string, signPrice?: string): Promise<IProductsEntity[] | IError>;
|
|
195
227
|
/**
|
|
@@ -204,6 +236,7 @@ export default class BlocksApi extends AsyncModules implements IBlocks {
|
|
|
204
236
|
}
|
|
205
237
|
* @returns {Promise<IProductsEntity[] | IError>} Returns an array of products.
|
|
206
238
|
* @throws {IError} When isShell=false and an error occurs during the fetch
|
|
239
|
+
* @see {@link https://js-sdk.oneentry.cloud/docs/blocks/getWishlistSimilarByProductIds getWishlistSimilarByProductIds} documentation.
|
|
207
240
|
*/
|
|
208
241
|
getWishlistSimilarByProductIds(marker: string, body: IBlockProductsLookup): Promise<IProductsEntity[] | IError>;
|
|
209
242
|
}
|