platform-types 1.10.830 → 1.10.832

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.
@@ -26,14 +26,19 @@ exports.PURCHASE_WITHDRAWAL_VERIFICATION_FAILED = exports.SHOPPER_REQUEST_INTENT
26
26
  * (`purchase-withdrawal-pending`) until an operator decides.
27
27
  * - `declined` — an operator declined it with a typed exemption reason.
28
28
  * Terminal.
29
- * - `accepted` — an operator accepted it. The order's cancellation (before
30
- * fulfilment) or its return authorisation (after it) follows from here.
31
- * - `awaiting-goods` — after fulfilment, the goods are on their way back. Its
32
- * refund obligations wait `awaiting-goods` too. At the collection deadline
29
+ * - `accepted` — an operator accepted it before delivery (shipped or not): the
30
+ * dispatch lock is released so the delivery can be recorded. Accepting an
31
+ * `accepted` withdrawal again once its order is delivered, while no open
32
+ * `purchase-withdrawal` RMA names it, hands it off as below. That also covers
33
+ * a row accepted after delivery before the hand-off shipped.
34
+ * - `awaiting-goods` — after delivery, the goods are on their way back. The
35
+ * operator's accept hands it off in one transaction: an `authorized` RMA
36
+ * (`source: 'purchase-withdrawal'`, `withdrawalId`, `collectByAt`), one
37
+ * `awaiting-goods` refund obligation per payment bucket at a provisional
38
+ * amount, and the collection pointer. At the collection deadline
33
39
  * (`collectByAt` on its RMA) the hourly refund sweep opens them, due
34
40
  * `refundObligationDueDays` after that deadline, whether or not the goods
35
41
  * came back, and moves the withdrawal to `refund-pending` when one is owed.
36
- * Nothing writes this state yet: the hand-off that does is still to ship.
37
42
  * - `refund-pending` — money is owed back (an open refund obligation): reached
38
43
  * from `awaiting-goods` at the collection deadline, or from `completed` by a
39
44
  * late capture. Moves
@@ -23,14 +23,19 @@
23
23
  * (`purchase-withdrawal-pending`) until an operator decides.
24
24
  * - `declined` — an operator declined it with a typed exemption reason.
25
25
  * Terminal.
26
- * - `accepted` — an operator accepted it. The order's cancellation (before
27
- * fulfilment) or its return authorisation (after it) follows from here.
28
- * - `awaiting-goods` — after fulfilment, the goods are on their way back. Its
29
- * refund obligations wait `awaiting-goods` too. At the collection deadline
26
+ * - `accepted` — an operator accepted it before delivery (shipped or not): the
27
+ * dispatch lock is released so the delivery can be recorded. Accepting an
28
+ * `accepted` withdrawal again once its order is delivered, while no open
29
+ * `purchase-withdrawal` RMA names it, hands it off as below. That also covers
30
+ * a row accepted after delivery before the hand-off shipped.
31
+ * - `awaiting-goods` — after delivery, the goods are on their way back. The
32
+ * operator's accept hands it off in one transaction: an `authorized` RMA
33
+ * (`source: 'purchase-withdrawal'`, `withdrawalId`, `collectByAt`), one
34
+ * `awaiting-goods` refund obligation per payment bucket at a provisional
35
+ * amount, and the collection pointer. At the collection deadline
30
36
  * (`collectByAt` on its RMA) the hourly refund sweep opens them, due
31
37
  * `refundObligationDueDays` after that deadline, whether or not the goods
32
38
  * came back, and moves the withdrawal to `refund-pending` when one is owed.
33
- * Nothing writes this state yet: the hand-off that does is still to ship.
34
39
  * - `refund-pending` — money is owed back (an open refund obligation): reached
35
40
  * from `awaiting-goods` at the collection deadline, or from `completed` by a
36
41
  * late capture. Moves
@@ -23,14 +23,19 @@
23
23
  * (`purchase-withdrawal-pending`) until an operator decides.
24
24
  * - `declined` — an operator declined it with a typed exemption reason.
25
25
  * Terminal.
