@be-link/ecommerce-product-service-node-sdk 0.1.40 → 0.1.42
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 +6 -0
- package/enum.js +8 -0
- package/modules/product/types.d.ts +1 -1
- package/modules/productExp/service.d.ts +0 -1
- package/modules/productExp/service.js +0 -8
- package/modules/productExp/types.d.ts +0 -26
- package/modules/productLive/service.d.ts +1 -1
- package/modules/productLive/service.js +5 -5
- package/modules/productLive/types.d.ts +14 -9
- package/package.json +1 -2
package/enum.d.ts
CHANGED
|
@@ -138,6 +138,12 @@ export declare namespace ENUM {
|
|
|
138
138
|
TAG = "TAG"
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
+
namespace PRODUCT_LIVE_ENUM {
|
|
142
|
+
enum PRODUCT_TYPE {
|
|
143
|
+
EC = "EC",
|
|
144
|
+
TOUR = "TOUR"
|
|
145
|
+
}
|
|
146
|
+
}
|
|
141
147
|
}
|
|
142
148
|
export declare const PRODUCT_TYPE_MAP: Record<string, string>;
|
|
143
149
|
export declare const PRODUCT_STATUS_MAP: Record<string, string>;
|
package/enum.js
CHANGED
|
@@ -172,6 +172,14 @@ var ENUM;
|
|
|
172
172
|
SCOPE_TYPE["TAG"] = "TAG";
|
|
173
173
|
})(SCOPE_TYPE = PRODUCT_EXP_ENUM.SCOPE_TYPE || (PRODUCT_EXP_ENUM.SCOPE_TYPE = {}));
|
|
174
174
|
})(PRODUCT_EXP_ENUM = ENUM.PRODUCT_EXP_ENUM || (ENUM.PRODUCT_EXP_ENUM = {}));
|
|
175
|
+
let PRODUCT_LIVE_ENUM;
|
|
176
|
+
(function (PRODUCT_LIVE_ENUM) {
|
|
177
|
+
let PRODUCT_TYPE;
|
|
178
|
+
(function (PRODUCT_TYPE) {
|
|
179
|
+
PRODUCT_TYPE["EC"] = "EC";
|
|
180
|
+
PRODUCT_TYPE["TOUR"] = "TOUR";
|
|
181
|
+
})(PRODUCT_TYPE = PRODUCT_LIVE_ENUM.PRODUCT_TYPE || (PRODUCT_LIVE_ENUM.PRODUCT_TYPE = {}));
|
|
182
|
+
})(PRODUCT_LIVE_ENUM = ENUM.PRODUCT_LIVE_ENUM || (ENUM.PRODUCT_LIVE_ENUM = {}));
|
|
175
183
|
})(ENUM || (exports.ENUM = ENUM = {}));
|
|
176
184
|
// 中英文映射 Record
|
|
177
185
|
exports.PRODUCT_TYPE_MAP = {
|
|
@@ -2,7 +2,6 @@ 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
|
-
queryPurePointsSalesTopList(request: Service.Request.queryPurePointsSalesTopList): Promise<Service.Response.queryPurePointsSalesTopList>;
|
|
6
5
|
getSupplierList(request: Service.Request.getSupplierList): Promise<Service.Response.getSupplierList>;
|
|
7
6
|
addSupplier(request: Service.Request.addSupplier): Promise<Service.Response.addSupplier>;
|
|
8
7
|
getLiveGroupList(request: Service.Request.getLiveGroupList): Promise<Service.Response.getLiveGroupList>;
|
|
@@ -21,9 +21,6 @@ let ProductExpService = class ProductExpService extends BaseService_1.default {
|
|
|
21
21
|
super(...arguments);
|
|
22
22
|
this.prefixUrl = '/product-exp';
|
|
23
23
|
}
|
|
24
|
-
queryPurePointsSalesTopList(request) {
|
|
25
|
-
return (0, http_1.callApi)(this.getApiUrl(this.queryPurePointsSalesTopList), request);
|
|
26
|
-
}
|
|
27
24
|
getSupplierList(request) {
|
|
28
25
|
return (0, http_1.callApi)(this.getApiUrl(this.getSupplierList), request);
|
|
29
26
|
}
|
|
@@ -61,11 +58,6 @@ let ProductExpService = class ProductExpService extends BaseService_1.default {
|
|
|
61
58
|
return (0, http_1.callApi)(this.getApiUrl(this.queryProductExpList), request);
|
|
62
59
|
}
|
|
63
60
|
};
|
|
64
|
-
__decorate([
|
|
65
|
-
(0, tsoa_1.OperationId)('查询积分商城纯积分兑换销量 Top10'),
|
|
66
|
-
(0, tsoa_1.Post)('query-pure-points-sales-top-list'),
|
|
67
|
-
__param(0, (0, tsoa_1.Body)())
|
|
68
|
-
], ProductExpService.prototype, "queryPurePointsSalesTopList", null);
|
|
69
61
|
__decorate([
|
|
70
62
|
(0, tsoa_1.OperationId)('获取供应商列表'),
|
|
71
63
|
(0, tsoa_1.Post)('get-supplier-list'),
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import type { PointsMallServiceTypes } from '@be-link/ecommerce-promotion-service-node-sdk';
|
|
2
1
|
export declare namespace ProductExpService {
|
|
3
2
|
/**
|
|
4
3
|
* Entity 命名空间
|
|
@@ -38,9 +37,6 @@ export declare namespace ProductExpService {
|
|
|
38
37
|
categoryName: string;
|
|
39
38
|
}
|
|
40
39
|
namespace Request {
|
|
41
|
-
/** 查询积分商城纯积分兑换销量 Top10 */
|
|
42
|
-
interface queryPurePointsSalesTopList {
|
|
43
|
-
}
|
|
44
40
|
interface getSupplierList {
|
|
45
41
|
/** 页码,0开始 */
|
|
46
42
|
pageIndex: number;
|
|
@@ -124,24 +120,6 @@ export declare namespace ProductExpService {
|
|
|
124
120
|
}
|
|
125
121
|
}
|
|
126
122
|
namespace Response {
|
|
127
|
-
/** 查询积分商城纯积分兑换销量 Top10 响应 */
|
|
128
|
-
interface queryPurePointsSalesTopList {
|
|
129
|
-
list: {
|
|
130
|
-
/** 商品ID(本服务) */
|
|
131
|
-
productId: string;
|
|
132
|
-
/** 商品名称(本服务) */
|
|
133
|
-
productName: string;
|
|
134
|
-
/** 商品图片(本服务) */
|
|
135
|
-
productImage: string;
|
|
136
|
-
/** 销量(本服务扩展表) */
|
|
137
|
-
salesQuantity: number;
|
|
138
|
-
/**
|
|
139
|
-
* 积分商城后台列表项(促销侧 AdminProductItem 全量)
|
|
140
|
-
* 未在积分商城配置命中时为 null
|
|
141
|
-
*/
|
|
142
|
-
pointsMallProduct: PointsMallServiceTypes.Entity.AdminProductItem | null;
|
|
143
|
-
}[];
|
|
144
|
-
}
|
|
145
123
|
interface addSupplier {
|
|
146
124
|
/** 供应商Id */
|
|
147
125
|
supplierId: string;
|
|
@@ -246,10 +224,6 @@ export declare namespace ProductExpService {
|
|
|
246
224
|
* ProductLive Controller 接口定义
|
|
247
225
|
*/
|
|
248
226
|
interface ProductExpController {
|
|
249
|
-
/**
|
|
250
|
-
* 查询积分商城纯积分兑换销量 Top10
|
|
251
|
-
*/
|
|
252
|
-
queryPurePointsSalesTopList(request: ProductExpService.Request.queryPurePointsSalesTopList): Promise<ProductExpService.Response.queryPurePointsSalesTopList>;
|
|
253
227
|
/**
|
|
254
228
|
* 获取供应商列表
|
|
255
229
|
*/
|
|
@@ -5,7 +5,7 @@ declare class ProductLiveService extends BaseService implements Service.ProductL
|
|
|
5
5
|
list(request: Service.Request.list): Promise<Service.Response.list>;
|
|
6
6
|
add(request: Service.Request.operate[]): Promise<void>;
|
|
7
7
|
remove(request: Service.Request.operate): Promise<void>;
|
|
8
|
-
|
|
8
|
+
updateAll(request: Service.Request.updateAll): Promise<Service.Response.updateAll>;
|
|
9
9
|
}
|
|
10
10
|
export declare const productLiveService: ProductLiveService;
|
|
11
11
|
export default productLiveService;
|
|
@@ -30,8 +30,8 @@ let ProductLiveService = class ProductLiveService extends BaseService_1.default
|
|
|
30
30
|
remove(request) {
|
|
31
31
|
return (0, http_1.callApi)(this.getApiUrl(this.remove), request);
|
|
32
32
|
}
|
|
33
|
-
|
|
34
|
-
return (0, http_1.callApi)(this.getApiUrl(this.
|
|
33
|
+
updateAll(request) {
|
|
34
|
+
return (0, http_1.callApi)(this.getApiUrl(this.updateAll), request);
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
__decorate([
|
|
@@ -50,10 +50,10 @@ __decorate([
|
|
|
50
50
|
__param(0, (0, tsoa_1.Body)())
|
|
51
51
|
], ProductLiveService.prototype, "remove", null);
|
|
52
52
|
__decorate([
|
|
53
|
-
(0, tsoa_1.OperationId)('
|
|
54
|
-
(0, tsoa_1.Post)('
|
|
53
|
+
(0, tsoa_1.OperationId)('更新所有商品'),
|
|
54
|
+
(0, tsoa_1.Post)('updateAll'),
|
|
55
55
|
__param(0, (0, tsoa_1.Body)())
|
|
56
|
-
], ProductLiveService.prototype, "
|
|
56
|
+
], ProductLiveService.prototype, "updateAll", null);
|
|
57
57
|
ProductLiveService = __decorate([
|
|
58
58
|
(0, tsoa_1.Route)('product-live'),
|
|
59
59
|
(0, tsoa_1.Tags)('Product-live')
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ENUM } from '../../enum';
|
|
1
2
|
export declare namespace ProductLiveService {
|
|
2
3
|
namespace Request {
|
|
3
4
|
interface list {
|
|
@@ -13,14 +14,12 @@ export declare namespace ProductLiveService {
|
|
|
13
14
|
productId: string;
|
|
14
15
|
/** 直播间ID */
|
|
15
16
|
liveRoomId: string;
|
|
17
|
+
/** 分类 */
|
|
18
|
+
type?: ENUM.PRODUCT_LIVE_ENUM.PRODUCT_TYPE;
|
|
16
19
|
}
|
|
17
|
-
interface
|
|
18
|
-
/**
|
|
19
|
-
|
|
20
|
-
/** 城市ID */
|
|
21
|
-
cityId?: string;
|
|
22
|
-
/** 是否同步会员开卡卡片:true-开启 false-关闭 */
|
|
23
|
-
enableSync: boolean;
|
|
20
|
+
interface updateAll {
|
|
21
|
+
/** 商品ID */
|
|
22
|
+
productId: string;
|
|
24
23
|
}
|
|
25
24
|
}
|
|
26
25
|
namespace Response {
|
|
@@ -39,8 +38,14 @@ export declare namespace ProductLiveService {
|
|
|
39
38
|
price: number;
|
|
40
39
|
/** 库存 */
|
|
41
40
|
stock: number;
|
|
41
|
+
/** 分类 */
|
|
42
|
+
type: ENUM.PRODUCT_LIVE_ENUM.PRODUCT_TYPE;
|
|
42
43
|
}[];
|
|
43
44
|
}
|
|
45
|
+
interface updateAll {
|
|
46
|
+
/** 是否成功 */
|
|
47
|
+
success: boolean;
|
|
48
|
+
}
|
|
44
49
|
}
|
|
45
50
|
/**
|
|
46
51
|
* ProductLive Controller 接口定义
|
|
@@ -59,8 +64,8 @@ export declare namespace ProductLiveService {
|
|
|
59
64
|
*/
|
|
60
65
|
remove(request: ProductLiveService.Request.operate): Promise<void>;
|
|
61
66
|
/**
|
|
62
|
-
*
|
|
67
|
+
* 更新所有商品
|
|
63
68
|
*/
|
|
64
|
-
|
|
69
|
+
updateAll(request: ProductLiveService.Request.updateAll): Promise<ProductLiveService.Response.updateAll>;
|
|
65
70
|
}
|
|
66
71
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@be-link/ecommerce-product-service-node-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.42",
|
|
4
4
|
"description": "EcommerceProductService Node.js SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
"access": "public"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@be-link/ecommerce-promotion-service-node-sdk": "0.1.56",
|
|
14
13
|
"@fastify/request-context": "6.2.1",
|
|
15
14
|
"axios": "1.13.2",
|
|
16
15
|
"axios-retry": "4.0.0",
|