refactor(checkout): simplify direct item handling in checkout process

This commit is contained in:
2026-08-12 14:09:11 -03:00
parent 0e5f6dceb0
commit 30b8527c9a
2 changed files with 18 additions and 16 deletions

View File

@@ -11,16 +11,21 @@ export interface UpdatePurchaseCustomerPayload {
email: string;
}
export interface DirectCheckoutItem {
catalog_item_id: number;
variant_id: number | null;
cantidad: number;
}
export type StartCheckoutPayload =
| {
cart_id: number;
}
| {
direct_item: {
catalog_item_id: number;
variant_id: number | null;
cantidad: number;
};
direct_item: DirectCheckoutItem;
}
| {
direct_items: DirectCheckoutItem[];
};
export interface PurchaseStatusResponse {