@be-link/ecommerce-product-service-node-sdk 0.0.7 → 0.0.9

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.
@@ -12,6 +12,7 @@ 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
+ querySkuBaseInfo(request: Service.Request.querySkuBaseInfo): Promise<Service.Response.querySkuBaseInfo[]>;
15
16
  }
16
17
  export declare const productService: ProductService;
17
18
  export default productService;
@@ -51,6 +51,9 @@ 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
+ querySkuBaseInfo(request) {
55
+ return (0, http_1.callApi)(this.getApiUrl(this.querySkuBaseInfo), request);
56
+ }
54
57
  };
55
58
  __decorate([
56
59
  (0, tsoa_1.OperationId)('商品列表'),
@@ -102,6 +105,11 @@ __decorate([
102
105
  (0, tsoa_1.Post)('query-product-sku-list'),
103
106
  __param(0, (0, tsoa_1.Body)())
104
107
  ], ProductService.prototype, "queryProductSkuList", null);
108
+ __decorate([
109
+ (0, tsoa_1.OperationId)('获取商品SKU基础信息'),
110
+ (0, tsoa_1.Post)('query-sku-base-info'),
111
+ __param(0, (0, tsoa_1.Body)())
112
+ ], ProductService.prototype, "querySkuBaseInfo", null);
105
113
  ProductService = __decorate([
106
114
  (0, tsoa_1.Route)('product'),
107
115
  (0, tsoa_1.Tags)('Product')
@@ -1,4 +1,12 @@
1
1
  export declare namespace ProductService {
2
+ interface SkuField {
3
+ price: number;
4
+ stock: number;
5
+ skuCode: string;
6
+ attrs: Attr[];
7
+ bindSkus: BindSku[];
8
+ multiSkuCodes: string[];
9
+ }
2
10
  /**
3
11
  * 核销期限接口
4
12
  */
@@ -125,8 +133,10 @@ export declare namespace ProductService {
125
133
  skuCodes?: string[];
126
134
  isCombo?: number;
127
135
  }
128
- interface productQrCode {
129
- path: string;
136
+ interface querySkuBaseInfo {
137
+ skuIds?: string[];
138
+ productIds?: string[];
139
+ fields: (keyof SkuField)[];
130
140
  }
131
141
  }
132
142
  namespace Response {
@@ -190,6 +200,10 @@ export declare namespace ProductService {
190
200
  skuCode: string;
191
201
  }[];
192
202
  }
203
+ interface querySkuBaseInfo extends Partial<SkuField> {
204
+ productId: string;
205
+ skuId: string;
206
+ }
193
207
  }
194
208
  /**
195
209
  * ProductLive Controller 接口定义
@@ -235,5 +249,9 @@ export declare namespace ProductService {
235
249
  * 获取商品+规格信息
236
250
  */
237
251
  queryProductSkuList(request: ProductService.Request.queryProductList): Promise<ProductService.Response.queryProductSkuList>;
252
+ /**
253
+ * 获取商品SKU基础信息
254
+ */
255
+ querySkuBaseInfo(request: ProductService.Request.querySkuBaseInfo): Promise<ProductService.Response.querySkuBaseInfo[]>;
238
256
  }
239
257
  }
@@ -2,9 +2,9 @@ import { ProductExpService as Service } from './types';
2
2
  import BaseService from '../BaseService';
3
3
  declare class ProductExpService extends BaseService implements Service.ProductExpController {
4
4
  protected prefixUrl: string;
5
- getSupplierList(): Promise<Service.Response.getSupplierList[]>;
5
+ getSupplierList(request: Service.Request.getSupplierList): Promise<Service.Response.getSupplierList>;
6
6
  addSupplier(request: Service.Request.addSupplier): Promise<Service.Response.addSupplier>;
7
- getLiveGroupList(): Promise<Service.Response.getLiveGroupList[]>;
7
+ getLiveGroupList(request: Service.Request.getLiveGroupList): Promise<Service.Response.getLiveGroupList>;
8
8
  addLiveGroup(request: Service.Request.addLiveGroup): Promise<Service.Response.addLiveGroup>;
9
9
  productCategoryList(request: Service.Request.productCategoryList): Promise<Service.ProductCategory[]>;
10
10
  }
@@ -21,14 +21,14 @@ let ProductExpService = class ProductExpService extends BaseService_1.default {
21
21
  super(...arguments);
22
22
  this.prefixUrl = '/product-exp';
23
23
  }
24
- getSupplierList() {
25
- return (0, http_1.callApi)(this.getApiUrl(this.getSupplierList));
24
+ getSupplierList(request) {
25
+ return (0, http_1.callApi)(this.getApiUrl(this.getSupplierList), request);
26
26
  }
27
27
  addSupplier(request) {
28
28
  return (0, http_1.callApi)(this.getApiUrl(this.addSupplier), request);
29
29
  }
30
- getLiveGroupList() {
31
- return (0, http_1.callApi)(this.getApiUrl(this.getLiveGroupList));
30
+ getLiveGroupList(request) {
31
+ return (0, http_1.callApi)(this.getApiUrl(this.getLiveGroupList), request);
32
32
  }
33
33
  addLiveGroup(request) {
34
34
  return (0, http_1.callApi)(this.getApiUrl(this.addLiveGroup), request);
@@ -39,7 +39,8 @@ let ProductExpService = class ProductExpService extends BaseService_1.default {
39
39
  };
40
40
  __decorate([
41
41
  (0, tsoa_1.OperationId)('获取供应商列表'),
42
- (0, tsoa_1.Post)('get-supplier-list')
42
+ (0, tsoa_1.Post)('get-supplier-list'),
43
+ __param(0, (0, tsoa_1.Body)())
43
44
  ], ProductExpService.prototype, "getSupplierList", null);
44
45
  __decorate([
45
46
  (0, tsoa_1.OperationId)('新增供应商'),
@@ -48,7 +49,8 @@ __decorate([
48
49
  ], ProductExpService.prototype, "addSupplier", null);
49
50
  __decorate([
50
51
  (0, tsoa_1.OperationId)('获取直播分组列表'),
51
- (0, tsoa_1.Post)('get-live-group-list')
52
+ (0, tsoa_1.Post)('get-live-group-list'),
53
+ __param(0, (0, tsoa_1.Body)())
52
54
  ], ProductExpService.prototype, "getLiveGroupList", null);
53
55
  __decorate([
54
56
  (0, tsoa_1.OperationId)('新增直播分组'),
@@ -6,10 +6,20 @@ export declare namespace ProductExpService {
6
6
  categoryName: string;
7
7
  }
8
8
  namespace Request {
9
+ interface getSupplierList {
10
+ pageIndex: number;
11
+ pageSize: number;
12
+ supplierName?: string;
13
+ }
9
14
  interface addSupplier {
10
15
  supplierName: string;
11
16
  creatorId: string;
12
17
  }
18
+ interface getLiveGroupList {
19
+ pageIndex: number;
20
+ pageSize: number;
21
+ liveGroupName?: string;
22
+ }
13
23
  interface addLiveGroup {
14
24
  liveGroupName: string;
15
25
  creatorId: string;
@@ -24,15 +34,21 @@ export declare namespace ProductExpService {
24
34
  supplierId: string;
25
35
  }
26
36
  interface getSupplierList {
27
- supplierId: string;
28
- supplierName: string;
37
+ total: number;
38
+ list: {
39
+ supplierId: string;
40
+ supplierName: string;
41
+ }[];
29
42
  }
30
43
  interface addLiveGroup {
31
44
  liveGroupId: string;
32
45
  }
33
46
  interface getLiveGroupList {
34
- liveGroupId: string;
35
- liveGroupName: string;
47
+ total: number;
48
+ list: {
49
+ liveGroupId: string;
50
+ liveGroupName: string;
51
+ }[];
36
52
  }
37
53
  interface list {
38
54
  total: number;
@@ -52,7 +68,7 @@ export declare namespace ProductExpService {
52
68
  /**
53
69
  * 获取供应商列表
54
70
  */
55
- getSupplierList(): Promise<ProductExpService.Response.getSupplierList[]>;
71
+ getSupplierList(request: ProductExpService.Request.getSupplierList): Promise<ProductExpService.Response.getSupplierList>;
56
72
  /**
57
73
  * 新增供应商
58
74
  */
@@ -60,7 +76,7 @@ export declare namespace ProductExpService {
60
76
  /**
61
77
  * 获取直播分组列表
62
78
  */
63
- getLiveGroupList(): Promise<ProductExpService.Response.getLiveGroupList[]>;
79
+ getLiveGroupList(request: ProductExpService.Request.getLiveGroupList): Promise<ProductExpService.Response.getLiveGroupList>;
64
80
  /**
65
81
  * 新增直播分组
66
82
  */
@@ -3,7 +3,7 @@ import BaseService from '../BaseService';
3
3
  declare class ProductLiveService extends BaseService implements Service.ProductLiveController {
4
4
  protected prefixUrl: string;
5
5
  list(request: Service.Request.list): Promise<Service.Response.list>;
6
- add(request: Service.Request.operate): Promise<void>;
6
+ add(request: Service.Request.operate[]): Promise<void>;
7
7
  remove(request: Service.Request.operate): Promise<void>;
8
8
  }
9
9
  export declare const productLiveService: ProductLiveService;
@@ -33,7 +33,7 @@ export declare namespace ProductLiveService {
33
33
  /**
34
34
  * 新增商品
35
35
  */
36
- add(request: ProductLiveService.Request.operate): Promise<void>;
36
+ add(request: ProductLiveService.Request.operate[]): Promise<void>;
37
37
  /**
38
38
  * 删除商品
39
39
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-product-service-node-sdk",
3
- "version": "0.0.7",
3
+ "version": "0.0.9",
4
4
  "description": "EcommerceProductService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",