@be-link/ecommerce-product-service-node-sdk 0.0.16 → 0.0.17

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.
@@ -1,297 +1,503 @@
1
1
  export declare namespace ProductService {
2
2
  interface SkuField {
3
+ /** 价格(分) */
3
4
  price: number;
5
+ /** 库存 */
4
6
  stock: number;
7
+ /** SKU编码 */
5
8
  skuCode: string;
9
+ /** 属性列表 */
6
10
  attrs: Attr[];
11
+ /** 绑定的SKU列表 */
7
12
  bindSkus: BindSku[];
13
+ /** 多SKU编码 */
8
14
  multiSkuCodes: string[];
9
15
  }
10
16
  /**
11
17
  * 核销期限接口
12
18
  */
13
19
  interface VerifyPeriod {
20
+ /** 开始时间戳 */
14
21
  startDate: number;
22
+ /** 结束时间戳 */
15
23
  endDate: number;
24
+ /** 付款后天数 */
16
25
  payAfterDay: number;
26
+ /** 类型 1: 时间范围 2: 付款后天数 */
17
27
  type: number;
18
28
  }
19
29
  /**
20
30
  * 属性接口
21
31
  */
22
32
  interface Attr {
33
+ /** 属性名称 */
23
34
  attrName: string;
35
+ /** 属性值 */
24
36
  attrValue: string;
25
37
  }
26
38
  /**
27
39
  * 绑定的SKU接口
28
40
  */
29
41
  interface BindSku {
42
+ /** 商品ID */
30
43
  productId: string;
44
+ /** 绑定的子SKUID */
31
45
  skuId: string;
46
+ /** 数量 */
32
47
  quantity: number;
33
48
  }
34
49
  /**
35
50
  * 定时任务接口
36
51
  */
37
52
  interface ScheduledTask {
53
+ /** 任务ID */
38
54
  id?: string;
55
+ /** 定时任务时间戳 */
39
56
  scheduledTime: number;
57
+ /** 上下状态 */
40
58
  status: string;
41
59
  }
42
60
  /**
43
61
  * SKU项接口
44
62
  */
45
63
  interface SkuItem {
64
+ /** SKU ID(编辑/更新时传入) */
46
65
  skuId?: string;
66
+ /** 属性列表 */
47
67
  attrs: Attr[];
68
+ /** 价格(分) */
48
69
  price: number;
70
+ /** 划线价(分) */
49
71
  strikethroughPrice: number;
72
+ /** 采购价(分) */
50
73
  purchasePrice: number;
74
+ /** SKU编码 */
51
75
  skuCode: string;
76
+ /** 多SKU编码 */
52
77
  multiSkuCodes: string[];
78
+ /** 绑定的SKU列表 */
53
79
  bindSkus: BindSku[];
80
+ /** 库存 */
54
81
  stock: number;
82
+ /** 是否展示绑定子商品 1展示,0不展示 */
55
83
  showBindSkus: number;
56
84
  }
57
85
  /**
58
86
  * 产品信息接口
59
87
  */
60
88
  interface ProductInfo {
89
+ /** 商品ID(编辑/更新时传入) */
61
90
  productId?: string;
91
+ /** 产品类型 */
62
92
  productType: string;
93
+ /** 是否组合商品 */
63
94
  isCombo: number;
95
+ /** 商品名称 */
64
96
  productName: string;
97
+ /** 主图URL */
65
98
  mainImg: string;
99
+ /** 图片列表 */
66
100
  imgList: string[];
101
+ /** 商品描述 */
67
102
  productDesc?: string;
103
+ /** 一级分类ID */
68
104
  categoryId: string;
105
+ /** 二级分类ID */
69
106
  twoCategoryId: string;
107
+ /** 三级分类ID */
70
108
  threeCategoryId: string;
109
+ /** 提货方式 */
71
110
  pickType: string;
111
+ /** 发货方式 */
72
112
  dispatchType: string;
113
+ /** 存储方式 */
73
114
  storageMethod: string;
115
+ /** 商品分类 */
74
116
  classification: string;
117
+ /** 库存单位 */
75
118
  stockUnit: string;
119
+ /** 产品经理ID */
76
120
  productManagerId?: string;
121
+ /** 供应商ID */
77
122
  supplierId?: string;
123
+ /** 直播分组ID */
78
124
  liveGroupId?: string;
125
+ /** 上下架状态 */
79
126
  status?: string;
127
+ /** 是否需要核销 */
80
128
  needVerify?: number;
129
+ /** 核销期限 */
81
130
  verifyPeriod?: VerifyPeriod;
131
+ /** 起售数量 */
82
132
  miniSaleQuantity?: number;
133
+ /** 限购 */
83
134
  purchaseLimit?: number;
135
+ /** 运费模板版本类型 */
84
136
  freightType?: string;
85
137
  }
86
138
  interface ProductData {
139
+ /** 产品信息 */
87
140
  productInfo: ProductInfo;
141
+ /** SKU列表 */
88
142
  skuList: SkuItem[];
89
143
  }
90
144
  namespace Request {
91
145
  interface detail {
146
+ /** 商品Id */
92
147
  productId: string;
93
148
  }
94
149
  interface list {
150
+ /** 0 开始 */
95
151
  pageIndex: number;
152
+ /** 每页数量 */
96
153
  pageSize: number;
154
+ /** 商品Id */
97
155
  productIds?: string[];
156
+ /** 商品名称 */
98
157
  productNames?: string[];
158
+ /** 商品分类 */
99
159
  classifications?: string[];
160
+ /** 存储方式 */
100
161
  storageMethods?: string[];
162
+ /** 配货方式 */
101
163
  dispatchTypes?: string[];
164
+ /** 供应商Id */
102
165
  supplierIds?: string[];
166
+ /** 直播分组ID */
103
167
  liveGroupIds?: string[];
168
+ /** 产品经理ID */
104
169
  productManagerIds?: string[];
170
+ /** 商品类型 */
105
171
  productType?: string;
172
+ /** 上下架状态 */
106
173
  status?: string;
174
+ /** 是否套餐 */
107
175
  isCombo?: number;
176
+ /** 69码列表 */
108
177
  skuCodes?: string[];
109
178
  }
110
179
  interface batchUpdate {
180
+ /** 商品Id列表 */
111
181
  productIds: string[];
182
+ /** 上下架状态 */
112
183
  status?: string;
184
+ /** 定时上下架任务 */
113
185
  scheduledTasks?: ScheduledTask[];
186
+ /** 商品分类 */
114
187
  classification?: string;
188
+ /** 存储方式 */
115
189
  storageMethod?: string;
190
+ /** 配货方式 */
116
191
  dispatchType?: string;
192
+ /** 直播分组ID */
117
193
  liveGroupId?: string;
194
+ /** 是否删除 */
118
195
  isDelete?: boolean;
119
196
  }
120
197
  interface queryScheduledTask {
198
+ /** 商品Id */
121
199
  productId: string;
122
200
  }
123
201
  interface checkSkuCode {
202
+ /** 商品Id */
124
203
  productId?: string;
204
+ /** SKU ID(更新已有SKU时传入,排除自身) */
125
205
  skuId?: string;
206
+ /** SKU编码 */
126
207
  skuCode: string;
127
208
  }
128
209
  interface queryProductList {
210
+ /** 0 开始 */
129
211
  pageIndex: number;
212
+ /** 页码数量 */
130
213
  pageSize: number;
214
+ /** 商品Id列表 */
131
215
  productIds?: string[];
216
+ /** 商品名称列表 */
132
217
  productNames?: string[];
218
+ /** 69码列表 */
133
219
  skuCodes?: string[];
220
+ /** 是否套餐 */
134
221
  isCombo?: number;
222
+ /** 提货方式 */
135
223
  pickTypes?: string[];
224
+ /** 配货方式 */
136
225
  dispatchTypes?: string[];
226
+ /** 存储方式 */
137
227
  storageMethods?: string[];
228
+ /** 商品分类 */
138
229
  classifications?: string[];
230
+ /** 上下架状态 */
139
231
  status?: string;
140
232
  }
141
233
  interface querySkuBaseInfo {
234
+ /** skuId列表 */
142
235
  skuIds?: string[];
236
+ /** productId列表 */
143
237
  productIds?: string[];
238
+ /** 需要查询的SKU基础信息字段列表 */
144
239
  fields: (keyof SkuField)[];
145
240
  }
146
241
  interface isSoldOut {
242
+ /** SKU ID */
147
243
  skuId: string;
148
244
  }
149
245
  interface deleteScheduledTask {
246
+ /** 任务ID */
150
247
  taskId: string;
151
248
  }
152
249
  interface getProductSkuInfo {
250
+ /** 商品Id */
153
251
  productId: string;
252
+ /** SKU Id */
154
253
  skuIds?: string[];
254
+ /** SKU编码列表 */
155
255
  skuCodes?: string[];
156
256
  }
157
257
  }
158
258
  namespace Response {
159
259
  interface create {
260
+ /** 商品Id */
160
261
  productId: string;
161
262
  }
162
263
  interface queryScheduledTask {
264
+ /** 任务ID */
163
265
  id: string;
266
+ /** 定时任务时间戳 */
164
267
  scheduledTime: number;
268
+ /** 任务状态 */
165
269
  status: string;
270
+ /** 操作类型 上下架 */
166
271
  operationType: string;
167
272
  }
168
273
  interface list {
169
274
  total: number;
170
275
  list: {
276
+ /** 商品ID */
171
277
  productId: string;
278
+ /** 商品名称 */
172
279
  productName: string;
280
+ /** 商品图片 */
173
281
  productImage: string;
282
+ /** 分类名称 */
174
283
  cateName: string;
284
+ /** 商品分类 */
175
285
  classification: string;
286
+ /** 存储方式 */
176
287
  storageMethod: string;
288
+ /** 配货方式 */
177
289
  dispatchType: string;
290
+ /** 销售数量 */
178
291
  salesQuantity: number;
292
+ /** 退货数量 */
179
293
  refundQuantity: number;
294
+ /** 价格 */
180
295
  price: number;
296
+ /** 库存 */
181
297
  stock: number;
298
+ /** 上下架状态 */
182
299
  status: string;
300
+ /** 创建时间 */
183
301
  createdAt: number;
184
302
  }[];
185
303
  }
186
304
  interface checkSkuCode {
305
+ /** 是否可用 */
187
306
  enable: boolean;
188
307
  }
189
308
  interface queryProductList {
190
309
  total: number;
191
310
  list: {
311
+ /** 商品ID */
192
312
  productId: string;
313
+ /** 商品名称 */
193
314
  productName: string;
315
+ /** 商品图片 */
194
316
  productImage: string;
317
+ /** 商品分类 */
195
318
  classification: string;
319
+ /** 存储方式 */
196
320
  storageMethod: string;
321
+ /** 配货方式 */
197
322
  dispatchType: string;
323
+ /** 价格 */
198
324
  price: number;
325
+ /** 库存 */
199
326
  stock: number;
327
+ /** 上下架状态 */
200
328
  status: string;
201
329
  }[];
202
330
  }
203
331
  interface queryProductSkuList {
204
332
  total: number;
205
333
  list: {
334
+ /** 商品ID */
206
335
  productId: string;
336
+ /** 商品名称 */
207
337
  productName: string;
338
+ /** 商品图片 */
208
339
  productImage: string;
340
+ /** 商品分类 */
209
341
  classification: string;
342
+ /** 存储方式 */
210
343
  storageMethod: string;
344
+ /** 配货方式 */
211
345
  dispatchType: string;
346
+ /** 价格 */
212
347
  price: number;
348
+ /** 库存 */
213
349
  stock: number;
350
+ /** 上下架状态 */
214
351
  status: string;
352
+ /** SKU ID */
215
353
  skuId: string;
354
+ /** 属性列表 */
216
355
  attrs: Attr[];
356
+ /** SKU编码 */
217
357
  skuCode: string;
218
358
  }[];
219
359
  }
220
360
  interface querySkuBaseInfo extends Partial<SkuField> {
361
+ /** 商品ID */
221
362
  productId: string;
363
+ /** SKU ID */
222
364
  skuId: string;
223
365
  }
224
366
  interface getProductDetail {
367
+ /** 商品信息 */
225
368
  productInfo: {
369
+ /** 商品ID */
226
370
  productId: string;
371
+ /** 产品类型 */
227
372
  productType: string;
373
+ /** 商品名称 */
228
374
  productName: string;
375
+ /** 是否组合商品 */
229
376
  isCombo: number;
377
+ /** 主图URL */
230
378
  mainImg: string;
379
+ /** 图片列表 */
231
380
  imgList: string[];
381
+ /** 商品描述 */
232
382
  productDesc: string;
383
+ /** 提货方式 */
233
384
  pickType: string;
385
+ /** 发货方式 */
234
386
  dispatchType: string;
387
+ /** 存储方式 */
235
388
  storageMethod: string;
389
+ /** 商品分类 */
236
390
  classification: string;
391
+ /** 库存单位 */
237
392
  stockUnit: string;
393
+ /** 上下架状态 */
238
394
  status: string;
395
+ /** 起售数量 */
239
396
  miniSaleQuantity: number;
397
+ /** 限购 -1 表示不限购 */
240
398
  purchaseLimit: number;
399
+ /** 运费JSON字符串 */
241
400
  freightTemplate: string[] | null;
401
+ /** 门店可见范围 */
242
402
  visibleStores: string[] | null;
403
+ /** 门店不可见范围和可见互斥 */
243
404
  invisibleStores: string[] | null;
244
405
  };
406
+ /** SKU列表 */
245
407
  skuList: {
408
+ /** SKU ID */
246
409
  skuId: string;
410
+ /** 属性列表 [颜色:白色; 尺寸:L] */
247
411
  attrs: Attr[];
412
+ /** 价格(分) */
248
413
  price: number;
414
+ /** 划线价(分) */
249
415
  strikethroughPrice: number;
416
+ /** SKU编码 */
250
417
  skuCode: string;
418
+ /** 库存 */
251
419
  stock: number;
252
420
  }[];
253
421
  }
254
422
  interface isSoldOut {
423
+ /** SKU ID */
255
424
  skuId: string;
425
+ /** 是否售罄 */
256
426
  soldOut: boolean;
257
427
  }
258
428
  interface getProductSkuInfo {
429
+ /** 商品信息 */
259
430
  productInfo: {
431
+ /** 商品ID */
260
432
  productId: string;
433
+ /** 产品类型 */
261
434
  productType: string;
435
+ /** 商品名称 */
262
436
  productName: string;
437
+ /** 是否组合商品 */
263
438
  isCombo: number;
439
+ /** 主图URL */
264
440
  mainImg: string;
441
+ /** 图片列表 */
265
442
  imgList: string[];
443
+ /** 商品描述 */
266
444
  productDesc: string;
445
+ /** 一级分类ID */
267
446
  categoryId: string;
447
+ /** 二级分类ID */
268
448
  twoCategoryId: string;
449
+ /** 三级分类ID */
269
450
  threeCategoryId: string;
451
+ /** 提货方式 */
270
452
  pickType: string;
453
+ /** 发货方式 */
271
454
  dispatchType: string;
455
+ /** 存储方式 */
272
456
  storageMethod: string;
457
+ /** 商品分类 */
273
458
  classification: string;
459
+ /** 库存单位 */
274
460
  stockUnit: string;
461
+ /** 上下架状态 */
275
462
  status: string;
463
+ /** 是否需要核销 */
276
464
  needVerify: number;
465
+ /** 核销期限 */
277
466
  verifyPeriod: VerifyPeriod | null;
467
+ /** 起售数量 */
278
468
  miniSaleQuantity: number;
469
+ /** 限购 -1 表示不限购 */
279
470
  purchaseLimit: number;
471
+ /** 运费JSON字符串 */
280
472
  freightTemplate: string[] | null;
473
+ /** 门店可见范围 */
281
474
  visibleStores: string[] | null;
475
+ /** 门店不可见范围和可见互斥 */
282
476
  invisibleStores: string[] | null;
283
477
  };
478
+ /** SKU列表 */
284
479
  skuList: {
480
+ /** SKU ID */
285
481
  skuId: string;
482
+ /** 属性列表 [颜色:白色; 尺寸:L] */
286
483
  attrs: Attr[];
484
+ /** 价格(分) */
287
485
  price: number;
486
+ /** 划线价(分) */
288
487
  strikethroughPrice: number;
488
+ /** 采购价(分) */
289
489
  purchasePrice: number;
490
+ /** SKU编码 */
290
491
  skuCode: string;
492
+ /** 多SKU编码 */
291
493
  multiSkuCodes: string[];
494
+ /** 绑定的SKU列表 */
292
495
  bindSkus: BindSku[];
496
+ /** 是否展示绑定子商品 1展示,0不展示 */
293
497
  showBindSkus: number;
498
+ /** 是否有绑定子商品 1有,0无 */
294
499
  hasBindSkus: number;
500
+ /** 是否有多码 1有,0无 */
295
501
  hasMultiSkuCodes: number;
296
502
  }[];
297
503
  }
@@ -1,73 +1,104 @@
1
1
  export declare namespace ProductExpService {
2
2
  interface ProductCategory {
3
+ /** 分类ID */
3
4
  id: string;
5
+ /** 父级ID */
4
6
  parentId: string;
7
+ /** 层级 */
5
8
  level: number;
9
+ /** 分类名称 */
6
10
  categoryName: string;
7
11
  }
8
12
  namespace Request {
9
13
  interface getSupplierList {
14
+ /** 页码,0开始 */
10
15
  pageIndex: number;
16
+ /** 每页数量 */
11
17
  pageSize: number;
18
+ /** 供应商名称,模糊匹配 */
12
19
  supplierName?: string;
13
20
  }
14
21
  interface addSupplier {
22
+ /** 供应商名称 */
15
23
  supplierName: string;
16
24
  }
17
25
  interface getLiveGroupList {
26
+ /** 页码,0开始 */
18
27
  pageIndex: number;
28
+ /** 每页数量 */
19
29
  pageSize: number;
30
+ /** 直播分组名称,模糊匹配 */
20
31
  liveGroupName?: string;
21
32
  }
22
33
  interface addLiveGroup {
34
+ /** 直播分组名称 */
23
35
  liveGroupName: string;
24
36
  }
25
37
  interface productCategoryList {
38
+ /** 分类层级 */
26
39
  level: number;
40
+ /** 父分类ID */
27
41
  parentId?: string;
28
42
  }
29
43
  interface setStoreScope {
44
+ /** 商品Id */
30
45
  productId: string;
46
+ /** 类型 VISIBLE | INVISIBLE */
31
47
  type: string;
48
+ /** 门店Id列表 */
32
49
  storeIds: string[];
33
50
  }
34
51
  interface queryStoreScope {
52
+ /** 商品Id */
35
53
  productId: string;
36
54
  }
37
55
  }
38
56
  namespace Response {
39
57
  interface addSupplier {
58
+ /** 供应商Id */
40
59
  supplierId: string;
41
60
  }
42
61
  interface getSupplierList {
43
62
  total: number;
44
63
  list: {
64
+ /** 供应商Id */
45
65
  supplierId: string;
66
+ /** 供应商名称 */
46
67
  supplierName: string;
47
68
  }[];
48
69
  }
49
70
  interface addLiveGroup {
71
+ /** 直播分组Id */
50
72
  liveGroupId: string;
51
73
  }
52
74
  interface getLiveGroupList {
53
75
  total: number;
54
76
  list: {
77
+ /** 直播分组Id */
55
78
  liveGroupId: string;
79
+ /** 直播分组名称 */
56
80
  liveGroupName: string;
57
81
  }[];
58
82
  }
59
83
  interface list {
60
84
  total: number;
61
85
  list: {
86
+ /** 商品ID */
62
87
  productId: string;
88
+ /** 商品名称 */
63
89
  productName: string;
90
+ /** 商品图片 */
64
91
  productImage: string;
92
+ /** 价格 */
65
93
  price: number;
94
+ /** 库存 */
66
95
  stock: number;
67
96
  }[];
68
97
  }
69
98
  interface queryStoreScope {
99
+ /** 类型 VISIBLE | INVISIBLE */
70
100
  type: string;
101
+ /** 门店Id列表 */
71
102
  storeIds: string[];
72
103
  }
73
104
  }
@@ -1,12 +1,17 @@
1
1
  export declare namespace ProductLiveService {
2
2
  namespace Request {
3
3
  interface list {
4
+ /** 0 开始 */
4
5
  pageIndex: number;
6
+ /** 每页数量 */
5
7
  pageSize: number;
8
+ /** 直播间ID */
6
9
  liveRoomId: string;
7
10
  }
8
11
  interface operate {
12
+ /** 商品ID */
9
13
  productId: string;
14
+ /** 直播间ID */
10
15
  liveRoomId: string;
11
16
  }
12
17
  }
@@ -14,10 +19,15 @@ export declare namespace ProductLiveService {
14
19
  interface list {
15
20
  total: number;
16
21
  list: {
22
+ /** 商品ID */
17
23
  productId: string;
24
+ /** 商品名称 */
18
25
  productName: string;
26
+ /** 商品图片 */
19
27
  productImage: string;
28
+ /** 价格 */
20
29
  price: number;
30
+ /** 库存 */
21
31
  stock: number;
22
32
  }[];
23
33
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/ecommerce-product-service-node-sdk",
3
- "version": "0.0.16",
3
+ "version": "0.0.17",
4
4
  "description": "EcommerceProductService Node.js SDK",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",