import type { DataSourceFn } from '../../../libs/integration-data-source'; import type { Address } from '../../../libs/util-domain-models'; import type * as Models from '../models'; declare global { export namespace CartDomain { type CartItem = Models.CartItem; type Cart = Models.Cart; } } export interface AddCartProductInput { productId: string; variantId?: string; quantity?: number; } export interface AddCartVariantInput { productId?: string; variantId: string; quantity?: number; } export declare type AddCartItemInput = AddCartProductInput | AddCartVariantInput; export declare type AddCartItem = DataSourceFn; export interface FetchCartInput { } export declare type FetchCart = DataSourceFn; export interface RemoveCartItemInput { id: string; productId?: string; } export declare type RemoveCartItem = DataSourceFn; export declare type AddBillingAddress = (input: Address) => Promise; export declare type RemoveBillingAddress = (id: string) => Promise; export declare type UpdateBillingAddress = (input: Partial
) => Promise; export declare type AddShippingAddress = (input: Address) => Promise; export declare type RemoveShippingAddress = (id: string) => Promise; export declare type UpdateShippingAddress = (input: Partial
) => Promise; export interface UpdateCartItemInput { id: string; productId?: string; quantity: number; } export declare type UpdateCartItem = DataSourceFn; export declare type CartDataSource = { addBillingAddress?: AddBillingAddress; removeBillingAddress?: RemoveBillingAddress; updateBillingAddress?: UpdateBillingAddress; addShippingAddress?: AddShippingAddress; removeShippingAddress?: RemoveShippingAddress; updateShippingAddress?: UpdateShippingAddress; addCartItem: AddCartItem; fetchCart: FetchCart; removeCartItem: RemoveCartItem; updateCartItem: UpdateCartItem; };