@be-link/pos-cli-nodejs 1.0.54 → 1.0.55

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@be-link/pos-cli-nodejs",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "正向订单服务Nodejs客户端",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -1,9 +1,11 @@
1
+ import { ComboTypeEnum } from 'vitality-meta/enums/pos';
1
2
  import { PosDto } from '../..';
2
3
  export declare abstract class ComboInfoProxy {
3
4
  abstract get raw(): PosDto.IPositiveOrderComboInfo | PosDto.IPositiveSkuInfo;
4
5
  abstract get name(): string | undefined;
5
6
  abstract get costDays(): number | undefined;
6
7
  abstract get nightNum(): number | undefined;
8
+ abstract get minOrderCount(): number | undefined;
7
9
  }
8
10
  declare class ComboInfoProxyV1 extends ComboInfoProxy {
9
11
  private readonly orderComboInfo;
@@ -12,6 +14,8 @@ declare class ComboInfoProxyV1 extends ComboInfoProxy {
12
14
  get name(): string | undefined;
13
15
  get costDays(): number | undefined;
14
16
  get nightNum(): number | undefined;
17
+ get minOrderCount(): number;
18
+ get type(): ComboTypeEnum;
15
19
  }
16
20
  declare class ComboInfoProxyV2 extends ComboInfoProxy {
17
21
  private readonly orderComboInfo;
@@ -20,6 +24,8 @@ declare class ComboInfoProxyV2 extends ComboInfoProxy {
20
24
  get name(): string;
21
25
  get costDays(): number;
22
26
  get nightNum(): number;
27
+ get minOrderCount(): number | undefined;
28
+ get type(): ComboTypeEnum;
23
29
  }
24
30
  export declare function createComboInfoProxy(orderComboInfo: PosDto.IPositiveOrderComboInfo | PosDto.IPositiveSkuInfo, version: 'V1' | 'V2'): ComboInfoProxyV1 | ComboInfoProxyV2;
25
31
  export {};
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createComboInfoProxy = exports.ComboInfoProxy = void 0;
4
+ const pos_1 = require("vitality-meta/enums/pos");
4
5
  class ComboInfoProxy {
5
6
  }
6
7
  exports.ComboInfoProxy = ComboInfoProxy;
@@ -14,6 +15,8 @@ class ComboInfoProxyV1 extends ComboInfoProxy {
14
15
  get name() { return this.orderComboInfo.combo; }
15
16
  get costDays() { return this.orderComboInfo.costDays; }
16
17
  get nightNum() { return this.orderComboInfo.costDays ? this.orderComboInfo.costDays - 1 : undefined; }
18
+ get minOrderCount() { return this.orderComboInfo.minOrderQuantity; }
19
+ get type() { return pos_1.ComboTypeEnum.BASIC; }
17
20
  }
18
21
  class ComboInfoProxyV2 extends ComboInfoProxy {
19
22
  constructor(orderComboInfo) {
@@ -25,6 +28,8 @@ class ComboInfoProxyV2 extends ComboInfoProxy {
25
28
  get name() { return this.orderComboInfo.comboInfo.name; }
26
29
  get costDays() { return this.orderComboInfo.comboInfo.nightNum + 1; }
27
30
  get nightNum() { return this.orderComboInfo.comboInfo.nightNum; }
31
+ get minOrderCount() { return 'minOrderCount' in this.orderComboInfo.comboInfo ? this.orderComboInfo.comboInfo.minOrderCount : undefined; }
32
+ get type() { return this.orderComboInfo.type; }
28
33
  }
29
34
  function createComboInfoProxy(orderComboInfo, version) {
30
35
  if (version === 'V2')