@final-commerce/command-frame 0.7.0-staging.6 → 0.7.0-staging.7
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.
|
@@ -18,11 +18,14 @@ export interface GetRefundPlanParams {
|
|
|
18
18
|
* nothing staged, no `allocation` comes back.
|
|
19
19
|
*/
|
|
20
20
|
items?: {
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* `internalId` / `variantId` for a product, `customSaleId`, cart-fee id, tip
|
|
23
|
+
* `transactionId`, or a booking's own `internalId` on `order.reservations[]`.
|
|
24
|
+
*/
|
|
22
25
|
itemKey: string;
|
|
23
26
|
quantity: number;
|
|
24
27
|
/** Optional hint; inferred from the order when omitted. */
|
|
25
|
-
type?: 'product' | 'customSale' | 'fee' | 'tip';
|
|
28
|
+
type?: 'product' | 'customSale' | 'fee' | 'tip' | 'reservation';
|
|
26
29
|
}[];
|
|
27
30
|
}
|
|
28
31
|
export interface RefundPlanSource {
|
|
@@ -18,6 +18,14 @@ export interface GetRemainingRefundableQuantitiesResponse {
|
|
|
18
18
|
* 0/1 semantics: `1` = still refundable, `0` = already refunded.
|
|
19
19
|
*/
|
|
20
20
|
tips: Record<string, number>;
|
|
21
|
+
/**
|
|
22
|
+
* Remaining refundable bookings, keyed by `order.reservations[].internalId` —
|
|
23
|
+
* the same key `processPartialRefund` takes for `type: 'reservation'` items.
|
|
24
|
+
* A service is sold as a reservation rather than a line item, so without this
|
|
25
|
+
* map a refund screen can show everything on the order EXCEPT the appointment.
|
|
26
|
+
* 0/1 semantics: `1` = still refundable, `0` = already refunded.
|
|
27
|
+
*/
|
|
28
|
+
reservations: Record<string, number>;
|
|
21
29
|
timestamp: string;
|
|
22
30
|
}
|
|
23
31
|
export type GetRemainingRefundableQuantities = (params?: GetRemainingRefundableQuantitiesParams) => Promise<GetRemainingRefundableQuantitiesResponse>;
|
|
@@ -131,10 +131,10 @@ export interface ProcessPartialRefundParams {
|
|
|
131
131
|
};
|
|
132
132
|
/** Optional items to refund. */
|
|
133
133
|
items?: {
|
|
134
|
-
/** internalId or variantId or
|
|
134
|
+
/** internalId or variantId, customSaleId, or a booking's own internalId. */
|
|
135
135
|
itemKey: string;
|
|
136
136
|
quantity: number;
|
|
137
|
-
type?: 'product' | 'customSale' | 'fee' | 'tip';
|
|
137
|
+
type?: 'product' | 'customSale' | 'fee' | 'tip' | 'reservation';
|
|
138
138
|
/**
|
|
139
139
|
* Per-item stock disposition for a refunded **product** line — the
|
|
140
140
|
* headless equivalent of the old refund popup's per-row restock/damaged
|