platform-types 1.10.825 → 1.10.826

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.
@@ -83,11 +83,14 @@ exports.PURCHASE_WITHDRAWAL_ACTION_MODES = ['accept', 'decline', 'relay'];
83
83
  * already returned (`data.orderItemIndex`).
84
84
  * - `nothing-to-withdraw` — every line is already withdrawn or returned.
85
85
  * - `not-delivered` — a warranty request on an order not yet delivered.
86
- * - `return-request-open` — a warranty request on an order that already has an
87
- * open shopper return request (`requested`, `authorized` or `received`);
88
- * `data.rmaId` names it. One open shopper request per order.
89
- * - `too-many-lines` — a warranty request naming, or resolving to, more lines
90
- * than one return request may hold; `data.max` is the bound.
86
+ * - `return-request-open` — a shopper return request (a warranty request, or a
87
+ * change of mind: a withdrawal-shaped body past W2 while the store's policy is
88
+ * on) on an order that already has an open shopper return request
89
+ * (`requested`, `authorized` or `received`); `data.rmaId` names it. One open
90
+ * shopper request per order.
91
+ * - `too-many-lines` — a shopper return request (either flow) naming, or
92
+ * resolving to, more lines than one return request may hold; `data.max` is
93
+ * the bound.
91
94
  */
