platform-types 1.10.727 → 1.10.728
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/return.d.ts +25 -4
- package/package.json +1 -1
package/dist/return.d.ts
CHANGED
|
@@ -9,7 +9,14 @@ declare global {
|
|
|
9
9
|
type ReturnRefundMethod = 'account' | 'cash';
|
|
10
10
|
/** Return planning refusals: invalid selected lines, too many return summaries, or more than 100 transaction items. */
|
|
11
11
|
type ReturnPlanFailureCode = 'RETURN_INVALID_SUBSET' | 'RETURN_LIMIT_REACHED' | 'RETURN_TRANSACTION_TOO_LARGE' | 'UNIT_QUANTITY_NOT_WHOLE' | 'UNIT_QUANTITY_UNREPRESENTABLE';
|
|
12
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Cash handed back in the return transaction, linked to its drawer and, for a
|
|
14
|
+
* named customer, its compensating account debit. On a walk-in return (the
|
|
15
|
+
* system customer) no `ACCOUNT#` row is written, so `accountId` is only the
|
|
16
|
+
* payout id the drawer `refund` event carries — it names no ledger row.
|
|
17
|
+
* `amount` is the full return total for a named customer; on a walk-in return
|
|
18
|
+
* it is only the part the order had actually been paid (see `owedReduction`).
|
|
19
|
+
*/
|
|
13
20
|
interface ReturnCashRefund {
|
|
14
21
|
amount: number;
|
|
15
22
|
currency: string;
|
|
@@ -150,8 +157,20 @@ declare global {
|
|
|
150
157
|
fiscalAllocation?: ReturnFiscalAllocation;
|
|
151
158
|
/** Absent on legacy rows: account. Cash never retains a customer balance credit. */
|
|
152
159
|
refundMethod?: ReturnRefundMethod;
|
|
153
|
-
/**
|
|
160
|
+
/**
|
|
161
|
+
* Present only when cash left the drawer: the full total for a named
|
|
162
|
+
* customer's cash return, the paid part of a walk-in return. A walk-in
|
|
163
|
+
* return of goods never paid for carries none.
|
|
164
|
+
*/
|
|
154
165
|
cashRefund?: ReturnCashRefund;
|
|
166
|
+
/**
|
|
167
|
+
* Walk-in returns only (the system customer). The part of `total` the
|
|
168
|
+
* order had never been paid: it moved no money and lowered what the order
|
|
169
|
+
* still owes, so the till collects that much less. `total` equals
|
|
170
|
+
* `cashRefund.amount` (or 0) plus this. Absent when zero, and on every
|
|
171
|
+
* named-customer return.
|
|
172
|
+
*/
|
|
173
|
+
owedReduction?: number;
|
|
155
174
|
reason: ReturnReason;
|
|
156
175
|
notes?: string;
|
|
157
176
|
userId: string;
|
|
@@ -591,6 +610,8 @@ declare global {
|
|
|
591
610
|
refundMethod?: ReturnRefundMethod;
|
|
592
611
|
/** Mirrors the committed cash payout on Return.cashRefund. */
|
|
593
612
|
cashRefund?: ReturnCashRefund;
|
|
613
|
+
/** Mirrors Return.owedReduction: the unpaid part of a walk-in return, which lowered what the order owes. */
|
|
614
|
+
owedReduction?: number;
|
|
594
615
|
reason: ReturnReason;
|
|
595
616
|
ncStatus?: ReturnCreditNoteStatus;
|
|
596
617
|
creditNoteId?: string;
|
|
@@ -713,7 +734,7 @@ declare global {
|
|
|
713
734
|
*/
|
|
714
735
|
interface CreateReturnRequest {
|
|
715
736
|
mode: 'return';
|
|
716
|
-
/** Omission credits the customer account. Cash pays the full server-calculated return total; no provider refund. */
|
|
737
|
+
/** Omission credits the customer account. Cash pays the full server-calculated return total; no provider refund. A walk-in order (the system customer) is always refunded in cash, whatever is sent, but only up to what the order was paid; the unpaid rest lowers what the order still owes. */
|
|
717
738
|
refundMethod?: ReturnRefundMethod;
|
|
718
739
|
/** Client-minted UUID; the idempotency key. A replay returns the original outcome. */
|
|
719
740
|
requestId: string;
|
|
@@ -728,7 +749,7 @@ declare global {
|
|
|
728
749
|
/**
|
|
729
750
|
* Required when the order has a non-empty `linkedPayments` map: the
|
|
730
751
|
* operator acknowledges SINFACTURA does NOT refund or unlink the provider
|
|
731
|
-
* payment. The return pays by refundMethod (account by default).
|
|
752
|
+
* payment. The return pays by refundMethod (account by default; always cash on a walk-in order).
|
|
732
753
|
*/
|
|
733
754
|
acknowledgeNoProviderRefund?: boolean;
|
|
734
755
|
/**
|