@be-link/ecommerce-product-service-node-sdk 0.0.20 → 0.0.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.
package/enum.d.ts CHANGED
@@ -9,12 +9,10 @@ export declare namespace ENUM {
9
9
  VIRTUAL = "\u865A\u62DF\u5546\u54C1"
10
10
  }
11
11
  enum STATUS {
12
- DRAFT = "DRAFT",
13
12
  ACTIVE = "ACTIVE",
14
13
  INACTIVE = "INACTIVE"
15
14
  }
16
15
  enum STATUS_CHINESE {
17
- DRAFT = "\u8349\u7A3F",
18
16
  ACTIVE = "\u4E0A\u67B6",
19
17
  INACTIVE = "\u4E0B\u67B6"
20
18
  }
package/enum.js CHANGED
@@ -18,13 +18,11 @@ var ENUM;
18
18
  })(TYPE_CHINESE = PRODUCT_ENUM.TYPE_CHINESE || (PRODUCT_ENUM.TYPE_CHINESE = {}));
19
19
  let STATUS;
20
20
  (function (STATUS) {
21
- STATUS["DRAFT"] = "DRAFT";
22
21
  STATUS["ACTIVE"] = "ACTIVE";
23
22
  STATUS["INACTIVE"] = "INACTIVE";
24
23
  })(STATUS = PRODUCT_ENUM.STATUS || (PRODUCT_ENUM.STATUS = {}));
25
24
  let STATUS_CHINESE;
26
25
  (function (STATUS_CHINESE) {
27
- STATUS_CHINESE["DRAFT"] = "\u8349\u7A3F";
28
26
  STATUS_CHINESE["ACTIVE"] = "\u4E0A\u67B6";
29
27
  STATUS_CHINESE["INACTIVE"] = "\u4E0B\u67B6";
30
28
  })(STATUS_CHINESE = PRODUCT_ENUM.STATUS_CHINESE || (PRODUCT_ENUM.STATUS_CHINESE = {}));
@@ -146,7 +144,6 @@ exports.PRODUCT_TYPE_MAP = {
146
144
  [ENUM.PRODUCT_ENUM.TYPE.VIRTUAL]: ENUM.PRODUCT_ENUM.TYPE_CHINESE.VIRTUAL,
147
145
  };
148
146
  exports.PRODUCT_STATUS_MAP = {
149
- [ENUM.PRODUCT_ENUM.STATUS.DRAFT]: ENUM.PRODUCT_ENUM.STATUS_CHINESE.DRAFT,
150
147
  [ENUM.PRODUCT_ENUM.STATUS.ACTIVE]: ENUM.PRODUCT_ENUM.STATUS_CHINESE.ACTIVE,
151
148
  [ENUM.PRODUCT_ENUM.STATUS.INACTIVE]: ENUM.PRODUCT_ENUM.STATUS_CHINESE.INACTIVE,
152
149
  };
@@ -17,6 +17,8 @@ declare class ProductService extends BaseService implements Service.ProductContr
17
17
  isSoldOut(request: Service.Request.isSoldOut): Promise<Service.Response.isSoldOut>;
18
18
  deleteScheduledTask(request: Service.Request.deleteScheduledTask): Promise<void>;
19
19
  getProductSkuInfo(request: Service.Request.getProductSkuInfo): Promise<Service.Response.getProductSkuInfo>;
20
+ searchProductByName(request: Service.Request.searchProductByName): Promise<Service.Response.searchProductByName[]>;
21
+ queryBindSkus(request: Service.Request.queryBindSkus): Promise<Service.Response.queryBindSkus[]>;
20
22
  }
21
23
  export declare const productService: ProductService;
22
24
  export default productService;
