@vita-mojo/types 1.0.26 → 1.0.27
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 +1 -1
- package/src/order/bill-v2.d.ts +75 -0
- package/src/order/bill-v2.js +3 -0
- package/src/order/bill-v2.js.map +1 -0
- package/src/order/index.d.ts +2 -1
- package/src/order/index.js +2 -1
- package/src/order/index.js.map +1 -1
- package/src/order/payment.d.ts +2 -0
package/package.json
CHANGED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
export interface BillV2 {
|
|
2
|
+
uuid: string;
|
|
3
|
+
/**
|
|
4
|
+
* Selected cover/items total amount including service charge.
|
|
5
|
+
*/
|
|
6
|
+
selectedAmount: number;
|
|
7
|
+
/**
|
|
8
|
+
* Selected splits by cover (uuid). These are autogenerated when you select covers to pay
|
|
9
|
+
*/
|
|
10
|
+
selectedSplits?: Split[];
|
|
11
|
+
/**
|
|
12
|
+
* This is only present if you make the changes to the splits from UI. Subsequent transactions will have it missing
|
|
13
|
+
* @default undefined
|
|
14
|
+
*/
|
|
15
|
+
splitProposal?: {
|
|
16
|
+
/**
|
|
17
|
+
* This is the remaining amount to pay at the time of the transaction. It indicates the willingness to split this amount by N ways
|
|
18
|
+
*/
|
|
19
|
+
amount: number;
|
|
20
|
+
/**
|
|
21
|
+
* Desired number of splits
|
|
22
|
+
*/
|
|
23
|
+
splits: number;
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Total amount of the order including service charge at the time of the transaction. It will help to understand if order total changed after the transaction and reset the cover proposal flow
|
|
27
|
+
*/
|
|
28
|
+
totalOrderValue: number;
|
|
29
|
+
/**
|
|
30
|
+
* Total service charge for the bill
|
|
31
|
+
* @default 0
|
|
32
|
+
*/
|
|
33
|
+
serviceCharge?: number;
|
|
34
|
+
/**
|
|
35
|
+
* Indicates if this bill is partially paid or not
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
partiallyPaid?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Empty in case of pay by cover
|
|
41
|
+
*/
|
|
42
|
+
bundles?: BillBundleV2[];
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* This is part of pay by item feature. Each bundle has splits and each split can be either fully or partially paid
|
|
46
|
+
*/
|
|
47
|
+
export interface BillBundleV2 {
|
|
48
|
+
/**
|
|
49
|
+
* Basket bundle uuid
|
|
50
|
+
*/
|
|
51
|
+
uuid: string;
|
|
52
|
+
/**
|
|
53
|
+
* Exact amount paid for this bundle; this is already distributed amount. If you sum up all bundles amount you must get selectedAmount
|
|
54
|
+
*/
|
|
55
|
+
amount: number;
|
|
56
|
+
/**
|
|
57
|
+
* Selected splits by item. In case of full payment, this is empty. These are dynamically generated when you select items to pay
|
|
58
|
+
*/
|
|
59
|
+
selectedSplits?: Split[];
|
|
60
|
+
/**
|
|
61
|
+
* Total splits made on this bundle
|
|
62
|
+
*/
|
|
63
|
+
splits?: number;
|
|
64
|
+
}
|
|
65
|
+
export interface Split {
|
|
66
|
+
/**
|
|
67
|
+
* Split amount. This is not amount paid but rather the total split value
|
|
68
|
+
*/
|
|
69
|
+
amount: number;
|
|
70
|
+
uuid: string;
|
|
71
|
+
/**
|
|
72
|
+
* Total value of the split. Useful to understand how much is left to pay for it
|
|
73
|
+
*/
|
|
74
|
+
splitValue: number;
|
|
75
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bill-v2.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/bill-v2.ts"],"names":[],"mappings":""}
|
package/src/order/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export * from './bill';
|
|
2
|
+
export * from './bill-v2';
|
|
1
3
|
export * as Bundle from './bundle';
|
|
2
4
|
export * as Fiscalization from './fiscalization';
|
|
3
5
|
export * as Item from './item';
|
|
@@ -11,5 +13,4 @@ export * from './promotion';
|
|
|
11
13
|
export * from './settings';
|
|
12
14
|
export * as Subway from './subway';
|
|
13
15
|
export * from './tenant-settings';
|
|
14
|
-
export * from './bill';
|
|
15
16
|
export { Type } from './type';
|
package/src/order/index.js
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Subway = exports.Payment = exports.Item = exports.Fiscalization = exports.Bundle = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./bill"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./bill-v2"), exports);
|
|
5
7
|
exports.Bundle = require("./bundle");
|
|
6
8
|
exports.Fiscalization = require("./fiscalization");
|
|
7
9
|
exports.Item = require("./item");
|
|
@@ -13,5 +15,4 @@ tslib_1.__exportStar(require("./promotion"), exports);
|
|
|
13
15
|
tslib_1.__exportStar(require("./settings"), exports);
|
|
14
16
|
exports.Subway = require("./subway");
|
|
15
17
|
tslib_1.__exportStar(require("./tenant-settings"), exports);
|
|
16
|
-
tslib_1.__exportStar(require("./bill"), exports);
|
|
17
18
|
//# sourceMappingURL=index.js.map
|
package/src/order/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/index.ts"],"names":[],"mappings":";;;;AAAA,qCAAmC;AACnC,mDAAiD;AACjD,iCAA+B;AAG/B,uDAA6B;AAC7B,kEAAwC;AACxC,uCAAqC;AACrC,sDAA4B;AAC5B,sDAA4B;AAC5B,qDAA2B;AAC3B,qCAAmC;AACnC,4DAAkC
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/types/src/order/index.ts"],"names":[],"mappings":";;;;AAAA,iDAAuB;AACvB,oDAA0B;AAC1B,qCAAmC;AACnC,mDAAiD;AACjD,iCAA+B;AAG/B,uDAA6B;AAC7B,kEAAwC;AACxC,uCAAqC;AACrC,sDAA4B;AAC5B,sDAA4B;AAC5B,qDAA2B;AAC3B,qCAAmC;AACnC,4DAAkC"}
|