@be-link/ecommerce-product-service-node-sdk 0.1.20 → 0.1.22

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,36 @@ 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 updateSkuStock {
347
+ /** 商品Id */
348
+ productId: string;
349
+ /** SKU Id */
350
+ skuId: string;
351
+ /** 库存数量 */
352
+ stock: number;
353
+ }
354
+ interface updateSkuPrice {
355
+ /** 商品Id */
356
+ productId: string;
357
+ /** SKU Id */
358
+ skuId: string;
359
+ /** 价格(分) */
360
+ price: number;
361
+ /** 会员价(分) */
362
+ memberPrice?: number;
363
+ }
334
364
  }
335
365
  namespace Response {
336
366
  interface create {
@@ -364,6 +394,8 @@ export declare namespace ProductService {
364
394
  storageMethod: string;
365
395
  /** 配货方式 */
366
396
  dispatchType: string;
397
+ /** 限购数量 */
398
+ purchaseLimit: number;
367
399
  /** 销售数量 */
368
400
  salesQuantity: number;
369
401
  /** 退货数量 */
@@ -709,5 +741,15 @@ export declare namespace ProductService {
709
741
  * 商品二维码
710
742
  */
711
743
  productQrCode(request: ProductService.Request.productQrCode): Promise<ProductService.Response.productQrCode>;
744
+ /**
745
+ * 更新商品名称
746
+ */
747
+ updateProductName(request: ProductService.Request.updateProductName): Promise<void>;
748
+ /** 更新商品限购数量 */
749
+ updatePurchaseLimit(request: ProductService.Request.updatePurchaseLimit): Promise<void>;
750
+ /** 更新商品sku库存 */
751
+ updateSkuStock(request: ProductService.Request.updateSkuStock[]): Promise<void>;
752
+ /** 更新商品sku价格 */
753
+ updateSkuPrice(request: ProductService.Request.updateSkuPrice[]): Promise<void>;
712
754
  }
713
755
  }
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.22",
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": {