@@ -66,6 +66,12 @@ let ProductService = class ProductService extends BaseService_1.default {
66
66
  getProductSkuInfo(request) {
67
67
  return (0, http_1.callApi)(this.getApiUrl(this.getProductSkuInfo), request);
68
68
  }
69
+ searchProductByName(request) {
70
+ return (0, http_1.callApi)(this.getApiUrl(this.searchProductByName), request);
71
+ }
72
+ queryBindSkus(request) {
73
+ return (0, http_1.callApi)(this.getApiUrl(this.queryBindSkus), request);
74
+ }
69
75
  };
70
76
  __decorate([
71
77
  (0, tsoa_1.OperationId)('商品列表'),
@@ -142,6 +148,16 @@ __decorate([
142
148
  (0, tsoa_1.Post)('get-product-sku-info'),
143
149
  __param(0, (0, tsoa_1.Body)())
144
150
  ], ProductService.prototype, "getProductSkuInfo", null);
151
+ __decorate([
152
+ (0, tsoa_1.OperationId)('根据商品名获取商品id列表'),
153
+ (0, tsoa_1.Post)('search-product-by-name'),
154
+ __param(0, (0, tsoa_1.Body)())
155
+ ], ProductService.prototype, "searchProductByName", null);
156
+ __decorate([
157
+ (0, tsoa_1.OperationId)('获取绑定子商品'),
158
+ (0, tsoa_1.Post)('query-bind-skus'),
159
+ __param(0, (0, tsoa_1.Body)())
160
+ ], ProductService.prototype, "queryBindSkus", null);
145
161
  ProductService = __decorate([
146
162
  (0, tsoa_1.Route)('product'),
147
163
  (0, tsoa_1.Tags)('Product')
@@ -278,6 +278,14 @@ export declare namespace ProductService {
278
278
  /** SKU Id */
279
279
  skuId: string;
280
280
  }
281
+ interface searchProductByName {
282
+ /** 商品名称 */
283
+ productName: string;
284
+ }
285
+ interface queryBindSkus {
286
+ /** SKU Id */
287
+ skuId: string;
288
+ }
281
289
  }
282
290
  namespace Response {
283
291
  interface create {
@@ -529,6 +537,32 @@ export declare namespace ProductService {
529
537
  hasMultiSkuCodes: number;
530
538
  }[];
531
539
  }
540
+ interface searchProductByName {
541
+ /** 商品名称 */
542
+ productName: string;
543
+ /** 商品ID */
544
+ productId: string;
545
+ }
546
+ interface queryBindSkus {
547
+ /** 商品Id */
548
+ productId: string;
549
+ /** SKU Id */
550
+ skuId: string;
551
+ /** 商品名称 */
552
+ productName: string;
553
+ /** 分类 */
554
+ cateName: string;
555
+ /** 数量 */
556
+ quantity: number;
557
+ /** 69码 */
558
+ skuCode: string;
559
+ /** 规格 */
560
+ attrs: Attr[];
561
+ /** 价格 */
562
+ price: number;
563
+ /** 上下架状态 */
564
+ status: string;
565
+ }
532
566
  }
533
567
  /**
534
568
  * ProductLive Controller 接口定义
@@ -594,5 +628,13 @@ export declare namespace ProductService {
594
628
  * 获取商品和sku信息 s端
595
629
  */
596
630
  getProductSkuInfo(request: ProductService.Request.getProductSkuInfo): Promise<ProductService.Response.getProductSkuInfo>;
631
+ /**
632
+ * 根据商品名获取商品id列表
633
+ */
634
+ searchProductByName(request: ProductService.Request.searchProductByName): Promise<ProductService.Response.searchProductByName[]>;
635
+ /**
636
+ * 获取绑定的SKU信息
637
+ */
638
+ queryBindSkus(request: ProductService.Request.queryBindSkus): Promise<ProductService.Response.queryBindSkus[]>;
597
639
  }
598
640
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-product-service-node-sdk",
3
- "version": "0.0.20",
3
+ "version": "0.0.22",
4
4
  "description": "EcommerceProductService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",