@be-link/ecommerce-product-service-node-sdk 0.0.4 → 0.0.6
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/modules/product/service.d.ts +0 -1
- package/modules/product/service.js +0 -8
- package/modules/product/types.d.ts +0 -7
- package/modules/productExp/service.d.ts +0 -1
- package/modules/productExp/service.js +0 -7
- package/modules/productExp/types.d.ts +0 -8
- package/package.json +1 -1
- package/utils/http.js +3 -1
|
@@ -12,7 +12,6 @@ declare class ProductService extends BaseService implements Service.ProductContr
|
|
|
12
12
|
export(request: Service.Request.list): Promise<void>;
|
|
13
13
|
queryProductList(request: Service.Request.queryProductList): Promise<Service.Response.queryProductList>;
|
|
14
14
|
queryProductSkuList(request: Service.Request.queryProductList): Promise<Service.Response.queryProductSkuList>;
|
|
15
|
-
productQrCode(request: Service.Request.productQrCode): Promise<Service.Response.productQrCode>;
|
|
16
15
|
}
|
|
17
16
|
export declare const productService: ProductService;
|
|
18
17
|
export default productService;
|
|
@@ -51,9 +51,6 @@ let ProductService = class ProductService extends BaseService_1.default {
|
|
|
51
51
|
queryProductSkuList(request) {
|
|
52
52
|
return (0, http_1.callApi)(this.getApiUrl(this.queryProductSkuList), request);
|
|
53
53
|
}
|
|
54
|
-
productQrCode(request) {
|
|
55
|
-
return (0, http_1.callApi)(this.getApiUrl(this.productQrCode), request);
|
|
56
|
-
}
|
|
57
54
|
};
|
|
58
55
|
__decorate([
|
|
59
56
|
(0, tsoa_1.OperationId)('商品列表'),
|
|
@@ -105,11 +102,6 @@ __decorate([
|
|
|
105
102
|
(0, tsoa_1.Post)('query-product-sku-list'),
|
|
106
103
|
__param(0, (0, tsoa_1.Body)())
|
|
107
104
|
], ProductService.prototype, "queryProductSkuList", null);
|
|
108
|
-
__decorate([
|
|
109
|
-
(0, tsoa_1.OperationId)('商品二维码'),
|
|
110
|
-
(0, tsoa_1.Post)('product-qr-code'),
|
|
111
|
-
__param(0, (0, tsoa_1.Body)())
|
|
112
|
-
], ProductService.prototype, "productQrCode", null);
|
|
113
105
|
ProductService = __decorate([
|
|
114
106
|
(0, tsoa_1.Route)('product'),
|
|
115
107
|
(0, tsoa_1.Tags)('Product')
|
|
@@ -190,9 +190,6 @@ export declare namespace ProductService {
|
|
|
190
190
|
skuCode: string;
|
|
191
191
|
}[];
|
|
192
192
|
}
|
|
193
|
-
interface productQrCode {
|
|
194
|
-
qrCodeUrl: string;
|
|
195
|
-
}
|
|
196
193
|
}
|
|
197
194
|
/**
|
|
198
195
|
* ProductLive Controller 接口定义
|
|
@@ -238,9 +235,5 @@ export declare namespace ProductService {
|
|
|
238
235
|
* 获取商品+规格信息
|
|
239
236
|
*/
|
|
240
237
|
queryProductSkuList(request: ProductService.Request.queryProductList): Promise<ProductService.Response.queryProductSkuList>;
|
|
241
|
-
/**
|
|
242
|
-
* 商品二维码
|
|
243
|
-
*/
|
|
244
|
-
productQrCode(request: ProductService.Request.productQrCode): Promise<ProductService.Response.productQrCode>;
|
|
245
238
|
}
|
|
246
239
|
}
|
|
@@ -7,7 +7,6 @@ declare class ProductExpService extends BaseService implements Service.ProductEx
|
|
|
7
7
|
getLiveGroupList(): Promise<Service.Response.getLiveGroupList[]>;
|
|
8
8
|
addLiveGroup(request: Service.Request.addLiveGroup): Promise<Service.Response.addLiveGroup>;
|
|
9
9
|
productCategoryTree(): Promise<Service.Response.ProductCategoryTree>;
|
|
10
|
-
getProductManagerList(): Promise<Service.Response.getProductManagerList>;
|
|
11
10
|
}
|
|
12
11
|
export declare const productExpService: ProductExpService;
|
|
13
12
|
export default productExpService;
|
|
@@ -36,9 +36,6 @@ let ProductExpService = class ProductExpService extends BaseService_1.default {
|
|
|
36
36
|
productCategoryTree() {
|
|
37
37
|
return (0, http_1.callApi)(this.getApiUrl(this.productCategoryTree));
|
|
38
38
|
}
|
|
39
|
-
getProductManagerList() {
|
|
40
|
-
return (0, http_1.callApi)(this.getApiUrl(this.getProductManagerList));
|
|
41
|
-
}
|
|
42
39
|
};
|
|
43
40
|
__decorate([
|
|
44
41
|
(0, tsoa_1.OperationId)('获取供应商列表'),
|
|
@@ -62,10 +59,6 @@ __decorate([
|
|
|
62
59
|
(0, tsoa_1.OperationId)('商品分类 树结构'),
|
|
63
60
|
(0, tsoa_1.Post)('product-category-tree')
|
|
64
61
|
], ProductExpService.prototype, "productCategoryTree", null);
|
|
65
|
-
__decorate([
|
|
66
|
-
(0, tsoa_1.OperationId)('获取产品经理列表'),
|
|
67
|
-
(0, tsoa_1.Post)('get-product-manager-list')
|
|
68
|
-
], ProductExpService.prototype, "getProductManagerList", null);
|
|
69
62
|
ProductExpService = __decorate([
|
|
70
63
|
(0, tsoa_1.Route)('product-exp'),
|
|
71
64
|
(0, tsoa_1.Tags)('Product-exp')
|
|
@@ -43,10 +43,6 @@ export declare namespace ProductExpService {
|
|
|
43
43
|
stock: number;
|
|
44
44
|
}[];
|
|
45
45
|
}
|
|
46
|
-
interface getProductManagerList {
|
|
47
|
-
productManagerId: string;
|
|
48
|
-
productManagerName: string;
|
|
49
|
-
}
|
|
50
46
|
}
|
|
51
47
|
/**
|
|
52
48
|
* ProductLive Controller 接口定义
|
|
@@ -72,9 +68,5 @@ export declare namespace ProductExpService {
|
|
|
72
68
|
* 商品分类 树结构
|
|
73
69
|
*/
|
|
74
70
|
productCategoryTree(): Promise<ProductExpService.Response.ProductCategoryTree>;
|
|
75
|
-
/**
|
|
76
|
-
* 获取产品经理列表
|
|
77
|
-
*/
|
|
78
|
-
getProductManagerList(): Promise<ProductExpService.Response.getProductManagerList>;
|
|
79
71
|
}
|
|
80
72
|
}
|
package/package.json
CHANGED
package/utils/http.js
CHANGED
|
@@ -58,7 +58,9 @@ async function callApi(url, request) {
|
|
|
58
58
|
const requestId = request_context_1.requestContext.get('requestId') || request_context_1.requestContext.get('traceMessageId') || (0, uuid_1.v4)();
|
|
59
59
|
try {
|
|
60
60
|
console.info(`准备发起ecommerce-product-service请求[${requestId}]: ${url}, 参数: ${JSON.stringify(request)}`);
|
|
61
|
-
const response = await axios_1.default.post(url, request
|
|
61
|
+
const response = await axios_1.default.post(url, request || {}, {
|
|
62
|
+
headers: { 'x-request-id': requestId },
|
|
63
|
+
});
|
|
62
64
|
const responseData = response.data;
|
|
63
65
|
return responseData.data;
|
|
64
66
|
}
|