@tallyui/pos 5.0.0 → 5.2.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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import { ReactNode } from 'react';
3
- import { MoneyFormat, Money, RoundingMode, TaxRounding, StoreSettings, woocommerceTax, PaymentMethodDescriptor, CustomerAddress, CustomerTaxId, OrderCreateMeta, TallyConnector, SyncContext, StoreSettingsChoice, StoreSettingsChoices, Cashier, CashierPermission, ProductTraits, woocommerceCoupons, StoreOrder, ListOrdersQuery, OrderFilterField, StoreRefundOrphan, StoreRefund, OrderCreateLine, PaymentMethodKind, OrderAddress, CommandServerRefs, CommandWarning, CommandError, ReceiptTemplate, ServerCapabilities, OrderCreateEnvelope, OrderUpdateEnvelope, OrderRefundEnvelope, OrderRefundResult, Correction, RegisterInfo, RegisterCommandType, RegisterCommandResult, RegisterSessionTransitionPayload, CommandResult, AnyCommandEnvelope, CommandEnvelope, OrderCreatePayload, VariantSummary, TraitContext, PaymentRounding, IceServer, SignalMessage, DisplaySignalling, DisplaySignallingContext, DisplayAdvertisement, TillDevice, DisplayRecord, PendingPairing, CustomerInput, Customer, CustomerPatch, ProductCategory, ProductTerm, VariantOptionGroup, RegisterCommandEnvelope, OrderReopenResult, OrderReopenEnvelope, StoreOrderLine } from '@tallyui/core';
3
+ import { MoneyFormat, Money, RoundingMode, TaxRounding, StoreSettings, woocommerceTax, PaymentMethodDescriptor, CustomerAddress, CustomerTaxId, OrderCreateMeta, TallyConnector, SyncContext, StoreSettingsChoice, StoreSettingsChoices, Cashier, CashierPermission, ProductTraits, woocommerceCoupons, StoreOrder, ListOrdersQuery, OrderFilterField, StoreRefundOrphan, StoreRefund, OrderCreateLine, PaymentMethodKind, OrderAddress, CommandServerRefs, CommandWarning, CommandError, ReceiptTemplate, ServerCapabilities, OrderCreateEnvelope, OrderUpdateEnvelope, OrderRefundEnvelope, OrderRefundResult, Correction, RegisterInfo, RegisterCommandType, RegisterCommandResult, RegisterSessionTransitionPayload, CommandResult, AnyCommandEnvelope, CommandEnvelope, OrderCreatePayload, VariantSummary, TraitContext, PaymentRounding, IceServer, SignalMessage, DisplaySignalling, DisplaySignallingContext, DisplayAdvertisement, TillDevice, DisplayRecord, PendingPairing, CustomerInput, Customer, CustomerPatch, ProductCategory, ProductTerm, VariantOptionGroup, SettleCancelRequest, SettleOutcome, SettlePayRequest, SettlePayResult, SettleReverseRequest, SettleReverseResult, RegisterCommandEnvelope, OrderReopenResult, OrderReopenEnvelope, StoreOrderLine } from '@tallyui/core';
4
4
  export { Correction, MoneyFormat as CurrencyFormat, EarlierRefund, PricedRefund, PricedRefundLine, RefundableLine, RefundableOrderLine, getProductStock, priceRefund, ratePpmFromPercent, refundableLines, withStockOverlay } from '@tallyui/core';
5
5
  import * as rxdb from 'rxdb';
6
6
  import { RxCollection, RxJsonSchema, MangoQuery, MigrationStrategies, RxDatabase, RxLocalDocumentMutation } from 'rxdb';