92
95
  exports.PURCHASE_WITHDRAWAL_INELIGIBLE_REASONS = [
93
96
  'order-cancelled',
@@ -65,11 +65,14 @@ export declare const PURCHASE_WITHDRAWAL_ACTION_MODES: readonly ["accept", "decl
65
65
  * already returned (`data.orderItemIndex`).
66
66
  * - `nothing-to-withdraw` — every line is already withdrawn or returned.
67
67
  * - `not-delivered` — a warranty request on an order not yet delivered.
68
- * - `return-request-open` — a warranty request on an order that already has an
69
- * open shopper return request (`requested`, `authorized` or `received`);
70
- * `data.rmaId` names it. One open shopper request per order.
71
- * - `too-many-lines` — a warranty request naming, or resolving to, more lines
72
- * than one return request may hold; `data.max` is the bound.
68
+ * - `return-request-open` — a shopper return request (a warranty request, or a
69
+ * change of mind: a withdrawal-shaped body past W2 while the store's policy is
70
+ * on) on an order that already has an open shopper return request
71
+ * (`requested`, `authorized` or `received`); `data.rmaId` names it. One open
72
+ * shopper request per order.
73
+ * - `too-many-lines` — a shopper return request (either flow) naming, or
74
+ * resolving to, more lines than one return request may hold; `data.max` is
75
+ * the bound.
73
76
  */
74
77
  export declare const PURCHASE_WITHDRAWAL_INELIGIBLE_REASONS: readonly ["order-cancelled", "no-customer", "partial-before-fulfilment", "line-not-on-order", "line-unavailable", "nothing-to-withdraw", "not-delivered", "return-request-open", "too-many-lines"];
75
78
  /**
@@ -282,7 +285,14 @@ declare global {
282
285
  /** 1–{@link PURCHASE_WITHDRAWAL_LINES_MAX} distinct lines, each with a positive quantity. */
283
286
  lines?: PurchaseWithdrawalLine[];
284
287
  }
285
- /** `data` of the `201` of `POST /orders/purchase-withdrawal`: the code is `purchaseWithdrawal.withdrawalId`. */
288
+ /**
289
+ * `data` of the `201` of `POST /orders/purchase-withdrawal` when a withdrawal
290
+ * was recorded: the code is `purchaseWithdrawal.withdrawalId`. A
291
+ * withdrawal-shaped body past W2 may instead open a change-of-mind return
292
+ * request (the store's policy on, its window open) and answer
293
+ * {@link ShopperReturnRequestSubmitResponse} — tell them apart by key
294
+ * ({@link ShopperOrderRequestResponse}).
295
+ */
286
296
  interface PurchaseWithdrawalSubmitResponse {
287
297
  purchaseWithdrawal: OrderPurchaseWithdrawalView;
288
298
  }
@@ -329,7 +339,11 @@ declare global {
329
339
  * `data` of the `201` of the guest submit: the code on screen, and a guest
330
340
  * order status token minted at the order's CURRENT fence generation (no
331
341
  * earlier link dies) — the storefront opens `/pedido/{statusToken}` to follow
332
- * the refund. Absent only when the token could not be minted.
342
+ * the refund. Absent only when the token could not be minted. A
343
+ * withdrawal-shaped body past W2 may instead open a change-of-mind return
344
+ * request (the store's policy on, its window open) and answer
345
+ * {@link ShopperReturnRequestGuestSubmitResponse} — tell them apart by key
346
+ * ({@link ShopperOrderGuestRequestResponse}).
333
347
  */
334
348
  interface PurchaseWithdrawalGuestSubmitResponse extends PurchaseWithdrawalSubmitResponse {
335
349
  statusToken?: string;
@@ -80,11 +80,14 @@ export const PURCHASE_WITHDRAWAL_ACTION_MODES = ['accept', 'decline', 'relay'];
80
80
  * already returned (`data.orderItemIndex`).
81
81
  * - `nothing-to-withdraw` — every line is already withdrawn or returned.
82
82
  * - `not-delivered` — a warranty request on an order not yet delivered.
83
- * - `return-request-open` — a warranty request on an order that already has an
84
- * open shopper return request (`requested`, `authorized` or `received`);
85
- * `data.rmaId` names it. One open shopper request per order.
86
- * - `too-many-lines` — a warranty request naming, or resolving to, more lines
87
- * than one return request may hold; `data.max` is the bound.
83
+ * - `return-request-open` — a shopper return request (a warranty request, or a
84
+ * change of mind: a withdrawal-shaped body past W2 while the store's policy is
85
+ * on) on an order that already has an open shopper return request
86
+ * (`requested`, `authorized` or `received`); `data.rmaId` names it. One open
87
+ * shopper request per order.
88
+ * - `too-many-lines` — a shopper return request (either flow) naming, or
89
+ * resolving to, more lines than one return request may hold; `data.max` is
90
+ * the bound.
88
91
  */
89
92
  export const PURCHASE_WITHDRAWAL_INELIGIBLE_REASONS = [
90
93
  'order-cancelled',
package/dist/rma.d.ts CHANGED
@@ -132,9 +132,10 @@ declare global {
132
132
  expiresAt?: number;
133
133
  /**
134
134
  * Who opened the request. Absent means `operator`. `shopper` is the
135
- * storefront warranty request (`POST /orders/purchase-withdrawal` and its
136
- * guest twin with `intent: 'warranty'`); `purchase-withdrawal` has no
137
- * writer yet.
135
+ * storefront's own request on `POST /orders/purchase-withdrawal` and its
136
+ * 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.
138
139
  */
139
140
  source?: RmaSource;
140
141
  /** Server-derived legal track. Absent on an operator request. */
@@ -233,8 +234,8 @@ declare global {
233
234
  /**
234
235
  * A shopper-sourced return request as the shopper sees it, by ALLOW-LIST:
235
236
  * never the operator's reasons or actors, carrier, tracking, nor the
236
- * shopper's own description. Answered by the shopper's warranty request
237
- * (`ShopperReturnRequestSubmitResponse`), its `orderReturnRequest` frame (on
237
+ * shopper's own description. Answered by the shopper's warranty or
238
+ * change-of-mind request (`ShopperReturnRequestSubmitResponse`), its `orderReturnRequest` frame (on
238
239
  * the request and on every later status move), and the order reads
239
240
  * (`StorefrontOrderView.returnRequests`, `GuestOrderStatusView.returnRequests`).
240
241
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "platform-types",
3
- "version": "1.10.825",
3
+ "version": "1.10.826",
4
4
  "description": "Shared wire and entity contracts for the platform.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",