import type { CartEventLevel, CartEventType, FulfillmentType } from '@/enums'; import type { ILocation } from '@/interfaces/api/address.interface'; import type { IProductPresale } from '@/interfaces/api/product.interface'; export interface ICartUpdateItem { id?: string; partNumber: string; quantity: number; fulfillmentId: string; engravingLines?: string[]; } export interface ICartUpdateParams { id: string; items: ICartUpdateItem[]; promoCode?: string; location?: ILocation; } export interface ICartFulfillment { id: string; canEngrave: boolean; type: FulfillmentType; expectation: string; engravingExpectation: string; itemIds: string[]; subtotal: number; hasUnmetMinimumPurchaseAmount: boolean; minimumPurchaseAmount: number; } export interface ICartRetailer { id: string; name: string; subtotal: number; itemsQuantity: number; fulfillments: Record; } export interface ICartItemAttributes { engraving: ICartItemEngraving; presale: IProductPresale; } export interface ICartItem { id: string; variantId: string; liquidId: string; retailerId: string; partNumber: string; fulfillmentId: string; upc: string; sku: string; salsifyGrouping: string; catPath: string; volume: string; uom: string; pack: boolean; packDesc: string; container: string; containerType: string; name: string; brand: string; size: string; price: number; quantity: number; maxQuantity: number; unitPrice: number; mainImage: string; attributes: ICartItemAttributes; } export interface ICartPromoCode { code: string; discount: number; freeDelivery: boolean; freeServiceFee: boolean; freeShipping: boolean; } export interface ICartEvent { type: CartEventType; message: string; level: CartEventLevel; } export interface ICart { id: string; subtotal: number; itemsQuantity: number; items: Record; retailers: Record; promoCode: ICartPromoCode | null; events: ICartEvent[]; } export interface ICartItemEngraving { isEngravable: boolean; isRequired: boolean; hasEngraving: boolean; fee: number; maxCharsPerLine: number; maxLines: number; location: string; lines: string[]; }