@be-link/ecommerce-product-service-node-sdk 0.0.9 → 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.
|
@@ -13,6 +13,8 @@ declare class ProductService extends BaseService implements Service.ProductContr
|
|
|
13
13
|
queryProductList(request: Service.Request.queryProductList): Promise<Service.Response.queryProductList>;
|
|
14
14
|
queryProductSkuList(request: Service.Request.queryProductList): Promise<Service.Response.queryProductSkuList>;
|
|
15
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>;
|
|
16
18
|
}
|
|
17
19
|
export declare const productService: ProductService;
|
|
18
20
|
export default productService;
|
|
@@ -54,6 +54,12 @@ let ProductService = class ProductService extends BaseService_1.default {
|
|
|
54
54
|
querySkuBaseInfo(request) {
|
|
55
55
|
return (0, http_1.callApi)(this.getApiUrl(this.querySkuBaseInfo), request);
|
|
56
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
|
+
}
|
|
57
63
|
};
|
|
58
64
|
__decorate([
|
|
59
65
|
(0, tsoa_1.OperationId)('商品列表'),
|
|
@@ -110,6 +116,16 @@ __decorate([
|
|
|
110
116
|
(0, tsoa_1.Post)('query-sku-base-info'),
|
|
111
117
|
__param(0, (0, tsoa_1.Body)())
|
|
112
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);
|
|
113
129
|
ProductService = __decorate([
|
|
114
130
|
(0, tsoa_1.Route)('product'),
|
|
115
131
|
(0, tsoa_1.Tags)('Product')
|
|
@@ -138,6 +138,9 @@ export declare namespace ProductService {
|
|
|
138
138
|
productIds?: string[];
|
|
139
139
|
fields: (keyof SkuField)[];
|
|
140
140
|
}
|
|
141
|
+
interface isSoldOut {
|
|
142
|
+
skuId: string;
|
|
143
|
+
}
|
|
141
144
|
}
|
|
142
145
|
namespace Response {
|
|
143
146
|
interface create {
|
|
@@ -204,6 +207,40 @@ export declare namespace ProductService {
|
|
|
204
207
|
productId: string;
|
|
205
208
|
skuId: string;
|
|
206
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
|
+
}
|
|
207
244
|
}
|
|
208
245
|
/**
|
|
209
246
|
* ProductLive Controller 接口定义
|
|
@@ -253,5 +290,13 @@ export declare namespace ProductService {
|
|
|
253
290
|
* 获取商品SKU基础信息
|
|
254
291
|
*/
|
|
255
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>;
|
|
256
301
|
}
|
|
257
302
|
}
|