@be-link/ecommerce-product-service-node-sdk 0.0.18 → 0.0.20
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 +11 -0
- package/enum.js +54 -1
- package/index.d.ts +1 -0
- package/index.js +13 -1
- package/modules/product/service.d.ts +1 -1
- package/modules/product/types.d.ts +40 -10
- package/package.json +1 -1
package/enum.d.ts
CHANGED
|
@@ -110,3 +110,14 @@ export declare namespace ENUM {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
+
export declare const PRODUCT_TYPE_MAP: Record<string, string>;
|
|
114
|
+
export declare const PRODUCT_STATUS_MAP: Record<string, string>;
|
|
115
|
+
export declare const PRODUCT_PICK_TYPE_MAP: Record<string, string>;
|
|
116
|
+
export declare const PRODUCT_DISPATCH_TYPE_MAP: Record<string, string>;
|
|
117
|
+
export declare const PRODUCT_STORAGE_METHOD_MAP: Record<string, string>;
|
|
118
|
+
export declare const PRODUCT_CLASSIFICATION_MAP: Record<string, string>;
|
|
119
|
+
export declare const PRODUCT_FREIGHT_TYPE_MAP: Record<string, string>;
|
|
120
|
+
export declare const PRODUCT_STORE_SCOPE_TYPE_MAP: Record<string, string>;
|
|
121
|
+
export declare const TASK_STATUS_MAP: Record<string, string>;
|
|
122
|
+
export declare const TASK_OPERATION_TYPE_MAP: Record<string, string>;
|
|
123
|
+
export declare const COMMON_BOOLEAN_MAP: Record<string, string>;
|
package/enum.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ENUM = void 0;
|
|
3
|
+
exports.COMMON_BOOLEAN_MAP = exports.TASK_OPERATION_TYPE_MAP = exports.TASK_STATUS_MAP = exports.PRODUCT_STORE_SCOPE_TYPE_MAP = exports.PRODUCT_FREIGHT_TYPE_MAP = exports.PRODUCT_CLASSIFICATION_MAP = exports.PRODUCT_STORAGE_METHOD_MAP = exports.PRODUCT_DISPATCH_TYPE_MAP = exports.PRODUCT_PICK_TYPE_MAP = exports.PRODUCT_STATUS_MAP = exports.PRODUCT_TYPE_MAP = exports.ENUM = void 0;
|
|
4
4
|
// 服务.模块.枚举名称.枚举值 示例: DEMO_ENUM.ORDER_ENUM.STATUS.PENDING
|
|
5
5
|
var ENUM;
|
|
6
6
|
(function (ENUM) {
|
|
@@ -140,3 +140,56 @@ var ENUM;
|
|
|
140
140
|
})(BOOLEAN_CHINESE = COMMON_ENUM.BOOLEAN_CHINESE || (COMMON_ENUM.BOOLEAN_CHINESE = {}));
|
|
141
141
|
})(COMMON_ENUM = ENUM.COMMON_ENUM || (ENUM.COMMON_ENUM = {}));
|
|
142
142
|
})(ENUM || (exports.ENUM = ENUM = {}));
|
|
143
|
+
// 中英文映射 Record
|
|
144
|
+
exports.PRODUCT_TYPE_MAP = {
|
|
145
|
+
[ENUM.PRODUCT_ENUM.TYPE.ENTITY]: ENUM.PRODUCT_ENUM.TYPE_CHINESE.ENTITY,
|
|
146
|
+
[ENUM.PRODUCT_ENUM.TYPE.VIRTUAL]: ENUM.PRODUCT_ENUM.TYPE_CHINESE.VIRTUAL,
|
|
147
|
+
};
|
|
148
|
+
exports.PRODUCT_STATUS_MAP = {
|
|
149
|
+
[ENUM.PRODUCT_ENUM.STATUS.DRAFT]: ENUM.PRODUCT_ENUM.STATUS_CHINESE.DRAFT,
|
|
150
|
+
[ENUM.PRODUCT_ENUM.STATUS.ACTIVE]: ENUM.PRODUCT_ENUM.STATUS_CHINESE.ACTIVE,
|
|
151
|
+
[ENUM.PRODUCT_ENUM.STATUS.INACTIVE]: ENUM.PRODUCT_ENUM.STATUS_CHINESE.INACTIVE,
|
|
152
|
+
};
|
|
153
|
+
exports.PRODUCT_PICK_TYPE_MAP = {
|
|
154
|
+
[ENUM.PRODUCT_ENUM.PICK_TYPE.STORE_PICKUP]: ENUM.PRODUCT_ENUM.PICK_TYPE_CHINESE.STORE_PICKUP,
|
|
155
|
+
[ENUM.PRODUCT_ENUM.PICK_TYPE.DELIVERY]: ENUM.PRODUCT_ENUM.PICK_TYPE_CHINESE.DELIVERY,
|
|
156
|
+
};
|
|
157
|
+
exports.PRODUCT_DISPATCH_TYPE_MAP = {
|
|
158
|
+
[ENUM.PRODUCT_ENUM.DISPATCH_TYPE.WAREHOSE_DISPATCH]: ENUM.PRODUCT_ENUM.DISPATCH_TYPE_CHINESE.WAREHOSE_DISPATCH,
|
|
159
|
+
[ENUM.PRODUCT_ENUM.DISPATCH_TYPE.SUPPLIER_DISPATCH]: ENUM.PRODUCT_ENUM.DISPATCH_TYPE_CHINESE.SUPPLIER_DISPATCH,
|
|
160
|
+
};
|
|
161
|
+
exports.PRODUCT_STORAGE_METHOD_MAP = {
|
|
162
|
+
[ENUM.PRODUCT_ENUM.STORAGE_METHOD.NORMAL]: ENUM.PRODUCT_ENUM.STORAGE_METHOD_CHINESE.NORMAL,
|
|
163
|
+
[ENUM.PRODUCT_ENUM.STORAGE_METHOD.REFRIGERATED]: ENUM.PRODUCT_ENUM.STORAGE_METHOD_CHINESE.REFRIGERATED,
|
|
164
|
+
[ENUM.PRODUCT_ENUM.STORAGE_METHOD.FROZEN]: ENUM.PRODUCT_ENUM.STORAGE_METHOD_CHINESE.FROZEN,
|
|
165
|
+
};
|
|
166
|
+
exports.PRODUCT_CLASSIFICATION_MAP = {
|
|
167
|
+
[ENUM.PRODUCT_ENUM.CLASSIFICATION.DEPARTMENT_STORE]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.DEPARTMENT_STORE,
|
|
168
|
+
[ENUM.PRODUCT_ENUM.CLASSIFICATION.HEALTH]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.HEALTH,
|
|
169
|
+
[ENUM.PRODUCT_ENUM.CLASSIFICATION.STORE_RETAIL]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.STORE_RETAIL,
|
|
170
|
+
[ENUM.PRODUCT_ENUM.CLASSIFICATION.OTHER_FRESH]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.OTHER_FRESH,
|
|
171
|
+
[ENUM.PRODUCT_ENUM.CLASSIFICATION.MORNING_FRESH]: ENUM.PRODUCT_ENUM.CLASSIFICATION_CHINESE.MORNING_FRESH,
|
|
172
|
+
};
|
|
173
|
+
exports.PRODUCT_FREIGHT_TYPE_MAP = {
|
|
174
|
+
[ENUM.PRODUCT_ENUM.FREIGHT_TYPE.JZH]: ENUM.PRODUCT_ENUM.FREIGHT_TYPE_CHINESE.JZH,
|
|
175
|
+
[ENUM.PRODUCT_ENUM.FREIGHT_TYPE.REMOTE_AREAS]: ENUM.PRODUCT_ENUM.FREIGHT_TYPE_CHINESE.REMOTE_AREAS,
|
|
176
|
+
};
|
|
177
|
+
exports.PRODUCT_STORE_SCOPE_TYPE_MAP = {
|
|
178
|
+
[ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE.VISIBLE]: ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE.VISIBLE,
|
|
179
|
+
[ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE.INVISIBLE]: ENUM.PRODUCT_ENUM.STORE_SCOPE_TYPE_CHINESE.INVISIBLE,
|
|
180
|
+
};
|
|
181
|
+
exports.TASK_STATUS_MAP = {
|
|
182
|
+
[ENUM.TASK_ENUM.STATUS.PENDING]: ENUM.TASK_ENUM.STATUS_CHINESE.PENDING,
|
|
183
|
+
[ENUM.TASK_ENUM.STATUS.EXECUTING]: ENUM.TASK_ENUM.STATUS_CHINESE.EXECUTING,
|
|
184
|
+
[ENUM.TASK_ENUM.STATUS.SUCCESS]: ENUM.TASK_ENUM.STATUS_CHINESE.SUCCESS,
|
|
185
|
+
[ENUM.TASK_ENUM.STATUS.CANCEL]: ENUM.TASK_ENUM.STATUS_CHINESE.CANCEL,
|
|
186
|
+
[ENUM.TASK_ENUM.STATUS.FAIL]: ENUM.TASK_ENUM.STATUS_CHINESE.FAIL,
|
|
187
|
+
};
|
|
188
|
+
exports.TASK_OPERATION_TYPE_MAP = {
|
|
189
|
+
[ENUM.TASK_ENUM.OPERATION_TYPE.ACTIVE]: ENUM.TASK_ENUM.OPERATION_TYPE_CHINESE.ACTIVE,
|
|
190
|
+
[ENUM.TASK_ENUM.OPERATION_TYPE.INACTIVE]: ENUM.TASK_ENUM.OPERATION_TYPE_CHINESE.INACTIVE,
|
|
191
|
+
};
|
|
192
|
+
exports.COMMON_BOOLEAN_MAP = {
|
|
193
|
+
[ENUM.COMMON_ENUM.BOOLEAN.NO]: ENUM.COMMON_ENUM.BOOLEAN_CHINESE.NO,
|
|
194
|
+
[ENUM.COMMON_ENUM.BOOLEAN.YES]: ENUM.COMMON_ENUM.BOOLEAN_CHINESE.YES,
|
|
195
|
+
};
|
package/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ENUM as PRODUCT_SERVICE_ENUM } from './enum';
|
|
2
|
+
export { PRODUCT_TYPE_MAP, PRODUCT_STATUS_MAP, PRODUCT_PICK_TYPE_MAP, PRODUCT_DISPATCH_TYPE_MAP, PRODUCT_STORAGE_METHOD_MAP, PRODUCT_CLASSIFICATION_MAP, PRODUCT_FREIGHT_TYPE_MAP, PRODUCT_STORE_SCOPE_TYPE_MAP, TASK_STATUS_MAP, TASK_OPERATION_TYPE_MAP, COMMON_BOOLEAN_MAP, } from './enum';
|
|
2
3
|
export { productService } from './modules/product/service';
|
|
3
4
|
export type { ProductService as ProductServiceTypes } from './modules/product/types';
|
|
4
5
|
export { productExpService } from './modules/productExp/service';
|
package/index.js
CHANGED
|
@@ -1,8 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.jobService = exports.productLiveService = exports.productExpService = exports.productService = exports.PRODUCT_SERVICE_ENUM = void 0;
|
|
3
|
+
exports.jobService = exports.productLiveService = exports.productExpService = exports.productService = exports.COMMON_BOOLEAN_MAP = exports.TASK_OPERATION_TYPE_MAP = exports.TASK_STATUS_MAP = exports.PRODUCT_STORE_SCOPE_TYPE_MAP = exports.PRODUCT_FREIGHT_TYPE_MAP = exports.PRODUCT_CLASSIFICATION_MAP = exports.PRODUCT_STORAGE_METHOD_MAP = exports.PRODUCT_DISPATCH_TYPE_MAP = exports.PRODUCT_PICK_TYPE_MAP = exports.PRODUCT_STATUS_MAP = exports.PRODUCT_TYPE_MAP = exports.PRODUCT_SERVICE_ENUM = void 0;
|
|
4
4
|
var enum_1 = require("./enum");
|
|
5
5
|
Object.defineProperty(exports, "PRODUCT_SERVICE_ENUM", { enumerable: true, get: function () { return enum_1.ENUM; } });
|
|
6
|
+
var enum_2 = require("./enum");
|
|
7
|
+
Object.defineProperty(exports, "PRODUCT_TYPE_MAP", { enumerable: true, get: function () { return enum_2.PRODUCT_TYPE_MAP; } });
|
|
8
|
+
Object.defineProperty(exports, "PRODUCT_STATUS_MAP", { enumerable: true, get: function () { return enum_2.PRODUCT_STATUS_MAP; } });
|
|
9
|
+
Object.defineProperty(exports, "PRODUCT_PICK_TYPE_MAP", { enumerable: true, get: function () { return enum_2.PRODUCT_PICK_TYPE_MAP; } });
|
|
10
|
+
Object.defineProperty(exports, "PRODUCT_DISPATCH_TYPE_MAP", { enumerable: true, get: function () { return enum_2.PRODUCT_DISPATCH_TYPE_MAP; } });
|
|
11
|
+
Object.defineProperty(exports, "PRODUCT_STORAGE_METHOD_MAP", { enumerable: true, get: function () { return enum_2.PRODUCT_STORAGE_METHOD_MAP; } });
|
|
12
|
+
Object.defineProperty(exports, "PRODUCT_CLASSIFICATION_MAP", { enumerable: true, get: function () { return enum_2.PRODUCT_CLASSIFICATION_MAP; } });
|
|
13
|
+
Object.defineProperty(exports, "PRODUCT_FREIGHT_TYPE_MAP", { enumerable: true, get: function () { return enum_2.PRODUCT_FREIGHT_TYPE_MAP; } });
|
|
14
|
+
Object.defineProperty(exports, "PRODUCT_STORE_SCOPE_TYPE_MAP", { enumerable: true, get: function () { return enum_2.PRODUCT_STORE_SCOPE_TYPE_MAP; } });
|
|
15
|
+
Object.defineProperty(exports, "TASK_STATUS_MAP", { enumerable: true, get: function () { return enum_2.TASK_STATUS_MAP; } });
|
|
16
|
+
Object.defineProperty(exports, "TASK_OPERATION_TYPE_MAP", { enumerable: true, get: function () { return enum_2.TASK_OPERATION_TYPE_MAP; } });
|
|
17
|
+
Object.defineProperty(exports, "COMMON_BOOLEAN_MAP", { enumerable: true, get: function () { return enum_2.COMMON_BOOLEAN_MAP; } });
|
|
6
18
|
var service_1 = require("./modules/product/service");
|
|
7
19
|
Object.defineProperty(exports, "productService", { enumerable: true, get: function () { return service_1.productService; } });
|
|
8
20
|
var service_2 = require("./modules/productExp/service");
|
|
@@ -9,7 +9,7 @@ declare class ProductService extends BaseService implements Service.ProductContr
|
|
|
9
9
|
batchUpdate(request: Service.Request.batchUpdate): Promise<void>;
|
|
10
10
|
queryScheduledTask(request: Service.Request.queryScheduledTask): Promise<Service.Response.queryScheduledTask[]>;
|
|
11
11
|
checkSkuCode(request: Service.Request.checkSkuCode): Promise<Service.Response.checkSkuCode>;
|
|
12
|
-
export(request: Service.Request.list): Promise<
|
|
12
|
+
export(request: Service.Request.list): Promise<Service.Response.productDetail>;
|
|
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[]>;
|
|
@@ -1,4 +1,30 @@
|
|
|
1
1
|
export declare namespace ProductService {
|
|
2
|
+
/** 商品明细项 */
|
|
3
|
+
interface ProductDetailItem {
|
|
4
|
+
商品ID: string;
|
|
5
|
+
商品名称: string;
|
|
6
|
+
一级类目: string;
|
|
7
|
+
二级类目: string;
|
|
8
|
+
三级类目: string;
|
|
9
|
+
商品分类: string;
|
|
10
|
+
储存方式: string;
|
|
11
|
+
取货方式: string;
|
|
12
|
+
配送方式: string;
|
|
13
|
+
供应商: string;
|
|
14
|
+
产品经理: string;
|
|
15
|
+
直播分组: string;
|
|
16
|
+
上下架状态: string;
|
|
17
|
+
起售数量: number;
|
|
18
|
+
限购数量: number | string;
|
|
19
|
+
商品类型: string;
|
|
20
|
+
售卖类型: string;
|
|
21
|
+
规格明细: string;
|
|
22
|
+
规格编码: string;
|
|
23
|
+
库存: number;
|
|
24
|
+
划线价: number;
|
|
25
|
+
售价: number;
|
|
26
|
+
采购价: number;
|
|
27
|
+
}
|
|
2
28
|
interface SkuField {
|
|
3
29
|
/** 价格(分) */
|
|
4
30
|
price: number;
|
|
@@ -18,13 +44,13 @@ export declare namespace ProductService {
|
|
|
18
44
|
*/
|
|
19
45
|
interface VerifyPeriod {
|
|
20
46
|
/** 开始时间戳 */
|
|
21
|
-
startDate
|
|
47
|
+
startDate?: number;
|
|
22
48
|
/** 结束时间戳 */
|
|
23
|
-
endDate
|
|
49
|
+
endDate?: number;
|
|
24
50
|
/** 付款后天数 */
|
|
25
|
-
payAfterDay
|
|
51
|
+
payAfterDay?: number;
|
|
26
52
|
/** 类型 1: 时间范围 2: 付款后天数 */
|
|
27
|
-
type
|
|
53
|
+
type?: number;
|
|
28
54
|
}
|
|
29
55
|
/**
|
|
30
56
|
* 属性接口
|
|
@@ -72,15 +98,15 @@ export declare namespace ProductService {
|
|
|
72
98
|
/** 采购价(分) */
|
|
73
99
|
purchasePrice: number;
|
|
74
100
|
/** SKU编码 */
|
|
75
|
-
skuCode
|
|
101
|
+
skuCode?: string;
|
|
76
102
|
/** 多SKU编码 */
|
|
77
|
-
multiSkuCodes
|
|
103
|
+
multiSkuCodes?: string[];
|
|
78
104
|
/** 绑定的SKU列表 */
|
|
79
|
-
bindSkus
|
|
105
|
+
bindSkus?: BindSku[];
|
|
80
106
|
/** 库存 */
|
|
81
107
|
stock: number;
|
|
82
108
|
/** 是否展示绑定子商品 1展示,0不展示 */
|
|
83
|
-
showBindSkus
|
|
109
|
+
showBindSkus?: number;
|
|
84
110
|
}
|
|
85
111
|
/**
|
|
86
112
|
* 产品信息接口
|
|
@@ -115,7 +141,7 @@ export declare namespace ProductService {
|
|
|
115
141
|
/** 商品分类 */
|
|
116
142
|
classification: string;
|
|
117
143
|
/** 库存单位 */
|
|
118
|
-
stockUnit
|
|
144
|
+
stockUnit?: string;
|
|
119
145
|
/** 产品经理ID */
|
|
120
146
|
productManagerId?: string;
|
|
121
147
|
/** 供应商ID */
|
|
@@ -303,6 +329,10 @@ export declare namespace ProductService {
|
|
|
303
329
|
/** 是否可用 */
|
|
304
330
|
enable: boolean;
|
|
305
331
|
}
|
|
332
|
+
interface productDetail {
|
|
333
|
+
data: ProductDetailItem[];
|
|
334
|
+
headerMap: string[];
|
|
335
|
+
}
|
|
306
336
|
interface queryProductList {
|
|
307
337
|
total: number;
|
|
308
338
|
list: {
|
|
@@ -535,7 +565,7 @@ export declare namespace ProductService {
|
|
|
535
565
|
/**
|
|
536
566
|
* 商品导出
|
|
537
567
|
*/
|
|
538
|
-
export(request: ProductService.Request.list): Promise<
|
|
568
|
+
export(request: ProductService.Request.list): Promise<ProductService.Response.productDetail>;
|
|
539
569
|
/**
|
|
540
570
|
* 获取商品信息(不含规格信息)
|
|
541
571
|
*/
|