@trusted-solutions/sdit.models 0.18.0-alpha.7 → 0.19.0-alpha.0

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.
Files changed (79) hide show
  1. package/constants/client-endpoints.d.ts +7 -0
  2. package/constants/client-endpoints.js +11 -0
  3. package/constants/client-endpoints.js.map +1 -0
  4. package/constants/index.d.ts +1 -0
  5. package/constants/index.js +1 -0
  6. package/constants/index.js.map +1 -1
  7. package/data-service/config.d.ts +8 -3
  8. package/data-service/config.js +81 -0
  9. package/data-service/config.js.map +1 -1
  10. package/data-service/enum.d.ts +5 -1
  11. package/data-service/enum.js +5 -0
  12. package/data-service/enum.js.map +1 -1
  13. package/data-service/model.js +1 -0
  14. package/data-service/model.js.map +1 -1
  15. package/enums/printer.d.ts +21 -0
  16. package/enums/printer.js +21 -0
  17. package/enums/printer.js.map +1 -1
  18. package/enums/real-time-switch-type.d.ts +2 -1
  19. package/enums/real-time-switch-type.js +1 -0
  20. package/enums/real-time-switch-type.js.map +1 -1
  21. package/lambda/contract.d.ts +11 -0
  22. package/lambda/contract.js +3 -0
  23. package/lambda/contract.js.map +1 -0
  24. package/lambda/online-ordering.d.ts +27 -10
  25. package/lambda/request/real-time-switch.d.ts +12 -3
  26. package/lambda/request/store.d.ts +1 -0
  27. package/models/contract.d.ts +143 -0
  28. package/models/contract.js +10 -0
  29. package/models/contract.js.map +1 -0
  30. package/models/menu.d.ts +11 -1
  31. package/models/online-integration.d.ts +1 -0
  32. package/models/online-integration.js +1 -0
  33. package/models/online-integration.js.map +1 -1
  34. package/models/online-ordering.d.ts +5 -1
  35. package/models/online-ordering.js +1 -0
  36. package/models/online-ordering.js.map +1 -1
  37. package/models/order.d.ts +8 -4
  38. package/models/payment-config.d.ts +2 -2
  39. package/models/plugin/intent-handler/intent-handler-request.d.ts +3 -0
  40. package/models/plugin/intent-handler/intent-handler-response.d.ts +3 -0
  41. package/models/plugin/payment-machine/models/fixed-string.model.d.ts +3 -0
  42. package/models/plugin/payment-machine/models/fixed-string.model.js +3 -0
  43. package/models/plugin/payment-machine/models/fixed-string.model.js.map +1 -1
  44. package/models/plugin/payment-machine/models/nccc/payment-machine-d200.model.d.ts +12 -0
  45. package/models/plugin/payment-machine/models/nccc/payment-machine-d200.model.js +12 -0
  46. package/models/plugin/payment-machine/models/nccc/payment-machine-d200.model.js.map +1 -1
  47. package/models/plugin/payment-machine/models/nccc/payment-machine-v3p.model.d.ts +12 -0
  48. package/models/plugin/payment-machine/models/nccc/payment-machine-v3p.model.js +12 -0
  49. package/models/plugin/payment-machine/models/nccc/payment-machine-v3p.model.js.map +1 -1
  50. package/models/plugin/payment-machine/models/nccc/payment-machine-vx520.model.d.ts +12 -0
  51. package/models/plugin/payment-machine/models/nccc/payment-machine-vx520.model.js +12 -0
  52. package/models/plugin/payment-machine/models/nccc/payment-machine-vx520.model.js.map +1 -1
  53. package/models/plugin/payment-machine/models/payment-machine-minimum.model.d.ts +12 -0
  54. package/models/plugin/payment-machine/models/payment-machine-minimum.model.js +12 -0
  55. package/models/plugin/payment-machine/models/payment-machine-minimum.model.js.map +1 -1
  56. package/models/plugin/payment-machine/models/payment-machine-union.model.d.ts +6 -0
  57. package/models/plugin/payment-machine/models/payment-machine-union.model.js +3 -0
  58. package/models/plugin/payment-machine/models/payment-machine-union.model.js.map +1 -1
  59. package/models/plugin/payment-machine/models/tsb/payment-machine-d220.model.d.ts +12 -0
  60. package/models/plugin/payment-machine/models/tsb/payment-machine-d220.model.js +12 -0
  61. package/models/plugin/payment-machine/models/tsb/payment-machine-d220.model.js.map +1 -1
  62. package/models/plugin/payment-machine/payment-machine-request.d.ts +3 -0
  63. package/models/plugin/payment-machine/payment-machine.d.ts +9 -0
  64. package/models/plugin/payment-machine/payment-machine.js +9 -0
  65. package/models/plugin/payment-machine/payment-machine.js.map +1 -1
  66. package/models/plugin/peripheral.model.d.ts +15 -0
  67. package/models/plugin/peripheral.model.js +9 -0
  68. package/models/plugin/peripheral.model.js.map +1 -1
  69. package/models/plugin/printer/printer-request.d.ts +6 -0
  70. package/models/plugin/printer/printer.d.ts +24 -0
  71. package/models/plugin/printer/printer.js +3 -0
  72. package/models/plugin/printer/printer.js.map +1 -1
  73. package/models/plugin/serial-port/serial-port-request.d.ts +3 -0
  74. package/models/plugin/serial-port/serial-port.d.ts +6 -0
  75. package/models/plugin/serial-port/serial-port.js +6 -0
  76. package/models/plugin/serial-port/serial-port.js.map +1 -1
  77. package/models/receipt.d.ts +5 -1
  78. package/models/store.d.ts +11 -2
  79. package/package.json +1 -1
