import { type CheckoutAddress, type CheckoutOrder, type CheckoutOrderDeliveryBundle, type Config, type GetCheckoutOrderQuery, type GetCollectPointsQuery, type PatchCheckoutOrderData, type PaymentInstrument, type PostCheckoutOrderChargeData, type PostCheckoutOrderDataWithBag, type PostCheckoutOrderDataWithItems, type PostPaymentIntentInstrumentData, type PutCheckoutOrderPromocodesData, type PutPaymentIntentInstrumentData } from '@farfetch/blackout-client'; import type { UseCheckoutOptions } from './types/index.js'; /** * Provides facilities to manage a checkout order. * If the `checkoutOrderId` parameter is not provided, * the hook will use the current checkout order instead * if available in the redux store. */ declare function useCheckout(checkoutOrderId?: CheckoutOrder['id'], options?: UseCheckoutOptions): { actions: { fetch: (query?: GetCheckoutOrderQuery | undefined, config?: Config | undefined) => Promise; fetchCharge: (config?: Config) => Promise; fetchDetails: (config?: Config | undefined) => Promise; fetchInstruments: (config?: Config | undefined) => Promise; fetchCollectPoints: (config?: Config, query?: GetCollectPointsQuery | undefined) => Promise; create: (createData?: PostCheckoutOrderDataWithItems | PostCheckoutOrderDataWithBag | undefined, config?: Config | undefined) => Promise; createInstrument: (data: PostPaymentIntentInstrumentData, config?: Config) => Promise; update: (data: PatchCheckoutOrderData, config?: Config) => Promise; updateInstrument: (paymentInstrumentId: PaymentInstrument['id'], data: PutPaymentIntentInstrumentData, config?: Config) => Promise; removeInstrument: (paymentInstrumentId: PaymentInstrument['id'], config?: Config) => Promise; setTags: (data: string[], config?: Config) => Promise; setPromocodes: (data: PutCheckoutOrderPromocodesData, config?: Config) => Promise; removePromocodes: (config?: Config) => Promise; charge: (data: PostCheckoutOrderChargeData, config?: Config) => Promise; reset: () => void; resetCheckoutState: () => void; resetChargeState: () => void; resetCollectPoints: () => void; resetDetailsState: () => void; resetInstrumentsState: () => void; }; helpers: { getCreateInstrumentData: (overrides?: Partial & { guestUserEmail?: string; }) => PostPaymentIntentInstrumentData | undefined; getUpdateInstrumentData: (overrides?: Partial & { guestUserEmail?: string; }) => PutPaymentIntentInstrumentData | undefined; isOrderConfirmed: () => boolean; isOrderAwaitingPayment: () => boolean; getSelectedShippingOption: () => import("@farfetch/blackout-client").CheckoutOrderShippingOption | undefined; getSelectedDeliveryBundle: () => import("@farfetch/blackout-redux").CheckoutOrderDeliveryBundleEntity | undefined; isShippingAddressZipCodeValid: (shippingAddress?: CheckoutAddress | undefined) => Promise<{ isValid: boolean; error?: import("../../index.js").ZipCodeValidationError | undefined; }>; }; data: { checkoutOrder: { checkoutOrder: import("@farfetch/blackout-redux").CheckoutOrderEntityDenormalized | undefined; id: number; '@controls'?: { [key: string]: import("@farfetch/blackout-client").HypermediaLink; } | undefined; orderStatus: import("@farfetch/blackout-client").OrderStatusError; paymentMethods?: import("@farfetch/blackout-client").PaymentMethods | undefined; shippingOptions?: import("@farfetch/blackout-client").CheckoutOrderShippingOption[] | undefined; userPaymentTokens?: import("@farfetch/blackout-client").PaymentToken[] | undefined; paymentRequestId?: string | undefined; deliveryBundles?: string[] | undefined; } | undefined; charge: import("@farfetch/blackout-redux").Nullable; details: { checkoutOrder: import("@farfetch/blackout-redux").CheckoutOrderEntityDenormalized | undefined; deliveryBundles?: CheckoutOrderDeliveryBundle[] | undefined; shippingOptions?: import("@farfetch/blackout-client").CheckoutOrderShippingOption[] | undefined; registered: boolean; } | undefined; instruments: PaymentInstrument[] | undefined; collectPoints: import("@farfetch/blackout-redux").Nullable; deliveryBundles: import("@farfetch/blackout-redux").CheckoutOrderDeliveryBundleEntity[] | undefined; } | undefined; isAnythingLoading: boolean; isCheckoutOrderLoading: boolean; isChargeLoading: boolean; arePromocodesLoading: boolean; areDetailsLoading: boolean; areInstrumentsLoading: boolean; areCollectPointsLoading: boolean; areTagsLoading: boolean; areCollectPointsFetched: boolean; areDetailsFetched: boolean; areInstrumentsFetched: boolean; isChargeFetched: boolean; isCheckoutOrderFetched: boolean; collectPointsError: import("@farfetch/blackout-redux").Nullable | undefined; checkoutOrderError: import("@farfetch/blackout-redux").Nullable; chargeError: import("@farfetch/blackout-redux").Nullable; detailsError: import("@farfetch/blackout-redux").Nullable; instrumentsError: import("@farfetch/blackout-redux").Nullable; promocodesError: import("@farfetch/blackout-redux").Nullable; tagsError: import("@farfetch/blackout-redux").Nullable; }; export default useCheckout;