@@ -443,7 +443,7 @@ interface ChargeLine {
443
443
  amountMinor: number;
444
444
  taxClass?: string;
445
445
  taxStatus: 'taxable' | 'none';
446
- /** The cashier's mode for this charge (v2 "Amount includes tax"); absent means the order's. Never stored on a finalized order. */
446
+ /** The cashier's mode for this charge (v2 "Amount includes tax"); absent means the order's. Never stored on a finalized order; a `chargeTaxMode` store keeps it in the stored charge's `entered`. */
447
447
  amountIncludesTax?: boolean;
448
448
  /** A fee's percentage of the cart (v2 Add Fee "%"): the builder sets `amountMinor` to it on every build. Fees only. Never stored on a finalized order. */
449
449
  percent?: number;
@@ -1517,10 +1517,22 @@ interface PosOrder {
1517
1517
  /** pos_orders v9, ADR-077 d2; present only on a sale with coupons */
1518
1518
  coupons?: PosOrderCoupon[];
1519
1519
  fees?: Array<FeeLine & {
1520
+ /** vendurepos 2.10b and #1391: the charge as the cashier entered it, kept whenever its mode differs from `pricesIncludeTax` (never under `woocommerce` granularity, #1392). `sent` marks an entry order.create sends as `amountMinor` + `amountIncludesTax`, set only for a store whose connector declared `chargeTaxMode` at finalize. Without `sent`, the charge is sent in the order's mode, as stored. */
1521
+ entered?: {
1522
+ amountMinor: number;
1523
+ amountIncludesTax: boolean;
1524
+ sent?: true;
1525
+ };
1520
1526
  /** The store's id of a kept fee or shipping line, in the same id space as lines (ADR-090). */
1521
1527
  storeLineId?: string;
1522
1528
  }>;
1523
1529
  shipping?: Array<ShippingLine & {
1530
+ /** vendurepos 2.10b and #1391: the charge as the cashier entered it, kept whenever its mode differs from `pricesIncludeTax` (never under `woocommerce` granularity, #1392). `sent` marks an entry order.create sends as `amountMinor` + `amountIncludesTax`, set only for a store whose connector declared `chargeTaxMode` at finalize. Without `sent`, the charge is sent in the order's mode, as stored. */
1531
+ entered?: {
1532
+ amountMinor: number;
1533
+ amountIncludesTax: boolean;
1534
+ sent?: true;
1535
+ };
1524
1536
  /** The store's id of a kept fee or shipping line, in the same id space as lines (ADR-090). */
1525
1537
  storeLineId?: string;
1526
1538
  }>;
@@ -1610,7 +1622,39 @@ interface PosOrder {
1610
1622
  reopenedAt?: string;
1611
1623
  /** The commandId whose refusal the cashier marked handled (tally-woo 03, ADR-092 6f); the logic comes in a later PR. */
1612
1624
  attentionHandledFor?: string;
1625
+ /** How the till settled the order the store created before it refused this sale (#1101); see `PosOrderStoreSettlement`. */
1626
+ storeSettlement?: PosOrderStoreSettlement;
1613
1627
  }
1628
+ /**
1629
+ * The till's settlement of a refused sale's store order (#1101, `storeOrderLeft`). `attemptId` names the attempt and is
1630
+ * kept while `state` is `sending`, so a repeat after a lost answer is the same attempt. `at` is the instant of the last
1631
+ * write. `storeStatus` is the store's status word (done, changed), `capturedMinor` what the store shows captured
1632
+ * (changed), `code` and `message` the store's refusal (refused), for the sync log, never shown to the cashier.
1633
+ * `payments` and `closeId` are for kind `pay`. A `reverse` keeps its store payment and void command ids in `legs`, with `done` on confirmed voids.
1634
+ */
1635
+ type PosOrderStoreSettlement = {
1636
+ kind: 'cancel' | 'pay' | 'reverse';
1637
+ state: 'sending' | 'done' | 'changed' | 'refused' | 'gone';
1638
+ attemptId: string;
1639
+ at: string;
1640
+ storeStatus?: string;
1641
+ capturedMinor?: number;
1642
+ code?: string;
1643
+ message?: string;
1644
+ payments?: {
1645
+ id: string;
1646
+ method: string;
1647
+ amountMinor: number;
1648
+ tenderedMinor?: number;
1649
+ done?: boolean;
1650
+ }[];
1651
+ closeId?: string;
1652
+ legs?: {
1653
+ paymentId: string;
1654
+ commandId: string;
1655
+ done?: boolean;
1656
+ }[];
1657
+ };
1614
1658
 
1615
1659
  /**
1616
1660
  * Receipt data for reprinting the till's own stored order (ADR-081). A stored order keeps no discount labels: the order discount
@@ -2549,7 +2593,8 @@ declare class UnsupportedOrderVersionError extends Error {
2549
2593
  }
2550
2594
  /**
2551
2595
  * Builds the ADR-038 order.create envelope for a PosOrder. It sends the stored order unchanged, so every resend of
2552
- * an order is byte-identical, and an order stored by an older till goes out exactly as that till sent it:
2596
+ * an order is byte-identical, except that a Woo-rounded order with charge display rows sends each charge at its row
2597
+ * (`wireChargeMinor`, #1341) and everything else as stored:
2553
2598
  * `finalizeOrder` freezes the sent form (names and labels cut, an unsendable customer email or id left out).
2554
2599
  * ADR-065's figures make version 3; otherwise a discounted order is version 2 (ADR-062), else version 1, byte-identical.
2555
2600
  * A version-3 order goes as version 4 (#286) only when `maxVersion` is at least 4 and its `sentVersion` doesn't cap it.
@@ -2635,19 +2680,74 @@ declare const UPDATE_UNSENDABLE_MESSAGE = "The store can't accept this change ye
2635
2680
  * `stuckCommandIds` (the outbox's `OutboxState.stuck`: the store keeps failing it), newest first.
2636
2681
  * A warning code this till version doesn't know is not shown here (`knownWarnings`). Never changes `orders`.
2637
2682
  * `register_session_unknown` is not shown, because the store counts the order once its session arrives (ADR-078).
2683
+ * A `total_mismatch` whose rounding bridge is within ADR-048's tolerance (|`bridgeMinor`| ≤ ⌈(lines + fees + shipping) / 2⌉)
2684
+ * is not shown for itself: the row's notice says it.
2638
2685
  * A refused order is left out once its finalized successor is in `orders`.
2639
2686
  * Pending updates marked `UPDATE_UNSENDABLE` are shown until a person acts.
2640
2687
  * An order a cashier marked handled (`markAttentionHandled`) is left out while its `commandId` is the one it was marked
2641
- * for; a requeue mints a new `commandId`, so a fresh refusal shows again (ADR-092 6f).
2688
+ * for; a requeue mints a new `commandId`, so a fresh refusal shows again (ADR-092 6f). The mark does not hide a refused
2689
+ * sale whose order the store created (`storeOrderLeft`, #1101). A refused sale whose store order is settled on the store
2690
+ * (`settledOnStore`: cancelled or gone, #1101) is not shown for its refusal; any other reason above still shows it.
2642
2691
  */
2643
2692
  declare function needsAttention(orders: PosOrder[], options?: {
2644
2693
  stuckCommandIds?: readonly string[];
2645
2694
  }): PosOrder[];
2646
2695
 
2696
+ /**
2697
+ * The store order a refused sale left behind (#1101): a value only for a rejected order with no `storeOrderId` whose
2698
+ * `error.data.orderId` is a non-empty string, as a transport that created the order before refusing the sale sets it.
2699
+ * `reference` is `data.displayId` when a non-empty string, else `orderId`. `recordedMinor` sums the first
2700
+ * `data.recorded` payments (a safe integer above 0; anything else counts as 0): what the store had recorded at the
2701
+ * refusal, not the order's state now.
2702
+ */
2703
+ declare function storeOrderLeft(order: Pick<PosOrder, 'syncStatus' | 'storeOrderId' | 'error' | 'payments'>): {
2704
+ orderId: string;
2705
+ reference: string;
2706
+ recordedMinor: number;
2707
+ } | undefined;
2708
+
2709
+ /** The payments this till took: a locked store payment (storePaymentId set) is the store's earlier money (ADR-090 gate 11). */
2710
+ declare function tillPayments<P extends {
2711
+ storePaymentId?: string;
2712
+ }>(payments: readonly P[]): P[];
2713
+ declare function settledAwayOnStore(order: {
2714
+ storeSettlement?: Pick<PosOrderStoreSettlement, 'kind' | 'state'>;
2715
+ }): boolean;
2716
+
2717
+ type LeftOrder = Pick<PosOrder, 'syncStatus' | 'storeOrderId' | 'error' | 'payments' | 'storeSettlement'>;
2718
+ declare const TILL_SESSION_CLOSED = "till_session_closed";
2719
+ /**
2720
+ * Whether the store order a refused sale left behind is settled on the store (#1101): its settlement is done, or gone
2721
+ * while the store had recorded nothing on it (desk ruling: a gone order with money recorded still needs a manager).
2722
+ */
2723
+ declare function settledOnStore(order: LeftOrder | Pick<PosOrder, 'storeSettlement'>): boolean;
2724
+ /**
2725
+ * Whether the till may cancel the store order a refused sale left behind (#1101): there is one (`storeOrderLeft`), the
2726
+ * store had recorded nothing paid on it, it is not settled (`settledOnStore`), and there is no settlement yet, or a
2727
+ * cancel (whose `sending` attempt a repeat finishes), or one the store changed or refused.
2728
+ */
2729
+ declare function canCancelOnStore(order: LeftOrder): boolean;
2730
+ /** The till's legs the store had recorded at the refusal, in recording order. */
2731
+ declare function recordedLegs(order: Pick<PosOrder, 'error' | 'payments'>): PosOrder['payments'];
2732
+ /** The till's legs the store had not recorded at the refusal (#1101 slice 3): the payments after `data.recorded`, counted
2733
+ * as `storeOrderLeft` counts them. */
2734
+ declare function unrecordedLegs(order: Pick<PosOrder, 'error' | 'payments'>): PosOrder['payments'];
2735
+ /** Whether the till can take its recorded legs off the store order and cancel it (#1101 slice 4). */
2736
+ declare function canReverseOnStore(order: LeftOrder): boolean;
2737
+ /**
2738
+ * Whether the till may record its unrecorded legs on the part-paid store order a refused sale left behind (#1101 slice
2739
+ * 3): the store had recorded some of the sale, it is not settled, every leg left has an amount, the settlement is not
2740
+ * `gone` (the order is not on the store, so a press could only read 404 again), and there is no settlement yet, or a
2741
+ * pay (whose `sending` attempt a repeat finishes), or one the store changed or refused without a reverse leg taken off.
2742
+ */
2743
+ declare function canPayRestOnStore(order: LeftOrder): boolean;
2744
+
2647
2745
  /**
2648
2746
  * Marks the order `orderId` handled for its current `commandId`, so `needsAttention` leaves it out until a requeue
2649
2747
  * mints a new one (ADR-092 6f, tally-woo 03). Resolves to true when the order is stamped (or already was, for this
2650
2748
  * commandId); false, with nothing changed, when the id is unknown or the order is pending (still the outbox's to settle).
2749
+ * The stamp does not hide a refused sale whose order the store created (`storeOrderLeft`, #1101): it is still written
2750
+ * and the call still resolves to true, but `needsAttention` keeps that sale.
2651
2751
  */
2652
2752
  declare function markAttentionHandled(orders: RxCollection<PosOrder>, orderId: string, now?: () => Date): Promise<boolean>;
2653
2753
 
@@ -3180,6 +3280,7 @@ interface DrawerTerms {
3180
3280
  */
3181
3281
  declare function deriveDrawerTerms(input: Parameters<typeof deriveExpected>[0]): DrawerTerms;
3182
3282
  type TillLeg = {
3283
+ id?: string;
3183
3284
  method: string;
3184
3285
  methodId?: string;
3185
3286
  amountMinor: number;
@@ -3189,9 +3290,10 @@ type TillLeg = {
3189
3290
  type TillOrder = {
3190
3291
  sessionId?: string;
3191
3292
  payments: readonly TillLeg[];
3293
+ storeSettlement?: Pick<PosOrderStoreSettlement, 'kind' | 'state' | 'legs'>;
3192
3294
  };
3193
3295
  /**
3194
- * Takings per payment method for one session, for the closure sheet: this till's captured payments (`tillPayments`) in
3296
+ * Takings per payment method for one session, for the closure sheet: this till's captured payments (`countedTillPayments`) in
3195
3297
  * `sessionId`: a payment's own session, else its order's (S3), keyed by `legMethodId`'s kind plus id (`external:stripe`), with the number of
3196
3298
  * payments behind each. Local only, never synced: register rows and payloads keep `method_id: payment.method` (#256, ADR-070
3197
3299
  * decision 1). A leg with no methodId keys exactly as deriveDrawerTerms does (`cash` or its method); the figures sum to
@@ -4623,7 +4725,7 @@ declare function useSale(settings: Pick<StoreSettings, 'currency' | 'calcDiscoun
4623
4725
  amountMinor: number;
4624
4726
  reference?: string;
4625
4727
  } | null) => void;
4626
- /** ADR-072: external is capped at the balance due; change comes only from cash. A cash leg records the amount applied, the amount handed over (`tenderedMinor`) and the change (`changeMinor`). A leg is captured unless a status says otherwise; a leg in motion is held against the external cap. Units are checked against the units legs hold (`heldUnitsByLine`), but a leg's amount is not tied to its units' money here; the pane enforces that (#1133). A cash part pick rounds its own target on a cashRounding store (ADR-094). */
4728
+ /** ADR-072: external is capped at the balance due; change comes only from cash. A cash leg records the amount applied, the amount handed over (`tenderedMinor`) and the change (`changeMinor`). A leg is captured unless a status says otherwise; a leg in motion is held against the external cap. Units are checked against the units legs hold (`heldUnitsByLine`), but a leg's amount is not tied to its units' money here; the pane enforces that (#1133). A cash part pick rounds its target less the live entries on a cashRounding store, and one that reaches the whole-settle due is taken as that settle (ADR-094 item 7). */
4627
4729
  addTender(input: {
4628
4730
  method: "cash" | "external";
4629
4731
  methodId?: string;
@@ -6629,8 +6731,9 @@ declare function isRequeueable(code: string | undefined): boolean;
6629
6731
  * Whether `requeue()` will send this order again. A rejected order: its code is requeueable, except that a reopened
6630
6732
  * sale (`storeOrderId`) refused with `reopen_required` or `revision_conflict` needs a fresh reopen, not a resend
6631
6733
  * (ADR-090 gate 5). A pending order the outbox could not build as an update (`UPDATE_UNSENDABLE`): yes, it is tried again.
6734
+ * An order with a `storeSettlement` (#1101): never; the till is settling its store order instead.
6632
6735
  */
6633
- declare function isRequeueableOrder(order: Pick<PosOrder, 'syncStatus' | 'storeOrderId' | 'error'>): boolean;
6736
+ declare function isRequeueableOrder(order: Pick<PosOrder, 'syncStatus' | 'storeOrderId' | 'error' | 'storeSettlement'>): boolean;
6634
6737
  interface OrderOutboxOptions {
6635
6738
  collection: RxCollection<PosOrder>;
6636
6739
  transport: CommandTransport<OrderCreateEnvelope | OrderUpdateEnvelope>;
@@ -6656,7 +6759,8 @@ interface OrderOutbox {
6656
6759
  * Orders isRequeueableOrder refuses are left alone. Resolves to the number requeued. */
6657
6760
  requeue(orderIds?: string[]): Promise<number>;
6658
6761
  /** Removes the rejected order `orderId` from the collection, after any running flush ends. Resolves to true when
6659
- * removed; false, with nothing changed, when the id is unknown or the order is not rejected. */
6762
+ * removed; false, with nothing changed, when the id is unknown, the order is not rejected, or the store created its
6763
+ * order before refusing it (`storeOrderLeft`, #1101). */
6660
6764
  discard(orderId: string): Promise<boolean>;
6661
6765
  /** Watches for pending orders and sends them. */
6662
6766
  start(): void;
@@ -6666,6 +6770,57 @@ interface OrderOutbox {
6666
6770
  }
6667
6771
  declare function createOrderOutbox(options: OrderOutboxOptions): OrderOutbox;
6668
6772
 
6773
+ /** Store the void command ids before sending; only the same sending attempt can receive the outcome. */
6774
+ declare function reverseOnStore(deps: {
6775
+ orders: RxCollection<PosOrder>;
6776
+ reverse(request: SettleReverseRequest): Promise<SettleReverseResult>;
6777
+ now?: () => Date;
6778
+ openSessionId?: CancelOnStoreDeps['openSessionId'];
6779
+ }, orderId: string): Promise<SettleOutcome | {
6780
+ kind: 'not_offered';
6781
+ }>;
6782
+ interface CancelOnStoreDeps {
6783
+ orders: RxCollection<PosOrder>;
6784
+ /** The connector's cancel, bound to the open store (`RefusedOrderSettlement.cancel`). */
6785
+ cancel(request: SettleCancelRequest): Promise<SettleOutcome>;
6786
+ /** The open register session's id. When given, the store's answer counts only while the session that took every till payment is still open. */
6787
+ openSessionId?: () => string | undefined | Promise<string | undefined>;
6788
+ now?: () => Date;
6789
+ }
6790
+ /**
6791
+ * Cancels on the store the order a refused sale left behind (#1101), when `canCancelOnStore` allows it on the stored
6792
+ * row; otherwise resolves to `not_offered` and never calls `cancel`. It first stores the attempt as `sending` (keeping
6793
+ * the stored `attemptId` of a cancel still `sending`, so a repeat is the same attempt), and only once that write has
6794
+ * resolved calls `cancel`. The outcome is written only while the stored settlement is still this attempt's `sending`
6795
+ * one; `retry` writes nothing, and a rejected `cancel` leaves the row `sending` and rejects with the same error.
6796
+ * `syncStatus`, `error`, `commandId`, `payments` and the totals are never changed. pos_orders is till-local, never
6797
+ * pulled from a store, so these writes break no replication rule.
6798
+ */
6799
+ declare function cancelOnStore(deps: CancelOnStoreDeps, orderId: string): Promise<SettleOutcome | {
6800
+ kind: 'not_offered';
6801
+ }>;
6802
+ interface PayRestOnStoreDeps {
6803
+ orders: RxCollection<PosOrder>;
6804
+ /** The connector's pay, bound to the open store (`RefusedOrderSettlement.pay`). */
6805
+ pay(request: SettlePayRequest): Promise<SettlePayResult>;
6806
+ now?: () => Date;
6807
+ }
6808
+ /**
6809
+ * Records on the store the legs of a refused sale its part-paid store order is missing (#1101 slice 3), when
6810
+ * `canPayRestOnStore` allows it on the stored row; otherwise resolves to `not_offered` and never calls `pay`. No money is
6811
+ * taken: each leg of `unrecordedLegs` is sent under a new id (method, amount, and `tenderedMinor` for cash only, never
6812
+ * the change), except that a stored pay with one payment per leg keeps its ids, amounts and `done` flags, so the store
6813
+ * skips a leg it already holds. It first stores the attempt as `sending` with those ids (a pay still `sending` also keeps
6814
+ * its `attemptId`, so a repeat is the same attempt; any other mints a new one), and only once that write has resolved
6815
+ * calls `pay`. The answer is written only while the stored settlement is still this attempt's `sending` one: every id in
6816
+ * `recorded` is marked `done` whatever the outcome, `retry` keeps `sending`, and a rejected `pay` leaves the row
6817
+ * `sending` and rejects with the same error.
6818
+ * `syncStatus`, `error`, `commandId`, `payments` and the totals are never changed.
6819
+ */
6820
+ declare function payRestOnStore(deps: PayRestOnStoreDeps, orderId: string): Promise<SettleOutcome | {
6821
+ kind: 'not_offered';
6822
+ }>;
6823
+
6669
6824
  /** Whether the register outbox's requeue() resends a rejection with this code. */
6670
6825
  declare function isRegisterRequeueable(code: string | undefined): boolean;
6671
6826
  interface RegisterOutboxOptions {
@@ -6734,6 +6889,8 @@ declare function needsAdminReasonOf(retryReason: string): string | undefined;
6734
6889
  declare const outboxLogger: Logger;
6735
6890
 
6736
6891
  interface UseOrderOutboxOptions {
6892
+ /** The open register session's id. Without it, `cancelOnStore` and `reverseOnStore` resolve to `not_offered`. */
6893
+ openSessionId?: () => string | undefined;
6737
6894
  /** Which order store to use (medusapos: the backend's base URL); `null` means no store. A change reopens. */
6738
6895
  storeKey: string | null;
6739
6896
  /** Opens the order store for `storeKey`; `close()` is called when the key or device id changes, or on unmount. */
@@ -6753,6 +6910,13 @@ interface UseOrderOutboxOptions {
6753
6910
  onBusy?(busy: boolean): void;
6754
6911
  /** Called when `open` rejects, even if the key has changed since (medusapos: reports storage worker failures). */
6755
6912
  onOpenError?(error: unknown): void;
6913
+ /** The settlement of a refused sale's store order (#1101) for `storeKey`: the connector's `cancel` and `pay`, bound to
6914
+ * that store. Read on each call, for the open store. */
6915
+ storeSettlement?(storeKey: string): {
6916
+ cancel?(request: SettleCancelRequest): Promise<SettleOutcome>;
6917
+ pay?(request: SettlePayRequest): Promise<SettlePayResult>;
6918
+ reverse?(request: SettleReverseRequest): Promise<SettleReverseResult>;
6919
+ } | undefined;
6756
6920
  }
6757
6921
  interface UseOrderOutboxResult {
6758
6922
  /** The open orders collection, or `null` until the current store is ready. */
@@ -6780,6 +6944,26 @@ interface UseOrderOutboxResult {
6780
6944
  requeue(orderIds?: string[]): Promise<number>;
6781
6945
  /** Removes one rejected order (see `OrderOutbox.discard`); resolves to false before the current store is ready. */
6782
6946
  discard(orderId: string): Promise<boolean>;
6947
+ /**
6948
+ * Cancels on the store the order a refused sale left behind (`cancelOnStore`, #1101), with the `cancel` of
6949
+ * `storeSettlement` for the open store, then recounts the outbox state, whether the cancel resolved or rejected.
6950
+ * Resolves to `not_offered` before the current store is ready, or when there is no `storeSettlement` or no `cancel`.
6951
+ */
6952
+ cancelOnStore(orderId: string): Promise<SettleOutcome | {
6953
+ kind: 'not_offered';
6954
+ }>;
6955
+ /**
6956
+ * Records on the store the till's legs a refused sale's part-paid store order is missing (`payRestOnStore`, #1101
6957
+ * slice 3), with the `pay` of `storeSettlement` for the open store, then recounts the outbox state, whether the pay
6958
+ * resolved or rejected. Resolves to `not_offered` before the current store is ready, or when there is no
6959
+ * `storeSettlement` or no `pay`.
6960
+ */
6961
+ payRestOnStore(orderId: string): Promise<SettleOutcome | {
6962
+ kind: 'not_offered';
6963
+ }>;
6964
+ reverseOnStore(orderId: string): Promise<SettleOutcome | {
6965
+ kind: 'not_offered';
6966
+ }>;
6783
6967
  /**
6784
6968
  * The count of `record()` calls not yet settled (resolved or rejected). An app holds sign-out
6785
6969
  * (closing the store) while this is above 0, because a close that lands under a write stuck in
@@ -7088,12 +7272,13 @@ declare function nearestPayableCash(amountMinor: number, incrementMinor: number)
7088
7272
  belowMinor: number;
7089
7273
  aboveMinor: number;
7090
7274
  } | null;
7091
- /** ADR-094 (cash picks): a cash part pick rounds its own target; 0 means cash cannot pay it. */
7092
- declare function roundedPickTarget(targetMinor: number, rounding: PaymentRounding | null | undefined): number;
7093
- /** ADR-094: the live entries a remainder rounds against, leaving out a pick leg's own entry (its leg carries units). */
7275
+ /** ADR-094 item 7 (carry): a cash part pick rounds its target less `entriesMinor`, the live entries the pick carries against; it defaults to 0, the 5.0.0 per-pick rounding. 0 means cash cannot pay it. */
7276
+ declare function roundedPickTarget(targetMinor: number, rounding: PaymentRounding | null | undefined, entriesMinor?: number): number;
7277
+ /** ADR-094 items 1 and 6: the live entries a remainder rounds against, every entry on the sale (cash-pick entries included since the carry rule). */
7094
7278
  declare function remainderEntriesMinor(order: {
7095
7279
  payments: readonly {
7096
7280
  id: string;
7281
+ method?: string;
7097
7282
  units?: Readonly<Record<string, number>>;
7098
7283
  }[];
7099
7284
  cashRoundings?: readonly {
@@ -7101,6 +7286,18 @@ declare function remainderEntriesMinor(order: {
7101
7286
  minor: number;
7102
7287
  }[];
7103
7288
  }): number;
7289
+ /**
7290
+ * ADR-094 item 1 (#1365, amended by the carry rule 2026-11-26): the zero-remainder write-off's leg, the last counting leg with
7291
+ * wire method 'cash', else the last counting leg. A later cash leg rounds against a non-cash leg's write-off; `cashVoidRefusal` keeps the entries a stack.
7292
+ */
7293
+ declare function writeOffLeg<L extends {
7294
+ id: string;
7295
+ method?: string;
7296
+ status?: PaymentLegStatus;
7297
+ units?: Readonly<Record<string, number>>;
7298
+ }>(order: {
7299
+ payments: readonly L[];
7300
+ }): L | undefined;
7104
7301
  /** Why a void is refused by ADR-094 item 6 (desk ruling (i), #1292): a later live cash leg's entry was computed against this leg's. */
7105
7302
  type CashVoidRefusal = 'later_cash_rounding';
7106
7303
  /**
@@ -7272,4 +7469,4 @@ declare function reportRefundFromPosRefund(refund: PosRefund): ReportRefund | un
7272
7469
  /** @deprecated Use `minorToMajor(minor, digits)` from `@tallyui/core`, which also rejects an amount that is not a safe integer. */
7273
7470
  declare const minorToDecimal: (minor: number, exponent: number) => string;
7274
7471
 
7275
- export { ADDRESS_CHANGE_REFUSED, AFTER_CLOSE_PAYMENTS_CHANGED, APP_SETTING_DEFINITIONS, type Actor, type AddLineInput, type AppSettingCollection, type AppSettingDefinition, type AppSettingDoc, type AppSettingKey, type AppSettings, type AppliedDiscount, type ApprovalNeeded, BLUETOOTH_PRINT_SERVICES, type BackendNotFound, type BasketLine, type BroadcastChannelLike, CAMERA_BARCODE_TYPES, CAMERA_CONSTRAINTS, CART_COLUMN_IDS, CASH_NOT_PAYABLE, CASH_PICK_ENTRIES_MAX, CASH_PICK_LIMIT, CASH_SETTLE_LIMIT, CASH_WAITS_FOR_PAYMENT, COLLECT_POLL_MS, CONNECT_TIMEOUT_MS, COUPONS_NEED_CONNECTION, COUPONS_REPRICING, COUPONS_UNSUPPORTED, COUPON_CARRIED, COUPON_CARRY_STALE, CUSTOMER_RETAX_REFUSED, type CameraDecoder, type CameraScan, type CartColumnId, type CartColumnsSetting, CartError, type CartQuantityLine, type CashMovement, type CashMovementCollection, type CashRounding, type CashVoidRefusal, type CashierState, type CatalogueEntry, type CatalogueGridColumns, type CatalogueView, type CatalogueViewAction, type CatalogueViewState, type ChargeInput, type ChargeLine, type Closure, type ClosureApprovalStatus, type ClosureCollection, type ClosureContext, type ClosureFigures, type ClosureScope, type CollectInput, type CollectOutcome, type CollectResult, type CommandTransport, type CreateClosureContextOptions, type CsvColumn, CurrencyProvider, type CurrencyProviderProps, type CustomerEditValues, type CustomerSummary, DATE_PRESETS, DECODER_ERROR_THRESHOLD, DEFAULT_APP_SETTINGS, DEFAULT_CATALOGUE_VIEW_STATE, DEFAULT_COOLDOWN_MS, DEFAULT_DECODE_INTERVAL_MS, DEFAULT_MIN_SCAN_CHARS, DEFAULT_RECEIPT_TEMPLATES, DEFAULT_SERIAL_BAUD_RATE, DEFAULT_TILE_FIELDS, DEFAULT_WEDGE_SETTINGS, DETECTOR_FORMATS, DISCOUNTS_UNSUPPORTED, DISPLAY_ACTIONS, DISPLAY_CHANNEL, DISPLAY_PROTOCOL_VERSION, DISPLAY_SIGNAL_POLL_MS, DISPLAY_TEMPLATE, type DatePreset, type DayPoint, type DayRange, type DecodeLoopOptions, type DecodeRefusal, type DecodeResult, type DetectedBarcode, type DeviceScanControl, type DeviceScanControls, type DeviceScanner, type DeviceScannerErrorHandler, type DeviceScannerErrorPhase, type DeviceScannerSettings, type DeviceScannerState, type DeviceScannerStateCell, type Discount, type DisplayAction, type DisplayCart, type DisplayClient, type DisplayClientError, type DisplayClientOptions, type DisplayClientPhase, type DisplayClientView, type DisplayClock, type DisplayConfig, type DisplayEnvelope, type DisplayLine, type DisplayLink, type DisplayPayloads, type DisplayPayment, type DisplayState, type DisplayTemplate, type DisplayTokenStore, type DisplayTotals, type DisplayTransport, type DisplayView, type DrawerTerm, type DrawerTerms, type DriverAvailability, type DriverCapabilities, type DriverStatus, type DriverStatusSource, ENGLISH_CLOSURE_LABELS, ESCPOS_CODE_PAGES, type EncodeEscPosOptions, type EscPosBarcodeOptions, type EscPosBuilder, type EscPosQrOptions, type EscPosSink, type EscPosTransportOptions, type ExtrasNotSent, type FeeLine, type FinalizeOptions, type FloatSuggestion, type FormatWcposReceiptOptions, type GroupRow, HELLO_RETRY_MS, HID_POS_USAGE_PAGE, type HandoverSlipData, type HandoverSlipInput, type HidDeviceLike, type HidInputReportEventLike, type HidLike, type HidPosDecodeOptions, type HidPosResult, type HidScannerOptions, type HttpTransportOptions, INFORMATIONAL_EXTRAS_ORDER_CREATE_VERSION, LINE_EDIT_REFUSED, LIST_POLL_MS, type LedgerRow, type LineItem, type LineJoin, type LineTaxLine, type LogActor, type LogEntry, type LogLevel, type LogMeta, type LogPreset, type LogPresetFilters, type LogSink, type LogSyncRecord, type Logger, MAX_MESSAGE_BYTES, MAX_TENDER_MINOR, META_CHANGE_REFUSED, META_INVALID, MICROS_PER_MINOR, type Margin, type MoneyDivergence, type Movement$1 as Movement, type MovementType, NEEDS_ADMIN_RETRY_PREFIX, NOTHING_DUE, NOTHING_TO_ROUND_AGAINST, type NeedsAdminAnswer, type NetworkSinkOptions, type NoteDelivery, OPEN_ORDERS_POSITIONS, OPEN_SIGNAL_POLL_MS, type OpenOrdersPosition, type OpenSale, type OptionPicks, type Order, type OrderBuilder, type OrderBuilderOptions, OrderContentMismatchError, type OrderCoupon, type OrderCouponContext, type OrderCouponLine, type OrderDownloadProgress, type OrderFilterValue, type OrderManager, type OrderManagerOptions, type OrderOutbox, type OrderOutboxOptions, type OrderRefundOutcome, type OrderReopenOutcome, type OrderTaxTotals, type OrderTransportContext, type OtherCurrencyRefunds, type OutboxCounts, type OutboxHealth, type OutboxState, PAPER_COLUMNS, PAYMENT_IN_MOTION, PAYMENT_TAKEN, PENDING_POLL_MS, PRINTER_PROFILES_COLLECTION, PRODUCT_SORT_FIELDS, type PairingError, type PairingPhase, type ParkedOrderSummary, type Payment, type PaymentDriver, type PaymentDriverRegistry, type PaymentLegStatus, type PaymentMethod, type PaymentPhase, type PaymentRow, type PaymentTransport, type PeerFactory, type PeerLink, type PeerLinkOptions, type PeerLinkState, type PlanLeg, type PosOrder, type PosOrderCoupon, type PosOrderCouponLine, type PosOrderLine, type PosOrderLocalWarning, PosOrderOpenClosedError, type PosOrderPayment, type PosOrderServerFailures, type PosOrderSyncStatus, type PosRefund, type PosRefundCollection, type PosRefundStatus, PrintError, type PrintErrorCode, type PrintJob, type PrintJobKind, type PrintQueue, type PrintQueueOptions, type PrintQueueState, type PrintTransport, type PrintableSale, type PrinterProfile, type PrinterProfileCollection, type ProductSort, type ProductSortValue, type ProductTermGroup, RECEIPT_SCHEMA_VERSION, REGISTER_CLOSING, REGISTER_SESSION_MIGRATION_CLOSE_WAIT_MS, REOPENABLE_CODES, REOPENED_NOT_LOADED, REOPEN_REFUSED_STATUSES, RESTORE_STALE, type RTCDataChannelLike, type RTCPeerConnectionLike, type RateTaxLine, type ReaderInfo, type ReceiptConfig, type ReceiptData, type ReceiptFiscal, type ReceiptLineItem, type ReceiptNode, type ReceiptPaper, type ReceiptRegister, type ReceiptSoftware, type ReceiptTemplateData, type ReceiptTemplateLine, type ReceiptTemplateOptions, type ReceiptTemplateRow, type RecordedFigures, RefundAnswerPendingError, RegisterApprovalRequiredError, type RegisterBucket, RegisterCloseIncompleteError, type RegisterCommand, type RegisterCommandCollection, type RegisterCounters, type RegisterDocument, type RegisterFact, type RegisterHost, RegisterIdInvalidError, RegisterMovementAmountError, RegisterMovementReasonError, RegisterMovementStrandedError, RegisterNeedsUpgradeError, type RegisterOutbox, type RegisterOutboxOptions, RegisterReapproveError, RegisterSaleSavingError, type RegisterSession, RegisterSessionAlreadyOpenError, RegisterSessionClosedError, type RegisterSessionCollection, RegisterSessionConflictError, RegisterSessionOpenClosedError, RegisterSessionRequiredError, type RegisterStore, RegisterTakeOverError, RegisterTenderInProgressError, type RenderEscposOptions, type RenderReceiptOptions, type RenderSanitizeOptions, ReopenEntryError, type ReopenEntryReason, type ReopenRefusal, ReopenRefusedOrderError, type ReopenStoreOrderOutcome, type ReportCategory, type ReportLine, type ReportOrder, type ReportPayment, type ReportRefund, type ReportTax, type Repository, type ResolvePrinterOptions, type ResolveStoreSettingsOptions, SALE_CARD_IN_PROGRESS, SALE_FINISHED, SALE_HAS_PAYMENT, SALE_IN_TENDER, SALE_PARTLY_PAID, SALE_SAVING, SCANNER_DEVICE_KEY_MAX_LENGTH, SCANNER_PROFILES_COLLECTION, SCAN_DEDUP_WINDOW_MS, SIGNAL_POLL_MS, SIMULATED_PROVIDER, SIMULATED_TIMING, SNAPSHOT_LIFETIME_MS, SNAPSHOT_MIN_INTERVAL_MS, SNAPSHOT_POLL_MS, SNAPSHOT_RESEND_MS, SPLIT_FIXED_DISCOUNT, STANDARD_SPP_SERVICE_CLASS_ID, STORE_ORDER_OPEN_HERE, SYSTEM_PRINTER_ID, SYSTEM_PRINT_TIMING, type SaleDiscountCodes, type SaleDiscountState, type SaleDisplayInput, type SaleDisplayOptions, type SaleDisplayPublisher, type SaleRemoval, type SaleStage, type SaleTaxContext, type SaleTaxLocation, type SalesFigures, type SalesFiguresInput, type SalesTotals, type SanitizeHtmlOptions, type ScanBus, type ScanEvent, type ScanHub, ScanHubProvider, type ScanHubProviderProps, type ScanOfferResult, type ScanRejectReason, type ScanSession, type ScanSessionOptions, type ScanSource, type ScanSourceKind, type ScanTraceSettings, type ScannerConnectionType, type ScannerIdentity, type ScannerProfile, type ScannerProfileCollection, type ScannerProfileStore, type ScannerTransport, type SentOrder, type SerialLike, type SerialLineDecoder, type SerialLineDecoderOptions, type SerialPortInfoLike, type SerialPortLike, type SerialScannerOptions, type ServiceClock, type SessionDescriptionLike, type ShippingLine, type SignalPort, type SimulatedDriverOptions, type SimulatedReaderId, type SnapshotBody, type SnapshotSender, type SnapshotSenderOptions, type SplitTab, type SplitUnitLine, type StoreDay, type StoreOrdersInRange, type StoreOrdersRangeQuery, type StorePricedAccepted, type StorePricedCodePricing, type StorePricedCoupon, type StorePricedCouponContext, type StorePricedDiscountCodesOptions, type StoreRefundsInRange, type StoreRefundsRangeQuery, type StoreSettingsResolution, type StoreSettingsState, type StoreTemplateContext, type StuckRecord, type SwitchKind, type SwitchWarning, type SwitchWarningInput, type SwitchWarnings, type SyncRecordOutcome, type SystemPrintTransportOptions, TAX_ADDRESS_ORDER_CREATE_VERSION, TAX_IDS_CHANGE_REFUSED, TAX_IDS_INVALID, TAX_ROUNDING_MIXED_NOTE, TAX_STORE_PAID_NOTE, TENDER_GATE_FAILED, TENDER_SALE_CHANGED, TILE_FIELDS, type TaxContext, type TaxDerivation, type TaxDerivationClass, type TaxDerivationRate, type TaxLineInput, TaxProvider, type TaxProviderProps, type TaxRateMap, type TaxRateWhy, type TaxRow, type TenderAction, type TenderFacts, type TenderFigures, type TenderKey, type TenderLineId, type TenderPlan, type TenderRounding, type TenderState, type TenderView, type TenderVoid, type ThermalNode, type TileField, type TileFields, type TillDeviceHandle, type TillDeviceKeyStore, type TillDeviceOptions, type TillDisplayEntry, type TillDisplayPauseReason, type TillDisplayService, type TillDisplayServiceOptions, type TillDisplayStatus, type TillDisplaysView, type TillPairing, type TillPairingOptions, type TillPairingView, type TraceAnalysis, type TraceKey, type TraceSuggestion, type TransportOutcome, UI_SCALES, UI_THEMES, UNTAXED_ADDRESS_ORDER_CREATE_VERSION, UPDATE_UNSENDABLE, UPDATE_UNSENDABLE_MESSAGE, type UiScale, type UiTheme, type UnitAllocations, UnsupportedOrderVersionError, type UseBarcodeScannerOptions, type UseCameraScanOptions, type UseOrderOutboxOptions, type UseOrderOutboxResult, type UseOutboxHealthOptions, type UseOutboxHealthResult, type UseRegisterOutboxOptions, type UseRegisterOutboxResult, type UseRegisterSessionOptions, VOID_LATER_CASH_FIRST, type ViewfinderStatus, WCPOS_DEFAULT_I18N, WCPOS_TAX_ID_LABELS, WEDGE_END_OF_SCAN_MS, type WcposLineView, type WcposMoneyOptions, type WcposReceiptData, type WcposReceiptDate, type WcposReceiptLine, type WcposReceiptOptions, type WcposReceiptSource, type WcposReceiptStore, type WcposReceiptView, type WcposTaxId, type WebBluetoothDevice, type WebBluetoothSinkOptions, type WebUsbDevice, type WebUsbSinkOptions, type WedgeDetector, type WedgeDetectorOptions, type WedgeReplayResult, type WedgeScanMeta, type WedgeSettings, type WedgeState, abandonSession, activePlan, addEntryToCart, addPosOrderCollection, addPrinterProfileCollection, addRegisterSessionCollection, addScannerProfileCollection, adoptRegisterResults, advancePerpetual, allocateOrderDiscount, analyzeScanTrace, appSettingCollection, appSettingSchema, appSettings$, appliedMinor, backToSelling, bindRegister, buildClosureDocument, buildReceiptData, buildReceiptDataFromPosOrder, buildReceiptDataFromStoreOrder, buildXReportDocument, callbackSink, cameraErrorStatus, can, canMoveLeg, canOpenDrawer, canVoidLeg, capturedMinor, cartQuantities, cashMovementSchema, cashVoidRefusal, catalogueEntries, catalogueViewReducer, changeMinor, clampClosureScope, closeNeedsApproval, closeSession, closureApprovalStatus, closureCommand, closureFigures, closureSchema, closureVariance, comparisonRange, computeOrderTax, consoleSink, countVariance, countsTowardPaid, couponPricingBasis, createBackendNotFound, createBroadcastDisplayTransport, createClosureContext, createDeviceScannerStateCell, createDisplayClient, createDisplayLink, createDisplayPeerLink, createEpsonEposSink, createEscPosTransport, createHidScanner, createHttpCommandTransport, createLogger, createOrderBuilder, createOrderManager, createOrderOutbox, createPaymentDriverRegistry, createPrintQueue, createRegisterOutbox, createRepository, createSaleDisplayPublisher, createScanBus, createScanHub, createScanSession, createSerialLineDecoder, createSerialScanner, createSimulatedDriver, createSnapshotSender, createStarWebPrntSink, createStorePricedDiscountCodes, createSystemPrintTransport, createTaxContext, createTillDevice, createTillDisplayService, createTillPairing, createTillPeerLink, createWebBluetoothSink, createWebUsbSink, createWedgeDetector, createWedgeState, csvCell, csvFromCells, daysOf, decode as decodeDisplayMessage, decodeHidPosReport, dedupeScans, denominationTotal, denominations, deriveDrawerTerms, deriveExpected, derivePaymentEvent, deriveSettled, deriveStuckRecords, detectorFormatToSymbology, disabledOptions, displayCart, displayReducer, driverForMethod, encode as encodeDisplayMessage, encodeEscPos, encodeThermalTemplate, ensureRegister, escpos, evenSplitShareMinor, exportCsv, extrasNotSent, finalizeOrder, findEntryByCode, foldWedgeKey, formatClosureDate, formatDecimalMoney, formatWcposMoney, formatWcposReceiptData, getBoundRegisterId, getDeviceId, handoverSlip, hasActor, hasTerm, hasValidRetailCheckDigit, heldUnitsByLine, inCategory, inMotionMinor, inRange, inertDeviceScanControls, inertScanHub, initTenderState, initialDisplayState, initialTenderState, isCanonicalUuid, isCarriedCouponLabel, isChooserCancel, isInMotion, isKnownSessionStatus, isLiveAtStore, isOrderReopenInFlight, isPartlyPaid, isRegisterRequeueable, isReopenOffered, isReopened, isRequeueable, isRequeueableOrder, isServerDecimal, isWebHidSupported, isWebSerialSupported, labelKeys, legStatus, listCategories, listTermGroups, lockedRefundDueMinor, makeEnvelope, marginOf, markAttentionHandled, matchVariant, matchesPresetFilters, medianMinor, messageBytes, methodDrivers, methodForProvider, minorToDecimal, mintClosureNumber, mintUuid, moneyDivergence, movementCommand, movementFieldError, nativeBarcodeDetector, nearestPayableCash, needsAdminReasonOf, needsAttention, networkSinkFor, nextSaleCounter, normalizeAmount, normalizeCatalogueViewState, normalizeRetailCode, normalizeTileFields, normalizeUuid, noteDelivery, observeRegister$, openDrawerJob, openSales, openSession, openSessionSelector, orderDraftSchema, orderFiltersQuery, outboxLogger, overThreshold, paidUnitsByLine, parkedOrderSummaries$, parseMinor, parseXml, percentOfMinor, pickedUnitsMinor, planLegs, posOrderCollection, posOrderSchema, posOrdersLogger, posRefundCollection, posRefundSchema, presetFilters, presetRange, printerProfileCollection, printerProfileSchema, productCategories, productSortValue, productTerms, quickTenderedAmounts, readAppSettings, readBoundRegister, readRegister, readScannerProfiles, reapproveClosure, receiptTemplateData, reconcileRegisterCommands, recordMovement, recordRegisterFact, refundDueOf, refundNeedsAdminLine, registerCommandCollection, registerCommandSchema, registerCommandsLogger, registerFactsLogger, registerSessionCollection, registerSessionSchema, registerSessionsLogger, remainderEntriesMinor, removeScannerProfile, renderEscpos, renderHtml, renderLogiclessTemplate, renderReceiptHtml, renderReceiptTemplate, renderStoreReceiptTemplate, renderThermalPreview, reopenRefusedOrder, reopenStoreOrder, replacedOrderIds, replayWedgeDetector, reportOrderFromPosOrder, reportOrderFromStoreOrder, reportRefundFromPosRefund, requireOpenSession, resolveAppSettings, resolveGridColumns, resolvePrinter, resolveStoreSettings, restoreOrderDraft, retailCodeTwin, roundMicrosToMinor, roundedDue, roundedPickTarget, runsWholeOrder, saleLogger, saleTaxContexts, salesFigures, salesRangeQuery, sameSale, sanitizeHtml, saveScannerProfile, scanTimeOf, scannerDeviceKey, scannerProfileCollection, scannerProfileSchema, scannerProfileStore, scannerProfiles$, scannerTransport, searchProducts, selectClosureRows, sendOrderRefund, sendOrderReopen, serialPortIdentity, sessionOpenCommand, sessionTransitionCommand, shipsToBilling, sortProducts, splitUnitLines, stampSession, startCounting, startDecodeLoop, stockOverlay$, stockOverlayAsOf$, storeOrderForReopen, stripBoundary, submitOrderRefund, suggestFloat, summarizeOutboxHealth, switchWarnings, takeOverSession, takingsByMethod, taxDerivation, taxFiguresForBasket, taxLinesByRate, taxLogger, taxMicros, taxProviderProps, taxSettingsForLocation, taxedLinesFor, templateColumns, tenderFigures, tenderReducer, tenderRounding, tenderVoidCollection, tenderVoidSchema, tillLegsTheStoreRefuses, toCsv, toCustomerInput, toCustomerPatch, toOrderCreateEnvelope, toOrderUpdateEnvelope, toPrintError, unbindRegister, unitAllocationsFromLegs, unitsMinor, unpaidUnitsByLine, useAppSettings, useBarcodeScanner, useCameraScan, useCashier, useCurrencyCode, useCurrencyFormatter, useCustomerDisplay, useDeviceScanControls, useDisplayClient, useOrderOutbox, useOutboxHealth, useParkedSales, useRegisterOutbox, useRegisterSession, useSale, useSaleDisplay, useScanHub, useStoreOrdersInRange, useStoreRefundsInRange, useStoreSettings, useTax, useTillDisplays, useTillPairing, uuidv7, validAmount, varianceText, variantFits, variantPriceLabel, voidMovement, watchOutboxHealth, wcposReceiptContext, wcposReceiptData, wcposSourceFromPosOrder, wcposSourceFromSentOrder, wcposSourceFromStoreOrder, withPricingContext, index as woocommerceDiscountCodes, writeAppSetting, writeClosure, writeOrderDraft };
7472
+ export { ADDRESS_CHANGE_REFUSED, AFTER_CLOSE_PAYMENTS_CHANGED, APP_SETTING_DEFINITIONS, type Actor, type AddLineInput, type AppSettingCollection, type AppSettingDefinition, type AppSettingDoc, type AppSettingKey, type AppSettings, type AppliedDiscount, type ApprovalNeeded, BLUETOOTH_PRINT_SERVICES, type BackendNotFound, type BasketLine, type BroadcastChannelLike, CAMERA_BARCODE_TYPES, CAMERA_CONSTRAINTS, CART_COLUMN_IDS, CASH_NOT_PAYABLE, CASH_PICK_ENTRIES_MAX, CASH_PICK_LIMIT, CASH_SETTLE_LIMIT, CASH_WAITS_FOR_PAYMENT, COLLECT_POLL_MS, CONNECT_TIMEOUT_MS, COUPONS_NEED_CONNECTION, COUPONS_REPRICING, COUPONS_UNSUPPORTED, COUPON_CARRIED, COUPON_CARRY_STALE, CUSTOMER_RETAX_REFUSED, type CameraDecoder, type CameraScan, type CancelOnStoreDeps, type CartColumnId, type CartColumnsSetting, CartError, type CartQuantityLine, type CashMovement, type CashMovementCollection, type CashRounding, type CashVoidRefusal, type CashierState, type CatalogueEntry, type CatalogueGridColumns, type CatalogueView, type CatalogueViewAction, type CatalogueViewState, type ChargeInput, type ChargeLine, type Closure, type ClosureApprovalStatus, type ClosureCollection, type ClosureContext, type ClosureFigures, type ClosureScope, type CollectInput, type CollectOutcome, type CollectResult, type CommandTransport, type CreateClosureContextOptions, type CsvColumn, CurrencyProvider, type CurrencyProviderProps, type CustomerEditValues, type CustomerSummary, DATE_PRESETS, DECODER_ERROR_THRESHOLD, DEFAULT_APP_SETTINGS, DEFAULT_CATALOGUE_VIEW_STATE, DEFAULT_COOLDOWN_MS, DEFAULT_DECODE_INTERVAL_MS, DEFAULT_MIN_SCAN_CHARS, DEFAULT_RECEIPT_TEMPLATES, DEFAULT_SERIAL_BAUD_RATE, DEFAULT_TILE_FIELDS, DEFAULT_WEDGE_SETTINGS, DETECTOR_FORMATS, DISCOUNTS_UNSUPPORTED, DISPLAY_ACTIONS, DISPLAY_CHANNEL, DISPLAY_PROTOCOL_VERSION, DISPLAY_SIGNAL_POLL_MS, DISPLAY_TEMPLATE, type DatePreset, type DayPoint, type DayRange, type DecodeLoopOptions, type DecodeRefusal, type DecodeResult, type DetectedBarcode, type DeviceScanControl, type DeviceScanControls, type DeviceScanner, type DeviceScannerErrorHandler, type DeviceScannerErrorPhase, type DeviceScannerSettings, type DeviceScannerState, type DeviceScannerStateCell, type Discount, type DisplayAction, type DisplayCart, type DisplayClient, type DisplayClientError, type DisplayClientOptions, type DisplayClientPhase, type DisplayClientView, type DisplayClock, type DisplayConfig, type DisplayEnvelope, type DisplayLine, type DisplayLink, type DisplayPayloads, type DisplayPayment, type DisplayState, type DisplayTemplate, type DisplayTokenStore, type DisplayTotals, type DisplayTransport, type DisplayView, type DrawerTerm, type DrawerTerms, type DriverAvailability, type DriverCapabilities, type DriverStatus, type DriverStatusSource, ENGLISH_CLOSURE_LABELS, ESCPOS_CODE_PAGES, type EncodeEscPosOptions, type EscPosBarcodeOptions, type EscPosBuilder, type EscPosQrOptions, type EscPosSink, type EscPosTransportOptions, type ExtrasNotSent, type FeeLine, type FinalizeOptions, type FloatSuggestion, type FormatWcposReceiptOptions, type GroupRow, HELLO_RETRY_MS, HID_POS_USAGE_PAGE, type HandoverSlipData, type HandoverSlipInput, type HidDeviceLike, type HidInputReportEventLike, type HidLike, type HidPosDecodeOptions, type HidPosResult, type HidScannerOptions, type HttpTransportOptions, INFORMATIONAL_EXTRAS_ORDER_CREATE_VERSION, LINE_EDIT_REFUSED, LIST_POLL_MS, type LedgerRow, type LineItem, type LineJoin, type LineTaxLine, type LogActor, type LogEntry, type LogLevel, type LogMeta, type LogPreset, type LogPresetFilters, type LogSink, type LogSyncRecord, type Logger, MAX_MESSAGE_BYTES, MAX_TENDER_MINOR, META_CHANGE_REFUSED, META_INVALID, MICROS_PER_MINOR, type Margin, type MoneyDivergence, type Movement$1 as Movement, type MovementType, NEEDS_ADMIN_RETRY_PREFIX, NOTHING_DUE, NOTHING_TO_ROUND_AGAINST, type NeedsAdminAnswer, type NetworkSinkOptions, type NoteDelivery, OPEN_ORDERS_POSITIONS, OPEN_SIGNAL_POLL_MS, type OpenOrdersPosition, type OpenSale, type OptionPicks, type Order, type OrderBuilder, type OrderBuilderOptions, OrderContentMismatchError, type OrderCoupon, type OrderCouponContext, type OrderCouponLine, type OrderDownloadProgress, type OrderFilterValue, type OrderManager, type OrderManagerOptions, type OrderOutbox, type OrderOutboxOptions, type OrderRefundOutcome, type OrderReopenOutcome, type OrderTaxTotals, type OrderTransportContext, type OtherCurrencyRefunds, type OutboxCounts, type OutboxHealth, type OutboxState, PAPER_COLUMNS, PAYMENT_IN_MOTION, PAYMENT_TAKEN, PENDING_POLL_MS, PRINTER_PROFILES_COLLECTION, PRODUCT_SORT_FIELDS, type PairingError, type PairingPhase, type ParkedOrderSummary, type PayRestOnStoreDeps, type Payment, type PaymentDriver, type PaymentDriverRegistry, type PaymentLegStatus, type PaymentMethod, type PaymentPhase, type PaymentRow, type PaymentTransport, type PeerFactory, type PeerLink, type PeerLinkOptions, type PeerLinkState, type PlanLeg, type PosOrder, type PosOrderCoupon, type PosOrderCouponLine, type PosOrderLine, type PosOrderLocalWarning, PosOrderOpenClosedError, type PosOrderPayment, type PosOrderServerFailures, type PosOrderStoreSettlement, type PosOrderSyncStatus, type PosRefund, type PosRefundCollection, type PosRefundStatus, PrintError, type PrintErrorCode, type PrintJob, type PrintJobKind, type PrintQueue, type PrintQueueOptions, type PrintQueueState, type PrintTransport, type PrintableSale, type PrinterProfile, type PrinterProfileCollection, type ProductSort, type ProductSortValue, type ProductTermGroup, RECEIPT_SCHEMA_VERSION, REGISTER_CLOSING, REGISTER_SESSION_MIGRATION_CLOSE_WAIT_MS, REOPENABLE_CODES, REOPENED_NOT_LOADED, REOPEN_REFUSED_STATUSES, RESTORE_STALE, type RTCDataChannelLike, type RTCPeerConnectionLike, type RateTaxLine, type ReaderInfo, type ReceiptConfig, type ReceiptData, type ReceiptFiscal, type ReceiptLineItem, type ReceiptNode, type ReceiptPaper, type ReceiptRegister, type ReceiptSoftware, type ReceiptTemplateData, type ReceiptTemplateLine, type ReceiptTemplateOptions, type ReceiptTemplateRow, type RecordedFigures, RefundAnswerPendingError, RegisterApprovalRequiredError, type RegisterBucket, RegisterCloseIncompleteError, type RegisterCommand, type RegisterCommandCollection, type RegisterCounters, type RegisterDocument, type RegisterFact, type RegisterHost, RegisterIdInvalidError, RegisterMovementAmountError, RegisterMovementReasonError, RegisterMovementStrandedError, RegisterNeedsUpgradeError, type RegisterOutbox, type RegisterOutboxOptions, RegisterReapproveError, RegisterSaleSavingError, type RegisterSession, RegisterSessionAlreadyOpenError, RegisterSessionClosedError, type RegisterSessionCollection, RegisterSessionConflictError, RegisterSessionOpenClosedError, RegisterSessionRequiredError, type RegisterStore, RegisterTakeOverError, RegisterTenderInProgressError, type RenderEscposOptions, type RenderReceiptOptions, type RenderSanitizeOptions, ReopenEntryError, type ReopenEntryReason, type ReopenRefusal, ReopenRefusedOrderError, type ReopenStoreOrderOutcome, type ReportCategory, type ReportLine, type ReportOrder, type ReportPayment, type ReportRefund, type ReportTax, type Repository, type ResolvePrinterOptions, type ResolveStoreSettingsOptions, SALE_CARD_IN_PROGRESS, SALE_FINISHED, SALE_HAS_PAYMENT, SALE_IN_TENDER, SALE_PARTLY_PAID, SALE_SAVING, SCANNER_DEVICE_KEY_MAX_LENGTH, SCANNER_PROFILES_COLLECTION, SCAN_DEDUP_WINDOW_MS, SIGNAL_POLL_MS, SIMULATED_PROVIDER, SIMULATED_TIMING, SNAPSHOT_LIFETIME_MS, SNAPSHOT_MIN_INTERVAL_MS, SNAPSHOT_POLL_MS, SNAPSHOT_RESEND_MS, SPLIT_FIXED_DISCOUNT, STANDARD_SPP_SERVICE_CLASS_ID, STORE_ORDER_OPEN_HERE, SYSTEM_PRINTER_ID, SYSTEM_PRINT_TIMING, type SaleDiscountCodes, type SaleDiscountState, type SaleDisplayInput, type SaleDisplayOptions, type SaleDisplayPublisher, type SaleRemoval, type SaleStage, type SaleTaxContext, type SaleTaxLocation, type SalesFigures, type SalesFiguresInput, type SalesTotals, type SanitizeHtmlOptions, type ScanBus, type ScanEvent, type ScanHub, ScanHubProvider, type ScanHubProviderProps, type ScanOfferResult, type ScanRejectReason, type ScanSession, type ScanSessionOptions, type ScanSource, type ScanSourceKind, type ScanTraceSettings, type ScannerConnectionType, type ScannerIdentity, type ScannerProfile, type ScannerProfileCollection, type ScannerProfileStore, type ScannerTransport, type SentOrder, type SerialLike, type SerialLineDecoder, type SerialLineDecoderOptions, type SerialPortInfoLike, type SerialPortLike, type SerialScannerOptions, type ServiceClock, type SessionDescriptionLike, type ShippingLine, type SignalPort, type SimulatedDriverOptions, type SimulatedReaderId, type SnapshotBody, type SnapshotSender, type SnapshotSenderOptions, type SplitTab, type SplitUnitLine, type StoreDay, type StoreOrdersInRange, type StoreOrdersRangeQuery, type StorePricedAccepted, type StorePricedCodePricing, type StorePricedCoupon, type StorePricedCouponContext, type StorePricedDiscountCodesOptions, type StoreRefundsInRange, type StoreRefundsRangeQuery, type StoreSettingsResolution, type StoreSettingsState, type StoreTemplateContext, type StuckRecord, type SwitchKind, type SwitchWarning, type SwitchWarningInput, type SwitchWarnings, type SyncRecordOutcome, type SystemPrintTransportOptions, TAX_ADDRESS_ORDER_CREATE_VERSION, TAX_IDS_CHANGE_REFUSED, TAX_IDS_INVALID, TAX_ROUNDING_MIXED_NOTE, TAX_STORE_PAID_NOTE, TENDER_GATE_FAILED, TENDER_SALE_CHANGED, TILE_FIELDS, TILL_SESSION_CLOSED, type TaxContext, type TaxDerivation, type TaxDerivationClass, type TaxDerivationRate, type TaxLineInput, TaxProvider, type TaxProviderProps, type TaxRateMap, type TaxRateWhy, type TaxRow, type TenderAction, type TenderFacts, type TenderFigures, type TenderKey, type TenderLineId, type TenderPlan, type TenderRounding, type TenderState, type TenderView, type TenderVoid, type ThermalNode, type TileField, type TileFields, type TillDeviceHandle, type TillDeviceKeyStore, type TillDeviceOptions, type TillDisplayEntry, type TillDisplayPauseReason, type TillDisplayService, type TillDisplayServiceOptions, type TillDisplayStatus, type TillDisplaysView, type TillPairing, type TillPairingOptions, type TillPairingView, type TraceAnalysis, type TraceKey, type TraceSuggestion, type TransportOutcome, UI_SCALES, UI_THEMES, UNTAXED_ADDRESS_ORDER_CREATE_VERSION, UPDATE_UNSENDABLE, UPDATE_UNSENDABLE_MESSAGE, type UiScale, type UiTheme, type UnitAllocations, UnsupportedOrderVersionError, type UseBarcodeScannerOptions, type UseCameraScanOptions, type UseOrderOutboxOptions, type UseOrderOutboxResult, type UseOutboxHealthOptions, type UseOutboxHealthResult, type UseRegisterOutboxOptions, type UseRegisterOutboxResult, type UseRegisterSessionOptions, VOID_LATER_CASH_FIRST, type ViewfinderStatus, WCPOS_DEFAULT_I18N, WCPOS_TAX_ID_LABELS, WEDGE_END_OF_SCAN_MS, type WcposLineView, type WcposMoneyOptions, type WcposReceiptData, type WcposReceiptDate, type WcposReceiptLine, type WcposReceiptOptions, type WcposReceiptSource, type WcposReceiptStore, type WcposReceiptView, type WcposTaxId, type WebBluetoothDevice, type WebBluetoothSinkOptions, type WebUsbDevice, type WebUsbSinkOptions, type WedgeDetector, type WedgeDetectorOptions, type WedgeReplayResult, type WedgeScanMeta, type WedgeSettings, type WedgeState, abandonSession, activePlan, addEntryToCart, addPosOrderCollection, addPrinterProfileCollection, addRegisterSessionCollection, addScannerProfileCollection, adoptRegisterResults, advancePerpetual, allocateOrderDiscount, analyzeScanTrace, appSettingCollection, appSettingSchema, appSettings$, appliedMinor, backToSelling, bindRegister, buildClosureDocument, buildReceiptData, buildReceiptDataFromPosOrder, buildReceiptDataFromStoreOrder, buildXReportDocument, callbackSink, cameraErrorStatus, can, canCancelOnStore, canMoveLeg, canOpenDrawer, canPayRestOnStore, canReverseOnStore, canVoidLeg, cancelOnStore, capturedMinor, cartQuantities, cashMovementSchema, cashVoidRefusal, catalogueEntries, catalogueViewReducer, changeMinor, clampClosureScope, closeNeedsApproval, closeSession, closureApprovalStatus, closureCommand, closureFigures, closureSchema, closureVariance, comparisonRange, computeOrderTax, consoleSink, countVariance, countsTowardPaid, couponPricingBasis, createBackendNotFound, createBroadcastDisplayTransport, createClosureContext, createDeviceScannerStateCell, createDisplayClient, createDisplayLink, createDisplayPeerLink, createEpsonEposSink, createEscPosTransport, createHidScanner, createHttpCommandTransport, createLogger, createOrderBuilder, createOrderManager, createOrderOutbox, createPaymentDriverRegistry, createPrintQueue, createRegisterOutbox, createRepository, createSaleDisplayPublisher, createScanBus, createScanHub, createScanSession, createSerialLineDecoder, createSerialScanner, createSimulatedDriver, createSnapshotSender, createStarWebPrntSink, createStorePricedDiscountCodes, createSystemPrintTransport, createTaxContext, createTillDevice, createTillDisplayService, createTillPairing, createTillPeerLink, createWebBluetoothSink, createWebUsbSink, createWedgeDetector, createWedgeState, csvCell, csvFromCells, daysOf, decode as decodeDisplayMessage, decodeHidPosReport, dedupeScans, denominationTotal, denominations, deriveDrawerTerms, deriveExpected, derivePaymentEvent, deriveSettled, deriveStuckRecords, detectorFormatToSymbology, disabledOptions, displayCart, displayReducer, driverForMethod, encode as encodeDisplayMessage, encodeEscPos, encodeThermalTemplate, ensureRegister, escpos, evenSplitShareMinor, exportCsv, extrasNotSent, finalizeOrder, findEntryByCode, foldWedgeKey, formatClosureDate, formatDecimalMoney, formatWcposMoney, formatWcposReceiptData, getBoundRegisterId, getDeviceId, handoverSlip, hasActor, hasTerm, hasValidRetailCheckDigit, heldUnitsByLine, inCategory, inMotionMinor, inRange, inertDeviceScanControls, inertScanHub, initTenderState, initialDisplayState, initialTenderState, isCanonicalUuid, isCarriedCouponLabel, isChooserCancel, isInMotion, isKnownSessionStatus, isLiveAtStore, isOrderReopenInFlight, isPartlyPaid, isRegisterRequeueable, isReopenOffered, isReopened, isRequeueable, isRequeueableOrder, isServerDecimal, isWebHidSupported, isWebSerialSupported, labelKeys, legStatus, listCategories, listTermGroups, lockedRefundDueMinor, makeEnvelope, marginOf, markAttentionHandled, matchVariant, matchesPresetFilters, medianMinor, messageBytes, methodDrivers, methodForProvider, minorToDecimal, mintClosureNumber, mintUuid, moneyDivergence, movementCommand, movementFieldError, nativeBarcodeDetector, nearestPayableCash, needsAdminReasonOf, needsAttention, networkSinkFor, nextSaleCounter, normalizeAmount, normalizeCatalogueViewState, normalizeRetailCode, normalizeTileFields, normalizeUuid, noteDelivery, observeRegister$, openDrawerJob, openSales, openSession, openSessionSelector, orderDraftSchema, orderFiltersQuery, outboxLogger, overThreshold, paidUnitsByLine, parkedOrderSummaries$, parseMinor, parseXml, payRestOnStore, percentOfMinor, pickedUnitsMinor, planLegs, posOrderCollection, posOrderSchema, posOrdersLogger, posRefundCollection, posRefundSchema, presetFilters, presetRange, printerProfileCollection, printerProfileSchema, productCategories, productSortValue, productTerms, quickTenderedAmounts, readAppSettings, readBoundRegister, readRegister, readScannerProfiles, reapproveClosure, receiptTemplateData, reconcileRegisterCommands, recordMovement, recordRegisterFact, recordedLegs, refundDueOf, refundNeedsAdminLine, registerCommandCollection, registerCommandSchema, registerCommandsLogger, registerFactsLogger, registerSessionCollection, registerSessionSchema, registerSessionsLogger, remainderEntriesMinor, removeScannerProfile, renderEscpos, renderHtml, renderLogiclessTemplate, renderReceiptHtml, renderReceiptTemplate, renderStoreReceiptTemplate, renderThermalPreview, reopenRefusedOrder, reopenStoreOrder, replacedOrderIds, replayWedgeDetector, reportOrderFromPosOrder, reportOrderFromStoreOrder, reportRefundFromPosRefund, requireOpenSession, resolveAppSettings, resolveGridColumns, resolvePrinter, resolveStoreSettings, restoreOrderDraft, retailCodeTwin, reverseOnStore, roundMicrosToMinor, roundedDue, roundedPickTarget, runsWholeOrder, saleLogger, saleTaxContexts, salesFigures, salesRangeQuery, sameSale, sanitizeHtml, saveScannerProfile, scanTimeOf, scannerDeviceKey, scannerProfileCollection, scannerProfileSchema, scannerProfileStore, scannerProfiles$, scannerTransport, searchProducts, selectClosureRows, sendOrderRefund, sendOrderReopen, serialPortIdentity, sessionOpenCommand, sessionTransitionCommand, settledAwayOnStore, settledOnStore, shipsToBilling, sortProducts, splitUnitLines, stampSession, startCounting, startDecodeLoop, stockOverlay$, stockOverlayAsOf$, storeOrderForReopen, storeOrderLeft, stripBoundary, submitOrderRefund, suggestFloat, summarizeOutboxHealth, switchWarnings, takeOverSession, takingsByMethod, taxDerivation, taxFiguresForBasket, taxLinesByRate, taxLogger, taxMicros, taxProviderProps, taxSettingsForLocation, taxedLinesFor, templateColumns, tenderFigures, tenderReducer, tenderRounding, tenderVoidCollection, tenderVoidSchema, tillLegsTheStoreRefuses, tillPayments, toCsv, toCustomerInput, toCustomerPatch, toOrderCreateEnvelope, toOrderUpdateEnvelope, toPrintError, unbindRegister, unitAllocationsFromLegs, unitsMinor, unpaidUnitsByLine, unrecordedLegs, useAppSettings, useBarcodeScanner, useCameraScan, useCashier, useCurrencyCode, useCurrencyFormatter, useCustomerDisplay, useDeviceScanControls, useDisplayClient, useOrderOutbox, useOutboxHealth, useParkedSales, useRegisterOutbox, useRegisterSession, useSale, useSaleDisplay, useScanHub, useStoreOrdersInRange, useStoreRefundsInRange, useStoreSettings, useTax, useTillDisplays, useTillPairing, uuidv7, validAmount, varianceText, variantFits, variantPriceLabel, voidMovement, watchOutboxHealth, wcposReceiptContext, wcposReceiptData, wcposSourceFromPosOrder, wcposSourceFromSentOrder, wcposSourceFromStoreOrder, withPricingContext, index as woocommerceDiscountCodes, writeAppSetting, writeClosure, writeOffLeg, writeOrderDraft };