oneentry 1.0.100 → 1.0.102
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.
|
@@ -152,7 +152,12 @@ class AsyncModules extends syncModules_1.default {
|
|
|
152
152
|
try {
|
|
153
153
|
const response = await fetch(this._getFullPath(path), options);
|
|
154
154
|
if (response.ok) {
|
|
155
|
-
|
|
155
|
+
try {
|
|
156
|
+
return await response.json();
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
156
161
|
}
|
|
157
162
|
else {
|
|
158
163
|
if (response.status == 401 && !this.state.customAuth) {
|
|
@@ -22,9 +22,9 @@ export default class EventsApi extends AsyncModules implements IEvents {
|
|
|
22
22
|
*
|
|
23
23
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
24
24
|
* @param {string} marker - Event marker.
|
|
25
|
-
* @param {number} langCode - Language code.
|
|
25
|
+
* @param {number} [langCode] - Language code.
|
|
26
26
|
* @param {string} productId - Product id.
|
|
27
|
-
* @param {number} threshold - Threshold value for comparing numerical value.
|
|
27
|
+
* @param {number} [threshold] - Threshold value for comparing numerical value.
|
|
28
28
|
*/
|
|
29
29
|
subscribeByMarker(marker: string, productId: number, langCode?: string, threshold?: number): Promise<any | IError>;
|
|
30
30
|
/**
|
|
@@ -32,9 +32,9 @@ export default class EventsApi extends AsyncModules implements IEvents {
|
|
|
32
32
|
*
|
|
33
33
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
34
34
|
* @param {string} marker - Event marker.
|
|
35
|
-
* @param {number} langCode - Language code.
|
|
35
|
+
* @param {number} [langCode] - Language code.
|
|
36
36
|
* @param {string} productId - Product id.
|
|
37
|
-
* @param {number} threshold - Threshold value for comparing numerical value.
|
|
37
|
+
* @param {number} [threshold] - Threshold value for comparing numerical value.
|
|
38
38
|
*/
|
|
39
39
|
unsubscribeByMarker(marker: string, productId: number, langCode?: string, threshold?: number): Promise<any | IError>;
|
|
40
40
|
}
|
package/dist/events/eventsApi.js
CHANGED
|
@@ -24,9 +24,9 @@ class EventsApi extends asyncModules_1.default {
|
|
|
24
24
|
*
|
|
25
25
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
26
26
|
* @param {string} marker - Event marker.
|
|
27
|
-
* @param {number} langCode - Language code.
|
|
27
|
+
* @param {number} [langCode] - Language code.
|
|
28
28
|
* @param {string} productId - Product id.
|
|
29
|
-
* @param {number} threshold - Threshold value for comparing numerical value.
|
|
29
|
+
* @param {number} [threshold] - Threshold value for comparing numerical value.
|
|
30
30
|
*/
|
|
31
31
|
async subscribeByMarker(marker, productId, langCode = this.state.lang, threshold = null) {
|
|
32
32
|
const data = {
|
|
@@ -44,9 +44,9 @@ class EventsApi extends asyncModules_1.default {
|
|
|
44
44
|
*
|
|
45
45
|
* @description This method requires user authorization. For more information about configuring the authorization module, see the documentation in the configuration settings section of the SDK.
|
|
46
46
|
* @param {string} marker - Event marker.
|
|
47
|
-
* @param {number} langCode - Language code.
|
|
47
|
+
* @param {number} [langCode] - Language code.
|
|
48
48
|
* @param {string} productId - Product id.
|
|
49
|
-
* @param {number} threshold - Threshold value for comparing numerical value.
|
|
49
|
+
* @param {number} [threshold] - Threshold value for comparing numerical value.
|
|
50
50
|
*/
|
|
51
51
|
async unsubscribeByMarker(marker, productId, langCode = this.state.lang, threshold = null) {
|
|
52
52
|
const data = {
|
|
@@ -52,9 +52,9 @@ interface IProductsQuery {
|
|
|
52
52
|
* 'exs' - Exists,
|
|
53
53
|
* 'nexs' - Does not exist
|
|
54
54
|
*/
|
|
55
|
-
conditionMarker?:
|
|
55
|
+
conditionMarker?: "in" | "nin" | "eq" | "neq" | "mth" | "lth" | "exs" | "nexs" | null;
|
|
56
56
|
attributeMarker?: string | null;
|
|
57
|
-
sortOrder?:
|
|
57
|
+
sortOrder?: "DESC" | "ASC" | null;
|
|
58
58
|
sortKey?: "id" | "position" | "title" | "date" | "price" | null;
|
|
59
59
|
[key: string]: string | number | null;
|
|
60
60
|
}
|
|
@@ -81,12 +81,12 @@ interface IFilterParams {
|
|
|
81
81
|
* 'exs' - Exists,
|
|
82
82
|
* 'nexs' - Does not exist
|
|
83
83
|
*/
|
|
84
|
-
conditionMarker?:
|
|
84
|
+
conditionMarker?: "in" | "nin" | "eq" | "neq" | "mth" | "lth" | "exs" | "nexs" | null;
|
|
85
85
|
conditionValue: number | string | null;
|
|
86
86
|
pageUrl?: Array<string> | null;
|
|
87
87
|
statusMarker?: string;
|
|
88
|
-
title
|
|
89
|
-
isNested
|
|
88
|
+
title?: string;
|
|
89
|
+
isNested?: boolean;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
92
|
* Represents a product entity object.
|
|
@@ -175,4 +175,4 @@ interface IProductBlock {
|
|
|
175
175
|
isSync: boolean;
|
|
176
176
|
attributeValues: AttributeType;
|
|
177
177
|
}
|
|
178
|
-
export { IFilterParams, IProductsQuery, IProductApi, IProductsEntity, IProductsInfo, IProductInfo, IProductBlock, IProductEntity, IProductsResponse };
|
|
178
|
+
export { IFilterParams, IProductsQuery, IProductApi, IProductsEntity, IProductsInfo, IProductInfo, IProductBlock, IProductEntity, IProductsResponse, };
|
package/package.json
CHANGED