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

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,9 @@ 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[]>;
16
+ getProductDetail(request: Service.Request.detail): Promise<Service.Response.getProductDetail>;
17
+ isSoldOut(request: Service.Request.isSoldOut): Promise<Service.Response.isSoldOut>;
15
18
  }
16
19
  export declare const productService: ProductService;
17
20
  export default productService;
@@ -51,6 +51,15 @@ 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
+ }
57
+ getProductDetail(request) {
58
+ return (0, http_1.callApi)(this.getApiUrl(this.getProductDetail), request);
59
+ }
60
+ isSoldOut(request) {
61
+ return (0, http_1.callApi)(this.getApiUrl(this.isSoldOut), request);
62
+ }
54
63
  };
55
64
  __decorate([
56
65
  (0, tsoa_1.OperationId)('商品列表'),
@@ -102,6 +111,21 @@ __decorate([
102
111
  (0, tsoa_1.Post)('query-product-sku-list'),
103
112
  __param(0, (0, tsoa_1.Body)())
104
113
  ], ProductService.prototype, "queryProductSkuList", null);
114
+ __decorate([
115
+ (0, tsoa_1.OperationId)('获取商品SKU基础信息'),
116
+ (0, tsoa_1.Post)('query-sku-base-info'),
117
+ __param(0, (0, tsoa_1.Body)())
118
+ ], ProductService.prototype, "querySkuBaseInfo", null);
119
+ __decorate([
120
+ (0, tsoa_1.OperationId)('获取商品详情-C端'),
121
+ (0, tsoa_1.Post)('get-product-detail'),
122
+ __param(0, (0, tsoa_1.Body)())
123
+ ], ProductService.prototype, "getProductDetail", null);
124
+ __decorate([
125
+ (0, tsoa_1.OperationId)('是否售罄-C端'),
126
+ (0, tsoa_1.Post)('is-sold-out'),
127
+ __param(0, (0, tsoa_1.Body)())
128
+ ], ProductService.prototype, "isSoldOut", null);
105
129
  ProductService = __decorate([
106
130
  (0, tsoa_1.Route)('product'),
107
131
  (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,13 @@ 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)[];
140
+ }
141
+ interface isSoldOut {
142
+ skuId: string;
130
143
  }
131
144
  }
132
145
  namespace Response {
@@ -190,6 +203,44 @@ export declare namespace ProductService {
190
203
  skuCode: string;
191
204
  }[];
192
205
  }
206
+ interface querySkuBaseInfo extends Partial<SkuField> {
207
+ productId: string;
208
+ skuId: string;
209
+ }
210
+ interface getProductDetail {
211
+ productInfo: {
212
+ productId: string;
213
+ productType: string;
214
+ productName: string;
215
+ isCombo: number;
216
+ mainImg: string;
217
+ imgList: string[];
218
+ productDesc: string;
219
+ pickType: string;
220
+ dispatchType: string;
221
+ storageMethod: string;
222
+ classification: string;
223
+ stockUnit: string;
224
+ status: string;
225
+ miniSaleQuantity: number;
226
+ purchaseLimit: number;
227
+ freightTemplate: string[] | null;
228
+ visibleStores: string[] | null;
229
+ invisibleStores: string[] | null;
230
+ };
231
+ skuList: {
232
+ skuId: string;
233
+ attrs: Attr[];
234
+ price: number;
235
+ strikethroughPrice: number;
236
+ skuCode: string;
237
+ stock: number;
238
+ }[];
239
+ }
240
+ interface isSoldOut {
241
+ skuId: string;
242
+ soldOut: boolean;
243
+ }
193
244
  }
194
245
  /**
195
246
  * ProductLive Controller 接口定义
@@ -235,5 +286,17 @@ export declare namespace ProductService {
235
286
  * 获取商品+规格信息
236
287
  */
237
288
  queryProductSkuList(request: ProductService.Request.queryProductList): Promise<ProductService.Response.queryProductSkuList>;
289
+ /**
290
+ * 获取商品SKU基础信息
291
+ */
292
+ querySkuBaseInfo(request: ProductService.Request.querySkuBaseInfo): Promise<ProductService.Response.querySkuBaseInfo[]>;
293
+ /**
294
+ * 获取商品详情-C端
295
+ */
296
+ getProductDetail(request: ProductService.Request.detail): Promise<ProductService.Response.getProductDetail>;
297
+ /**
298
+ * 是否售罄-C端
299
+ */
300
+ isSoldOut(request: ProductService.Request.isSoldOut): Promise<ProductService.Response.isSoldOut>;
238
301
  }
239
302
  }
@@ -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.8",
3
+ "version": "0.0.10",
4
4
  "description": "EcommerceProductService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",