nextemos 5.1.22 → 5.2.0
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/dist/interfaces/environment.d.ts +4 -1
- package/dist/interfaces/product.d.ts +3 -3
- package/dist/services/environment/environment.types.d.ts +5 -1
- package/dist/services/environment/index.js +3 -0
- package/dist/services/product/product.types.d.ts +8 -2
- package/dist/services/urls.d.ts +1 -0
- package/dist/services/urls.js +1 -0
- package/package.json +1 -1
|
@@ -1,7 +1,10 @@
|
|
|
1
|
-
import { IResponse } from
|
|
1
|
+
import { IResponse } from "./response";
|
|
2
2
|
export interface IInitEnvironmentResponse extends IResponse {
|
|
3
3
|
environment: string;
|
|
4
4
|
}
|
|
5
|
+
export interface IGetTokenConfigResponse extends IResponse {
|
|
6
|
+
publicKey: string;
|
|
7
|
+
}
|
|
5
8
|
export interface IReadEnvironmentResponse extends IResponse {
|
|
6
9
|
isValid: boolean;
|
|
7
10
|
version: number;
|
|
@@ -297,13 +297,13 @@ export interface IProductType {
|
|
|
297
297
|
isAggregated: boolean;
|
|
298
298
|
extensionData: any;
|
|
299
299
|
}
|
|
300
|
-
export interface IGetFavoritesResponse extends
|
|
300
|
+
export interface IGetFavoritesResponse extends IResponsePaging {
|
|
301
301
|
data: IProductFavorite[];
|
|
302
302
|
}
|
|
303
|
-
export interface IGetPriceAlertsResponse extends
|
|
303
|
+
export interface IGetPriceAlertsResponse extends IResponsePaging {
|
|
304
304
|
data: IProductPriceAlert[];
|
|
305
305
|
}
|
|
306
|
-
export interface IGetStockAlertsResponse extends
|
|
306
|
+
export interface IGetStockAlertsResponse extends IResponsePaging {
|
|
307
307
|
data: IProductStockAlert[];
|
|
308
308
|
}
|
|
309
309
|
export interface IProductFavorite {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IEnvironmentParameters, IInitEnvironmentResponse, IReadEnvironmentResponse, IService, IUpdateEnvironmentResponse } from "../../";
|
|
1
|
+
import { IEnvironmentParameters, IGetTokenConfigResponse, IInitEnvironmentResponse, IReadEnvironmentResponse, IService, IUpdateEnvironmentResponse } from "../../";
|
|
2
2
|
import { IApiResponse, IRequestInit } from "../..";
|
|
3
3
|
export interface IInitEnvironmentRequest {
|
|
4
4
|
platform: "desktop" | "mobile";
|
|
@@ -17,9 +17,13 @@ export interface IUpdateEnvironmentRequest {
|
|
|
17
17
|
export interface IRefreshEnvironmentRequest extends IInitEnvironmentRequest {
|
|
18
18
|
environment: string;
|
|
19
19
|
}
|
|
20
|
+
export interface IGetTokenConfigRequest {
|
|
21
|
+
language?: string;
|
|
22
|
+
}
|
|
20
23
|
export interface IEnvironmentService extends IService {
|
|
21
24
|
Init: (data: IInitEnvironmentRequest, options?: IRequestInit) => Promise<IApiResponse<IInitEnvironmentResponse>>;
|
|
22
25
|
Read: (data: IReadEnvironmentRequest, options?: IRequestInit) => Promise<IApiResponse<IReadEnvironmentResponse>>;
|
|
23
26
|
Update: (data: IUpdateEnvironmentRequest, options?: IRequestInit) => Promise<IApiResponse<IUpdateEnvironmentResponse>>;
|
|
24
27
|
Refresh: (data: IRefreshEnvironmentRequest, options?: IRequestInit) => Promise<IApiResponse<IInitEnvironmentResponse>>;
|
|
28
|
+
GetTokenConfig: (data?: IGetTokenConfigRequest, options?: IRequestInit) => Promise<IApiResponse<IGetTokenConfigResponse>>;
|
|
25
29
|
}
|
|
@@ -51,6 +51,9 @@ exports.EnvironmentService = {
|
|
|
51
51
|
language,
|
|
52
52
|
methodName,
|
|
53
53
|
}),
|
|
54
|
+
GetTokenConfig: (...args_1) => __awaiter(void 0, [...args_1], void 0, function* (data = {}, options) {
|
|
55
|
+
return (0, __1.fetchRequest)().post(exports.EnvironmentService.Url(urls_1.default.Environment.GetTokenConfig, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
56
|
+
}),
|
|
54
57
|
Init: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
58
|
return (0, __1.fetchRequest)().post(exports.EnvironmentService.Url(urls_1.default.Environment.Init, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
56
59
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiResponse, IRequestInit, ICategoryTreeResponse, IGetAllProductsResponse, IProductCategoryResponse, IProductResponse, ISearchProductsResponse, IProductCategoryAllResponse, IProductCategoryHierarchyResponse, IService, IProductTypeResponse, IProductTypeListResponse, IResponse, IGetFavoritesResponse, IRequestBase, IGetPriceAlertsResponse, IGetStockAlertsResponse } from
|
|
1
|
+
import { IApiResponse, IRequestInit, ICategoryTreeResponse, IGetAllProductsResponse, IProductCategoryResponse, IProductResponse, ISearchProductsResponse, IProductCategoryAllResponse, IProductCategoryHierarchyResponse, IService, IProductTypeResponse, IProductTypeListResponse, IResponse, IGetFavoritesResponse, IRequestBase, IGetPriceAlertsResponse, IGetStockAlertsResponse } from "../..";
|
|
2
2
|
export interface IProductRequest extends IRequestBase {
|
|
3
3
|
id: number;
|
|
4
4
|
flags?: string | number | string[];
|
|
@@ -65,7 +65,7 @@ export interface ICategoryTreeRequest extends IRequestBase {
|
|
|
65
65
|
categoryId?: number;
|
|
66
66
|
includes?: string[];
|
|
67
67
|
levelCount?: number;
|
|
68
|
-
ReturnProductCounts?:
|
|
68
|
+
ReturnProductCounts?: "true" | "false";
|
|
69
69
|
}
|
|
70
70
|
export interface IAllCategoriesRequest extends IRequestBase {
|
|
71
71
|
categoryId?: number;
|
|
@@ -92,6 +92,8 @@ export interface IProductTypeListRequest extends IRequestBase {
|
|
|
92
92
|
includes?: string[];
|
|
93
93
|
}
|
|
94
94
|
export interface IGetFavoritesRequest extends IRequestBase {
|
|
95
|
+
currentPage?: number;
|
|
96
|
+
pageSize?: number;
|
|
95
97
|
}
|
|
96
98
|
export interface IAddFavoritesRequest extends IRequestBase {
|
|
97
99
|
productIds: number[];
|
|
@@ -100,6 +102,8 @@ export interface IRemoveFavoritesRequest extends IRequestBase {
|
|
|
100
102
|
productIds: number[];
|
|
101
103
|
}
|
|
102
104
|
export interface IGetPriceAlertsRequest extends IRequestBase {
|
|
105
|
+
currentPage?: number;
|
|
106
|
+
pageSize?: number;
|
|
103
107
|
}
|
|
104
108
|
export interface IAddPriceAlertRequest extends IRequestBase {
|
|
105
109
|
productPriceAlerts: {
|
|
@@ -110,6 +114,8 @@ export interface IRemovePriceAlertRequest extends IRequestBase {
|
|
|
110
114
|
productIds: number[];
|
|
111
115
|
}
|
|
112
116
|
export interface IGetStockAlertsRequest extends IRequestBase {
|
|
117
|
+
currentPage?: number;
|
|
118
|
+
pageSize?: number;
|
|
113
119
|
}
|
|
114
120
|
export interface IAddStockAlertRequest extends IRequestBase {
|
|
115
121
|
productStockAlerts: {
|
package/dist/services/urls.d.ts
CHANGED
package/dist/services/urls.js
CHANGED
|
@@ -115,6 +115,7 @@ exports.default = {
|
|
|
115
115
|
Read: "/{language}/Environment/v1/Read",
|
|
116
116
|
Update: "/{language}/Environment/v1/Update",
|
|
117
117
|
Refresh: "/{language}/Environment/v1/Refresh",
|
|
118
|
+
GetTokenConfig: "/{language}/Configuration/v1/GetTokenConfig",
|
|
118
119
|
},
|
|
119
120
|
Notification: {
|
|
120
121
|
RenderTemplate: "/{language}/Template/v1/RenderTemplate",
|