platform-types 1.10.828 → 1.10.830
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.
|
@@ -28,8 +28,15 @@ exports.PURCHASE_WITHDRAWAL_VERIFICATION_FAILED = exports.SHOPPER_REQUEST_INTENT
|
|
|
28
28
|
* Terminal.
|
|
29
29
|
* - `accepted` — an operator accepted it. The order's cancellation (before
|
|
30
30
|
* fulfilment) or its return authorisation (after it) follows from here.
|
|
31
|
-
* - `awaiting-goods` — after fulfilment, the goods are on their way back.
|
|
32
|
-
*
|
|
31
|
+
* - `awaiting-goods` — after fulfilment, the goods are on their way back. Its
|
|
32
|
+
* refund obligations wait `awaiting-goods` too. At the collection deadline
|
|
33
|
+
* (`collectByAt` on its RMA) the hourly refund sweep opens them, due
|
|
34
|
+
* `refundObligationDueDays` after that deadline, whether or not the goods
|
|
35
|
+
* 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
|
+
* - `refund-pending` — money is owed back (an open refund obligation): reached
|
|
38
|
+
* from `awaiting-goods` at the collection deadline, or from `completed` by a
|
|
39
|
+
* late capture. Moves
|
|
33
40
|
* to `completed` with the closure of its last open obligation, never while
|
|
34
41
|
* another one is open.
|
|
35
42
|
* - `completed` — nothing is owed any more. Not final while money can still
|
|
@@ -25,8 +25,15 @@
|
|
|
25
25
|
* Terminal.
|
|
26
26
|
* - `accepted` — an operator accepted it. The order's cancellation (before
|
|
27
27
|
* fulfilment) or its return authorisation (after it) follows from here.
|
|
28
|
-
* - `awaiting-goods` — after fulfilment, the goods are on their way back.
|
|
29
|
-
*
|
|
28
|
+
* - `awaiting-goods` — after fulfilment, the goods are on their way back. Its
|
|
29
|
+
* refund obligations wait `awaiting-goods` too. At the collection deadline
|
|
30
|
+
* (`collectByAt` on its RMA) the hourly refund sweep opens them, due
|
|
31
|
+
* `refundObligationDueDays` after that deadline, whether or not the goods
|
|
32
|
+
* 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
|
+
* - `refund-pending` — money is owed back (an open refund obligation): reached
|
|
35
|
+
* from `awaiting-goods` at the collection deadline, or from `completed` by a
|
|
36
|
+
* late capture. Moves
|
|
30
37
|
* to `completed` with the closure of its last open obligation, never while
|
|
31
38
|
* another one is open.
|
|
32
39
|
* - `completed` — nothing is owed any more. Not final while money can still
|
|
@@ -141,10 +148,23 @@ declare global {
|
|
|
141
148
|
* How the identification code reached the shopper. `shownAt` is when the
|
|
142
149
|
* `201` carried it on screen (the same medium as the request); the
|
|
143
150
|
* `purchase-withdrawal-received` mail is queued after the commit and
|
|
144
|
-
* stamps `emailQueuedAt`, and the mail worker records `emailStatus
|
|
145
|
-
*
|
|
146
|
-
*
|
|
147
|
-
*
|
|
151
|
+
* stamps `emailQueuedAt`, and the mail worker records `emailStatus: 'sent'`
|
|
152
|
+
* once the mail went out. `emailStatus: 'not-sent'` is written when:
|
|
153
|
+
*
|
|
154
|
+
* - the mail was never queued — platform email sending was off at the
|
|
155
|
+
* request, or the queue write (or the `emailQueuedAt` stamp) failed. This
|
|
156
|
+
* stamp never replaces a verdict the worker already recorded;
|
|
157
|
+
* - the worker found no address on the order's customer row;
|
|
158
|
+
* - the sender did not deliver it — an address suppressed after a bounce, a
|
|
159
|
+
* demo store, or the sender refusing the message;
|
|
160
|
+
* - the send failed for good (a permanent rejection);
|
|
161
|
+
* - an operator decided the request before the mail went out.
|
|
162
|
+
*
|
|
163
|
+
* Each verdict the worker records reaches operator sockets as the record's
|
|
164
|
+
* frame. `emailQueuedAt` with no `emailStatus` is not proof of a mail in
|
|
165
|
+
* flight: some worker exits stamp nothing (a transient send failure whose
|
|
166
|
+
* retries run out, a batch dropped because platform email sending was
|
|
167
|
+
* switched off after the request).
|
|
148
168
|
*/
|
|
149
169
|
interface PurchaseWithdrawalAcknowledgement {
|
|
150
170
|
/** Unix ms. */
|
|
@@ -25,8 +25,15 @@
|
|
|
25
25
|
* Terminal.
|
|
26
26
|
* - `accepted` — an operator accepted it. The order's cancellation (before
|
|
27
27
|
* fulfilment) or its return authorisation (after it) follows from here.
|
|
28
|
-
* - `awaiting-goods` — after fulfilment, the goods are on their way back.
|
|
29
|
-
*
|
|
28
|
+
* - `awaiting-goods` — after fulfilment, the goods are on their way back. Its
|
|
29
|
+
* refund obligations wait `awaiting-goods` too. At the collection deadline
|
|
30
|
+
* (`collectByAt` on its RMA) the hourly refund sweep opens them, due
|
|
31
|
+
* `refundObligationDueDays` after that deadline, whether or not the goods
|
|
32
|
+
* 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
|
+
* - `refund-pending` — money is owed back (an open refund obligation): reached
|
|
35
|
+
* from `awaiting-goods` at the collection deadline, or from `completed` by a
|
|
36
|
+
* late capture. Moves
|
|
30
37
|
* to `completed` with the closure of its last open obligation, never while
|
|
31
38
|
* another one is open.
|
|
32
39
|
* - `completed` — nothing is owed any more. Not final while money can still
|
package/dist/rma.d.ts
CHANGED
|
@@ -229,11 +229,17 @@ declare global {
|
|
|
229
229
|
type ShopperReturnRequestFlow = Extract<ReturnFlow, 'warranty' | 'change-of-mind'>;
|
|
230
230
|
/**
|
|
231
231
|
* A shopper return request's acknowledgement — the purchase withdrawal's
|
|
232
|
-
* shape: `shownAt` (the
|
|
233
|
-
*
|
|
234
|
-
*
|
|
235
|
-
*
|
|
236
|
-
*
|
|
232
|
+
* shape and rules ({@link PurchaseWithdrawalAcknowledgement}): `shownAt` (the
|
|
233
|
+
* `201` showed the request number), `emailQueuedAt` (the
|
|
234
|
+
* `return-request-received` mail was queued) and `emailStatus` — `sent`, or
|
|
235
|
+
* `not-sent` when the mail was never queued (platform email sending off, or
|
|
236
|
+
* the queue write or its stamp failing — never over a verdict the worker
|
|
237
|
+
* already recorded), the customer row has no address, the sender did not
|
|
238
|
+
* deliver it (an address suppressed after a bounce, a demo store, or a
|
|
239
|
+
* refused message), the send failed for good, or an operator decided the
|
|
240
|
+
* request before the mail went out. The operator reads an undelivered
|
|
241
|
+
* acknowledgement off it, on `GET /rma` and the `rma` frame each recorded
|
|
242
|
+
* verdict sends; the shopper's view never carries it.
|
|
237
243
|
*/
|
|
238
244
|
type ReturnRequestAcknowledgement = PurchaseWithdrawalAcknowledgement;
|
|
239
245
|
/** The change-of-mind terms snapshotted onto a request, so a later policy edit does not rewrite them. */
|