@managesome/eposmatic-toolkit 0.2.637 → 0.2.638

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.
@@ -15423,7 +15423,7 @@ export declare const ORDERS_COLLECTION_NAME = "orders";
15423
15423
  * credit bills / credit-tab orders are indexed; every query using this hint
15424
15424
  * filters deferred_settlement: true and typically is_deleted: false).
15425
15425
  * Supports per-tenant credit-bill lookups newest first via created_at desc.
15426
- * - `source_tenant_id__is_deleted__createdAt__tenant_id`: PARTIAL index —
15426
+ * - `source_tenant_id__is_deleted__createdAt`: PARTIAL index —
15427
15427
  * create with `partialFilterExpression: { source_tenant_id: { $exists: true } }`
15428
15428
  * (source_tenant_id is an optional string). Supports per-source-tenant order
15429
15429
  * lookups filtered by is_deleted, newest first, scoped by tenant_id.
@@ -15432,11 +15432,10 @@ export declare const ORDERS_COLLECTION_INDEXES: {
15432
15432
  _id: {
15433
15433
  _id: number;
15434
15434
  };
15435
- source_tenant_id__is_deleted__createdAt__tenant_id: {
15435
+ source_tenant_id__is_deleted__createdAt: {
15436
15436
  source_tenant_id: number;
15437
15437
  is_deleted: number;
15438
15438
  createdAt: number;
15439
- tenant_id: number;
15440
15439
  };
15441
15440
  tenant_id__deferred_settlement__is_deleted__createdAt: {
15442
15441
  tenant_id: number;
@@ -984,18 +984,17 @@ exports.ORDERS_COLLECTION_NAME = 'orders';
984
984
  * credit bills / credit-tab orders are indexed; every query using this hint
985
985
  * filters deferred_settlement: true and typically is_deleted: false).
986
986
  * Supports per-tenant credit-bill lookups newest first via created_at desc.
987
- * - `source_tenant_id__is_deleted__createdAt__tenant_id`: PARTIAL index —
987
+ * - `source_tenant_id__is_deleted__createdAt`: PARTIAL index —
988
988
  * create with `partialFilterExpression: { source_tenant_id: { $exists: true } }`
989
989
  * (source_tenant_id is an optional string). Supports per-source-tenant order
990
990
  * lookups filtered by is_deleted, newest first, scoped by tenant_id.
991
991
  */
992
992
  exports.ORDERS_COLLECTION_INDEXES = {
993
993
  _id: { _id: 1 }, // Unique Index
994
- source_tenant_id__is_deleted__createdAt__tenant_id: {
994
+ source_tenant_id__is_deleted__createdAt: {
995
995
  source_tenant_id: 1,
996
996
  is_deleted: 1,
997
997
  createdAt: -1,
998
- tenant_id: 1,
999
998
  }, // partial index (partialFilterExpression: { source_tenant_id: { $exists: true } }) — per-source-tenant order lookups filtered by is_deleted, newest first, scoped by tenant_id
1000
999
  tenant_id__deferred_settlement__is_deleted__createdAt: {
1001
1000
  tenant_id: 1,
@@ -6,9 +6,10 @@
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`). 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.
9
+ * `convertDecimalToInt`). It exists on the cash-drawer open (opening float),
10
+ * reopen (registered count — becomes the drawer's running balance) and close
11
+ * (counted cash) requests — every other lifecycle amount is backend-owned and
12
+ * derived server-side from the cash-drawer ledger.
12
13
  * - `operational_time_zone_offset_gmt` is NOT part of any request — local-time
13
14
  * fields are always stamped server-side from the tenant's stored offset.
14
15
  */
@@ -99,4 +100,12 @@ export interface IReopenCashDrawerSessionRequestBody {
99
100
  staff_id: string;
100
101
  staff_name: string;
101
102
  note?: string;
103
+ /**
104
+ * The registered count at reopen — the balance the drawer resumes with.
105
+ * The backend adds it to the cash in/out ledger as a CASH_IN (like a drawer
106
+ * open) and sets it as the session's `running_balance`; the original opening
107
+ * float is preserved and is NOT added to the day/shift opening totals.
108
+ * Optional: if omitted, the backend falls back to the close's expected cash.
109
+ */
110
+ cash_amount?: number;
102
111
  }
@@ -7,9 +7,10 @@
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`). 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.
10
+ * `convertDecimalToInt`). It exists on the cash-drawer open (opening float),
11
+ * reopen (registered count — becomes the drawer's running balance) and close
12
+ * (counted cash) requests — every other lifecycle amount is backend-owned and
13
+ * derived server-side from the cash-drawer ledger.
13
14
  * - `operational_time_zone_offset_gmt` is NOT part of any request — local-time
14
15
  * fields are always stamped server-side from the tenant's stored offset.
15
16
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@managesome/eposmatic-toolkit",
3
- "version": "0.2.637",
3
+ "version": "0.2.638",
4
4
  "description": "A Toolkit Library for Eposmatic",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",