@be-link/ecommerce-product-service-node-sdk 0.0.6 → 0.0.8

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.
@@ -2,11 +2,11 @@ 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
- productCategoryTree(): Promise<Service.Response.ProductCategoryTree>;
9
+ productCategoryList(request: Service.Request.productCategoryList): Promise<Service.ProductCategory[]>;
10
10
  }
11
11
  export declare const productExpService: ProductExpService;
12
12
  export default productExpService;
@@ -21,25 +21,26 @@ 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);
35
35
  }
36
- productCategoryTree() {
37
- return (0, http_1.callApi)(this.getApiUrl(this.productCategoryTree));
36
+ productCategoryList(request) {
37
+ return (0, http_1.callApi)(this.getApiUrl(this.productCategoryList), request);
38
38
  }
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)('新增直播分组'),
@@ -56,9 +58,10 @@ __decorate([
56
58
  __param(0, (0, tsoa_1.Body)())
57
59
  ], ProductExpService.prototype, "addLiveGroup", null);
58
60
  __decorate([
59
- (0, tsoa_1.OperationId)('商品分类 树结构'),
60
- (0, tsoa_1.Post)('product-category-tree')
61
- ], ProductExpService.prototype, "productCategoryTree", null);
61
+ (0, tsoa_1.OperationId)('商品分类列表'),
62
+ (0, tsoa_1.Post)('product-category-list'),
63
+ __param(0, (0, tsoa_1.Body)())
64
+ ], ProductExpService.prototype, "productCategoryList", null);
62
65
  ProductExpService = __decorate([
63
66
  (0, tsoa_1.Route)('product-exp'),
64
67
  (0, tsoa_1.Tags)('Product-exp')
@@ -2,36 +2,53 @@ export declare namespace ProductExpService {
2
2
  interface ProductCategory {
3
3
  id: string;
4
4
  parentId: string;
5
- level: string;
5
+ level: number;
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;
16
26
  }
27
+ interface productCategoryList {
28
+ level: number;
29
+ parentId?: string;
30
+ }
17
31
  }
18
32
  namespace Response {
19
33
  interface addSupplier {
20
34
  supplierId: string;
21
35
  }
22
36
  interface getSupplierList {
23
- supplierId: string;
24
- supplierName: string;
37
+ total: number;
38
+ list: {
39
+ supplierId: string;
40
+ supplierName: string;
41
+ }[];
25
42
  }
26
43
  interface addLiveGroup {
27
44
  liveGroupId: string;
28
45
  }
29
46
  interface getLiveGroupList {
30
- liveGroupId: string;
31
- liveGroupName: string;
32
- }
33
- interface ProductCategoryTree extends ProductCategory {
34
- children?: ProductCategoryTree[];
47
+ total: number;
48
+ list: {
49
+ liveGroupId: string;
50
+ liveGroupName: string;
51
+ }[];
35
52
  }
36
53
  interface list {
37
54
  total: number;
@@ -51,7 +68,7 @@ export declare namespace ProductExpService {
51
68
  /**
52
69
  * 获取供应商列表
53
70
  */
54
- getSupplierList(): Promise<ProductExpService.Response.getSupplierList[]>;
71
+ getSupplierList(request: ProductExpService.Request.getSupplierList): Promise<ProductExpService.Response.getSupplierList>;
55
72
  /**
56
73
  * 新增供应商
57
74
  */
@@ -59,14 +76,14 @@ export declare namespace ProductExpService {
59
76
  /**
60
77
  * 获取直播分组列表
61
78
  */
62
- getLiveGroupList(): Promise<ProductExpService.Response.getLiveGroupList[]>;
79
+ getLiveGroupList(request: ProductExpService.Request.getLiveGroupList): Promise<ProductExpService.Response.getLiveGroupList>;
63
80
  /**
64
81
  * 新增直播分组
65
82
  */
66
83
  addLiveGroup(request: ProductExpService.Request.addLiveGroup): Promise<ProductExpService.Response.addLiveGroup>;
67
84
  /**
68
- * 商品分类 树结构
85
+ * 商品分类列表
69
86
  */
70
- productCategoryTree(): Promise<ProductExpService.Response.ProductCategoryTree>;
87
+ productCategoryList(request: ProductExpService.Request.productCategoryList): Promise<ProductExpService.ProductCategory[]>;
71
88
  }
72
89
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-product-service-node-sdk",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "EcommerceProductService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",