@be-link/ecommerce-product-service-node-sdk 0.1.19 → 0.1.21
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.
|
@@ -20,6 +20,10 @@ declare class ProductService extends BaseService implements Service.ProductContr
|
|
|
20
20
|
searchProductByName(request: Service.Request.searchProductByName): Promise<Service.Response.searchProductByName[]>;
|
|
21
21
|
queryBindSkus(request: Service.Request.queryBindSkus): Promise<Service.Response.queryBindSkus[]>;
|
|
22
22
|
productQrCode(request: Service.Request.productQrCode): Promise<Service.Response.productQrCode>;
|
|
23
|
+
updateProductName(request: Service.Request.updateProductName): Promise<void>;
|
|
24
|
+
updatePurchaseLimit(request: Service.Request.updatePurchaseLimit): Promise<void>;
|
|
25
|
+
updateSkuStock(request: Service.Request.updateSkuStock): Promise<void>;
|
|
26
|
+
updateSkuPrice(request: Service.Request.updateSkuPrice): Promise<void>;
|
|
23
27
|
}
|
|
24
28
|
export declare const productService: ProductService;
|
|
25
29
|
export default productService;
|
|
@@ -75,6 +75,18 @@ let ProductService = class ProductService extends BaseService_1.default {
|
|
|
75
75
|
productQrCode(request) {
|
|
76
76
|
return (0, http_1.callApi)(this.getApiUrl(this.productQrCode), request);
|
|
77
77
|
}
|
|
78
|
+
updateProductName(request) {
|
|
79
|
+
return (0, http_1.callApi)(this.getApiUrl(this.updateProductName), request);
|
|
80
|
+
}
|
|
81
|
+
updatePurchaseLimit(request) {
|
|
82
|
+
return (0, http_1.callApi)(this.getApiUrl(this.updatePurchaseLimit), request);
|
|
83
|
+
}
|
|
84
|
+
updateSkuStock(request) {
|
|
85
|
+
return (0, http_1.callApi)(this.getApiUrl(this.updateSkuStock), request);
|
|
86
|
+
}
|
|
87
|
+
updateSkuPrice(request) {
|
|
88
|
+
return (0, http_1.callApi)(this.getApiUrl(this.updateSkuPrice), request);
|
|
89
|
+
}
|
|
78
90
|
};
|
|
79
91
|
__decorate([
|
|
80
92
|
(0, tsoa_1.OperationId)('商品列表'),
|
|
@@ -166,6 +178,26 @@ __decorate([
|
|
|
166
178
|
(0, tsoa_1.Post)('product-qr-code'),
|
|
167
179
|
__param(0, (0, tsoa_1.Body)())
|
|
168
180
|
], ProductService.prototype, "productQrCode", null);
|
|
181
|
+
__decorate([
|
|
182
|
+
(0, tsoa_1.OperationId)('更新商品名称'),
|
|
183
|
+
(0, tsoa_1.Post)('update-product-name'),
|
|
184
|
+
__param(0, (0, tsoa_1.Body)())
|
|
185
|
+
], ProductService.prototype, "updateProductName", null);
|
|
186
|
+
__decorate([
|
|
187
|
+
(0, tsoa_1.OperationId)('更新商品限购数量'),
|
|
188
|
+
(0, tsoa_1.Post)('update-purchase-limit'),
|
|
189
|
+
__param(0, (0, tsoa_1.Body)())
|
|
190
|
+
], ProductService.prototype, "updatePurchaseLimit", null);
|
|
191
|
+
__decorate([
|
|
192
|
+
(0, tsoa_1.OperationId)('更新商品sku库存'),
|
|
193
|
+
(0, tsoa_1.Post)('update-sku-stock'),
|
|
194
|
+
__param(0, (0, tsoa_1.Body)())
|
|
195
|
+
], ProductService.prototype, "updateSkuStock", null);
|
|
196
|
+
__decorate([
|
|
197
|
+
(0, tsoa_1.OperationId)('更新商品sku价格'),
|
|
198
|
+
(0, tsoa_1.Post)('update-sku-price'),
|
|
199
|
+
__param(0, (0, tsoa_1.Body)())
|
|
200
|
+
], ProductService.prototype, "updateSkuPrice", null);
|
|
169
201
|
ProductService = __decorate([
|
|
170
202
|
(0, tsoa_1.Route)('product'),
|
|
171
203
|
(0, tsoa_1.Tags)('Product')
|
|
@@ -24,10 +24,13 @@ export declare namespace ProductService {
|
|
|
24
24
|
划线价: number;
|
|
25
25
|
售价: number;
|
|
26
26
|
采购价: number;
|
|
27
|
+
会员价: number;
|
|
27
28
|
}
|
|
28
29
|
interface SkuField {
|
|
29
30
|
/** 价格(分) */
|
|
30
31
|
price: number;
|
|
32
|
+
/** 会员价(分) */
|
|
33
|
+
memberPrice: number;
|
|
31
34
|
/** 库存 */
|
|
32
35
|
stock: number;
|
|
33
36
|
/** SKU编码 */
|
|
@@ -99,6 +102,8 @@ export declare namespace ProductService {
|
|
|
99
102
|
strikethroughPrice?: number;
|
|
100
103
|
/** 采购价(分) */
|
|
101
104
|
purchasePrice?: number;
|
|
105
|
+
/** 会员价(分) */
|
|
106
|
+
memberPrice?: number;
|
|
102
107
|
/** SKU编码 */
|
|
103
108
|
skuCode?: string;
|
|
104
109
|
/** 多SKU编码 */
|
|
@@ -205,6 +210,8 @@ export declare namespace ProductService {
|
|
|
205
210
|
skuCodes?: string[];
|
|
206
211
|
/** 取货方式 */
|
|
207
212
|
pickTypes?: string[];
|
|
213
|
+
/** 是否有会员价 0:无 1:有 */
|
|
214
|
+
hasMemberPrice?: number;
|
|
208
215
|
}
|
|
209
216
|
interface batchUpdate {
|
|
210
217
|
/** 商品Id列表 */
|
|
@@ -324,6 +331,40 @@ export declare namespace ProductService {
|
|
|
324
331
|
/** 路径 */
|
|
325
332
|
path: string;
|
|
326
333
|
}
|
|
334
|
+
interface updateProductName {
|
|
335
|
+
/** 商品Id */
|
|
336
|
+
productId: string;
|
|
337
|
+
/** 商品名称 */
|
|
338
|
+
productName: string;
|
|
339
|
+
}
|
|
340
|
+
interface updatePurchaseLimit {
|
|
341
|
+
/** 商品Id */
|
|
342
|
+
productId: string;
|
|
343
|
+
/** 限购数量 -1表示不限购 */
|
|
344
|
+
purchaseLimit: number;
|
|
345
|
+
}
|
|
346
|
+
interface getSkuList {
|
|
347
|
+
/** 商品Id */
|
|
348
|
+
productId: string;
|
|
349
|
+
}
|
|
350
|
+
interface updateSkuStock {
|
|
351
|
+
/** 商品Id */
|
|
352
|
+
productId: string;
|
|
353
|
+
/** SKU Id */
|
|
354
|
+
skuId: string;
|
|
355
|
+
/** 库存数量 */
|
|
356
|
+
stock: number;
|
|
357
|
+
}
|
|
358
|
+
interface updateSkuPrice {
|
|
359
|
+
/** 商品Id */
|
|
360
|
+
productId: string;
|
|
361
|
+
/** SKU Id */
|
|
362
|
+
skuId: string;
|
|
363
|
+
/** 价格(分) */
|
|
364
|
+
price: number;
|
|
365
|
+
/** 会员价(分) */
|
|
366
|
+
memberPrice?: number;
|
|
367
|
+
}
|
|
327
368
|
}
|
|
328
369
|
namespace Response {
|
|
329
370
|
interface create {
|
|
@@ -357,6 +398,8 @@ export declare namespace ProductService {
|
|
|
357
398
|
storageMethod: string;
|
|
358
399
|
/** 配货方式 */
|
|
359
400
|
dispatchType: string;
|
|
401
|
+
/** 限购数量 */
|
|
402
|
+
purchaseLimit: number;
|
|
360
403
|
/** 销售数量 */
|
|
361
404
|
salesQuantity: number;
|
|
362
405
|
/** 退货数量 */
|
|
@@ -423,6 +466,8 @@ export declare namespace ProductService {
|
|
|
423
466
|
purchaseLimit: number;
|
|
424
467
|
/** 价格 */
|
|
425
468
|
price: number;
|
|
469
|
+
/** 会员价 */
|
|
470
|
+
memberPrice: number;
|
|
426
471
|
/** 库存 */
|
|
427
472
|
stock: number;
|
|
428
473
|
/** 上下架状态 */
|
|
@@ -493,6 +538,8 @@ export declare namespace ProductService {
|
|
|
493
538
|
price: number;
|
|
494
539
|
/** 划线价(分) */
|
|
495
540
|
strikethroughPrice: number;
|
|
541
|
+
/** 会员价(分) */
|
|
542
|
+
memberPrice: number;
|
|
496
543
|
/** SKU编码 */
|
|
497
544
|
skuCode: string;
|
|
498
545
|
}[];
|
|
@@ -571,6 +618,8 @@ export declare namespace ProductService {
|
|
|
571
618
|
strikethroughPrice: number;
|
|
572
619
|
/** 采购价(分) */
|
|
573
620
|
purchasePrice: number;
|
|
621
|
+
/** 会员价(分) */
|
|
622
|
+
memberPrice: number;
|
|
574
623
|
/** SKU编码 */
|
|
575
624
|
skuCode: string;
|
|
576
625
|
/** 多SKU编码 */
|
|
@@ -583,6 +632,8 @@ export declare namespace ProductService {
|
|
|
583
632
|
hasBindSkus: number;
|
|
584
633
|
/** 是否有多码 1有,0无 */
|
|
585
634
|
hasMultiSkuCodes: number;
|
|
635
|
+
/** 是否有会员价 1有,0无 */
|
|
636
|
+
hasMemberPrice: number;
|
|
586
637
|
}[];
|
|
587
638
|
}
|
|
588
639
|
interface searchProductByName {
|
|
@@ -694,5 +745,15 @@ export declare namespace ProductService {
|
|
|
694
745
|
* 商品二维码
|
|
695
746
|
*/
|
|
696
747
|
productQrCode(request: ProductService.Request.productQrCode): Promise<ProductService.Response.productQrCode>;
|
|
748
|
+
/**
|
|
749
|
+
* 更新商品名称
|
|
750
|
+
*/
|
|
751
|
+
updateProductName(request: ProductService.Request.updateProductName): Promise<void>;
|
|
752
|
+
/** 更新商品限购数量 */
|
|
753
|
+
updatePurchaseLimit(request: ProductService.Request.updatePurchaseLimit): Promise<void>;
|
|
754
|
+
/** 更新商品sku库存 */
|
|
755
|
+
updateSkuStock(request: ProductService.Request.updateSkuStock): Promise<void>;
|
|
756
|
+
/** 更新商品sku价格 */
|
|
757
|
+
updateSkuPrice(request: ProductService.Request.updateSkuPrice): Promise<void>;
|
|
697
758
|
}
|
|
698
759
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@be-link/ecommerce-product-service-node-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.21",
|
|
4
4
|
"description": "EcommerceProductService Node.js SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
"axios": "1.13.2",
|
|
15
15
|
"axios-retry": "4.0.0",
|
|
16
16
|
"uuid": "9.0.1",
|
|
17
|
-
"tsoa": "
|
|
17
|
+
"tsoa": "6.6.0",
|
|
18
18
|
"safe-stable-stringify": "2.5.0"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|