@@ -1,5 +1,8 @@
1
1
  import { Justification, PaperHeight, PaperWidth, PrinterInstructionType } from '../../../enums';
2
2
  import { PeripheralEventType } from '../peripheral.model';
3
+ /**
4
+ * @Deprecated - Please import from HAL
5
+ */
3
6
  export interface PrinterTaskRequest {
4
7
  id: string;
5
8
  data: {
@@ -21,11 +24,17 @@ export interface PrinterTaskRequest {
21
24
  [key: string]: any;
22
25
  };
23
26
  }
27
+ /**
28
+ * @Deprecated - Please import from HAL
29
+ */
24
30
  export interface PrinterTaskResponse extends PrinterTaskRequest {
25
31
  isSuccess: boolean;
26
32
  errorCode: number;
27
33
  message?: string;
28
34
  }
35
+ /**
36
+ * @Deprecated - Please import from HAL
37
+ */
29
38
  export interface BatchPrintRequest {
30
39
  id: string;
31
40
  connectConfig: PrintConnectConfig;
@@ -39,9 +48,15 @@ export interface BatchPrintRequest {
39
48
  [key: string]: any;
40
49
  };
41
50
  }
51
+ /**
52
+ * @Deprecated - Please import from HAL
53
+ */
42
54
  export interface BatchPrintRequestPayload {
43
55
  batchPrintRequests: BatchPrintRequest[];
44
56
  }
57
+ /**
58
+ * @Deprecated - Please import from HAL
59
+ */
45
60
  export interface BatchPrintResponse {
46
61
  id: string;
47
62
  isSuccess: boolean;
@@ -49,10 +64,16 @@ export interface BatchPrintResponse {
49
64
  errorMsg?: string;
50
65
  transportEventType: PeripheralEventType;
51
66
  }
67
+ /**
68
+ * @Deprecated - Please import from HAL
69
+ */
52
70
  export declare enum PrinterActionEnum {
53
71
  printHtml = 0,
54
72
  openCashDrawer = 1
55
73
  }
74
+ /**
75
+ * @Deprecated - Please import from HAL
76
+ */
56
77
  export interface PrintConnectConfig {
57
78
  ip?: string;
58
79
  vendorId?: number;
@@ -63,6 +84,9 @@ export interface PrintConnectConfig {
63
84
  paperHeight?: PaperHeight;
64
85
  justification?: Justification;
65
86
  }
87
+ /**
88
+ * @Deprecated - Please import from HAL
89
+ */
66
90
  export interface PrintData {
67
91
  htmlString: string;
68
92
  }
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.PrinterActionEnum = void 0;
4
+ /**
5
+ * @Deprecated - Please import from HAL
6
+ */
4
7
  var PrinterActionEnum;
5
8
  (function (PrinterActionEnum) {
6
9
  PrinterActionEnum[PrinterActionEnum["printHtml"] = 0] = "printHtml";
@@ -1 +1 @@
1
- {"version":3,"file":"printer.js","sourceRoot":"","sources":["../../../../../projects/sdit-model-lib/src/models/plugin/printer/printer.ts"],"names":[],"mappings":";;;AA0DA,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,mEAAS,CAAA;IACT,6EAAc,CAAA;AAChB,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B"}
1
+ {"version":3,"file":"printer.js","sourceRoot":"","sources":["../../../../../projects/sdit-model-lib/src/models/plugin/printer/printer.ts"],"names":[],"mappings":";;;AAyEA;;GAEG;AACH,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,mEAAS,CAAA;IACT,6EAAc,CAAA;AAChB,CAAC,EAHW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAG5B"}
@@ -1,4 +1,7 @@
1
1
  import { SupportedEncodings, SupportedDrivers } from './serial-port';
2
+ /**
3
+ * @Deprecated - Please import from HAL
4
+ */
2
5
  export interface SerialPortConnectRequest {
3
6
  comPortName?: string;
4
7
  vendorId?: number;
@@ -1,7 +1,13 @@
1
+ /**
2
+ * @Deprecated - Please import from HAL
3
+ */
1
4
  export declare enum SupportedEncodings {
2
5
  big5 = "Big5",
3
6
  utf8 = "UTF8"
4
7
  }
8
+ /**
9
+ * @Deprecated - Please import from HAL
10
+ */
5
11
  export declare enum SupportedDrivers {
6
12
  cdcAcm = "cdcAcm",
7
13
  ftdi = "ftdi",
@@ -1,11 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SupportedDrivers = exports.SupportedEncodings = void 0;
4
+ /**
5
+ * @Deprecated - Please import from HAL
6
+ */
4
7
  var SupportedEncodings;
5
8
  (function (SupportedEncodings) {
6
9
  SupportedEncodings["big5"] = "Big5";
7
10
  SupportedEncodings["utf8"] = "UTF8";
8
11
  })(SupportedEncodings = exports.SupportedEncodings || (exports.SupportedEncodings = {}));
12
+ /**
13
+ * @Deprecated - Please import from HAL
14
+ */
9
15
  var SupportedDrivers;
10
16
  (function (SupportedDrivers) {
11
17
  SupportedDrivers["cdcAcm"] = "cdcAcm";
@@ -1 +1 @@
1
- {"version":3,"file":"serial-port.js","sourceRoot":"","sources":["../../../../../projects/sdit-model-lib/src/models/plugin/serial-port/serial-port.ts"],"names":[],"mappings":";;;AAAA,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAED,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,qCAAwB,CAAA;IACxB,iCAAsB,CAAA;IACtB,yCAA0B,CAAA;IAC1B,mDAA+B,CAAA;IAC/B,uCAAyB,CAAA;AAC3B,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B"}
1
+ {"version":3,"file":"serial-port.js","sourceRoot":"","sources":["../../../../../projects/sdit-model-lib/src/models/plugin/serial-port/serial-port.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,mCAAa,CAAA;IACb,mCAAa,CAAA;AACf,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAED;;GAEG;AACH,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,qCAAwB,CAAA;IACxB,iCAAsB,CAAA;IACtB,yCAA0B,CAAA;IAC1B,mDAA+B,CAAA;IAC/B,uCAAyB,CAAA;AAC3B,CAAC,EANW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAM3B"}
@@ -8,7 +8,11 @@ export interface Receipt {
8
8
  id: string;
9
9
  /** Copy `invoiceConfig` from `Store` */
10
10
  invoiceConfig: InvoiceConfig;
11
- /** 此訂單來自線上點餐XX平台 */
11
+ /**
12
+ * 有值代表「線上訂單 & 線上付款」。
13
+ * 若是「線上訂單 & 線上付款」,會走線上取消訂單並退款流程。
14
+ * 若是「現場付款」,則會走現場退款流程。
15
+ */
12
16
  onlinePlatformType?: OnlinePlatformType;
13
17
  /** 外部線上點餐平台訂單ID */
14
18
  onlinePlatformOrderId?: string;
package/models/store.d.ts CHANGED
@@ -40,6 +40,9 @@ export interface Store {
40
40
  */
41
41
  kioskPaymentConfigs?: PaymentConfig[];
42
42
  /**
43
+ * @readonly
44
+ * 使用 lambda func `realTimeSwitch` 來更新此 property
45
+ *
43
46
  * if value is undefined, default value regarding as a
44
47
  * ```
45
48
  * {
@@ -60,6 +63,10 @@ export interface Store {
60
63
  * ```
61
64
  */
62
65
  customerConfig?: CustomerConfig;
66
+ /**
67
+ * @readonly
68
+ * 使用 lambda func `realTimeSwitch` 來更新此 property
69
+ */
63
70
  kioskDisabled?: boolean;
64
71
  flowConfig?: FlowConfig;
65
72
  multiplePaymentConfigs?: MultiplePaymentConfig[];
@@ -123,9 +130,11 @@ export interface Store {
123
130
  */
124
131
  onlineBuyerIdInputHidden?: boolean;
125
132
  /**
126
- * 線上店是否營業中可接單
133
+ * 暫時停止營業直到onlineUntilOpen (時間戳記)
134
+ * 設很久(約100年後)為永久停業; null的話,看openingHours判斷是否營業中
135
+ * 使用 lambda func `realTimeSwitch` 來更新此 property
127
136
  */
128
- onlineIsOpen?: boolean;
137
+ onlineUntilOpen?: number;
129
138
  /**
130
139
  * 是否使用線上點餐
131
140
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trusted-solutions/sdit.models",
3
- "version": "0.18.0-alpha.7",
3
+ "version": "0.19.0-alpha.0",
4
4
  "description": "TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.",
5
5
  "main": "index.js",
6
6
  "scripts": {