@tallyui/pos 3.8.0 → 3.9.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 +112 -17
- package/dist/index.js +303 -35
- package/package.json +8 -7
- package/src/index.ts +3 -1
- package/src/order/index.ts +2 -1
- package/src/order/order-builder.ts +41 -9
- package/src/order/order-drafts.ts +3 -1
- package/src/order/types.ts +11 -1
- package/src/order/woocommerce-tax.ts +61 -4
- package/src/outbox/types.test-d.ts +5 -0
- package/src/refund/index.ts +3 -0
- package/src/refund/pos-refund.ts +35 -0
- package/src/refund/send-order-refund.ts +43 -0
- package/src/refund/submit-order-refund.ts +85 -0
- package/src/register/expected.ts +23 -6
- package/src/register/register-adoption.ts +7 -4
- package/src/register/schemas.ts +1 -1
- package/src/register/session-store.ts +21 -5
- package/src/register/use-register-session.ts +18 -13
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 { Money, TaxRounding, StoreSettings, TallyConnector, SyncContext, StoreSettingsChoice, StoreSettingsChoices, ProductTraits, ProductCategory, TraitContext, OrderCreateLine, PaymentMethodKind, CommandServerRefs, CommandWarning, CommandError, ServerCapabilities, OrderCreateEnvelope, RegisterCommandType, RegisterCommandResult, RegisterSessionTransitionPayload, VariantSummary, CommandResult, AnyCommandEnvelope, CommandEnvelope, OrderCreatePayload, RegisterCommandEnvelope } from '@tallyui/core';
|
|
3
|
+
import { Money, TaxRounding, StoreSettings, TallyConnector, SyncContext, StoreSettingsChoice, StoreSettingsChoices, ProductTraits, woocommerceCoupons, ProductCategory, TraitContext, OrderCreateLine, PaymentMethodKind, CommandServerRefs, CommandWarning, CommandError, ServerCapabilities, OrderCreateEnvelope, OrderRefundEnvelope, OrderRefundResult, RegisterCommandType, RegisterCommandResult, RegisterSessionTransitionPayload, VariantSummary, CommandResult, AnyCommandEnvelope, CommandEnvelope, OrderCreatePayload, RegisterCommandEnvelope } from '@tallyui/core';
|
|
4
4
|
export { getProductStock, withStockOverlay } from '@tallyui/core';
|
|
5
5
|
export { countFresh, readFresh, watchFresh } from '@tallyui/core/rxdb';
|
|
6
6
|
import * as rxdb from 'rxdb';
|
|
@@ -249,6 +249,11 @@ declare function createRepository<T extends {
|
|
|
249
249
|
id: string;
|
|
250
250
|
}>(collection: RxCollection<T>): Repository<T>;
|
|
251
251
|
|
|
252
|
+
interface OrderCoupon {
|
|
253
|
+
code: string;
|
|
254
|
+
discountMinor: number;
|
|
255
|
+
discountTaxMinor: number;
|
|
256
|
+
}
|
|
252
257
|
interface Order {
|
|
253
258
|
id: string;
|
|
254
259
|
status: 'draft' | 'parked' | 'saved' | 'completed';
|
|
@@ -256,6 +261,8 @@ interface Order {
|
|
|
256
261
|
fees?: FeeLine[];
|
|
257
262
|
shipping?: ShippingLine[];
|
|
258
263
|
discounts: AppliedDiscount[];
|
|
264
|
+
/** Present only after coupon replay; discountMinor excludes coupons, which are carried here. */
|
|
265
|
+
coupons?: OrderCoupon[];
|
|
259
266
|
payments: Payment[];
|
|
260
267
|
customer: CustomerSummary | null;
|
|
261
268
|
note: string;
|
|
@@ -301,6 +308,11 @@ interface DisplayTotals {
|
|
|
301
308
|
name: string;
|
|
302
309
|
amountMinor: number;
|
|
303
310
|
}>;
|
|
311
|
+
/** Present exactly when Order.coupons is. */
|
|
312
|
+
coupons?: Array<{
|
|
313
|
+
code: string;
|
|
314
|
+
amountMinor: number;
|
|
315
|
+
}>;
|
|
304
316
|
orderDiscountMinor: number;
|
|
305
317
|
}
|
|
306
318
|
/** One line in the display mode (ADR-063): before any discount, with its own discounts as sub-rows. */
|
|
@@ -416,10 +428,18 @@ interface AddLineInput {
|
|
|
416
428
|
taxClass?: string;
|
|
417
429
|
}
|
|
418
430
|
|
|
431
|
+
interface OrderCouponContext {
|
|
432
|
+
configs: ReadonlyMap<string, woocommerceCoupons.CouponDiscountConfig>;
|
|
433
|
+
productCategories: ReadonlyMap<number, {
|
|
434
|
+
id: number;
|
|
435
|
+
}[]>;
|
|
436
|
+
calcDiscountsSequentially: boolean;
|
|
437
|
+
}
|
|
419
438
|
interface OrderBuilderOptions {
|
|
420
439
|
currency: string;
|
|
421
440
|
taxContext: TaxContext;
|
|
422
441
|
id?: string;
|
|
442
|
+
couponContext?: OrderCouponContext;
|
|
423
443
|
}
|
|
424
444
|
interface OrderBuilder {
|
|
425
445
|
order$: Observable<Order>;
|
|
@@ -449,6 +469,8 @@ interface OrderBuilder {
|
|
|
449
469
|
removePayment(paymentId: string): void;
|
|
450
470
|
setCustomer(customer: CustomerSummary | null): void;
|
|
451
471
|
setNote(note: string): void;
|
|
472
|
+
/** Replaces the coupon codes with their trimmed, lower-case, deduplicated list. */
|
|
473
|
+
setCoupons(codes: readonly string[]): void;
|
|
452
474
|
clear(): void;
|
|
453
475
|
getSnapshot(): Order;
|
|
454
476
|
}
|
|
@@ -966,17 +988,40 @@ declare function movementFieldError(input: {
|
|
|
966
988
|
reason: string;
|
|
967
989
|
}): 'amount' | 'reason' | null;
|
|
968
990
|
|
|
991
|
+
type PosRefundStatus = 'pending' | 'applied' | 'rejected' | 'unsent';
|
|
992
|
+
interface PosRefund {
|
|
993
|
+
id: string;
|
|
994
|
+
commandId: string;
|
|
995
|
+
orderId: string;
|
|
996
|
+
sessionId: string;
|
|
997
|
+
registerId: string;
|
|
998
|
+
envelope: OrderRefundEnvelope;
|
|
999
|
+
status: PosRefundStatus;
|
|
1000
|
+
result?: OrderRefundResult;
|
|
1001
|
+
duplicate?: boolean;
|
|
1002
|
+
error?: CommandError;
|
|
1003
|
+
createdAt: string;
|
|
1004
|
+
updatedAt: string;
|
|
1005
|
+
}
|
|
1006
|
+
type PosRefundCollection = RxCollection<PosRefund>;
|
|
1007
|
+
declare const posRefundSchema: RxJsonSchema<PosRefund>;
|
|
1008
|
+
/** Local-only, never replicated (ADR-080 amendment 1).
|
|
1009
|
+
* Added with addCollections like cash_movements. */
|
|
1010
|
+
declare const posRefundCollection: () => {
|
|
1011
|
+
schema: RxJsonSchema<PosRefund>;
|
|
1012
|
+
};
|
|
1013
|
+
|
|
969
1014
|
/**
|
|
970
1015
|
* What the register should hold at close, per tender method: the session's cash float plus
|
|
971
1016
|
* captured payments and cash movements — never what the cashier counts. Port provenance
|
|
972
1017
|
* (ADR-032 amendment 1): WCPOS `next` `3b5331b5c`.
|
|
973
1018
|
*
|
|
974
|
-
*
|
|
975
|
-
*
|
|
976
|
-
* `refunded_amount`
|
|
977
|
-
* `deriveExpected` covers only the float, the session's captured payment rows, and its
|
|
978
|
-
* paid-in/paid-out cash movements under WCPOS's void rules.
|
|
1019
|
+
* Refunds come from the till's applied `pos_refunds`, counted in the record's own `sessionId`
|
|
1020
|
+
* (ADR-080 amendment 1), by the server's rule. WCPOS's `attributeRefunds` fallbacks (allocations,
|
|
1021
|
+
* `refunded_amount`) are not ported: the store attributes each refund to a tender in `byMethod`.
|
|
979
1022
|
*/
|
|
1023
|
+
|
|
1024
|
+
type RefundRow = Pick<PosRefund, 'id' | 'sessionId' | 'status' | 'result'>;
|
|
980
1025
|
/** `session_id`, `kind`, `method_id`, `status` kept as WCPOS names them; money is TallyUI's integer-minor-units convention. */
|
|
981
1026
|
type LedgerRow = {
|
|
982
1027
|
session_id?: string | null;
|
|
@@ -997,18 +1042,19 @@ type Movement$1 = {
|
|
|
997
1042
|
/**
|
|
998
1043
|
* Expected totals per tender method: the counted float, plus every captured ledger row for the
|
|
999
1044
|
* session (grouped under `cash` for cash rows, else `method_id`), plus its non-voided
|
|
1000
|
-
* paid-in/paid-out movements.
|
|
1045
|
+
* paid-in/paid-out movements, minus its applied refunds.
|
|
1001
1046
|
*
|
|
1002
1047
|
* A movement is excluded when its own `voided_by` is set, or when a `type: 'void'` row's
|
|
1003
1048
|
* `voids` names its id; the `void` row itself carries no amount of its own.
|
|
1004
1049
|
*/
|
|
1005
|
-
declare function deriveExpected({ session, movements, ledgerRowsBySession, }: {
|
|
1050
|
+
declare function deriveExpected({ session, movements, ledgerRowsBySession, refunds, }: {
|
|
1006
1051
|
session: {
|
|
1007
1052
|
id: string;
|
|
1008
1053
|
countedFloatMinor: number;
|
|
1009
1054
|
};
|
|
1010
1055
|
movements: readonly Movement$1[];
|
|
1011
1056
|
ledgerRowsBySession: readonly LedgerRow[];
|
|
1057
|
+
refunds?: readonly RefundRow[];
|
|
1012
1058
|
}): Record<string, number>;
|
|
1013
1059
|
|
|
1014
1060
|
/**
|
|
@@ -1130,7 +1176,7 @@ interface Closure {
|
|
|
1130
1176
|
counted: TenderMap;
|
|
1131
1177
|
variance: TenderMap;
|
|
1132
1178
|
period_sales_total_minor: number;
|
|
1133
|
-
/**
|
|
1179
|
+
/** The session's applied refunds (ADR-080 amendment 1); 0 when the app passes none. */
|
|
1134
1180
|
period_refunds_total_minor: number;
|
|
1135
1181
|
perpetual_sales_total_minor: number;
|
|
1136
1182
|
perpetual_refunds_total_minor: number;
|
|
@@ -1350,8 +1396,9 @@ declare function voidMovement(sessions: RegisterSessionCollection, movements: Ca
|
|
|
1350
1396
|
* Only a closed session (`closed` with `closed_at_gmt`) has a closure, and a closed session is
|
|
1351
1397
|
* final, so its existing closure is returned as it was frozen. Orders the server rejected still
|
|
1352
1398
|
* count in the drawer, because the cash was taken.
|
|
1399
|
+
* A refund still pending at close is not counted, and the Z lists it.
|
|
1353
1400
|
*/
|
|
1354
|
-
declare function writeClosure({ closures, register, storeKey, session, counted, otherTenders, movements, orders, tillExpected, labels, resolveCashierName, softwareVersion, timezone, }: {
|
|
1401
|
+
declare function writeClosure({ closures, register, storeKey, session, counted, otherTenders, movements, orders, refunds, tillExpected, labels, resolveCashierName, softwareVersion, timezone, }: {
|
|
1355
1402
|
closures: ClosureCollection;
|
|
1356
1403
|
/** The register document's host (`register_sessions`). */
|
|
1357
1404
|
register: RegisterHost;
|
|
@@ -1363,6 +1410,8 @@ declare function writeClosure({ closures, register, storeKey, session, counted,
|
|
|
1363
1410
|
movements: readonly CashMovement[];
|
|
1364
1411
|
/** Any `pos_orders`; only those whose `sessionId` is this session's are counted. */
|
|
1365
1412
|
orders: readonly PosOrder[];
|
|
1413
|
+
/** `pos_refunds` rows; only this session's applied ones are counted (ADR-080 amendment 1). */
|
|
1414
|
+
refunds?: readonly PosRefund[];
|
|
1366
1415
|
tillExpected?: Record<string, number>;
|
|
1367
1416
|
labels?: {
|
|
1368
1417
|
register_name: string;
|
|
@@ -1896,6 +1945,8 @@ interface UseRegisterSessionOptions {
|
|
|
1896
1945
|
sessions: RegisterSessionCollection | null;
|
|
1897
1946
|
/** `cash_movements`; `null` while it opens. */
|
|
1898
1947
|
movements: CashMovementCollection | null;
|
|
1948
|
+
/** `pos_refunds` (`posRefundCollection()`); `null` while it opens. Leave it out when the app takes no refunds (ADR-080 amendment 1). */
|
|
1949
|
+
refunds?: PosRefundCollection | null;
|
|
1899
1950
|
/** `closures`; `null` while it opens. */
|
|
1900
1951
|
closures: ClosureCollection | null;
|
|
1901
1952
|
/** `register_commands`, created with `registerCommandCollection()`; `null` while it opens. */
|
|
@@ -2014,6 +2065,12 @@ declare function useRegisterSession(options: UseRegisterSessionOptions): {
|
|
|
2014
2065
|
};
|
|
2015
2066
|
};
|
|
2016
2067
|
|
|
2068
|
+
type SessionTarget = {
|
|
2069
|
+
commands: RegisterCommandCollection;
|
|
2070
|
+
sessions: RegisterSessionCollection;
|
|
2071
|
+
sessionId: string;
|
|
2072
|
+
now?: string;
|
|
2073
|
+
};
|
|
2017
2074
|
/**
|
|
2018
2075
|
* Applied opens fill a missing resume id; refused opens make open/counting sessions conflict.
|
|
2019
2076
|
* Superseded rejections make open/counting sessions terminal; a conflict session leaves only by an applied open or abandon (ADR-078 decision 9); terminal/unknown states stay untouched.
|
|
@@ -2025,13 +2082,11 @@ declare function adoptRegisterResults({ commands, sessions, registerId }: {
|
|
|
2025
2082
|
sessions: RegisterSessionCollection;
|
|
2026
2083
|
registerId: string;
|
|
2027
2084
|
}): Promise<void>;
|
|
2028
|
-
declare function takeOverSession({ commands, sessions, sessionId, now }: {
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
sessionId: string;
|
|
2032
|
-
now?: string;
|
|
2085
|
+
declare function takeOverSession({ commands, sessions, sessionId, now, registerContract }: SessionTarget & {
|
|
2086
|
+
/** The store's register contract (`capabilities.register`); take over needs 2, and a missing value counts as below 2. */
|
|
2087
|
+
registerContract?: number;
|
|
2033
2088
|
}): Promise<void>;
|
|
2034
|
-
declare function abandonSession(input:
|
|
2089
|
+
declare function abandonSession(input: SessionTarget): Promise<void>;
|
|
2035
2090
|
|
|
2036
2091
|
type CatalogueEntry<Doc> = {
|
|
2037
2092
|
product: Doc;
|
|
@@ -2448,6 +2503,46 @@ interface UseOrderOutboxResult {
|
|
|
2448
2503
|
/** Opens the order store for `storeKey`, runs its outbox and watches the recent orders (lifted from medusapos/app, ADR-052). */
|
|
2449
2504
|
declare function useOrderOutbox(options: UseOrderOutboxOptions): UseOrderOutboxResult;
|
|
2450
2505
|
|
|
2506
|
+
type OrderRefundOutcome = {
|
|
2507
|
+
kind: 'applied';
|
|
2508
|
+
refund: OrderRefundResult;
|
|
2509
|
+
duplicate: boolean;
|
|
2510
|
+
} | {
|
|
2511
|
+
kind: 'rejected';
|
|
2512
|
+
error: CommandError;
|
|
2513
|
+
} | {
|
|
2514
|
+
kind: 'unknown';
|
|
2515
|
+
reason: string;
|
|
2516
|
+
retryAfterMs?: number;
|
|
2517
|
+
} | {
|
|
2518
|
+
kind: 'refused';
|
|
2519
|
+
status: number;
|
|
2520
|
+
reason: string;
|
|
2521
|
+
} | {
|
|
2522
|
+
kind: 'unauthorized';
|
|
2523
|
+
};
|
|
2524
|
+
/** Online only, never queued (ADR-080). On unknown, resend the same envelope (same id).
|
|
2525
|
+
* After rejected, a new attempt needs a new id. Refused and unauthorized mean the store did not take the batch. */
|
|
2526
|
+
declare function sendOrderRefund(transport: CommandTransport<OrderRefundEnvelope>, envelope: OrderRefundEnvelope): Promise<OrderRefundOutcome>;
|
|
2527
|
+
|
|
2528
|
+
declare class RefundAnswerPendingError extends Error {
|
|
2529
|
+
readonly record: PosRefund;
|
|
2530
|
+
readonly code = "REFUND_ANSWER_PENDING";
|
|
2531
|
+
constructor(record: PosRefund);
|
|
2532
|
+
}
|
|
2533
|
+
/** Online only, never queued; the record is written before the send.
|
|
2534
|
+
* An applied record is final; a pending one is resent only with its own envelope
|
|
2535
|
+
* (ADR-080 amendment 1). */
|
|
2536
|
+
declare function submitOrderRefund({ refunds, transport, envelope, now }: {
|
|
2537
|
+
refunds: PosRefundCollection;
|
|
2538
|
+
transport: CommandTransport<OrderRefundEnvelope>;
|
|
2539
|
+
envelope: OrderRefundEnvelope;
|
|
2540
|
+
now?: () => string;
|
|
2541
|
+
}): Promise<{
|
|
2542
|
+
outcome: OrderRefundOutcome;
|
|
2543
|
+
record: PosRefund;
|
|
2544
|
+
}>;
|
|
2545
|
+
|
|
2451
2546
|
/** The transport a payment terminal is reached over: hardware-neutral, not tied to any backend. */
|
|
2452
2547
|
type PaymentTransport = 'bluetooth' | 'usb' | 'network' | 'tap_to_pay';
|
|
2453
2548
|
type TenderView = 'select' | 'amount' | 'cancel';
|
|
@@ -2633,4 +2728,4 @@ declare function tenderVoidCollection(): {
|
|
|
2633
2728
|
readonly schema: RxJsonSchema<TenderVoid>;
|
|
2634
2729
|
};
|
|
2635
2730
|
|
|
2636
|
-
export { type Actor, type AddLineInput, type AppliedDiscount, type BackendNotFound, type BasketLine, CartError, type CashMovement, type CashMovementCollection, type CatalogueEntry, type CatalogueGridColumns, type CatalogueView, type CatalogueViewAction, type CatalogueViewState, type ChargeInput, type ChargeLine, type Closure, type ClosureCollection, type ClosureContext, type ClosureScope, type CommandTransport, type Correction, CurrencyProvider, type CurrencyProviderProps, type CustomerSummary, DEFAULT_CATALOGUE_VIEW_STATE, DISCOUNTS_UNSUPPORTED, type Discount, type DisplayLine, type DisplayTotals, type FeeLine, type FinalizeOptions, type HttpTransportOptions, type LedgerRow, type LineItem, type LineTaxLine, type LogEntry, type LogLevel, type LogSink, type Logger, MAX_TENDER_MINOR, MICROS_PER_MINOR, type Movement$1 as Movement, type MovementType, type Order, type OrderBuilder, type OrderBuilderOptions, OrderContentMismatchError, type OrderManager, type OrderManagerOptions, type OrderOutbox, type OrderOutboxOptions, type OrderTaxTotals, type OrderTransportContext, type OutboxState, PRODUCT_SORT_FIELDS, type ParkedOrderSummary, type Payment, type PaymentMethod, type PaymentTransport, type PlanLeg, type PosOrder, type PosOrderLine, type PosOrderLocalWarning, PosOrderOpenClosedError, type PosOrderPayment, type PosOrderServerFailures, type PosOrderSyncStatus, type ProductSort, type ProductSortValue, RECEIPT_SCHEMA_VERSION, REGISTER_SESSION_MIGRATION_CLOSE_WAIT_MS, type RateTaxLine, type ReceiptConfig, type ReceiptData, type ReceiptFiscal, type ReceiptLineItem, type ReceiptRegister, type ReceiptSoftware, type RecordedFigures, 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, type RegisterSession, RegisterSessionAlreadyOpenError, RegisterSessionClosedError, type RegisterSessionCollection, RegisterSessionConflictError, RegisterSessionOpenClosedError, RegisterSessionRequiredError, type RegisterStore, RegisterTakeOverError, RegisterTenderInProgressError, type Repository, type ResolveStoreSettingsOptions, SALE_SAVING, type SaleStage, type SentOrder, type ShippingLine, type SplitTab, type StoreSettingsResolution, type StoreSettingsState, TAX_ROUNDING_MIXED_NOTE, type TaxContext, type TaxLineInput, TaxProvider, type TaxProviderProps, type TaxRateMap, type TenderAction, type TenderKey, type TenderLineId, type TenderPlan, type TenderState, type TenderView, type TenderVoid, type TransportOutcome, UnsupportedOrderVersionError, type UseOrderOutboxOptions, type UseOrderOutboxResult, type UseRegisterOutboxOptions, type UseRegisterOutboxResult, type UseRegisterSessionOptions, abandonSession, activePlan, addEntryToCart, addPosOrderCollection, addRegisterSessionCollection, adoptRegisterResults, advancePerpetual, allocateOrderDiscount, appliedMinor, backToSelling, bindRegister, buildClosureDocument, buildReceiptData, buildXReportDocument, callbackSink, cashMovementSchema, catalogueEntries, catalogueViewReducer, changeMinor, clampClosureScope, closeNeedsApproval, closeSession, closureCommand, closureSchema, computeOrderTax, consoleSink, countVariance, createBackendNotFound, createHttpCommandTransport, createLogger, createOrderBuilder, createOrderManager, createOrderOutbox, createRegisterOutbox, createRepository, denominationTotal, denominations, deriveExpected, deriveSettled, ensureRegister, evenSplitShareMinor, exportCsv, finalizeOrder, findEntryByCode, formatClosureDate, getBoundRegisterId, getDeviceId, inCategory, initTenderState, initialTenderState, isKnownSessionStatus, isServerDecimal, labelKeys, listCategories, minorToDecimal, mintClosureNumber, mintUuid, movementCommand, movementFieldError, needsAttention, nextSaleCounter, normalizeAmount, normalizeCatalogueViewState, observeRegister$, openSession, openSessionSelector, orderDraftSchema, outboxLogger, overThreshold, parkedOrderSummaries$, parseMinor, planLegs, posOrderCollection, posOrderSchema, posOrdersLogger, productCategories, productSortValue, quickTenderedAmounts, ratePpmFromPercent, readBoundRegister, readRegister, reconcileRegisterCommands, recordMovement, recordRegisterFact, registerCommandCollection, registerCommandSchema, registerCommandsLogger, registerFactsLogger, registerSessionCollection, registerSessionSchema, registerSessionsLogger, requireOpenSession, resolveGridColumns, resolveStoreSettings, restoreOrderDraft, roundMicrosToMinor, saleLogger, sameSale, searchProducts, selectClosureRows, sessionOpenCommand, sessionTransitionCommand, sortProducts, stampSession, startCounting, stockOverlay$, stockOverlayAsOf$, takeOverSession, taxFiguresForBasket, taxLinesByRate, taxLogger, taxMicros, taxProviderProps, tenderReducer, tenderVoidCollection, tenderVoidSchema, toOrderCreateEnvelope, unbindRegister, useCurrencyCode, useCurrencyFormatter, useOrderOutbox, useParkedSales, useRegisterOutbox, useRegisterSession, useSale, useStoreSettings, useTax, uuidv7, validAmount, varianceText, variantPriceLabel, voidMovement, withPricingContext, writeClosure, writeOrderDraft };
|
|
2731
|
+
export { type Actor, type AddLineInput, type AppliedDiscount, type BackendNotFound, type BasketLine, CartError, type CashMovement, type CashMovementCollection, type CatalogueEntry, type CatalogueGridColumns, type CatalogueView, type CatalogueViewAction, type CatalogueViewState, type ChargeInput, type ChargeLine, type Closure, type ClosureCollection, type ClosureContext, type ClosureScope, type CommandTransport, type Correction, CurrencyProvider, type CurrencyProviderProps, type CustomerSummary, DEFAULT_CATALOGUE_VIEW_STATE, DISCOUNTS_UNSUPPORTED, type Discount, type DisplayLine, type DisplayTotals, type FeeLine, type FinalizeOptions, type HttpTransportOptions, type LedgerRow, type LineItem, type LineTaxLine, type LogEntry, type LogLevel, type LogSink, type Logger, MAX_TENDER_MINOR, MICROS_PER_MINOR, type Movement$1 as Movement, type MovementType, type Order, type OrderBuilder, type OrderBuilderOptions, OrderContentMismatchError, type OrderCoupon, type OrderCouponContext, type OrderManager, type OrderManagerOptions, type OrderOutbox, type OrderOutboxOptions, type OrderRefundOutcome, type OrderTaxTotals, type OrderTransportContext, type OutboxState, PRODUCT_SORT_FIELDS, type ParkedOrderSummary, type Payment, type PaymentMethod, type PaymentTransport, type PlanLeg, type PosOrder, type PosOrderLine, type PosOrderLocalWarning, PosOrderOpenClosedError, type PosOrderPayment, type PosOrderServerFailures, type PosOrderSyncStatus, type PosRefund, type PosRefundCollection, type PosRefundStatus, type ProductSort, type ProductSortValue, RECEIPT_SCHEMA_VERSION, REGISTER_SESSION_MIGRATION_CLOSE_WAIT_MS, type RateTaxLine, type ReceiptConfig, type ReceiptData, type ReceiptFiscal, type ReceiptLineItem, type ReceiptRegister, type ReceiptSoftware, 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, type RegisterSession, RegisterSessionAlreadyOpenError, RegisterSessionClosedError, type RegisterSessionCollection, RegisterSessionConflictError, RegisterSessionOpenClosedError, RegisterSessionRequiredError, type RegisterStore, RegisterTakeOverError, RegisterTenderInProgressError, type Repository, type ResolveStoreSettingsOptions, SALE_SAVING, type SaleStage, type SentOrder, type ShippingLine, type SplitTab, type StoreSettingsResolution, type StoreSettingsState, TAX_ROUNDING_MIXED_NOTE, type TaxContext, type TaxLineInput, TaxProvider, type TaxProviderProps, type TaxRateMap, type TenderAction, type TenderKey, type TenderLineId, type TenderPlan, type TenderState, type TenderView, type TenderVoid, type TransportOutcome, UnsupportedOrderVersionError, type UseOrderOutboxOptions, type UseOrderOutboxResult, type UseRegisterOutboxOptions, type UseRegisterOutboxResult, type UseRegisterSessionOptions, abandonSession, activePlan, addEntryToCart, addPosOrderCollection, addRegisterSessionCollection, adoptRegisterResults, advancePerpetual, allocateOrderDiscount, appliedMinor, backToSelling, bindRegister, buildClosureDocument, buildReceiptData, buildXReportDocument, callbackSink, cashMovementSchema, catalogueEntries, catalogueViewReducer, changeMinor, clampClosureScope, closeNeedsApproval, closeSession, closureCommand, closureSchema, computeOrderTax, consoleSink, countVariance, createBackendNotFound, createHttpCommandTransport, createLogger, createOrderBuilder, createOrderManager, createOrderOutbox, createRegisterOutbox, createRepository, denominationTotal, denominations, deriveExpected, deriveSettled, ensureRegister, evenSplitShareMinor, exportCsv, finalizeOrder, findEntryByCode, formatClosureDate, getBoundRegisterId, getDeviceId, inCategory, initTenderState, initialTenderState, isKnownSessionStatus, isServerDecimal, labelKeys, listCategories, minorToDecimal, mintClosureNumber, mintUuid, movementCommand, movementFieldError, needsAttention, nextSaleCounter, normalizeAmount, normalizeCatalogueViewState, observeRegister$, openSession, openSessionSelector, orderDraftSchema, outboxLogger, overThreshold, parkedOrderSummaries$, parseMinor, planLegs, posOrderCollection, posOrderSchema, posOrdersLogger, posRefundCollection, posRefundSchema, productCategories, productSortValue, quickTenderedAmounts, ratePpmFromPercent, readBoundRegister, readRegister, reconcileRegisterCommands, recordMovement, recordRegisterFact, registerCommandCollection, registerCommandSchema, registerCommandsLogger, registerFactsLogger, registerSessionCollection, registerSessionSchema, registerSessionsLogger, requireOpenSession, resolveGridColumns, resolveStoreSettings, restoreOrderDraft, roundMicrosToMinor, saleLogger, sameSale, searchProducts, selectClosureRows, sendOrderRefund, sessionOpenCommand, sessionTransitionCommand, sortProducts, stampSession, startCounting, stockOverlay$, stockOverlayAsOf$, submitOrderRefund, takeOverSession, taxFiguresForBasket, taxLinesByRate, taxLogger, taxMicros, taxProviderProps, tenderReducer, tenderVoidCollection, tenderVoidSchema, toOrderCreateEnvelope, unbindRegister, useCurrencyCode, useCurrencyFormatter, useOrderOutbox, useParkedSales, useRegisterOutbox, useRegisterSession, useSale, useStoreSettings, useTax, uuidv7, validAmount, varianceText, variantPriceLabel, voidMovement, withPricingContext, writeClosure, writeOrderDraft };
|