26
- * - `accepted` — an operator accepted it. The order's cancellation (before
27
- * fulfilment) or its return authorisation (after it) follows from here.
28
- * - `awaiting-goods` — after fulfilment, the goods are on their way back. Its
29
- * refund obligations wait `awaiting-goods` too. At the collection deadline
26
+ * - `accepted` — an operator accepted it before delivery (shipped or not): the
27
+ * dispatch lock is released so the delivery can be recorded. Accepting an
28
+ * `accepted` withdrawal again once its order is delivered, while no open
29
+ * `purchase-withdrawal` RMA names it, hands it off as below. That also covers
30
+ * a row accepted after delivery before the hand-off shipped.
31
+ * - `awaiting-goods` — after delivery, the goods are on their way back. The
32
+ * operator's accept hands it off in one transaction: an `authorized` RMA
33
+ * (`source: 'purchase-withdrawal'`, `withdrawalId`, `collectByAt`), one
34
+ * `awaiting-goods` refund obligation per payment bucket at a provisional
35
+ * amount, and the collection pointer. At the collection deadline
30
36
  * (`collectByAt` on its RMA) the hourly refund sweep opens them, due
31
37
  * `refundObligationDueDays` after that deadline, whether or not the goods
32
38
  * came back, and moves the withdrawal to `refund-pending` when one is owed.
33
- * Nothing writes this state yet: the hand-off that does is still to ship.
34
39
  * - `refund-pending` — money is owed back (an open refund obligation): reached
35
40
  * from `awaiting-goods` at the collection deadline, or from `completed` by a
36
41
  * late capture. Moves
package/dist/rma.d.ts CHANGED
@@ -128,16 +128,35 @@ declare global {
128
128
  * did, which would have stamped `NaN` on every row. When a store-level
129
129
  * default does land it becomes that parameter's fallback, and this
130
130
  * field's meaning does not change.
131
+ *
132
+ * Never written on a `purchase-withdrawal` RMA, which is born `authorized`
133
+ * and never expires: the expiry sweep skips that source, whatever this
134
+ * field says.
131
135
  */
132
136
  expiresAt?: number;
133
137
  /**
134
138
  * Who opened the request. Absent means `operator`. `shopper` is the
135
139
  * storefront's own request on `POST /orders/purchase-withdrawal` and its
136
140
  * guest twin: the warranty request (`intent: 'warranty'`), or a change of
137
- * mind (a withdrawal-shaped body past W2 while the store's policy is on);
138
- * `purchase-withdrawal` has no writer yet.
141
+ * mind (a withdrawal-shaped body past W2 while the store's policy is on).
142
+ * `purchase-withdrawal` is written by the operator's accept of a purchase
143
+ * withdrawal on a delivered order (`POST /purchase-withdrawals { mode:
144
+ * 'accept' }`), born `authorized`, with `withdrawalId` and `collectByAt`.
145
+ * Only its `Return` settles it: `POST /rma { mode: 'settle' }` refuses it.
139
146
  */
140
147
  source?: RmaSource;
148
+ /**
149
+ * The purchase withdrawal this RMA hands off. Set only on a
150
+ * `purchase-withdrawal` RMA; absent means an operator or shopper request.
151
+ */
152
+ withdrawalId?: string;
153
+ /**
154
+ * The withdrawal's collection deadline: `purchaseWithdrawalCollectionDays`
155
+ * after the hand-off (`source: 'global:purchaseWithdrawalCollectionDays'`).
156
+ * The refund sweep opens its withdrawal's obligations at it. Set only on a
157
+ * `purchase-withdrawal` RMA.
158
+ */
159
+ collectByAt?: StatutoryInstant;
141
160
  /** Server-derived legal track. Absent on an operator request. */
142
161
  flow?: ReturnFlow;
143
162
  /** End of the legal warranty window (W3). Set only on a `warranty` request. */
package/dist/store.d.ts CHANGED
@@ -1070,7 +1070,8 @@ declare global {
1070
1070
  *
1071
1071
  * ⚠️ **It lives on the store row and NOT in the plan entitlement map,
1072
1072
  * and that placement is the whole design.** The `mandatory2fa` FeatureKey
1073
- * gates which TIERS may impose the obligation; this leaf records whether a
1073
+ * is display-only — it lists the feature on the plans comparison, and a
1074
+ * store on any tier may impose the obligation; this leaf records whether a
1074
1075
  * store actually has. Every other FeatureKey GRANTS a capability, so losing
1075
1076
  * it withdraws something. This one OBLIGES — so resolving it from the
1076
1077
  * entitlement map would mean `graceSweep` silently UN-mandating 2FA when it
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.830",
3
+ "version": "1.10.832",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",