@tallyui/core 4.1.0 → 5.0.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/{chunk-XF3RD6GX.js → chunk-RPBSJ3FB.js} +62 -2
- package/dist/index.d.ts +10 -4
- package/dist/index.js +25 -7
- package/dist/{tax-rate-DCJhfJbZ.d.ts → refund-share-BZ_Ff9Zk.d.ts} +145 -3
- package/dist/server/index.cjs +96 -2
- package/dist/server/index.d.cts +105 -3
- package/dist/server/index.d.ts +21 -4
- package/dist/server/index.js +40 -3
- package/package.json +4 -1
- package/src/commands.ts +2 -0
- package/src/index.ts +8 -3
- package/src/order-filters.ts +14 -6
- package/src/server/batch-outcome.ts +7 -0
- package/src/server/batch.ts +6 -1
- package/src/server/command-result.ts +3 -1
- package/src/server/fiscal-figures.ts +13 -0
- package/src/server/index.ts +4 -2
- package/src/server/order-payload-shape.ts +12 -0
- package/src/server/refund-share.ts +92 -0
- package/src/server/round-ratio.ts +10 -0
- package/src/server/versions.ts +6 -2
- package/src/types/commands.ts +4 -1
- package/src/types/connector.ts +10 -1
- package/src/types/orders.ts +69 -2
|
@@ -49,6 +49,7 @@ var PROTOCOL_HEADER = "X-Tally-Protocol";
|
|
|
49
49
|
var PROTOCOL_VERSION = 1;
|
|
50
50
|
var MAX_COMMANDS_PER_BATCH = 50;
|
|
51
51
|
var ORDER_NOTE_MAX = 1e3;
|
|
52
|
+
var NEEDS_ADMIN_MESSAGE_MAX = 500;
|
|
52
53
|
var ORDER_TAX_IDS_MAX = 10;
|
|
53
54
|
var ORDER_TAX_ID_TYPE_MAX = 32;
|
|
54
55
|
var ORDER_TAX_ID_VALUE_MAX = 64;
|
|
@@ -288,7 +289,8 @@ function parseCommandResult(value) {
|
|
|
288
289
|
return [key, amount];
|
|
289
290
|
}));
|
|
290
291
|
if (Object.values(byMethod).reduce((sum, amount) => sum + amount, 0) !== refund.totalMinor) throw new CommandResultError("Invalid refund.byMethod");
|
|
291
|
-
if (!Array.isArray(refund.refunds)
|
|
292
|
+
if (!Array.isArray(refund.refunds)) throw new CommandResultError("Invalid refund.refunds");
|
|
293
|
+
if (refund.refunds.length === 0 && (refund.totalMinor !== 0 || Object.keys(byMethod).length > 0)) throw new CommandResultError("Invalid refund.refunds");
|
|
292
294
|
const refunds = refund.refunds.map((value2, index) => {
|
|
293
295
|
const field = `refund.refunds[${index}]`;
|
|
294
296
|
if (!object(value2)) throw new CommandResultError(`Invalid ${field}`);
|
|
@@ -479,6 +481,60 @@ function ratePpmFromPercent(percent) {
|
|
|
479
481
|
return Number(ratePpm);
|
|
480
482
|
}
|
|
481
483
|
|
|
484
|
+
// src/server/round-ratio.ts
|
|
485
|
+
function roundRatio(n, d, mode = "half_away_from_zero") {
|
|
486
|
+
if (mode === "half_away_from_zero" && n < 0n) return -roundRatio(-n, d, mode);
|
|
487
|
+
const a = 2n * n + d, b = 2n * d;
|
|
488
|
+
return a / b - (a < 0n && a % b !== 0n ? 1n : 0n);
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
// src/server/refund-share.ts
|
|
492
|
+
function refundableLines(lines, refunds) {
|
|
493
|
+
const earlier = refunds.flatMap((refund) => refund.lines);
|
|
494
|
+
for (const refund of earlier) {
|
|
495
|
+
if (!Number.isSafeInteger(refund.quantity)) throw new RangeError("Earlier refund quantity must be a safe integer");
|
|
496
|
+
}
|
|
497
|
+
return lines.map((line) => {
|
|
498
|
+
if (!Number.isSafeInteger(line.quantity) || line.quantity < 0 || !Number.isSafeInteger(line.totalMinor) || !Number.isSafeInteger(line.taxMinor)) {
|
|
499
|
+
throw new RangeError("Order line values must be safe integers and quantity non-negative");
|
|
500
|
+
}
|
|
501
|
+
const refundedQuantity = earlier.reduce((sum, refund) => refund.orderLineId === line.id ? Math.min(line.quantity, sum + Math.abs(refund.quantity)) : sum, 0);
|
|
502
|
+
const [netMinor, taxMinor] = [line.totalMinor, line.taxMinor].map((total) => line.quantity === 0 ? 0 : total - Number(roundRatio(BigInt(refundedQuantity) * BigInt(total), BigInt(line.quantity), "half_up")));
|
|
503
|
+
return {
|
|
504
|
+
orderLineId: line.id,
|
|
505
|
+
refundedQuantity,
|
|
506
|
+
refundableQuantity: line.quantity - refundedQuantity,
|
|
507
|
+
netMinor,
|
|
508
|
+
taxMinor
|
|
509
|
+
};
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
function priceRefund(lines, refunds, request) {
|
|
513
|
+
const available = refundableLines(lines, refunds);
|
|
514
|
+
const seen = /* @__PURE__ */ new Set();
|
|
515
|
+
const result = { lines: [], priced: [], clamped: [], netMinor: 0, taxMinor: 0, totalMinor: 0 };
|
|
516
|
+
for (const { orderLineId, quantity: requestedQuantity, restock } of request) {
|
|
517
|
+
if (!Number.isSafeInteger(requestedQuantity) || requestedQuantity < 0 || seen.has(orderLineId)) {
|
|
518
|
+
throw new RangeError("Request quantities must be non-negative safe integers and line ids unique");
|
|
519
|
+
}
|
|
520
|
+
seen.add(orderLineId);
|
|
521
|
+
const index = lines.findIndex((line2) => line2.id === orderLineId);
|
|
522
|
+
const quantity = Math.min(requestedQuantity, available[index]?.refundableQuantity ?? 0);
|
|
523
|
+
if (quantity < requestedQuantity) result.clamped.push({ orderLineId, requestedQuantity, quantity });
|
|
524
|
+
if (quantity < 1) continue;
|
|
525
|
+
const line = lines[index];
|
|
526
|
+
const refundedQuantity = available[index].refundedQuantity;
|
|
527
|
+
const [netMinor, taxMinor] = [line.totalMinor, line.taxMinor].map((total) => Number(roundRatio(BigInt(refundedQuantity + quantity) * BigInt(total), BigInt(line.quantity), "half_up")) - Number(roundRatio(BigInt(refundedQuantity) * BigInt(total), BigInt(line.quantity), "half_up")));
|
|
528
|
+
const totalMinor = netMinor + taxMinor;
|
|
529
|
+
result.lines.push({ orderLineId, quantity, restock });
|
|
530
|
+
result.priced.push({ orderLineId, quantity, netMinor, taxMinor, totalMinor });
|
|
531
|
+
result.netMinor += netMinor;
|
|
532
|
+
result.taxMinor += taxMinor;
|
|
533
|
+
result.totalMinor += totalMinor;
|
|
534
|
+
}
|
|
535
|
+
return result;
|
|
536
|
+
}
|
|
537
|
+
|
|
482
538
|
export {
|
|
483
539
|
DISPLAY_PAIR_CAPABILITY,
|
|
484
540
|
DisplaySignallingError,
|
|
@@ -488,6 +544,7 @@ export {
|
|
|
488
544
|
PROTOCOL_VERSION,
|
|
489
545
|
MAX_COMMANDS_PER_BATCH,
|
|
490
546
|
ORDER_NOTE_MAX,
|
|
547
|
+
NEEDS_ADMIN_MESSAGE_MAX,
|
|
491
548
|
ORDER_TAX_IDS_MAX,
|
|
492
549
|
ORDER_TAX_ID_TYPE_MAX,
|
|
493
550
|
ORDER_TAX_ID_VALUE_MAX,
|
|
@@ -511,5 +568,8 @@ export {
|
|
|
511
568
|
parseCommandResult,
|
|
512
569
|
deriveSessionFigures,
|
|
513
570
|
deriveVariance,
|
|
514
|
-
ratePpmFromPercent
|
|
571
|
+
ratePpmFromPercent,
|
|
572
|
+
roundRatio,
|
|
573
|
+
refundableLines,
|
|
574
|
+
priceRefund
|
|
515
575
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { I as IceServer, D as DisplayAdvertisement, O as OrderFilterField, L as ListOrdersQuery, V as VariantSummary, C as CommandWarning, P as ProductTraits, S as StockReconcileAdapter, a as StockLevel, R as ReplicationAdapter, b as SyncContext, T as TallyConnector, c as TraitContext, d as CustomerTraits, M as MoneyFormat, e as Money, f as CalculateTaxesInput, g as CalculateTaxesResult, W as WooTaxRate, h as ItemizedTax, i as ResolvedTaxLocation, j as TAX_BASED_ON_META_KEY, k as TaxAddress, l as TaxBasedOn, m as TaxLocationOrder, n as normalizeTaxBasedOn, o as orderTaxLocation } from './
|
|
2
|
-
export { A as AnyCommandEnvelope, p as ApproverCredentials, q as AuthField, B as BatchTooLargeBody, r as CASHIER_PERMISSIONS, s as COMMANDS_PATH, t as CaptureMode, u as CaptureModeEntry, v as Cashier, w as CashierPermission, x as CatalogueReconcileAdapter, y as CatalogueReconcileEntry, z as ClosureReads, E as CollectionSync, F as CommandBatchRequest, G as CommandBatchResponse, H as CommandEnvelope, J as CommandError, K as CommandResult, N as CommandResultError, Q as CommandServerRefs, U as CommandStatus, X as CommandType, Y as ConnectivityState, Z as ConnectorAuth, _ as ConnectorSchemas, $ as ConnectorTraits, a0 as Correction, a1 as Customer, a2 as CustomerAddress, a3 as CustomerInput, a4 as CustomerPage, a5 as CustomerPatch, a6 as CustomerServiceError, a7 as CustomerTaxId, a8 as DISPLAY_PAIR_CAPABILITY, a9 as DisplayRecord, aa as DisplaySignalling, ab as DisplaySignallingContext, ac as DisplaySignallingError, ad as DisplaySignallingErrorCode, ae as
|
|
1
|
+
import { I as IceServer, D as DisplayAdvertisement, O as OrderFilterField, L as ListOrdersQuery, V as VariantSummary, C as CommandWarning, P as ProductTraits, S as StockReconcileAdapter, a as StockLevel, R as ReplicationAdapter, b as SyncContext, T as TallyConnector, c as TraitContext, d as CustomerTraits, M as MoneyFormat, e as Money, f as CalculateTaxesInput, g as CalculateTaxesResult, W as WooTaxRate, h as ItemizedTax, i as ResolvedTaxLocation, j as TAX_BASED_ON_META_KEY, k as TaxAddress, l as TaxBasedOn, m as TaxLocationOrder, n as normalizeTaxBasedOn, o as orderTaxLocation } from './refund-share-BZ_Ff9Zk.js';
|
|
2
|
+
export { A as AnyCommandEnvelope, p as ApproverCredentials, q as AuthField, B as BatchTooLargeBody, r as CASHIER_PERMISSIONS, s as COMMANDS_PATH, t as CaptureMode, u as CaptureModeEntry, v as Cashier, w as CashierPermission, x as CatalogueReconcileAdapter, y as CatalogueReconcileEntry, z as ClosureReads, E as CollectionSync, F as CommandBatchRequest, G as CommandBatchResponse, H as CommandEnvelope, J as CommandError, K as CommandResult, N as CommandResultError, Q as CommandServerRefs, U as CommandStatus, X as CommandType, Y as ConnectivityState, Z as ConnectorAuth, _ as ConnectorSchemas, $ as ConnectorTraits, a0 as Correction, a1 as Customer, a2 as CustomerAddress, a3 as CustomerInput, a4 as CustomerPage, a5 as CustomerPatch, a6 as CustomerServiceError, a7 as CustomerTaxId, a8 as DISPLAY_PAIR_CAPABILITY, a9 as DisplayRecord, aa as DisplaySignalling, ab as DisplaySignallingContext, ac as DisplaySignallingError, ad as DisplaySignallingErrorCode, ae as EarlierRefund, af as FailureClass, ag as FingerprintReconcileAdapter, ah as IdReconcileAdapter, ai as ListRefundsQuery, aj as MAX_COMMANDS_PER_BATCH, ak as NEEDS_ADMIN_MESSAGE_MAX, al as ORDER_LINE_SKU_MAX, am as ORDER_META_KEY_MAX, an as ORDER_META_MAX, ao as ORDER_NOTE_MAX, ap as ORDER_TAX_IDS_MAX, aq as ORDER_TAX_ID_TYPE_MAX, ar as ORDER_TAX_ID_VALUE_MAX, as as OrderAddress, at as OrderCreateCoupon, au as OrderCreateCouponInvalidData, av as OrderCreateCouponLine, aw as OrderCreateDisplay, ax as OrderCreateEnvelope, ay as OrderCreateLine, az as OrderCreateMeta, aA as OrderCreatePayload, aB as OrderCreatePayment, aC as OrderCreateTaxId, aD as OrderCreateTaxRate, aE as OrderCreateTotalMismatchData, aF as OrderRefundAmountMismatchData, aG as OrderRefundEnvelope, aH as OrderRefundLine, aI as OrderRefundNoOpenSessionData, aJ as OrderRefundOrderStateData, aK as OrderRefundPayload, aL as OrderRefundQuantityExceedsData, aM as OrderRefundRejectionCode, aN as OrderRefundResult, aO as OrderReopenEnvelope, aP as OrderReopenOrderStateData, aQ as OrderReopenPayload, aR as OrderReopenPaymentInMotionData, aS as OrderReopenRejectionCode, aT as OrderReopenResult, aU as OrderUpdateEnvelope, aV as OrderUpdateFee, aW as OrderUpdateLine, aX as OrderUpdatePayload, aY as OrderUpdatePayment, aZ as OrderUpdateRejectionCode, a_ as OrderUpdateReopenRequiredData, a$ as OrderUpdateShipping, b0 as PROTOCOL_HEADER, b1 as PROTOCOL_VERSION, b2 as PaymentHardware, b3 as PaymentKind, b4 as PaymentMethodDescriptor, b5 as PaymentMethodKind, b6 as PaymentOfflineMode, b7 as PaymentRounding, b8 as PaymentTipsMode, b9 as PaymentTransport, ba as PendingPairing, bb as PricedRefund, bc as PricedRefundLine, bd as ProductCategory, be as ProductPrice, bf as ProductTerm, bg as ReceiptTemplate, bh as ReceiptTemplateKind, bi as RefundableLine, bj as RefundableOrderLine, bk as RegisterApprovalInvalidData, bl as RegisterApprovalRequiredData, bm as RegisterClosureSubmitPayload, bn as RegisterCommandEnvelope, bo as RegisterCommandResult, bp as RegisterCommandType, bq as RegisterInfo, br as RegisterMovementRecordPayload, bs as RegisterMovementVoidPayload, bt as RegisterSessionAlreadyOpenData, bu as RegisterSessionOpenPayload, bv as RegisterSessionSupersededData, bw as RegisterSessionTransitionPayload, bx as RemoteIdEntry, by as ResolvedPrice, bz as RoundingMode, bA as ServerCapabilities, bB as SignInResult, bC as SignalMessage, bD as StockStatus, bE as StoreClosure, bF as StoreOrder, bG as StoreOrderCharge, bH as StoreOrderLine, bI as StoreOrderPage, bJ as StoreOrderPayment, bK as StoreOrderRefund, bL as StoreOrderRefundLine, bM as StoreRefund, bN as StoreRefundOrphan, bO as StoreRefundPage, bP as StoreSettings, bQ as StoreSettingsChoice, bR as StoreTaxClass, bS as StoreTaxRate, bT as StoreTaxRateLocation, bU as TaxRounding, bV as TillDevice, bW as UpdateRequired, bX as VariantOptionGroup, bY as cashierPermissions, bZ as classifyFailure, b_ as currencySymbol, b$ as customerTraits, c0 as defaultPaymentMethods, c1 as deriveSessionFigures, c2 as deriveVariance, c3 as formatMoney, c4 as isCashierPermission, c5 as isCommandBatchResponse, c6 as legMethodId, c7 as minorToMajor, c8 as minorUnitDigits, c9 as moneyFromDecimalString, ca as moneyFromMajor, cb as moneyToMajor, cc as neutralFailureClass, cd as noResponse, ce as normalizeMoneyText, cf as parseCommandResult, cg as parseInfoCapabilities, ch as parseLineTax, ci as parseTaxRounding, cj as paymentMethodOf, ck as priceRefund, cl as ratePpmFromPercent, cm as refundableLines, cn as resolveCapabilities, co as resolvePrice, cp as resolvePriceRange, cq as roundRatio, cr as wireMethodOf } from './refund-share-BZ_Ff9Zk.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
5
|
import 'rxdb';
|
|
@@ -121,12 +121,18 @@ declare class UnsupportedOrderFilterError extends Error {
|
|
|
121
121
|
readonly fields: OrderFilterField[];
|
|
122
122
|
constructor(fields: OrderFilterField[]);
|
|
123
123
|
}
|
|
124
|
+
/** listRefunds cannot read this store's refunds (for example, a plugin too old to serve them). The app treats it as an absent listRefunds. */
|
|
125
|
+
declare class StoreRefundsUnsupportedError extends Error {
|
|
126
|
+
readonly code = "store_refunds_unsupported";
|
|
127
|
+
constructor(message: string);
|
|
128
|
+
}
|
|
124
129
|
/** The filter fields a query sets (a field counts when its value is not undefined; dateRange counts when after or before is set). */
|
|
125
130
|
declare function orderFilterFields(query: ListOrdersQuery | undefined): OrderFilterField[];
|
|
126
131
|
/**
|
|
127
132
|
* Throws UnsupportedOrderFilterError naming every set field not in `supported`, in OrderFilterField order. A connector
|
|
128
133
|
* calls this first in listOrders. An empty string is a set value, so it is refused too. When `dateRange` is set and
|
|
129
|
-
* supported, it is checked with `assertOrderDateRange
|
|
134
|
+
* supported, it is checked with `assertOrderDateRange`; a set and supported `modifiedAfter` must be a UTC instant
|
|
135
|
+
* ending in Z, as a `dateRange` end must.
|
|
130
136
|
*/
|
|
131
137
|
declare function assertOrderFiltersSupported(query: ListOrdersQuery | undefined, supported: readonly OrderFilterField[] | undefined): void;
|
|
132
138
|
/**
|
|
@@ -869,4 +875,4 @@ declare namespace index {
|
|
|
869
875
|
export { type index_CouponContext as CouponContext, type index_CouponDiscountConfig as CouponDiscountConfig, type index_CouponInput as CouponInput, type index_CouponLineInput as CouponLineInput, type index_CouponRejection as CouponRejection, type index_CouponRejectionCode as CouponRejectionCode, type index_CouponValidationContext as CouponValidationContext, type index_EngineWarning as EngineWarning, type index_LineItemInput as LineItemInput, type index_OrderTotals as OrderTotals, type index_RecalculateInput as RecalculateInput, type index_RecalculateResult as RecalculateResult, type index_TaxRateInput as TaxRateInput, type index_ValidationResult as ValidationResult, index_calculateOrderTotals as calculateOrderTotals, index_enrichCategoriesWithAncestors as enrichCategoriesWithAncestors, index_recalculateCoupons as recalculateCoupons, index_toCouponConfigs as toCouponConfigs, index_validateCoupon as validateCoupon };
|
|
870
876
|
}
|
|
871
877
|
|
|
872
|
-
export { CommandWarning, ConnectorProvider, type ConnectorProviderProps, ConnectorUnauthorizedError, CustomerTraits, DEFAULT_ICE_SERVERS, DisplayAdvertisement, type ErrorKind, IceServer, type KeyedReconcileFeedOptions, ListOrdersQuery, Money, MoneyFormat, MoneyFormatProvider, type MoneyFormatProviderProps, ORDER_FILTER_FIELDS, OrderFilterField, ProductTraits, type ReconcileFeed, type ReconcileFeedEntry, type ReconcileFetchEntry, ReplicationAdapter, STOCK_LEVELS_LAST_PASS, SignInError, type SignInErrorCode, StockLevel, StockReconcileAdapter, type StoreSettingsChoices, StoreSettingsError, type StoreSettingsErrorCode, SyncContext, type SyncNotice, TallyConnector, TraitContext, UnsupportedOrderFilterError, VariantSummary, assertOrderDateRange, assertOrderFiltersSupported, combinePullAdapters, compareIds, createReconcileFeed, errorKind, findVariantByCode, fnv1a32, getProductStock, isRxdbRemoteVersionMismatch, knownWarnings, orderFilterFields, parseDisplayAdvertisement, rateLimitSource, useConnector, useCurrencySymbol, useCustomerTraits, useFormatMoney, useMoneyFormat, useProductStock, useProductTraits, useStockOverlaid, useStockOverlayAsOf, useTraitContext, withStockOverlay, index as woocommerceCoupons, index$1 as woocommerceTax };
|
|
878
|
+
export { CommandWarning, ConnectorProvider, type ConnectorProviderProps, ConnectorUnauthorizedError, CustomerTraits, DEFAULT_ICE_SERVERS, DisplayAdvertisement, type ErrorKind, IceServer, type KeyedReconcileFeedOptions, ListOrdersQuery, Money, MoneyFormat, MoneyFormatProvider, type MoneyFormatProviderProps, ORDER_FILTER_FIELDS, OrderFilterField, ProductTraits, type ReconcileFeed, type ReconcileFeedEntry, type ReconcileFetchEntry, ReplicationAdapter, STOCK_LEVELS_LAST_PASS, SignInError, type SignInErrorCode, StockLevel, StockReconcileAdapter, StoreRefundsUnsupportedError, type StoreSettingsChoices, StoreSettingsError, type StoreSettingsErrorCode, SyncContext, type SyncNotice, TallyConnector, TraitContext, UnsupportedOrderFilterError, VariantSummary, assertOrderDateRange, assertOrderFiltersSupported, combinePullAdapters, compareIds, createReconcileFeed, errorKind, findVariantByCode, fnv1a32, getProductStock, isRxdbRemoteVersionMismatch, knownWarnings, orderFilterFields, parseDisplayAdvertisement, rateLimitSource, useConnector, useCurrencySymbol, useCustomerTraits, useFormatMoney, useMoneyFormat, useProductStock, useProductTraits, useStockOverlaid, useStockOverlayAsOf, useTraitContext, withStockOverlay, index as woocommerceCoupons, index$1 as woocommerceTax };
|
package/dist/index.js
CHANGED
|
@@ -4,6 +4,7 @@ import {
|
|
|
4
4
|
DISPLAY_PAIR_CAPABILITY,
|
|
5
5
|
DisplaySignallingError,
|
|
6
6
|
MAX_COMMANDS_PER_BATCH,
|
|
7
|
+
NEEDS_ADMIN_MESSAGE_MAX,
|
|
7
8
|
ORDER_LINE_SKU_MAX,
|
|
8
9
|
ORDER_META_KEY_MAX,
|
|
9
10
|
ORDER_META_MAX,
|
|
@@ -25,11 +26,14 @@ import {
|
|
|
25
26
|
moneyToMajor,
|
|
26
27
|
normalizeMoneyText,
|
|
27
28
|
parseCommandResult,
|
|
29
|
+
priceRefund,
|
|
28
30
|
rateLimitSource,
|
|
29
31
|
ratePpmFromPercent,
|
|
32
|
+
refundableLines,
|
|
30
33
|
resolvePrice,
|
|
31
|
-
resolvePriceRange
|
|
32
|
-
|
|
34
|
+
resolvePriceRange,
|
|
35
|
+
roundRatio
|
|
36
|
+
} from "./chunk-RPBSJ3FB.js";
|
|
33
37
|
import {
|
|
34
38
|
__export
|
|
35
39
|
} from "./chunk-MLKGABMK.js";
|
|
@@ -301,7 +305,8 @@ var ORDER_FILTER_FIELDS = [
|
|
|
301
305
|
"paymentMethod",
|
|
302
306
|
"storeId",
|
|
303
307
|
"createdVia",
|
|
304
|
-
"dateRange"
|
|
308
|
+
"dateRange",
|
|
309
|
+
"modifiedAfter"
|
|
305
310
|
];
|
|
306
311
|
var UnsupportedOrderFilterError = class extends Error {
|
|
307
312
|
code = "unsupported_order_filter";
|
|
@@ -312,6 +317,13 @@ var UnsupportedOrderFilterError = class extends Error {
|
|
|
312
317
|
this.fields = fields;
|
|
313
318
|
}
|
|
314
319
|
};
|
|
320
|
+
var StoreRefundsUnsupportedError = class extends Error {
|
|
321
|
+
code = "store_refunds_unsupported";
|
|
322
|
+
constructor(message) {
|
|
323
|
+
super(message);
|
|
324
|
+
this.name = "StoreRefundsUnsupportedError";
|
|
325
|
+
}
|
|
326
|
+
};
|
|
315
327
|
function orderFilterFields(query) {
|
|
316
328
|
if (!query) return [];
|
|
317
329
|
return ORDER_FILTER_FIELDS.filter((field) => {
|
|
@@ -324,16 +336,17 @@ function assertOrderFiltersSupported(query, supported) {
|
|
|
324
336
|
const missing = set.filter((field) => !supported?.includes(field));
|
|
325
337
|
if (missing.length > 0) throw new UnsupportedOrderFilterError(missing);
|
|
326
338
|
if (set.includes("dateRange")) assertOrderDateRange(query?.dateRange);
|
|
339
|
+
if (set.includes("modifiedAfter")) instantMs("modifiedAfter", query?.modifiedAfter);
|
|
327
340
|
}
|
|
328
341
|
var UTC_INSTANT = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2}(\.\d+)?)?Z$/;
|
|
329
|
-
function instantMs(
|
|
342
|
+
function instantMs(label, value) {
|
|
330
343
|
const ms = typeof value === "string" && UTC_INSTANT.test(value) ? Date.parse(value) : Number.NaN;
|
|
331
|
-
if (Number.isNaN(ms)) throw new TypeError(
|
|
344
|
+
if (Number.isNaN(ms)) throw new TypeError(`${label} must be an ISO 8601 UTC instant ending in Z: ${String(value)}`);
|
|
332
345
|
return ms;
|
|
333
346
|
}
|
|
334
347
|
function assertOrderDateRange(range) {
|
|
335
|
-
const after = range?.after === void 0 ? void 0 : instantMs("after", range.after);
|
|
336
|
-
const before = range?.before === void 0 ? void 0 : instantMs("before", range.before);
|
|
348
|
+
const after = range?.after === void 0 ? void 0 : instantMs("dateRange.after", range.after);
|
|
349
|
+
const before = range?.before === void 0 ? void 0 : instantMs("dateRange.before", range.before);
|
|
337
350
|
if (after !== void 0 && before !== void 0 && after > before) {
|
|
338
351
|
throw new TypeError(`dateRange.after (${range?.after}) is later than dateRange.before (${range?.before})`);
|
|
339
352
|
}
|
|
@@ -1959,6 +1972,7 @@ export {
|
|
|
1959
1972
|
DisplaySignallingError,
|
|
1960
1973
|
MAX_COMMANDS_PER_BATCH,
|
|
1961
1974
|
MoneyFormatProvider,
|
|
1975
|
+
NEEDS_ADMIN_MESSAGE_MAX,
|
|
1962
1976
|
ORDER_FILTER_FIELDS,
|
|
1963
1977
|
ORDER_LINE_SKU_MAX,
|
|
1964
1978
|
ORDER_META_KEY_MAX,
|
|
@@ -1971,6 +1985,7 @@ export {
|
|
|
1971
1985
|
PROTOCOL_VERSION,
|
|
1972
1986
|
STOCK_LEVELS_LAST_PASS,
|
|
1973
1987
|
SignInError,
|
|
1988
|
+
StoreRefundsUnsupportedError,
|
|
1974
1989
|
StoreSettingsError,
|
|
1975
1990
|
UnsupportedOrderFilterError,
|
|
1976
1991
|
assertOrderDateRange,
|
|
@@ -2010,11 +2025,14 @@ export {
|
|
|
2010
2025
|
parseLineTax,
|
|
2011
2026
|
parseTaxRounding,
|
|
2012
2027
|
paymentMethodOf,
|
|
2028
|
+
priceRefund,
|
|
2013
2029
|
rateLimitSource,
|
|
2014
2030
|
ratePpmFromPercent,
|
|
2031
|
+
refundableLines,
|
|
2015
2032
|
resolveCapabilities,
|
|
2016
2033
|
resolvePrice,
|
|
2017
2034
|
resolvePriceRange,
|
|
2035
|
+
roundRatio,
|
|
2018
2036
|
useConnector,
|
|
2019
2037
|
useCurrencySymbol,
|
|
2020
2038
|
useCustomerTraits,
|
|
@@ -743,6 +743,7 @@ type OrderRefundEnvelope<P = OrderRefundPayload> = Omit<CommandEnvelope<P>, 'typ
|
|
|
743
743
|
interface OrderRefundResult {
|
|
744
744
|
totalMinor: number;
|
|
745
745
|
byMethod: Record<string, number>;
|
|
746
|
+
/** The platform refunds created, summing to totalMinor. Empty only for a stock-only return: totalMinor 0 and byMethod {} (ADR-080, #1330). */
|
|
746
747
|
refunds: Array<{
|
|
747
748
|
id: string;
|
|
748
749
|
paymentId: string;
|
|
@@ -1002,7 +1003,7 @@ interface RegisterCommandResult {
|
|
|
1002
1003
|
deviceId?: string;
|
|
1003
1004
|
deviceName?: string;
|
|
1004
1005
|
};
|
|
1005
|
-
/** The register's counters: a floor for the till's own, never lowered. */
|
|
1006
|
+
/** The register's counters: a floor for the till's own, never lowered, with two exceptions for perpetual refunds. The till raises refunds only from answers at the highest closure number among the store's answers, and sets them to the largest store figure at its newest applied closure once nothing of its own is unsent (@tallyui/pos settleStoreRefunds). A closure refused for its number resets the counters outright (@tallyui/pos renumberClosures). */
|
|
1006
1007
|
counters?: {
|
|
1007
1008
|
lastClosureNumber: number;
|
|
1008
1009
|
perpetualSalesTotalMinor: number;
|
|
@@ -1277,6 +1278,11 @@ interface OrderCreatePayload {
|
|
|
1277
1278
|
taxMinor: number;
|
|
1278
1279
|
totalMinor: number;
|
|
1279
1280
|
payments: OrderCreatePayment[];
|
|
1281
|
+
/** ADR-094: each cash leg's signed rounding, in minor units, already summed into `totalMinor`; sent at the order's content version, only for an order that has one, and only to a store whose connector declares `cashRounding` (a server without it refuses the field). */
|
|
1282
|
+
cashRoundings?: Array<{
|
|
1283
|
+
paymentId: string;
|
|
1284
|
+
minor: number;
|
|
1285
|
+
}>;
|
|
1280
1286
|
/** Version 3+; both or neither. */
|
|
1281
1287
|
display?: OrderCreateDisplay;
|
|
1282
1288
|
/** Version 3+; both or neither. */
|
|
@@ -1393,11 +1399,20 @@ interface StoreOrderPayment {
|
|
|
1393
1399
|
kind?: PaymentMethodKind;
|
|
1394
1400
|
amountMinor: number;
|
|
1395
1401
|
}
|
|
1402
|
+
/** One order line a store refund paid back (#1324). Integers; `netMinor + taxMinor` is the line's gross refund. Shipping and adjustments are never lines. */
|
|
1403
|
+
interface StoreOrderRefundLine {
|
|
1404
|
+
orderLineId: string; /** > 0. */
|
|
1405
|
+
quantity: number;
|
|
1406
|
+
netMinor: number;
|
|
1407
|
+
taxMinor: number;
|
|
1408
|
+
}
|
|
1396
1409
|
/** A refund the store already recorded against the order. */
|
|
1397
1410
|
interface StoreOrderRefund {
|
|
1398
1411
|
id: string; /** Positive. */
|
|
1399
1412
|
amountMinor: number;
|
|
1400
1413
|
reason?: string;
|
|
1414
|
+
/** The lines this refund paid back, when the store records them; absent when it cannot say (#1324). A line is on the store refund that paid it back and never repeated on another: a till refund split over tenders is one store refund. When an order's refunds together name more of a line than was ordered, none of them carry lines. */
|
|
1415
|
+
lines?: StoreOrderRefundLine[];
|
|
1401
1416
|
}
|
|
1402
1417
|
/** An order as the store holds it, read online (ADR-081); never stored by the till. */
|
|
1403
1418
|
interface StoreOrder {
|
|
@@ -1407,12 +1422,23 @@ interface StoreOrder {
|
|
|
1407
1422
|
reference: string;
|
|
1408
1423
|
/** The till's `PosOrder.id` when a till created the order; absent otherwise. It is also what an `order.reopen` sends as `clientOrderId`. */
|
|
1409
1424
|
clientOrderId?: string;
|
|
1425
|
+
/** The cashier the store records for the order, as `ListOrdersQuery.cashierId` filters it (WooCommerce: the WordPress user id in `_pos_user`); absent when the store records none. */
|
|
1426
|
+
cashierId?: string;
|
|
1427
|
+
/** The store (outlet) the order was rung at, as `ListOrdersQuery.storeId` filters it (WooCommerce: `_pos_store`); absent when the store records none, as a single-store install does. */
|
|
1428
|
+
storeId?: string;
|
|
1429
|
+
/**
|
|
1430
|
+
* The register the store itself records for the order, as `ListOrdersQuery.registerId` filters it (WooCommerce: `_wcpos_register`,
|
|
1431
|
+
* which only WCPOS writes). It is neither the till's drawer nor its device id, and it is absent on every order TallyUI rings (ADR-090 decision 6).
|
|
1432
|
+
*/
|
|
1433
|
+
registerId?: string;
|
|
1410
1434
|
/** The store's current revision of the order, which `OrderReopenPayload.baseRevision` and `OrderUpdatePayload.baseRevision` carry; absent when the store has none. */
|
|
1411
1435
|
revision?: string;
|
|
1412
1436
|
/** The platform's own status word (WooCommerce: `completed`, `refunded`, …); the app labels it. */
|
|
1413
1437
|
status: string;
|
|
1414
1438
|
/** ISO 8601, UTC. */
|
|
1415
1439
|
placedAt: string;
|
|
1440
|
+
/** When the store recorded the order as paid (WooCommerce: `date_paid_gmt`); absent while unpaid, or when the store records none. ISO 8601, UTC. */
|
|
1441
|
+
paidAt?: string;
|
|
1416
1442
|
currency: string;
|
|
1417
1443
|
pricesIncludeTax: boolean;
|
|
1418
1444
|
customer: {
|
|
@@ -1445,10 +1471,14 @@ interface StoreOrder {
|
|
|
1445
1471
|
* (WooCommerce: a WCPOS payment ledger of another schema); `payments` is then the order's paid-state
|
|
1446
1472
|
* fallback, and a reopen must refuse the order. Absent otherwise. */
|
|
1447
1473
|
paymentRecordUnreadable?: true;
|
|
1474
|
+
/** The store says the order still owes money (WooCommerce: `needs_payment`); absent when the store does not say. */
|
|
1475
|
+
needsPayment?: boolean;
|
|
1476
|
+
/** Where the order was created, in the platform's own words, as `ListOrdersQuery.createdVia` filters it (WooCommerce: `woocommerce-pos`, `checkout`, `admin`); absent when the store records none. */
|
|
1477
|
+
createdVia?: string;
|
|
1448
1478
|
refunds: StoreOrderRefund[];
|
|
1449
1479
|
}
|
|
1450
1480
|
/** The filter fields a connector may support on listOrders. */
|
|
1451
|
-
type OrderFilterField = 'status' | 'customerId' | 'cashierId' | 'registerId' | 'paymentMethod' | 'storeId' | 'createdVia' | 'dateRange';
|
|
1481
|
+
type OrderFilterField = 'status' | 'customerId' | 'cashierId' | 'registerId' | 'paymentMethod' | 'storeId' | 'createdVia' | 'dateRange' | 'modifiedAfter';
|
|
1452
1482
|
/**
|
|
1453
1483
|
* One page of order history, filtered on the server (#721). A connector maps each filter field its own way; a field the
|
|
1454
1484
|
* connector does not list in `TallyConnector.orderFilters` is refused with `UnsupportedOrderFilterError`
|
|
@@ -1478,6 +1508,11 @@ interface ListOrdersQuery {
|
|
|
1478
1508
|
after?: string;
|
|
1479
1509
|
before?: string;
|
|
1480
1510
|
};
|
|
1511
|
+
/**
|
|
1512
|
+
* Changed at or after this instant: ISO 8601 UTC with a `Z`, as `dateRange` takes. It widens a read to orders created
|
|
1513
|
+
* earlier and changed since, such as one paid in a report's range (WooCommerce: `modified_after`).
|
|
1514
|
+
*/
|
|
1515
|
+
modifiedAfter?: string;
|
|
1481
1516
|
}
|
|
1482
1517
|
/** One page of an order list: its orders, whether more follow, and how many the whole query matches when the store says. */
|
|
1483
1518
|
interface StoreOrderPage {
|
|
@@ -1488,6 +1523,49 @@ interface StoreOrderPage {
|
|
|
1488
1523
|
/** Every order the query matches across all pages; undefined when the store gives no count. It still counts orders left out as `unreadable`. */
|
|
1489
1524
|
total?: number;
|
|
1490
1525
|
}
|
|
1526
|
+
/** A refund the store recorded, dated by when it was made (ADR-081 decision 7). */
|
|
1527
|
+
interface StoreRefund {
|
|
1528
|
+
id: string;
|
|
1529
|
+
/** The refunded order's `StoreOrder.id`. */
|
|
1530
|
+
orderId: string;
|
|
1531
|
+
/** When the refund was made: ISO 8601, UTC, with a `Z`. */
|
|
1532
|
+
refundedAt: string;
|
|
1533
|
+
/** The refunded order's currency. A store's refund row carries none, so the connector reads it from the order. */
|
|
1534
|
+
currency: string;
|
|
1535
|
+
/** Zero or more. Gross: the refunded total, tax included (WooCommerce: the refund's `amount`). It comes off a tax-inclusive sales figure only, never a net-of-tax one. */
|
|
1536
|
+
amountMinor: number;
|
|
1537
|
+
reason?: string;
|
|
1538
|
+
}
|
|
1539
|
+
/** A refund whose order the store did not return: no currency, so no amount. Never counted, never dropped. */
|
|
1540
|
+
interface StoreRefundOrphan {
|
|
1541
|
+
id: string;
|
|
1542
|
+
orderId: string;
|
|
1543
|
+
refundedAt: string;
|
|
1544
|
+
}
|
|
1545
|
+
interface ListRefundsQuery {
|
|
1546
|
+
/** 1-based; default 1. */
|
|
1547
|
+
page?: number;
|
|
1548
|
+
/** 1..100; default 25. */
|
|
1549
|
+
perPage?: number;
|
|
1550
|
+
/** Made at or after `after` and before `before`: ISO 8601 instants in UTC with a `Z`. Selects by when the refund was made, not when its order was placed. Either end may be absent. */
|
|
1551
|
+
dateRange?: {
|
|
1552
|
+
after?: string;
|
|
1553
|
+
before?: string;
|
|
1554
|
+
};
|
|
1555
|
+
/** Only the refunds of this order (`StoreOrder.id`). */
|
|
1556
|
+
orderId?: string;
|
|
1557
|
+
}
|
|
1558
|
+
/** One page of refunds, newest first. */
|
|
1559
|
+
interface StoreRefundPage {
|
|
1560
|
+
refunds: StoreRefund[];
|
|
1561
|
+
/** Refunds on this page whose order the store did not return. */
|
|
1562
|
+
orphans: StoreRefundOrphan[];
|
|
1563
|
+
hasMore: boolean;
|
|
1564
|
+
/** Rows on this page the connector could not read and left out; absent when every row read. */
|
|
1565
|
+
unreadable?: number;
|
|
1566
|
+
/** Every refund the query matches across all pages, orphans and unreadable rows included; undefined when the store gives no count. */
|
|
1567
|
+
total?: number;
|
|
1568
|
+
}
|
|
1491
1569
|
|
|
1492
1570
|
/**
|
|
1493
1571
|
* A payment method the till can offer, backend-neutral (a port of WCPOS v2's Payments Contract
|
|
@@ -2023,6 +2101,8 @@ interface ServerCapabilities {
|
|
|
2023
2101
|
receiptEmail?: number;
|
|
2024
2102
|
/** The platform plugin's own contract version, from `/tally/v1/info`'s top-level `pluginContract` (#1114). Absent when not sent or malformed; each connector says what a version adds. */
|
|
2025
2103
|
pluginContract?: number;
|
|
2104
|
+
/** True only when the store's connector carries order.create's `cashRoundings` (ADR-094). Absent: the till never rounds a cash leg, and finalize refuses an order with entries. */
|
|
2105
|
+
cashRounding?: boolean;
|
|
2026
2106
|
}
|
|
2027
2107
|
/** #287, ADR-071. `custom`: the till computes as when absent; that server never emits `figures_mismatch` for subtotal or tax. */
|
|
2028
2108
|
type TaxRounding = {
|
|
@@ -2269,6 +2349,13 @@ interface TallyConnector {
|
|
|
2269
2349
|
* read-only; rejects as `listOrders`. `undefined` when the connector has no order history.
|
|
2270
2350
|
*/
|
|
2271
2351
|
getOrders?: (context: SyncContext, ids: readonly string[]) => Promise<StoreOrder[]>;
|
|
2352
|
+
/**
|
|
2353
|
+
* The store's refunds, newest first, one page per call, dated by when each was made (ADR-081 decision 7): online only,
|
|
2354
|
+
* read-only. Rejects as `listOrders` does; a `dateRange` end that is not a UTC instant ending in Z is a TypeError
|
|
2355
|
+
* (`assertOrderDateRange`); a store that cannot serve dated refunds rejects with `StoreRefundsUnsupportedError`.
|
|
2356
|
+
* `undefined` when the connector has no dated refunds: the app keeps counting refunds on their order's day.
|
|
2357
|
+
*/
|
|
2358
|
+
listRefunds?: (context: SyncContext, query?: ListRefundsQuery) => Promise<StoreRefundPage>;
|
|
2272
2359
|
/**
|
|
2273
2360
|
* The store's register directory (v2 parity A4): online only, read-only. Rejects with `ConnectorUnauthorizedError`
|
|
2274
2361
|
* for credentials; a connector's own errors otherwise. `undefined` when the connector has no register directory.
|
|
@@ -2307,6 +2394,8 @@ declare const PROTOCOL_VERSION = 1;
|
|
|
2307
2394
|
declare const MAX_COMMANDS_PER_BATCH = 50;
|
|
2308
2395
|
/** The longest order.create `note` (version 7, ADR-083), in UTF-16 code units. WCPOS v2's order note has no cap; this bounds the wire. */
|
|
2309
2396
|
declare const ORDER_NOTE_MAX = 1000;
|
|
2397
|
+
/** The most UTF-16 units of a `needs_admin` message the till keeps and shows (TallyUI #1280). */
|
|
2398
|
+
declare const NEEDS_ADMIN_MESSAGE_MAX = 500;
|
|
2310
2399
|
/** The most tax ids order.create 12 carries in `customer.taxIds` (ADR-092). */
|
|
2311
2400
|
declare const ORDER_TAX_IDS_MAX = 10;
|
|
2312
2401
|
/** The longest order.create 12 tax id `type` (the connector's scheme id), in UTF-16 code units (ADR-092). */
|
|
@@ -2379,4 +2468,57 @@ declare function deriveVariance(counted: Record<string, number>, expected: Recor
|
|
|
2379
2468
|
/** Converts a plain decimal percentage with at most four fractional digits to safe integer ppm. */
|
|
2380
2469
|
declare function ratePpmFromPercent(percent: number | string): number;
|
|
2381
2470
|
|
|
2382
|
-
|
|
2471
|
+
/** #287: `half_up` is Math.round's rule, Vendure's DefaultMoneyStrategy (default-money-strategy.js:19-21). */
|
|
2472
|
+
type RoundingMode = 'half_away_from_zero' | 'half_up';
|
|
2473
|
+
/** `n / d` (d > 0) rounded to an integer in `mode`, exactly; the modes differ only on exact negative halves. */
|
|
2474
|
+
declare function roundRatio(n: bigint, d: bigint, mode?: RoundingMode): bigint;
|
|
2475
|
+
|
|
2476
|
+
/**
|
|
2477
|
+
* Ports v2 calculate-refund.ts (calculateLineItemRefund, computeRemainingRefundQuantity).
|
|
2478
|
+
* Amounts follow ADR-080 amendment 2's cumulative-share rule.
|
|
2479
|
+
*/
|
|
2480
|
+
|
|
2481
|
+
/** The fields of an order line this needs; a StoreOrderLine fits. */
|
|
2482
|
+
type RefundableOrderLine = Pick<StoreOrderLine, 'id' | 'quantity' | 'totalMinor' | 'taxMinor'>;
|
|
2483
|
+
/** Earlier refund lines; negative quantities count by magnitude. */
|
|
2484
|
+
interface EarlierRefund {
|
|
2485
|
+
lines: ReadonlyArray<Pick<OrderRefundLine, 'orderLineId' | 'quantity'>>;
|
|
2486
|
+
}
|
|
2487
|
+
/** Remaining quantities and amounts, with earlier refund magnitudes capped at the line quantity. */
|
|
2488
|
+
interface RefundableLine {
|
|
2489
|
+
orderLineId: string;
|
|
2490
|
+
refundedQuantity: number;
|
|
2491
|
+
refundableQuantity: number;
|
|
2492
|
+
netMinor: number;
|
|
2493
|
+
taxMinor: number;
|
|
2494
|
+
}
|
|
2495
|
+
/** A selected quantity's cumulative shares of net and tax, and their sum. */
|
|
2496
|
+
interface PricedRefundLine {
|
|
2497
|
+
orderLineId: string;
|
|
2498
|
+
quantity: number;
|
|
2499
|
+
netMinor: number;
|
|
2500
|
+
taxMinor: number;
|
|
2501
|
+
totalMinor: number;
|
|
2502
|
+
}
|
|
2503
|
+
/** Payload-ready lines and their amounts; the caller adds shipping and adjustment to totalMinor. */
|
|
2504
|
+
interface PricedRefund {
|
|
2505
|
+
/** Exactly orderLineId, quantity (>= 1), and restock. */
|
|
2506
|
+
lines: OrderRefundLine[];
|
|
2507
|
+
/** Amounts in the same order as lines. */
|
|
2508
|
+
priced: PricedRefundLine[];
|
|
2509
|
+
/** Requests cut to availability, including unknown lines cut to zero. */
|
|
2510
|
+
clamped: Array<{
|
|
2511
|
+
orderLineId: string;
|
|
2512
|
+
requestedQuantity: number;
|
|
2513
|
+
quantity: number;
|
|
2514
|
+
}>;
|
|
2515
|
+
netMinor: number;
|
|
2516
|
+
taxMinor: number;
|
|
2517
|
+
totalMinor: number;
|
|
2518
|
+
}
|
|
2519
|
+
/** Returns the quantities and amounts still refundable, in order-line order. */
|
|
2520
|
+
declare function refundableLines(lines: readonly RefundableOrderLine[], refunds: readonly EarlierRefund[]): RefundableLine[];
|
|
2521
|
+
/** Prices requested quantities with cumulative shares, clamping them to what remains refundable. */
|
|
2522
|
+
declare function priceRefund(lines: readonly RefundableOrderLine[], refunds: readonly EarlierRefund[], request: readonly OrderRefundLine[]): PricedRefund;
|
|
2523
|
+
|
|
2524
|
+
export { type ConnectorTraits as $, type AnyCommandEnvelope as A, type BatchTooLargeBody as B, type CommandWarning as C, type DisplayAdvertisement as D, type CollectionSync as E, type CommandBatchRequest as F, type CommandBatchResponse as G, type CommandEnvelope as H, type IceServer as I, type CommandError as J, type CommandResult as K, type ListOrdersQuery as L, type MoneyFormat as M, CommandResultError as N, type OrderFilterField as O, type ProductTraits as P, type CommandServerRefs as Q, type ReplicationAdapter as R, type StockReconcileAdapter as S, type TallyConnector as T, type CommandStatus as U, type VariantSummary as V, type WooTaxRate as W, type CommandType as X, type ConnectivityState as Y, type ConnectorAuth as Z, type ConnectorSchemas as _, type StockLevel as a, type OrderUpdateShipping as a$, type Correction as a0, type Customer as a1, type CustomerAddress as a2, type CustomerInput as a3, type CustomerPage as a4, type CustomerPatch as a5, CustomerServiceError as a6, type CustomerTaxId as a7, DISPLAY_PAIR_CAPABILITY as a8, type DisplayRecord as a9, type OrderCreatePayload as aA, type OrderCreatePayment as aB, type OrderCreateTaxId as aC, type OrderCreateTaxRate as aD, type OrderCreateTotalMismatchData as aE, type OrderRefundAmountMismatchData as aF, type OrderRefundEnvelope as aG, type OrderRefundLine as aH, type OrderRefundNoOpenSessionData as aI, type OrderRefundOrderStateData as aJ, type OrderRefundPayload as aK, type OrderRefundQuantityExceedsData as aL, type OrderRefundRejectionCode as aM, type OrderRefundResult as aN, type OrderReopenEnvelope as aO, type OrderReopenOrderStateData as aP, type OrderReopenPayload as aQ, type OrderReopenPaymentInMotionData as aR, type OrderReopenRejectionCode as aS, type OrderReopenResult as aT, type OrderUpdateEnvelope as aU, type OrderUpdateFee as aV, type OrderUpdateLine as aW, type OrderUpdatePayload as aX, type OrderUpdatePayment as aY, type OrderUpdateRejectionCode as aZ, type OrderUpdateReopenRequiredData as a_, type DisplaySignalling as aa, type DisplaySignallingContext as ab, DisplaySignallingError as ac, type DisplaySignallingErrorCode as ad, type EarlierRefund as ae, type FailureClass as af, type FingerprintReconcileAdapter as ag, type IdReconcileAdapter as ah, type ListRefundsQuery as ai, MAX_COMMANDS_PER_BATCH as aj, NEEDS_ADMIN_MESSAGE_MAX as ak, ORDER_LINE_SKU_MAX as al, ORDER_META_KEY_MAX as am, ORDER_META_MAX as an, ORDER_NOTE_MAX as ao, ORDER_TAX_IDS_MAX as ap, ORDER_TAX_ID_TYPE_MAX as aq, ORDER_TAX_ID_VALUE_MAX as ar, type OrderAddress as as, type OrderCreateCoupon as at, type OrderCreateCouponInvalidData as au, type OrderCreateCouponLine as av, type OrderCreateDisplay as aw, type OrderCreateEnvelope as ax, type OrderCreateLine as ay, type OrderCreateMeta as az, type SyncContext as b, customerTraits as b$, PROTOCOL_HEADER as b0, PROTOCOL_VERSION as b1, type PaymentHardware as b2, type PaymentKind as b3, type PaymentMethodDescriptor as b4, type PaymentMethodKind as b5, type PaymentOfflineMode as b6, type PaymentRounding as b7, type PaymentTipsMode as b8, type PaymentTransport as b9, type ServerCapabilities as bA, type SignInResult as bB, type SignalMessage as bC, type StockStatus as bD, type StoreClosure as bE, type StoreOrder as bF, type StoreOrderCharge as bG, type StoreOrderLine as bH, type StoreOrderPage as bI, type StoreOrderPayment as bJ, type StoreOrderRefund as bK, type StoreOrderRefundLine as bL, type StoreRefund as bM, type StoreRefundOrphan as bN, type StoreRefundPage as bO, type StoreSettings as bP, type StoreSettingsChoice as bQ, type StoreTaxClass as bR, type StoreTaxRate as bS, type StoreTaxRateLocation as bT, type TaxRounding as bU, type TillDevice as bV, type UpdateRequired as bW, type VariantOptionGroup as bX, cashierPermissions as bY, classifyFailure as bZ, currencySymbol as b_, type PendingPairing as ba, type PricedRefund as bb, type PricedRefundLine as bc, type ProductCategory as bd, type ProductPrice as be, type ProductTerm as bf, type ReceiptTemplate as bg, type ReceiptTemplateKind as bh, type RefundableLine as bi, type RefundableOrderLine as bj, type RegisterApprovalInvalidData as bk, type RegisterApprovalRequiredData as bl, type RegisterClosureSubmitPayload as bm, type RegisterCommandEnvelope as bn, type RegisterCommandResult as bo, type RegisterCommandType as bp, type RegisterInfo as bq, type RegisterMovementRecordPayload as br, type RegisterMovementVoidPayload as bs, type RegisterSessionAlreadyOpenData as bt, type RegisterSessionOpenPayload as bu, type RegisterSessionSupersededData as bv, type RegisterSessionTransitionPayload as bw, type RemoteIdEntry as bx, type ResolvedPrice as by, type RoundingMode as bz, type TraitContext as c, defaultPaymentMethods as c0, deriveSessionFigures as c1, deriveVariance as c2, formatMoney as c3, isCashierPermission as c4, isCommandBatchResponse as c5, legMethodId as c6, minorToMajor as c7, minorUnitDigits as c8, moneyFromDecimalString as c9, moneyFromMajor as ca, moneyToMajor as cb, neutralFailureClass as cc, noResponse as cd, normalizeMoneyText as ce, parseCommandResult as cf, parseInfoCapabilities as cg, parseLineTax as ch, parseTaxRounding as ci, paymentMethodOf as cj, priceRefund as ck, ratePpmFromPercent as cl, refundableLines as cm, resolveCapabilities as cn, resolvePrice as co, resolvePriceRange as cp, roundRatio as cq, wireMethodOf as cr, currencyDecimals as cs, majorToMinor as ct, type CustomerTraits as d, type Money as e, type CalculateTaxesInput as f, type CalculateTaxesResult as g, type ItemizedTax as h, type ResolvedTaxLocation as i, TAX_BASED_ON_META_KEY as j, type TaxAddress as k, type TaxBasedOn as l, type TaxLocationOrder as m, normalizeTaxBasedOn as n, orderTaxLocation as o, type ApproverCredentials as p, type AuthField as q, CASHIER_PERMISSIONS as r, COMMANDS_PATH as s, type CaptureMode as t, type CaptureModeEntry as u, type Cashier as v, type CashierPermission as w, type CatalogueReconcileAdapter as x, type CatalogueReconcileEntry as y, type ClosureReads as z };
|