@be-link/ecommerce-product-service-node-sdk 0.1.20 → 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')
@@ -331,6 +331,40 @@ export declare namespace ProductService {
331
331
  /** 路径 */
332
332
  path: string;
333
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
+ }
334
368
  }
335
369
  namespace Response {
336
370
  interface create {
@@ -364,6 +398,8 @@ export declare namespace ProductService {
364
398
  storageMethod: string;
365
399
  /** 配货方式 */
366
400
  dispatchType: string;
401
+ /** 限购数量 */
402
+ purchaseLimit: number;
367
403
  /** 销售数量 */
368
404
  salesQuantity: number;
369
405
  /** 退货数量 */
@@ -709,5 +745,15 @@ export declare namespace ProductService {
709
745
  * 商品二维码
710
746
  */
711
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>;
712
758
  }
713
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.20",
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": "^6.6.0",
17
+ "tsoa": "6.6.0",
18
18
  "safe-stable-stringify": "2.5.0"
19
19
  },
20
20
  "scripts": {