platform-types 1.10.727 → 1.10.729
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/marketing.d.ts +11 -5
- package/dist/return.d.ts +25 -4
- package/dist/store.d.ts +6 -1
- package/package.json +1 -1
package/dist/marketing.d.ts
CHANGED
|
@@ -74,11 +74,16 @@ declare global {
|
|
|
74
74
|
* `'queued'` — accepted for delivery, not yet handed to the transport.
|
|
75
75
|
* `'sent'` — the transport ACCEPTED it; acceptance is never proof of inbox
|
|
76
76
|
* placement. `'failed'` — the transport refused or errored. `'skipped'` — the
|
|
77
|
-
* segment matched the recipient but the
|
|
78
|
-
*
|
|
77
|
+
* segment matched the recipient but the send was withheld at send time: the
|
|
78
|
+
* recipient was not eligible (no marketing consent for the channel, no
|
|
79
|
+
* address, a suppressed address, a customer that no longer exists), the
|
|
80
|
+
* campaign was cancelled, or the store had its Marketing module switched off
|
|
81
|
+
* (`reason: 'MODULE_OFF'`). `CampaignRecipient.reason` carries which.
|
|
79
82
|
*
|
|
80
83
|
* ⚠️ `'skipped'` is a REFUSAL that was honoured, not a delivery problem:
|
|
81
|
-
* never retry it, and never roll it into a failure rate.
|
|
84
|
+
* never retry it, and never roll it into a failure rate. A `'MODULE_OFF'`
|
|
85
|
+
* skip is the STORE'S choice, not the customer's — group on `reason` before
|
|
86
|
+
* reading a skip as a consent refusal.
|
|
82
87
|
*/
|
|
83
88
|
type CampaignRecipientStatus = 'queued' | 'sent' | 'failed' | 'skipped';
|
|
84
89
|
/**
|
|
@@ -548,8 +553,9 @@ declare global {
|
|
|
548
553
|
/**
|
|
549
554
|
* `'queued'` — accepted, not yet handed to a transport. `'sent'` — handed
|
|
550
555
|
* over. `'failed'` — the transport refused or errored. `'skipped'` — the rule
|
|
551
|
-
* matched but the send was withheld, by the frequency cap
|
|
552
|
-
* consent re-check
|
|
556
|
+
* matched but the send was withheld, by the frequency cap, by a live
|
|
557
|
+
* consent re-check, or because the store had its Marketing module switched
|
|
558
|
+
* off (`reason: 'MODULE_OFF'`, a store choice rather than a customer's).
|
|
553
559
|
*
|
|
554
560
|
* Deliberately the same four values as {@link CampaignRecipientStatus}, and
|
|
555
561
|
* deliberately a SEPARATE type rather than an alias: the two vocabularies
|
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
|
/**
|
package/dist/store.d.ts
CHANGED
|
@@ -917,7 +917,7 @@ declare global {
|
|
|
917
917
|
* `409 STORE_MODULE_BALANCE_CHECK_INCOMPLETE` when the bounded read could
|
|
918
918
|
* not finish).
|
|
919
919
|
*
|
|
920
|
-
* Enforced on the server for
|
|
920
|
+
* Enforced on the server for six modules only:
|
|
921
921
|
* - `promotions` — applying one is refused `PROMOTION_NOT_ACTIVE` (the
|
|
922
922
|
* existing promotion refusal, not `STORE_MODULE_DISABLED`), a grant already
|
|
923
923
|
* frozen on a cart stays on the row but derives no money (its
|
|
@@ -934,6 +934,11 @@ declare global {
|
|
|
934
934
|
* - `multiWarehouse` — every sale resolves to the primary depósito (a
|
|
935
935
|
* scoped operator's sale to their own home depósito when the primary is
|
|
936
936
|
* outside their scope), and only the primary feeds MercadoLibre.
|
|
937
|
+
* - `loyalty` — the automatic earn credits nothing (the `loyalty-earn`
|
|
938
|
+
* worker skips it, including one queued before the switch). The
|
|
939
|
+
* operator's `POST /loyalty/earn` and every read stay reachable.
|
|
940
|
+
* - `marketing` — automation and campaign sends go out to nobody: each is
|
|
941
|
+
* settled `'skipped'` with reason `MODULE_OFF` at its send worker.
|
|
937
942
|
* Every other module is hide-only: its endpoints stay reachable. Public
|
|
938
943
|
* reads carry only `appointments`, `surveys`, `promotions` and
|
|
939
944
|
* `customerAccounts`. `PUT /platform/stores/{storeId}` refuses the leaf.
|