UNPKG

@godaddy/react

Version:

The `createCheckoutSession` function creates a new checkout session with GoDaddy's commerce API.

1,591 lines (1,590 loc) 130 kB
import React from "react"; import { QueryClient, QueryClientProviderProps } from "@tanstack/react-query"; import { enUs } from "@godaddy/localizations"; import * as react_jsx_runtime3 from "react/jsx-runtime"; import * as gql_tada0 from "gql.tada"; import { ResultOf, VariablesOf } from "gql.tada"; //#region src/godaddy-provider.d.ts declare const queryClient: QueryClient; type GoDaddyTheme = 'base' | 'orange' | 'purple'; interface CSSVariables { 'font-sans'?: string; 'font-serif'?: string; 'font-mono'?: string; 'default-font-family'?: string; background?: string; 'secondary-background'?: string; foreground?: string; card?: string; 'card-foreground'?: string; popover?: string; 'popover-foreground'?: string; primary?: string; 'primary-foreground'?: string; secondary?: string; 'secondary-foreground'?: string; muted?: string; 'muted-foreground'?: string; accent?: string; 'accent-foreground'?: string; destructive?: string; 'destructive-foreground'?: string; border?: string; input?: string; ring?: string; radius?: string; } type GoDaddyVariables = CSSVariables | { checkout: CSSVariables; }; interface GoDaddyAppearance { theme?: GoDaddyTheme; variables?: GoDaddyVariables; } interface GoDaddyContextValue { t: typeof enUs; appearance?: GoDaddyAppearance; debug?: boolean; apiHost?: string; clientId?: string; storeId?: string; channelId?: string; locale?: string; Link?: React.ComponentType<LinkComponentProps>; } interface LinkComponentProps { href: string; children: React.ReactNode; className?: string; [key: string]: any; } declare const useGoDaddyContext: () => GoDaddyContextValue; interface GoDaddyProviderProps { localization?: typeof enUs; appearance?: GoDaddyAppearance; debug?: boolean; /** * API host for checkout GraphQL requests. * Defaults to production (https://checkout.commerce.api.godaddy.com). * * Internal devs can set to: * - "http://localhost:3000" for local development */ apiHost?: string; clientId?: string; storeId?: string; channelId?: string; locale?: string; queryClient?: QueryClient; Link?: React.ComponentType<LinkComponentProps>; children: QueryClientProviderProps['children']; } declare function GoDaddyProvider({ localization, appearance, debug, apiHost, clientId, storeId, channelId, locale, queryClient: providedQueryClient, Link, children }: GoDaddyProviderProps): react_jsx_runtime3.JSX.Element; //#endregion //#region src/lib/godaddy/catalog-storefront-queries.d.ts declare const SkuGroupsQuery: gql_tada0.TadaDocumentNode<{ skuGroups: { edges: ({ cursor: string; node: { id: string; name: string; label: string | null; description: string | null; htmlDescription: string | null; type: string; priceRange: { min: number | null; max: number | null; } | null; compareAtPriceRange: { min: number | null; max: number | null; } | null; mediaObjects: { edges: ({ node: { url: string; type: string | null; } | null; } | null)[] | null; } | null; attributes: { edges: ({ node: { id: string; name: string; label: string | null; description: string | null; htmlDescription: string | null; values: { edges: ({ node: { id: string; name: string; label: string | null; } | null; } | null)[] | null; } | null; } | null; } | null)[] | null; } | null; skus: { edges: ({ node: { id: string; label: string | null; name: string; inventoryCounts: { edges: ({ node: { id: string; quantity: number | null; type: string; } | null; } | null)[] | null; } | null; } | null; } | null)[] | null; } | null; } | null; } | null)[] | null; pageInfo: { hasNextPage: boolean; hasPreviousPage: boolean; startCursor: string | null; endCursor: string | null; }; totalCount: number; } | null; }, { label?: { eq?: string | null | undefined; contains?: string | null | undefined; } | null | undefined; listId?: { in?: string[] | null | undefined; eq?: string | null | undefined; } | null | undefined; id?: { in?: string[] | null | undefined; eq?: string | null | undefined; } | null | undefined; after?: string | null | undefined; first?: number | null | undefined; }, void>; declare const SkuGroupQuery: gql_tada0.TadaDocumentNode<{ skuGroup: { id: string; name: string; label: string | null; description: string | null; htmlDescription: string | null; type: string; priceRange: { min: number | null; max: number | null; } | null; compareAtPriceRange: { min: number | null; max: number | null; } | null; mediaObjects: { edges: ({ node: { url: string; type: string | null; } | null; } | null)[] | null; } | null; attributes: { edges: ({ node: { id: string; name: string; label: string | null; description: string | null; htmlDescription: string | null; values: { edges: ({ node: { id: string; name: string; label: string | null; } | null; } | null)[] | null; } | null; } | null; } | null)[] | null; } | null; skus: { edges: ({ node: { id: string; label: string | null; name: string; inventoryCounts: { edges: ({ node: { id: string; quantity: number | null; type: string; } | null; } | null)[] | null; } | null; } | null; } | null)[] | null; } | null; } | null; }, { attributeValues?: string[] | null | undefined; first?: number | null | undefined; id: string; }, void>; declare const SkuQuery: gql_tada0.TadaDocumentNode<{ sku: { id: string; label: string | null; name: string; description: string | null; htmlDescription: string | null; code: string; prices: { edges: ({ node: { id: string; value: { value: number; currencyCode: string; }; compareAtValue: { value: number; currencyCode: string; } | null; } | null; } | null)[] | null; } | null; inventoryCounts: { edges: ({ node: { id: string; quantity: number | null; type: string; } | null; } | null)[] | null; } | null; mediaObjects: { edges: ({ node: { id: string; url: string; type: string | null; label: string | null; position: number | null; } | null; } | null)[] | null; } | null; attributeValues: { edges: ({ node: { id: string; name: string; label: string | null; } | null; } | null)[] | null; } | null; } | null; }, { id: string; }, void>; //#endregion //#region src/lib/godaddy/checkout-mutations.d.ts declare const CreateCheckoutSessionMutation: gql_tada0.TadaDocumentNode<{ createCheckoutSession: { id: string; token: string | null; url: string | null; sourceApp: string | null; returnUrl: string; successUrl: string; storeId: string; businessId: string | null; channelId: string; customerId: string | null; storeName: string | null; environment: "dev" | "ote" | "prod" | "test" | null; enableTips: boolean | null; enabledLocales: string[] | null; enableSurcharge: boolean | null; enableLocalPickup: boolean | null; enableShipping: boolean | null; enablePhoneCollection: boolean | null; enableNotesCollection: boolean | null; enablePromotionCodes: boolean | null; enableTaxCollection: boolean | null; enableShippingAddressCollection: boolean | null; enableBillingAddressCollection: boolean | null; enableAddressAutocomplete: boolean | null; appearance: { theme: "base" | "orange" | "purple" | null; variables: { fontSans: string | null; fontSerif: string | null; fontMono: string | null; defaultFontFamily: string | null; background: string | null; secondaryBackground: string | null; foreground: string | null; card: string | null; cardForeground: string | null; popover: string | null; popoverForeground: string | null; primary: string | null; primaryForeground: string | null; secondary: string | null; secondaryForeground: string | null; muted: string | null; mutedForeground: string | null; accent: string | null; accentForeground: string | null; destructive: string | null; destructiveForeground: string | null; border: string | null; input: string | null; ring: string | null; radius: string | null; } | null; } | null; experimental_rules: { freeShipping: { enabled: boolean; minimumOrderTotal: number; } | null; } | null; shipping: { originAddress: { addressLine1: string | null; addressLine2: string | null; addressLine3: string | null; postalCode: string | null; countryCode: string | null; adminArea1: string | null; adminArea2: string | null; adminArea3: string | null; adminArea4: string | null; } | null; } | null; paymentMethods: { card: { processor: string; checkoutTypes: string[]; } | null; ccavenue: { processor: string; checkoutTypes: string[]; } | null; express: { processor: string; checkoutTypes: string[]; } | null; applePay: { processor: string; checkoutTypes: string[]; } | null; googlePay: { processor: string; checkoutTypes: string[]; } | null; paypal: { processor: string; checkoutTypes: string[]; } | null; paze: { processor: string; checkoutTypes: string[]; } | null; offline: { processor: string; checkoutTypes: string[]; } | null; mercadopago: { processor: string; checkoutTypes: string[]; } | null; } | null; draftOrder: { id: string | null; statuses: { status: string | null; } | null; totals: { total: { currencyCode: string | null; value: number | null; } | null; } | null; } | null; locations: { id: string; isDefault: boolean; address: { addressLine1: string | null; addressLine2: string | null; addressLine3: string | null; postalCode: string | null; countryCode: string | null; adminArea1: string | null; adminArea2: string | null; adminArea3: string | null; adminArea4: string | null; }; operatingHours: { pickupWindowInDays: number; leadTime: number; pickupSlotInterval: number | null; timeZone: string; hours: { monday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; tuesday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; wednesday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; thursday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; friday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; saturday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; sunday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; }; } | null; }[] | null; defaultOperatingHours: { pickupWindowInDays: number; leadTime: number; pickupSlotInterval: number | null; timeZone: string; hours: { monday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; tuesday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; wednesday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; thursday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; friday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; saturday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; sunday: { enabled: boolean; openTime: string | null; closeTime: string | null; } | null; }; } | null; } | null; }, { input: { url?: string | null | undefined; taxes?: { originAddress?: { postalCode?: string | null | undefined; countryCode?: string | null | undefined; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; addressDetails?: { subBuilding?: string | null | undefined; streetType?: string | null | undefined; streetNumber?: string | null | undefined; streetName?: string | null | undefined; geoCoordinates?: { longitude: number; latitude: number; } | null | undefined; deliveryService?: string | null | undefined; buildingName?: string | null | undefined; addressType?: string | null | undefined; } | null | undefined; } | null | undefined; } | null | undefined; successUrl: string; storeName?: string | null | undefined; storeId: string; sourceApp?: string | null | undefined; shipping?: { originAddress?: { postalCode?: string | null | undefined; countryCode?: string | null | undefined; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; addressDetails?: { subBuilding?: string | null | undefined; streetType?: string | null | undefined; streetNumber?: string | null | undefined; streetName?: string | null | undefined; geoCoordinates?: { longitude: number; latitude: number; } | null | undefined; deliveryService?: string | null | undefined; buildingName?: string | null | undefined; addressType?: string | null | undefined; } | null | undefined; } | null | undefined; fulfillmentLocationId?: string | null | undefined; } | null | undefined; returnUrl: string; paymentMethods?: { paze?: { processor: string; checkoutTypes: string[]; } | null | undefined; paypal?: { processor: string; checkoutTypes: string[]; } | null | undefined; offline?: { processor: string; checkoutTypes: string[]; } | null | undefined; mercadopago?: { processor: string; checkoutTypes: string[]; } | null | undefined; googlePay?: { processor: string; checkoutTypes: string[]; } | null | undefined; express?: { processor: string; checkoutTypes: string[]; } | null | undefined; ccavenue?: { processor: string; checkoutTypes: string[]; } | null | undefined; card?: { processor: string; checkoutTypes: string[]; } | null | undefined; applePay?: { processor: string; checkoutTypes: string[]; } | null | undefined; } | null | undefined; operatingHours?: { default: { timeZone: string; pickupWindowInDays: number; pickupSlotInterval?: number | null | undefined; leadTime: number; hours: { wednesday?: { openTime?: string | null | undefined; enabled: boolean; closeTime?: string | null | undefined; } | null | undefined; tuesday?: { openTime?: string | null | undefined; enabled: boolean; closeTime?: string | null | undefined; } | null | undefined; thursday?: { openTime?: string | null | undefined; enabled: boolean; closeTime?: string | null | undefined; } | null | undefined; sunday?: { openTime?: string | null | undefined; enabled: boolean; closeTime?: string | null | undefined; } | null | undefined; saturday?: { openTime?: string | null | undefined; enabled: boolean; closeTime?: string | null | undefined; } | null | undefined; monday?: { openTime?: string | null | undefined; enabled: boolean; closeTime?: string | null | undefined; } | null | undefined; friday?: { openTime?: string | null | undefined; enabled: boolean; closeTime?: string | null | undefined; } | null | undefined; }; }; } | null | undefined; locations?: { isDefault: boolean; id: string; address: { postalCode?: string | null | undefined; countryCode?: string | null | undefined; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; addressDetails?: { subBuilding?: string | null | undefined; streetType?: string | null | undefined; streetNumber?: string | null | undefined; streetName?: string | null | undefined; geoCoordinates?: { longitude: number; latitude: number; } | null | undefined; deliveryService?: string | null | undefined; buildingName?: string | null | undefined; addressType?: string | null | undefined; } | null | undefined; }; }[] | null | undefined; lineItems?: { skuId: string; quantity: number; }[] | null | undefined; expiresAt?: string | null | undefined; experimental_rules?: { freeShipping?: { minimumOrderTotal: number; enabled: boolean; } | null | undefined; } | null | undefined; environment?: "dev" | "ote" | "prod" | "test" | null | undefined; enabledPaymentProviders?: string[] | null | undefined; enabledLocales?: string[] | null | undefined; enableTips?: boolean | null | undefined; enableTaxCollection?: boolean | null | undefined; enableSurcharge?: boolean | null | undefined; enableShippingAddressCollection?: boolean | null | undefined; enableShipping?: boolean | null | undefined; enablePromotionCodes?: boolean | null | undefined; enablePhoneCollection?: boolean | null | undefined; enablePaymentMethodCollection?: boolean | null | undefined; enableNotesCollection?: boolean | null | undefined; enableLocalPickup?: boolean | null | undefined; enableBillingAddressCollection?: boolean | null | undefined; enableAddressAutocomplete?: boolean | null | undefined; draftOrderId?: string | null | undefined; customerId?: string | null | undefined; channelId?: string | null | undefined; appearance?: { variables?: { secondaryForeground?: string | null | undefined; secondaryBackground?: string | null | undefined; secondary?: string | null | undefined; ring?: string | null | undefined; radius?: string | null | undefined; primaryForeground?: string | null | undefined; primary?: string | null | undefined; popoverForeground?: string | null | undefined; popover?: string | null | undefined; mutedForeground?: string | null | undefined; muted?: string | null | undefined; input?: string | null | undefined; foreground?: string | null | undefined; fontSerif?: string | null | undefined; fontSans?: string | null | undefined; fontMono?: string | null | undefined; destructiveForeground?: string | null | undefined; destructive?: string | null | undefined; defaultFontFamily?: string | null | undefined; cardForeground?: string | null | undefined; card?: string | null | undefined; border?: string | null | undefined; background?: string | null | undefined; accentForeground?: string | null | undefined; accent?: string | null | undefined; } | null | undefined; theme?: "base" | "orange" | "purple" | null | undefined; } | null | undefined; }; }, void>; declare const VerifyCheckoutSessionAddressMutation: gql_tada0.TadaDocumentNode<{ verifyAddress: { addressLine1: string | null; addressLine2: string | null; addressLine3: string | null; postalCode: string | null; countryCode: string | null; adminArea1: string | null; adminArea2: string | null; adminArea3: string | null; adminArea4: string | null; }[] | null; }, { input: { postalCode: string; countryCode: string; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1: string; }; }, void>; declare const UpdateCheckoutSessionDraftOrderMutation: gql_tada0.TadaDocumentNode<{ updateCheckoutSessionDraftOrder: { id: string | null; totals: { discountTotal: { currencyCode: string | null; value: number | null; } | null; feeTotal: { currencyCode: string | null; value: number | null; } | null; shippingTotal: { currencyCode: string | null; value: number | null; } | null; subTotal: { currencyCode: string | null; value: number | null; } | null; taxTotal: { currencyCode: string | null; value: number | null; } | null; total: { currencyCode: string | null; value: number | null; } | null; } | null; } | null; }, { input: { totals?: { total: { value: number; currencyCode: string; }; taxTotal: { value: number; currencyCode: string; }; subTotal: { value: number; currencyCode: string; }; shippingTotal: { value: number; currencyCode: string; }; feeTotal: { value: number; currencyCode: string; }; discountTotal: { value: number; currencyCode: string; }; } | null | undefined; taxes?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; included?: boolean | null | undefined; id?: string | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; exempted?: boolean | null | undefined; amount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; additional?: boolean | null | undefined; }[] | null | undefined; taxExempted?: boolean | null | undefined; tags?: string[] | null | undefined; staffUserIds?: string[] | null | undefined; shippingLines?: { totals?: { taxTotal?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; subTotal?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; } | null | undefined; taxes?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; included?: boolean | null | undefined; id?: string | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; exempted?: boolean | null | undefined; amount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; }[] | null | undefined; requestedService?: string | null | undefined; requestedProvider?: string | null | undefined; name?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; id?: string | null | undefined; fees?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name?: string | null | undefined; id?: string | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; appliedBeforeTax?: boolean | null | undefined; amount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; }[] | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; discounts?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; id?: string | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; code?: string | null | undefined; appliedBeforeTax?: boolean | null | undefined; amount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; }[] | null | undefined; amount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; }[] | null | undefined; shipping?: { phone?: string | null | undefined; lastName?: string | null | undefined; firstName?: string | null | undefined; email?: string | null | undefined; companyName?: string | null | undefined; address?: { postalCode?: string | null | undefined; countryCode?: string | null | undefined; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; } | null | undefined; notes?: { shouldNotifyCustomer?: boolean | null | undefined; referenceId?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; deletedAt?: string | null | undefined; createdAt?: string | null | undefined; content: string; authorType?: "NONE" | "CUSTOMER" | "MERCHANT" | null | undefined; author?: string | null | undefined; }[] | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; lineItems?: { update?: { unitAmount?: { value: number; currencyCode: string; } | null | undefined; type?: "PHYSICAL" | "DIGITAL" | "ALL" | "PAY_LINK" | "SERVICE" | "STAY" | null | undefined; totals?: { taxTotal: { value: number; currencyCode: string; }; subTotal: { value: number; currencyCode: string; }; feeTotal: { value: number; currencyCode: string; }; discountTotal: { value: number; currencyCode: string; }; } | null | undefined; taxes?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name: string; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; included?: boolean | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; exempted?: boolean | null | undefined; amount: { value: number; currencyCode: string; }; }[] | null | undefined; tags?: string[] | null | undefined; skuId?: string | null | undefined; shipping?: { phone?: string | null | undefined; lastName?: string | null | undefined; firstName?: string | null | undefined; email?: string | null | undefined; companyName?: string | null | undefined; address?: { postalCode?: string | null | undefined; countryCode?: string | null | undefined; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; } | null | undefined; serviceStartAt?: string | null | undefined; serviceEndsAt?: string | null | undefined; quantity?: number | null | undefined; productId?: string | null | undefined; notes?: { shouldNotifyCustomer?: boolean | null | undefined; referenceId?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; deletedAt?: string | null | undefined; createdAt?: string | null | undefined; content: string; authorType?: "NONE" | "CUSTOMER" | "MERCHANT" | null | undefined; author?: string | null | undefined; }[] | null | undefined; name?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; id: string; fulfillmentMode?: "CURBSIDE" | "DELIVERY" | "DIGITAL" | "DRIVE_THRU" | "FOR_HERE" | "GENERAL_CONTAINER" | "GIFT_CARD" | "NONE" | "NON_LODGING_NRR" | "NON_LODGING_SALE" | "PICKUP" | "PURCHASE" | "QUICK_STAY" | "REGULAR_STAY" | "SHIP" | "TO_GO" | null | undefined; fulfillmentChannelId?: string | null | undefined; fees?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name: string; externalIds?: { value: string; type: string; }[] | null | undefined; appliedBeforeTax?: boolean | null | undefined; amount: { value: number; currencyCode: string; }; }[] | null | undefined; externalId?: string | null | undefined; discounts?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name: string; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; code?: string | null | undefined; appliedBeforeTax?: boolean | null | undefined; amount: { value: number; currencyCode: string; }; }[] | null | undefined; details?: { unitOfMeasure?: string | null | undefined; sku?: string | null | undefined; selectedOptions?: { values: string[]; attribute: string; }[] | null | undefined; selectedAddons?: { values: { name: string; costAdjustment: { value: number; currencyCode: string; }; amountIncreased?: boolean | null | undefined; amount?: { value: number; currencyCode: string; } | null | undefined; }[]; sku?: string | null | undefined; attribute: string; }[] | null | undefined; productAssetUrl?: string | null | undefined; } | null | undefined; }[] | null | undefined; remove?: string[] | null | undefined; add?: { unitAmount: { value: number; currencyCode: string; }; type?: "PHYSICAL" | "DIGITAL" | "ALL" | "PAY_LINK" | "SERVICE" | "STAY" | null | undefined; totals: { taxTotal: { value: number; currencyCode: string; }; subTotal: { value: number; currencyCode: string; }; feeTotal: { value: number; currencyCode: string; }; discountTotal: { value: number; currencyCode: string; }; }; taxes?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name: string; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; included?: boolean | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; exempted?: boolean | null | undefined; amount: { value: number; currencyCode: string; }; }[] | null | undefined; tags?: string[] | null | undefined; skuId?: string | null | undefined; shipping?: { phone?: string | null | undefined; lastName?: string | null | undefined; firstName?: string | null | undefined; email?: string | null | undefined; companyName?: string | null | undefined; address?: { postalCode?: string | null | undefined; countryCode?: string | null | undefined; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; } | null | undefined; serviceStartAt?: string | null | undefined; serviceEndsAt?: string | null | undefined; quantity: number; productId?: string | null | undefined; notes?: { shouldNotifyCustomer?: boolean | null | undefined; referenceId?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; deletedAt?: string | null | undefined; createdAt?: string | null | undefined; content: string; authorType?: "NONE" | "CUSTOMER" | "MERCHANT" | null | undefined; author?: string | null | undefined; }[] | null | undefined; name: string; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; id?: string | null | undefined; fulfillmentMode: "CURBSIDE" | "DELIVERY" | "DIGITAL" | "DRIVE_THRU" | "FOR_HERE" | "GENERAL_CONTAINER" | "GIFT_CARD" | "NONE" | "NON_LODGING_NRR" | "NON_LODGING_SALE" | "PICKUP" | "PURCHASE" | "QUICK_STAY" | "REGULAR_STAY" | "SHIP" | "TO_GO"; fulfillmentChannelId?: string | null | undefined; fees?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name: string; externalIds?: { value: string; type: string; }[] | null | undefined; appliedBeforeTax?: boolean | null | undefined; amount: { value: number; currencyCode: string; }; }[] | null | undefined; externalId?: string | null | undefined; discounts?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name: string; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; code?: string | null | undefined; appliedBeforeTax?: boolean | null | undefined; amount: { value: number; currencyCode: string; }; }[] | null | undefined; details?: { unitOfMeasure?: string | null | undefined; sku?: string | null | undefined; selectedOptions?: { values: string[]; attribute: string; }[] | null | undefined; selectedAddons?: { values: { name: string; costAdjustment: { value: number; currencyCode: string; }; amountIncreased?: boolean | null | undefined; amount?: { value: number; currencyCode: string; } | null | undefined; }[]; sku?: string | null | undefined; attribute: string; }[] | null | undefined; productAssetUrl?: string | null | undefined; } | null | undefined; }[] | null | undefined; } | null | undefined; fees?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name?: string | null | undefined; id?: string | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; appliedBeforeTax?: boolean | null | undefined; amount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; }[] | null | undefined; externalId?: string | null | undefined; discounts?: { referenceId?: string | null | undefined; ratePercentage?: string | null | undefined; name?: string | null | undefined; metafields?: { value: string; type?: "JSON" | null | undefined; key: string; }[] | null | undefined; id?: string | null | undefined; externalIds?: { value: string; type: string; }[] | null | undefined; code?: string | null | undefined; appliedBeforeTax?: boolean | null | undefined; amount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; }[] | null | undefined; customerId?: string | null | undefined; context: { storeId: string; channelId: string; }; cartId?: string | null | undefined; billing?: { phone?: string | null | undefined; lastName?: string | null | undefined; firstName?: string | null | undefined; email?: string | null | undefined; companyName?: string | null | undefined; address?: { postalCode?: string | null | undefined; countryCode?: string | null | undefined; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; } | null | undefined; }; }, void>; declare const CalculateCheckoutSessionTaxesMutation: gql_tada0.TadaDocumentNode<{ calculateCheckoutSessionTaxes: { totalTaxAmount: { value: number | null; currencyCode: string | null; } | null; } | null; }, { destination?: { postalCode: string; countryCode: string; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; }, void>; declare const ApplyCheckoutSessionDiscountMutation: gql_tada0.TadaDocumentNode<{ applyCheckoutSessionDiscount: { id: string | null; lineItems: { externalId: string | null; fulfillmentMode: string | null; id: string; name: string | null; productId: string | null; quantity: number | null; status: string | null; tags: string[] | null; type: string | null; discounts: { amount: { currencyCode: string | null; value: number | null; } | null; appliedBeforeTax: boolean | null; code: string | null; id: string | null; name: string | null; ratePercentage: string | null; }[] | null; fees: { appliedBeforeTax: boolean | null; id: string | null; name: string | null; ratePercentage: string | null; }[] | null; totals: { discountTotal: { currencyCode: string | null; value: number | null; } | null; feeTotal: { currencyCode: string | null; value: number | null; } | null; subTotal: { currencyCode: string | null; value: number | null; } | null; taxTotal: { currencyCode: string | null; value: number | null; } | null; } | null; unitAmount: { currencyCode: string | null; value: number | null; } | null; }[] | null; shippingLines: { discounts: { id: string | null; amount: { currencyCode: string | null; value: number | null; } | null; appliedBeforeTax: boolean | null; code: string | null; }[] | null; }[] | null; discounts: { amount: { currencyCode: string | null; value: number | null; } | null; appliedBeforeTax: boolean | null; code: string | null; id: string | null; name: string | null; ratePercentage: string | null; }[] | null; totals: { discountTotal: { currencyCode: string | null; value: number | null; } | null; total: { currencyCode: string | null; value: number | null; } | null; } | null; } | null; }, { input: { discountCodes?: string[] | null | undefined; }; }, void>; declare const ConfirmCheckoutSessionMutation: gql_tada0.TadaDocumentNode<{ confirmCheckoutSession: { status: "ACTIVE" | "CANCELLED" | "COMPLETED" | "CREATED" | "EXPIRED"; } | null; }, { sessionId: string; input: { shippingTotal?: { value: number; currencyCode: string; } | null | undefined; shippingLines?: { totals: { taxTotal: { value: number; currencyCode: string; }; subTotal: { value: number; currencyCode: string; }; }; taxes?: { ratePercentage?: string | null | undefined; name: string; included?: boolean | null | undefined; exempted?: boolean | null | undefined; amount: { value: number; currencyCode: string; }; }[] | null | undefined; requestedService?: string | null | undefined; requestedProvider?: string | null | undefined; name: string; amount: { value: number; currencyCode: string; }; }[] | null | undefined; shipping?: { phone?: string | null | undefined; lastName?: string | null | undefined; firstName?: string | null | undefined; email?: string | null | undefined; companyName?: string | null | undefined; address?: { postalCode: string; countryCode: string; adminArea4?: string | null | undefined; adminArea3?: string | null | undefined; adminArea2?: string | null | undefined; adminArea1?: string | null | undefined; addressLine3?: string | null | undefined; addressLine2?: string | null | undefined; addressLine1?: string | null | undefined; } | null | undefined; } | null | undefined; paymentType: string; paymentToken: string; paymentProvider: string; paymentProcessor?: string | null | undefined; fulfillmentStartAt?: string | null | undefined; fulfillmentLocationId?: string | null | undefined; fulfillmentEndAt?: string | null | undefined; calculatedTaxes?: { totalTaxAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; taxAmounts?: { totalTaxAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; rate?: { value?: { percentage?: string | null | undefined; appliedPercentage?: number | null | undefined; appliedAmount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; amount?: { value?: number | null | undefined; currencyCode?: string | null | undefined; } | null | undefined; } | null | undefined; name?: string | null | undefined; label?: string | null | undefined; id?: string | null | undefined; calculationMethod?: string | null | undefined; } | null | undefined