feat(purchase-detail): update item details structure and handle null values in mapping
This commit is contained in:
@@ -24,7 +24,7 @@ export interface PurchaseSummaryResponse extends PurchaseStatusResponse {
|
||||
|
||||
export interface PurchaseDetailAttributeResponse {
|
||||
name: string;
|
||||
value: string | null;
|
||||
value: string | number | boolean | null;
|
||||
}
|
||||
|
||||
export interface PurchaseDetailItemResponse {
|
||||
@@ -32,16 +32,15 @@ export interface PurchaseDetailItemResponse {
|
||||
quantity: number;
|
||||
unit_price: string;
|
||||
line_total: string;
|
||||
product: {
|
||||
id: number;
|
||||
source_catalog_item_id: number | null;
|
||||
source_variant_id: number | null;
|
||||
item_details: {
|
||||
nombre: string;
|
||||
descripcion: string | null;
|
||||
slug: string;
|
||||
imagen: string | null;
|
||||
} | null;
|
||||
variant: {
|
||||
id: number;
|
||||
attributes: PurchaseDetailAttributeResponse[];
|
||||
} | null;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PurchaseDetailResponse extends PurchaseStatusResponse {
|
||||
@@ -52,10 +51,11 @@ export interface PurchaseDetailResponse extends PurchaseStatusResponse {
|
||||
created_at: string | null;
|
||||
payment_method: string | null;
|
||||
dni: string | null;
|
||||
transfer_payer_dni: string | null;
|
||||
telefono: string | null;
|
||||
nombre_apellido: string | null;
|
||||
email: string | null;
|
||||
items_source: 'purchase' | 'cart' | null;
|
||||
items_source: 'purchase';
|
||||
items: PurchaseDetailItemResponse[];
|
||||
subtotal: string;
|
||||
total: string;
|
||||
|
||||
Reference in New Issue
Block a user