nextemos 5.4.7 → 5.5.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/product.d.ts +20 -0
- package/dist/interfaces/stock.d.ts +17 -0
- package/dist/services/product/index.js +10 -0
- package/dist/services/product/product.types.d.ts +20 -1
- package/dist/services/stock/index.js +3 -0
- package/dist/services/stock/stock.types.d.ts +12 -1
- package/dist/services/urls.d.ts +6 -0
- package/dist/services/urls.js +6 -0
- package/package.json +1 -1
|
@@ -339,3 +339,23 @@ export interface IProductStockAlert {
|
|
|
339
339
|
stockBarCodeId: number;
|
|
340
340
|
lastInformedDate: string;
|
|
341
341
|
}
|
|
342
|
+
export interface IGetBrandListResponse extends IResponsePaging {
|
|
343
|
+
data: IBrand[];
|
|
344
|
+
}
|
|
345
|
+
export interface IGetBrandResponse extends IResponse {
|
|
346
|
+
brand: IBrand;
|
|
347
|
+
}
|
|
348
|
+
export interface IBrand {
|
|
349
|
+
id: number;
|
|
350
|
+
order: number;
|
|
351
|
+
name: string;
|
|
352
|
+
routePath: string;
|
|
353
|
+
parameterName: string;
|
|
354
|
+
integrationCode: string;
|
|
355
|
+
isApproved: boolean;
|
|
356
|
+
routeLocalizations: RouteLocalization[];
|
|
357
|
+
extensionData: any;
|
|
358
|
+
}
|
|
359
|
+
export interface IGetProductRelationsResponse extends IResponse {
|
|
360
|
+
products: IProduct[];
|
|
361
|
+
}
|
|
@@ -68,3 +68,20 @@ export interface IStockAvailabilityResponse extends IResponse {
|
|
|
68
68
|
stockTypeValues: IStockTypeValue[];
|
|
69
69
|
};
|
|
70
70
|
}
|
|
71
|
+
export interface IStockAvailabilityByStockBarcodeIdResponse extends IResponse {
|
|
72
|
+
data: {
|
|
73
|
+
stockBarcodeId: number;
|
|
74
|
+
productStockId: number;
|
|
75
|
+
warehouseStocks: {
|
|
76
|
+
[key: string]: {
|
|
77
|
+
stock: number;
|
|
78
|
+
reservation: number;
|
|
79
|
+
isAvail: boolean;
|
|
80
|
+
avail: number;
|
|
81
|
+
inStoreDeliveryAvailable: boolean;
|
|
82
|
+
stokManagement: boolean;
|
|
83
|
+
};
|
|
84
|
+
};
|
|
85
|
+
stockTypeValues: number[];
|
|
86
|
+
};
|
|
87
|
+
}
|
|
@@ -106,4 +106,14 @@ exports.ProductService = {
|
|
|
106
106
|
RemoveStockAlert: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
107
107
|
return (0, __1.fetchRequest)().delete(exports.ProductService.Url(urls_1.default.ProductStockAlert, options), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
108
108
|
}),
|
|
109
|
+
GetBrandList: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
110
|
+
return (0, __1.fetchRequest)().post(exports.ProductService.Url(urls_1.default.ProductBrand.GetBrandList, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
111
|
+
}),
|
|
112
|
+
GetBrand: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
113
|
+
var _a;
|
|
114
|
+
return (0, __1.fetchRequest)().get(exports.ProductService.Url(urls_1.default.ProductBrand.GetBrand.replace("{id}", ((_a = data === null || data === void 0 ? void 0 : data.id) === null || _a === void 0 ? void 0 : _a.toString()) || ""), options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { params: data }));
|
|
115
|
+
}),
|
|
116
|
+
GetProductRelations: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
117
|
+
return (0, __1.fetchRequest)().post(exports.ProductService.Url(urls_1.default.Product.GetProductRelations, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { body: JSON.stringify(data) }));
|
|
118
|
+
}),
|
|
109
119
|
};
|
|
@@ -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, IGetBrandResponse, IGetBrandListResponse, IGetProductRelationsResponse } from "../..";
|
|
2
2
|
export interface IProductRequest extends IRequestBase {
|
|
3
3
|
id: number;
|
|
4
4
|
flags?: string | number | string[];
|
|
@@ -129,6 +129,22 @@ export interface IAddStockAlertRequest extends IRequestBase {
|
|
|
129
129
|
export interface IRemoveStockAlertRequest extends IRequestBase {
|
|
130
130
|
stockBarcodeIds: number[];
|
|
131
131
|
}
|
|
132
|
+
export interface IGetBrandListRequest extends IRequestBase {
|
|
133
|
+
searchTerm?: string;
|
|
134
|
+
brandIds?: number[];
|
|
135
|
+
pageSize?: number;
|
|
136
|
+
currentPage?: number;
|
|
137
|
+
}
|
|
138
|
+
export interface IGetBrandRequest extends IRequestBase {
|
|
139
|
+
id: number;
|
|
140
|
+
}
|
|
141
|
+
export interface IGetProductRelationsRequest extends IRequestBase {
|
|
142
|
+
integrationCode?: string;
|
|
143
|
+
relatedDirection: "OneWay" | "TwoWay";
|
|
144
|
+
relatedType: "Complementary" | "Recommended" | "Alternatives";
|
|
145
|
+
categoryIds?: number[];
|
|
146
|
+
productIds?: number[];
|
|
147
|
+
}
|
|
132
148
|
export interface IProductService extends IService {
|
|
133
149
|
Product: (data: IProductRequest, options?: IRequestInit) => Promise<IApiResponse<IProductResponse>>;
|
|
134
150
|
SearchProductsRequest: (data: ISearchProductsRequest, options?: IRequestInit) => Promise<IApiResponse<ISearchProductsResponse>>;
|
|
@@ -148,5 +164,8 @@ export interface IProductService extends IService {
|
|
|
148
164
|
GetStockAlerts: (data?: IGetStockAlertsRequest, options?: IRequestInit) => Promise<IApiResponse<IGetStockAlertsResponse>>;
|
|
149
165
|
AddStockAlert: (data: IAddStockAlertRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
150
166
|
RemoveStockAlert: (data?: IRemoveStockAlertRequest, options?: IRequestInit) => Promise<IApiResponse<IResponse>>;
|
|
167
|
+
GetBrandList: (data?: IGetBrandListRequest, options?: IRequestInit) => Promise<IApiResponse<IGetBrandListResponse>>;
|
|
168
|
+
GetBrand: (data?: IGetBrandRequest, options?: IRequestInit) => Promise<IApiResponse<IGetBrandResponse>>;
|
|
169
|
+
GetProductRelations: (data?: IGetProductRelationsRequest, options?: IRequestInit) => Promise<IApiResponse<IGetProductRelationsResponse>>;
|
|
151
170
|
}
|
|
152
171
|
export {};
|
|
@@ -60,4 +60,7 @@ exports.StockService = {
|
|
|
60
60
|
StockAvailabilitiesByProductId: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
61
61
|
return (0, __1.fetchRequest)().get(exports.StockService.Url(urls_1.default.Stocks.StockAvailabilitiesByProductId, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { params: data }));
|
|
62
62
|
}),
|
|
63
|
+
ByStockBarcodeId: (data, options) => __awaiter(void 0, void 0, void 0, function* () {
|
|
64
|
+
return (0, __1.fetchRequest)().get(exports.StockService.Url(urls_1.default.Stocks.ByStockBarcodeId, options, data === null || data === void 0 ? void 0 : data.language), Object.assign(Object.assign({}, options), { params: data }));
|
|
65
|
+
}),
|
|
63
66
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IApiResponse, IRequestBase, IRequestInit, IService, IStockAvailabilityResponse, IWarehouseResponse, IWarehousesResponse } from "../..";
|
|
1
|
+
import { IApiResponse, IRequestBase, IRequestInit, IService, IStockAvailabilityByStockBarcodeIdResponse, IStockAvailabilityResponse, IWarehouseResponse, IWarehousesResponse } from "../..";
|
|
2
2
|
export interface IWarehousesRequest extends IRequestBase {
|
|
3
3
|
warehouseIds?: number[];
|
|
4
4
|
WarehouseTypeIds?: number[];
|
|
@@ -18,8 +18,19 @@ export interface IStockAvailabilitiesByProductIdRequest extends IRequestBase {
|
|
|
18
18
|
OnlyInStoreWarehouses?: boolean;
|
|
19
19
|
IsStockManagement?: boolean;
|
|
20
20
|
}
|
|
21
|
+
export interface IStockAvailabilityByStockBarcodeIdRequest extends IRequestBase {
|
|
22
|
+
productId: number;
|
|
23
|
+
stockBarcodeId: number;
|
|
24
|
+
channelId?: number;
|
|
25
|
+
warehouseId?: number;
|
|
26
|
+
criteriaIds?: number[];
|
|
27
|
+
checkOverall?: boolean;
|
|
28
|
+
OnlyInStoreWarehouses?: boolean;
|
|
29
|
+
IsStockManagement?: boolean;
|
|
30
|
+
}
|
|
21
31
|
export interface IStockService extends IService {
|
|
22
32
|
Warehouses: (data?: IWarehousesRequest, options?: IRequestInit) => Promise<IApiResponse<IWarehousesResponse>>;
|
|
23
33
|
Warehouse: (data: IWarehouseRequest, options?: IRequestInit) => Promise<IApiResponse<IWarehouseResponse>>;
|
|
24
34
|
StockAvailabilitiesByProductId: (data: IStockAvailabilitiesByProductIdRequest, options?: IRequestInit) => Promise<IApiResponse<IStockAvailabilityResponse>>;
|
|
35
|
+
ByStockBarcodeId: (data: IStockAvailabilityByStockBarcodeIdRequest, options?: IRequestInit) => Promise<IApiResponse<IStockAvailabilityByStockBarcodeIdResponse>>;
|
|
25
36
|
}
|
package/dist/services/urls.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ declare const _default: {
|
|
|
29
29
|
SearchProductsRequest: string;
|
|
30
30
|
GetAllProductsRequest: string;
|
|
31
31
|
SearchProductsRequestWithWorkflow: string;
|
|
32
|
+
GetProductRelations: string;
|
|
32
33
|
};
|
|
33
34
|
ProductCategory: {
|
|
34
35
|
All: string;
|
|
@@ -39,12 +40,17 @@ declare const _default: {
|
|
|
39
40
|
ProductFavorite: string;
|
|
40
41
|
ProductPriceAlert: string;
|
|
41
42
|
ProductStockAlert: string;
|
|
43
|
+
ProductBrand: {
|
|
44
|
+
GetBrandList: string;
|
|
45
|
+
GetBrand: string;
|
|
46
|
+
};
|
|
42
47
|
ProductType: {
|
|
43
48
|
All: string;
|
|
44
49
|
ProductType: string;
|
|
45
50
|
};
|
|
46
51
|
Stocks: {
|
|
47
52
|
StockAvailabilitiesByProductId: string;
|
|
53
|
+
ByStockBarcodeId: string;
|
|
48
54
|
};
|
|
49
55
|
Warehouse: {
|
|
50
56
|
All: string;
|
package/dist/services/urls.js
CHANGED
|
@@ -40,6 +40,7 @@ exports.default = {
|
|
|
40
40
|
SearchProductsRequest: "/live/{language}/Product/v1/SearchProductsRequest",
|
|
41
41
|
GetAllProductsRequest: "/live/{language}/Product/v1/GetAllProductsRequest",
|
|
42
42
|
SearchProductsRequestWithWorkflow: "/live/{language}/Product/v1/SearchProductsRequestWithWorkflow",
|
|
43
|
+
GetProductRelations: "/live/{language}/Product/v1/GetProductRelations",
|
|
43
44
|
},
|
|
44
45
|
ProductCategory: {
|
|
45
46
|
All: "/live/{language}/ProductCategory/v1/All",
|
|
@@ -50,12 +51,17 @@ exports.default = {
|
|
|
50
51
|
ProductFavorite: "/live/{language}/ProductFavorite/v1",
|
|
51
52
|
ProductPriceAlert: "/live/{language}/Alert/v1/ProductPriceAlerts",
|
|
52
53
|
ProductStockAlert: "/live/{language}/Alert/v1/ProductStockAlerts",
|
|
54
|
+
ProductBrand: {
|
|
55
|
+
GetBrandList: "/live/{language}/Brand/v1/GetBrandList",
|
|
56
|
+
GetBrand: "/live/{language}/Brand/v1/{id}",
|
|
57
|
+
},
|
|
53
58
|
ProductType: {
|
|
54
59
|
All: "/live/{language}/ProductType/v1/All",
|
|
55
60
|
ProductType: "/live/{language}/ProductType/v1",
|
|
56
61
|
},
|
|
57
62
|
Stocks: {
|
|
58
63
|
StockAvailabilitiesByProductId: "/{language}/Stocks/v1/StockAvailabilitiesByProductId",
|
|
64
|
+
ByStockBarcodeId: "/{language}/Stocks/v1/ByStockBarcodeId",
|
|
59
65
|
},
|
|
60
66
|
Warehouse: {
|
|
61
67
|
All: "/{language}/Warehouses/v1/All",
|