@trusted-solutions/sdit.models 0.17.0-alpha.7 → 0.18.0-alpha.4
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/enums/event.d.ts +2 -1
- package/enums/event.js +1 -0
- package/enums/event.js.map +1 -1
- package/enums/printer.d.ts +7 -1
- package/enums/printer.js +9 -1
- package/enums/printer.js.map +1 -1
- package/lambda/index.d.ts +1 -0
- package/lambda/index.js +1 -0
- package/lambda/index.js.map +1 -1
- package/lambda/line-notify.d.ts +8 -0
- package/lambda/line-notify.js +5 -0
- package/lambda/line-notify.js.map +1 -0
- package/lambda/online-ordering.d.ts +0 -4
- package/models/online-ordering.d.ts +2 -0
- package/models/online-ordering.js.map +1 -1
- package/models/plugin/printer/printer-request.d.ts +1 -1
- package/models/plugin/printer/printer.d.ts +38 -13
- package/models/plugin/printer/printer.js +1 -18
- package/models/plugin/printer/printer.js.map +1 -1
- package/models/printer.d.ts +2 -2
- package/package.json +1 -1
package/enums/event.d.ts
CHANGED
|
@@ -9,7 +9,8 @@ export declare enum EventNameEnum {
|
|
|
9
9
|
aggregateOrder = "aggregateOrder",
|
|
10
10
|
aggregateClosing = "aggregateClosing",
|
|
11
11
|
putInventory = "putInventory",
|
|
12
|
-
aggregateInventory = "aggregateInventory"
|
|
12
|
+
aggregateInventory = "aggregateInventory",
|
|
13
|
+
putReceipt = "putReceipt"
|
|
13
14
|
}
|
|
14
15
|
export declare enum EventEntityTypeEnum {
|
|
15
16
|
order = "order",
|
package/enums/event.js
CHANGED
|
@@ -14,6 +14,7 @@ var EventNameEnum;
|
|
|
14
14
|
EventNameEnum["aggregateClosing"] = "aggregateClosing";
|
|
15
15
|
EventNameEnum["putInventory"] = "putInventory";
|
|
16
16
|
EventNameEnum["aggregateInventory"] = "aggregateInventory";
|
|
17
|
+
EventNameEnum["putReceipt"] = "putReceipt";
|
|
17
18
|
})(EventNameEnum = exports.EventNameEnum || (exports.EventNameEnum = {}));
|
|
18
19
|
var EventEntityTypeEnum;
|
|
19
20
|
(function (EventEntityTypeEnum) {
|
package/enums/event.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/enums/event.ts"],"names":[],"mappings":";;;AAAA,IAAY,
|
|
1
|
+
{"version":3,"file":"event.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/enums/event.ts"],"names":[],"mappings":";;;AAAA,IAAY,aAaX;AAbD,WAAY,aAAa;IACrB,kEAAiD,CAAA;IACjD,sEAAqD,CAAA;IACrD,0EAAyD,CAAA;IACzD,sDAAqC,CAAA;IACrC,8DAA6C,CAAA;IAC7C,0EAAyD,CAAA;IACzD,0DAAyC,CAAA;IACzC,kDAAiC,CAAA;IACjC,sDAAqC,CAAA;IACrC,8CAA6B,CAAA;IAC7B,0DAAyC,CAAA;IACzC,0CAAyB,CAAA;AAC7B,CAAC,EAbW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAaxB;AAED,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,sCAAe,CAAA;IACf,0CAAmB,CAAA;AACvB,CAAC,EAHW,mBAAmB,GAAnB,2BAAmB,KAAnB,2BAAmB,QAG9B;AAED,IAAY,eAGX;AAHD,WAAY,eAAe;IACvB,0CAAuB,CAAA;IACvB,oCAAiB,CAAA;AACrB,CAAC,EAHW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAG1B;AAED,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,uCAAyB,CAAA;IACzB,2CAA6B,CAAA;AACjC,CAAC,EAHW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAGrB"}
|
package/enums/printer.d.ts
CHANGED
|
@@ -5,7 +5,13 @@ export declare enum PrinterInstructionType {
|
|
|
5
5
|
export declare enum PaperWidth {
|
|
6
6
|
width3_5 = 0,
|
|
7
7
|
width5_7 = 1,
|
|
8
|
-
width8_0 = 2
|
|
8
|
+
width8_0 = 2,
|
|
9
|
+
width4_0 = 3
|
|
10
|
+
}
|
|
11
|
+
export declare enum PaperHeight {
|
|
12
|
+
unset = 0,
|
|
13
|
+
height2_5 = 1,
|
|
14
|
+
height3_0 = 2
|
|
9
15
|
}
|
|
10
16
|
export declare enum Justification {
|
|
11
17
|
left = 0,
|
package/enums/printer.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServeTypeAndFloorExcludeType = exports.SplitMethodEnum = exports.PrintingRuleType = exports.Justification = exports.PaperWidth = exports.PrinterInstructionType = void 0;
|
|
3
|
+
exports.ServeTypeAndFloorExcludeType = exports.SplitMethodEnum = exports.PrintingRuleType = exports.Justification = exports.PaperHeight = exports.PaperWidth = exports.PrinterInstructionType = void 0;
|
|
4
4
|
var PrinterInstructionType;
|
|
5
5
|
(function (PrinterInstructionType) {
|
|
6
6
|
PrinterInstructionType[PrinterInstructionType["ESC"] = 0] = "ESC";
|
|
@@ -11,7 +11,15 @@ var PaperWidth;
|
|
|
11
11
|
PaperWidth[PaperWidth["width3_5"] = 0] = "width3_5";
|
|
12
12
|
PaperWidth[PaperWidth["width5_7"] = 1] = "width5_7";
|
|
13
13
|
PaperWidth[PaperWidth["width8_0"] = 2] = "width8_0";
|
|
14
|
+
// Due to data stored in DB, new enum should only be placed to the bottom.
|
|
15
|
+
PaperWidth[PaperWidth["width4_0"] = 3] = "width4_0";
|
|
14
16
|
})(PaperWidth = exports.PaperWidth || (exports.PaperWidth = {}));
|
|
17
|
+
var PaperHeight;
|
|
18
|
+
(function (PaperHeight) {
|
|
19
|
+
PaperHeight[PaperHeight["unset"] = 0] = "unset";
|
|
20
|
+
PaperHeight[PaperHeight["height2_5"] = 1] = "height2_5";
|
|
21
|
+
PaperHeight[PaperHeight["height3_0"] = 2] = "height3_0";
|
|
22
|
+
})(PaperHeight = exports.PaperHeight || (exports.PaperHeight = {}));
|
|
15
23
|
var Justification;
|
|
16
24
|
(function (Justification) {
|
|
17
25
|
Justification[Justification["left"] = 0] = "left";
|
package/enums/printer.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"printer.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/enums/printer.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;
|
|
1
|
+
{"version":3,"file":"printer.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/enums/printer.ts"],"names":[],"mappings":";;;AAAA,IAAY,sBAGX;AAHD,WAAY,sBAAsB;IAChC,iEAAO,CAAA;IACP,mEAAQ,CAAA;AACV,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC;AAED,IAAY,UAMX;AAND,WAAY,UAAU;IACpB,mDAAY,CAAA;IACZ,mDAAY,CAAA;IACZ,mDAAY,CAAA;IACZ,0EAA0E;IAC1E,mDAAY,CAAA;AACd,CAAC,EANW,UAAU,GAAV,kBAAU,KAAV,kBAAU,QAMrB;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,+CAAS,CAAA;IACT,uDAAa,CAAA;IACb,uDAAa,CAAA;AACf,CAAC,EAJW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAItB;AAED,IAAY,aAIX;AAJD,WAAY,aAAa;IACvB,iDAAQ,CAAA;IACR,yDAAY,CAAA;IACZ,mDAAS,CAAA;AACX,CAAC,EAJW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAIxB;AAED,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;AACrB,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAED,IAAY,eAKX;AALD,WAAY,eAAe;IACzB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,wCAAqB,CAAA;IACrB,4CAAyB,CAAA;AAC3B,CAAC,EALW,eAAe,GAAf,uBAAe,KAAf,uBAAe,QAK1B;AAED,IAAY,4BAGX;AAHD,WAAY,4BAA4B;IACtC,mDAAmB,CAAA;IACnB,uDAAuB,CAAA;AACzB,CAAC,EAHW,4BAA4B,GAA5B,oCAA4B,KAA5B,oCAA4B,QAGvC"}
|
package/lambda/index.d.ts
CHANGED
package/lambda/index.js
CHANGED
|
@@ -6,4 +6,5 @@ tslib_1.__exportStar(require("./request"), exports);
|
|
|
6
6
|
tslib_1.__exportStar(require("./response"), exports);
|
|
7
7
|
tslib_1.__exportStar(require("./online-integration"), exports);
|
|
8
8
|
tslib_1.__exportStar(require("./online-ordering"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./line-notify"), exports);
|
|
9
10
|
//# sourceMappingURL=index.js.map
|
package/lambda/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,oDAA0B;AAC1B,qDAA2B;AAG3B,+DAAqC;AACrC,4DAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/index.ts"],"names":[],"mappings":";;;AAAA,kDAAwB;AACxB,oDAA0B;AAC1B,qDAA2B;AAG3B,+DAAqC;AACrC,4DAAkC;AAElC,wDAA8B"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*******************************/
|
|
2
|
+
/*******************************/
|
|
3
|
+
export interface AuthLineNotifyAccessTokenRequest {
|
|
4
|
+
redirectUrl: string;
|
|
5
|
+
code: string;
|
|
6
|
+
}
|
|
7
|
+
export declare type AuthLineNotifyAccessTokenResponse = null;
|
|
8
|
+
export declare const COGNITO_LINE_NOTIFY_TOKEN_ATTR = "custom:line_notify_token";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"line-notify.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/lambda/line-notify.ts"],"names":[],"mappings":";;;AAUa,QAAA,8BAA8B,GAAG,0BAA0B,CAAC"}
|
|
@@ -129,6 +129,8 @@ export interface SOValidateCart {
|
|
|
129
129
|
export interface SOValidateCartItem {
|
|
130
130
|
/** 前端決定 cart item Id (timestamp ms) */
|
|
131
131
|
id: string;
|
|
132
|
+
/** 此品項由哪一個菜單id加入購物車 */
|
|
133
|
+
menuId: string;
|
|
132
134
|
productCategoryId: string;
|
|
133
135
|
productId: string;
|
|
134
136
|
/** 原單價 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,mDAA+B,CAAA;IAC/B,uDAAmC,CAAA;IACnC,uDAAmC,CAAA;AACrC,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAgDD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAkFD,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,sDAAmB,CAAA;IACnB,kEAA+B,CAAA;AACjC,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;
|
|
1
|
+
{"version":3,"file":"online-ordering.js","sourceRoot":"","sources":["../../../projects/sdit-model-lib/src/models/online-ordering.ts"],"names":[],"mappings":";;;AAeA,IAAY,gBAKX;AALD,WAAY,gBAAgB;IAC1B,+CAA2B,CAAA;IAC3B,mDAA+B,CAAA;IAC/B,uDAAmC,CAAA;IACnC,uDAAmC,CAAA;AACrC,CAAC,EALW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAK3B;AAgDD,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,iCAAe,CAAA;AACjB,CAAC,EAHW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAGzB;AAkFD,IAAY,+BAGX;AAHD,WAAY,+BAA+B;IACzC,sDAAmB,CAAA;IACnB,kEAA+B,CAAA;AACjC,CAAC,EAHW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAG1C;AA8BD,IAAY,YAMX;AAND,WAAY,YAAY;IACtB,mCAAmB,CAAA;IACnB,qCAAqB,CAAA;IACrB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,qCAAqB,CAAA;AACvB,CAAC,EANW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAMvB"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
+
import { Justification, PaperHeight, PaperWidth, PrinterInstructionType } from '../../../enums';
|
|
2
|
+
import { PeripheralEventType } from '../peripheral.model';
|
|
1
3
|
export interface PrinterTaskRequest {
|
|
2
4
|
id: string;
|
|
3
5
|
data: {
|
|
4
6
|
htmlString: string;
|
|
5
7
|
paperWidth: PaperWidth;
|
|
8
|
+
paperHeight?: PaperHeight;
|
|
6
9
|
justification?: Justification;
|
|
7
10
|
};
|
|
8
11
|
ip?: string;
|
|
@@ -12,7 +15,7 @@ export interface PrinterTaskRequest {
|
|
|
12
15
|
printerInstructionType?: PrinterInstructionType;
|
|
13
16
|
meta?: {
|
|
14
17
|
virtualPrinterId?: string;
|
|
15
|
-
|
|
18
|
+
printingRuleId?: string;
|
|
16
19
|
orderId?: string;
|
|
17
20
|
receiptId?: string;
|
|
18
21
|
[key: string]: any;
|
|
@@ -23,21 +26,43 @@ export interface PrinterTaskResponse extends PrinterTaskRequest {
|
|
|
23
26
|
errorCode: number;
|
|
24
27
|
message?: string;
|
|
25
28
|
}
|
|
29
|
+
export interface BatchPrintRequest {
|
|
30
|
+
id: string;
|
|
31
|
+
connectConfig: PrintConnectConfig;
|
|
32
|
+
data: PrintData[];
|
|
33
|
+
openDrawerAfterPrint?: boolean;
|
|
34
|
+
meta: {
|
|
35
|
+
virtualPrinterId?: string;
|
|
36
|
+
ruleId?: string;
|
|
37
|
+
orderId?: string;
|
|
38
|
+
receiptId?: string;
|
|
39
|
+
[key: string]: any;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
export interface BatchPrintRequestPayload {
|
|
43
|
+
batchPrintRequests: BatchPrintRequest[];
|
|
44
|
+
}
|
|
45
|
+
export interface BatchPrintResponse {
|
|
46
|
+
id: string;
|
|
47
|
+
isSuccess: boolean;
|
|
48
|
+
errorCode?: string;
|
|
49
|
+
errorMsg?: string;
|
|
50
|
+
transportEventType: PeripheralEventType;
|
|
51
|
+
}
|
|
26
52
|
export declare enum PrinterActionEnum {
|
|
27
53
|
printHtml = 0,
|
|
28
54
|
openCashDrawer = 1
|
|
29
55
|
}
|
|
30
|
-
export
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
56
|
+
export interface PrintConnectConfig {
|
|
57
|
+
ip?: string;
|
|
58
|
+
vendorId?: number;
|
|
59
|
+
productId?: number;
|
|
60
|
+
isInnerPrinter?: boolean;
|
|
61
|
+
printerInstructionType?: PrinterInstructionType;
|
|
62
|
+
paperWidth: PaperWidth;
|
|
63
|
+
paperHeight?: PaperHeight;
|
|
64
|
+
justification?: Justification;
|
|
38
65
|
}
|
|
39
|
-
export
|
|
40
|
-
|
|
41
|
-
centered = 1,
|
|
42
|
-
right = 2
|
|
66
|
+
export interface PrintData {
|
|
67
|
+
htmlString: string;
|
|
43
68
|
}
|
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.PrinterActionEnum = void 0;
|
|
4
4
|
var PrinterActionEnum;
|
|
5
5
|
(function (PrinterActionEnum) {
|
|
6
6
|
PrinterActionEnum[PrinterActionEnum["printHtml"] = 0] = "printHtml";
|
|
7
7
|
PrinterActionEnum[PrinterActionEnum["openCashDrawer"] = 1] = "openCashDrawer";
|
|
8
8
|
})(PrinterActionEnum = exports.PrinterActionEnum || (exports.PrinterActionEnum = {}));
|
|
9
|
-
var PrinterInstructionType;
|
|
10
|
-
(function (PrinterInstructionType) {
|
|
11
|
-
PrinterInstructionType[PrinterInstructionType["ESC"] = 0] = "ESC";
|
|
12
|
-
PrinterInstructionType[PrinterInstructionType["EZPL"] = 1] = "EZPL";
|
|
13
|
-
})(PrinterInstructionType = exports.PrinterInstructionType || (exports.PrinterInstructionType = {}));
|
|
14
|
-
var PaperWidth;
|
|
15
|
-
(function (PaperWidth) {
|
|
16
|
-
PaperWidth[PaperWidth["width3_5"] = 0] = "width3_5";
|
|
17
|
-
PaperWidth[PaperWidth["width5_7"] = 1] = "width5_7";
|
|
18
|
-
PaperWidth[PaperWidth["width8_0"] = 2] = "width8_0";
|
|
19
|
-
})(PaperWidth = exports.PaperWidth || (exports.PaperWidth = {}));
|
|
20
|
-
var Justification;
|
|
21
|
-
(function (Justification) {
|
|
22
|
-
Justification[Justification["left"] = 0] = "left";
|
|
23
|
-
Justification[Justification["centered"] = 1] = "centered";
|
|
24
|
-
Justification[Justification["right"] = 2] = "right";
|
|
25
|
-
})(Justification = exports.Justification || (exports.Justification = {}));
|
|
26
9
|
//# sourceMappingURL=printer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"printer.js","sourceRoot":"","sources":["../../../../../projects/sdit-model-lib/src/models/plugin/printer/printer.ts"],"names":[],"mappings":";;;
|
|
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"}
|
package/models/printer.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PrinterInstructionType, PrintingRuleType, SplitMethodEnum, PaperWidth, Justification, ServeTypeAndFloorExcludeType } from '../enums/printer';
|
|
1
|
+
import { PrinterInstructionType, PrintingRuleType, SplitMethodEnum, PaperWidth, Justification, ServeTypeAndFloorExcludeType, PaperHeight } from '../enums/printer';
|
|
2
2
|
import { ServeType } from '../enums/serve-type';
|
|
3
3
|
import { TypeValue } from './utils';
|
|
4
4
|
export interface VirtualPrinter {
|
|
@@ -7,7 +7,7 @@ export interface VirtualPrinter {
|
|
|
7
7
|
name: string;
|
|
8
8
|
instruction: PrinterInstructionType;
|
|
9
9
|
paperWidth: PaperWidth;
|
|
10
|
-
paperHeight?:
|
|
10
|
+
paperHeight?: PaperHeight;
|
|
11
11
|
justification: Justification;
|
|
12
12
|
enabled: boolean;
|
|
13
13
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trusted-solutions/sdit.models",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.18.0-alpha.4",
|
|
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": {
|