@managesome/eposmatic-toolkit 0.2.594 → 0.2.595
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.
|
@@ -6,24 +6,24 @@
|
|
|
6
6
|
* agree on the exact wire shape for these operations. Field semantics:
|
|
7
7
|
* - `staff_id` / `staff_name` are the operator performing the action.
|
|
8
8
|
* - `cash_amount` is in integer cents (POS converts decimal balances via
|
|
9
|
-
* `convertDecimalToInt`).
|
|
9
|
+
* `convertDecimalToInt`). It exists ONLY on the cash-drawer open (opening
|
|
10
|
+
* float) and close (counted cash) requests — every other lifecycle amount is
|
|
11
|
+
* backend-owned and derived server-side from the cash-drawer ledger.
|
|
10
12
|
* - `operational_time_zone_offset_gmt` is the tenant's UTC offset (hours) used
|
|
11
|
-
* to stamp the local-time fields
|
|
13
|
+
* to stamp the local-time fields — only where the client clock is trusted
|
|
14
|
+
* (shift open). Day open/reopen use the tenant's stored offset instead.
|
|
12
15
|
*/
|
|
13
16
|
export interface IOpenTenantDayRequestBody {
|
|
14
17
|
tenant_id: string;
|
|
15
18
|
staff_id: string;
|
|
16
19
|
staff_name: string;
|
|
17
20
|
note: string;
|
|
18
|
-
cash_amount: number;
|
|
19
|
-
operational_time_zone_offset_gmt: number;
|
|
20
21
|
}
|
|
21
22
|
export interface IReopenTenantDayRequestBody {
|
|
22
23
|
tenant_id: string;
|
|
23
24
|
staff_id: string;
|
|
24
25
|
staff_name: string;
|
|
25
26
|
note: string;
|
|
26
|
-
operational_time_zone_offset_gmt: number;
|
|
27
27
|
}
|
|
28
28
|
export interface ICloseTenantDayRequestBody {
|
|
29
29
|
tenant_id: string;
|
|
@@ -31,9 +31,6 @@ export interface ICloseTenantDayRequestBody {
|
|
|
31
31
|
staff_id: string;
|
|
32
32
|
staff_name: string;
|
|
33
33
|
note?: string;
|
|
34
|
-
cash_amount?: number;
|
|
35
|
-
expected_cash_amount?: number;
|
|
36
|
-
difference?: number;
|
|
37
34
|
cash_in_out_id?: string | null;
|
|
38
35
|
}
|
|
39
36
|
export interface IOpenInstoreShiftRequestBody {
|
|
@@ -43,7 +40,6 @@ export interface IOpenInstoreShiftRequestBody {
|
|
|
43
40
|
staff_id: string;
|
|
44
41
|
staff_name: string;
|
|
45
42
|
note?: string;
|
|
46
|
-
cash_amount?: number;
|
|
47
43
|
operational_time_zone_offset_gmt: number;
|
|
48
44
|
}
|
|
49
45
|
export interface ICloseInstoreShiftRequestBody {
|
|
@@ -52,16 +48,6 @@ export interface ICloseInstoreShiftRequestBody {
|
|
|
52
48
|
staff_id: string;
|
|
53
49
|
staff_name: string;
|
|
54
50
|
note?: string;
|
|
55
|
-
cash_amount?: number;
|
|
56
|
-
/**
|
|
57
|
-
* Client-computed shift totals — kept for compatibility; the backend
|
|
58
|
-
* recomputes these server-side from the ledger and ignores client values.
|
|
59
|
-
*/
|
|
60
|
-
cash_in_total?: number;
|
|
61
|
-
cash_out_total?: number;
|
|
62
|
-
expected_drawer_total?: number;
|
|
63
|
-
actual_drawer_total?: number;
|
|
64
|
-
difference?: number;
|
|
65
51
|
}
|
|
66
52
|
export interface IReopenInstoreShiftRequestBody {
|
|
67
53
|
tenant_id: string;
|
|
@@ -69,7 +55,6 @@ export interface IReopenInstoreShiftRequestBody {
|
|
|
69
55
|
staff_id: string;
|
|
70
56
|
staff_name: string;
|
|
71
57
|
note?: string;
|
|
72
|
-
cash_amount?: number;
|
|
73
58
|
}
|
|
74
59
|
export interface IOpenCashDrawerSessionRequestBody {
|
|
75
60
|
tenant_id: string;
|
|
@@ -79,6 +64,11 @@ export interface IOpenCashDrawerSessionRequestBody {
|
|
|
79
64
|
staff_id: string;
|
|
80
65
|
staff_name: string;
|
|
81
66
|
note?: string;
|
|
67
|
+
/**
|
|
68
|
+
* The opening float counted into the drawer — one of the two places
|
|
69
|
+
* `cash_amount` is meaningful (the other is the drawer close count).
|
|
70
|
+
* The backend accumulates it into the day/shift opening totals.
|
|
71
|
+
*/
|
|
82
72
|
cash_amount?: number;
|
|
83
73
|
denominations?: Record<string, number>;
|
|
84
74
|
}
|
|
@@ -87,6 +77,13 @@ export interface ICloseCashDrawerSessionRequestBody {
|
|
|
87
77
|
staff_id: string;
|
|
88
78
|
staff_name: string;
|
|
89
79
|
note?: string;
|
|
90
|
-
|
|
91
|
-
|
|
80
|
+
/**
|
|
81
|
+
* The counted closing cash — the second place `cash_amount` is meaningful.
|
|
82
|
+
* Optional: a drawer may close with a 0 count (backend defaults to 0).
|
|
83
|
+
*/
|
|
84
|
+
cash_amount?: number;
|
|
85
|
+
/**
|
|
86
|
+
* Optional like cash_amount — an empty/zero count has no denominations.
|
|
87
|
+
*/
|
|
88
|
+
denominations?: Record<string, number>;
|
|
92
89
|
}
|
|
@@ -7,8 +7,11 @@
|
|
|
7
7
|
* agree on the exact wire shape for these operations. Field semantics:
|
|
8
8
|
* - `staff_id` / `staff_name` are the operator performing the action.
|
|
9
9
|
* - `cash_amount` is in integer cents (POS converts decimal balances via
|
|
10
|
-
* `convertDecimalToInt`).
|
|
10
|
+
* `convertDecimalToInt`). It exists ONLY on the cash-drawer open (opening
|
|
11
|
+
* float) and close (counted cash) requests — every other lifecycle amount is
|
|
12
|
+
* backend-owned and derived server-side from the cash-drawer ledger.
|
|
11
13
|
* - `operational_time_zone_offset_gmt` is the tenant's UTC offset (hours) used
|
|
12
|
-
* to stamp the local-time fields
|
|
14
|
+
* to stamp the local-time fields — only where the client clock is trusted
|
|
15
|
+
* (shift open). Day open/reopen use the tenant's stored offset instead.
|
|
13
16
|
*/
|
|
14
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|