From 9882faf2b75672131c8c57e1ac4dd509402b5f83 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Tue, 4 Nov 2025 11:02:02 -0500 Subject: [PATCH 01/23] Add auth context and update API calls to use authentication Amp-Thread-ID: https://ampcode.com/threads/T-4a30d115-a4ed-4fb6-94c8-a93f2875611d Co-authored-by: Amp --- .../app/c/[sessionId]/HostedCheckout.tsx | 18 + examples/nextjs/app/c/[sessionId]/page.tsx | 7 + examples/nextjs/app/c/page.tsx | 5 + examples/nextjs/app/checkout.tsx | 50 +- examples/nextjs/app/layout.tsx | 3 +- examples/nextjs/app/providers.tsx | 14 + packages/react/package.json | 4 +- .../address/utils/use-address-matches.ts | 37 +- .../address/utils/use-address-verification.ts | 80 +- .../src/components/checkout/checkout.tsx | 644 +- .../utils/use-apply-delivery-method.ts | 32 +- .../utils/use-apply-fulfillment-location.ts | 102 +- .../discount/utils/use-discount-apply.ts | 316 +- .../utils/use-get-price-adjustments.ts | 56 +- .../checkout/form/checkout-form-container.tsx | 116 +- .../order/use-draft-order-products.ts | 50 +- .../checkout/order/use-draft-order.ts | 70 +- .../checkout/order/use-update-order.ts | 78 +- .../checkout/order/use-update-taxes.ts | 121 +- .../payment/utils/use-confirm-checkout.ts | 348 +- .../checkout/payment/utils/use-load-square.ts | 4 +- .../payment/utils/use-poynt-collect-cdn.ts | 4 +- .../utils/use-apply-shipping-method.ts | 202 +- .../utils/use-draft-order-shipping-methods.ts | 90 +- .../utils/use-get-shipping-methods.ts | 42 +- .../utils/use-remove-shipping-method.ts | 204 +- .../checkout/taxes/utils/use-get-taxes.ts | 46 +- packages/react/src/godaddy-provider.tsx | 14 +- .../react/src/hooks/use-checkout-session.tsx | 133 + .../react/src/hooks/use-event-callback.ts | 40 + .../react/src/hooks/use-event-listener.ts | 120 + .../src/hooks/use-isomorphic-layout-effect.ts | 17 + .../react/src/hooks/use-session-storage.ts | 191 + packages/react/src/lib/godaddy/godaddy.ts | 1283 +- packages/react/src/lib/godaddy/graphql-env.ts | 15692 ++++++++-------- packages/react/src/lib/godaddy/mutations.ts | 20 + packages/react/src/lib/godaddy/queries.ts | 192 +- packages/react/src/lib/godaddy/server.ts | 37 + packages/react/src/lib/graphql-with-errors.ts | 2 - packages/react/src/lib/utils.ts | 39 + packages/react/src/server.ts | 88 +- .../react/src/tracking/tracking-provider.tsx | 4 +- packages/react/tsdown.config.ts | 1 + pnpm-lock.yaml | 922 +- 44 files changed, 11587 insertions(+), 9951 deletions(-) create mode 100644 examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx create mode 100644 examples/nextjs/app/c/[sessionId]/page.tsx create mode 100644 examples/nextjs/app/c/page.tsx create mode 100644 examples/nextjs/app/providers.tsx create mode 100644 packages/react/src/hooks/use-checkout-session.tsx create mode 100644 packages/react/src/hooks/use-event-callback.ts create mode 100644 packages/react/src/hooks/use-event-listener.ts create mode 100644 packages/react/src/hooks/use-isomorphic-layout-effect.ts create mode 100644 packages/react/src/hooks/use-session-storage.ts create mode 100644 packages/react/src/lib/godaddy/server.ts diff --git a/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx b/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx new file mode 100644 index 00000000..f82e1041 --- /dev/null +++ b/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx @@ -0,0 +1,18 @@ +"use client"; + +import { Checkout, GoDaddyProvider } from "@godaddy/react"; + +export default function HostedCheckout() { + return ( +
+ + + +
+ ); +} diff --git a/examples/nextjs/app/c/[sessionId]/page.tsx b/examples/nextjs/app/c/[sessionId]/page.tsx new file mode 100644 index 00000000..56d58a43 --- /dev/null +++ b/examples/nextjs/app/c/[sessionId]/page.tsx @@ -0,0 +1,7 @@ +import HostedCheckout from "./HostedCheckout"; + +export const dynamic = "force-dynamic"; + +export default async function HostedCheckoutPage() { + return ; +} diff --git a/examples/nextjs/app/c/page.tsx b/examples/nextjs/app/c/page.tsx new file mode 100644 index 00000000..4d558f08 --- /dev/null +++ b/examples/nextjs/app/c/page.tsx @@ -0,0 +1,5 @@ +export const dynamic = "force-dynamic"; + +export default async function HostedCheckout() { + return
Test
; +} diff --git a/examples/nextjs/app/checkout.tsx b/examples/nextjs/app/checkout.tsx index aca19ce5..7bbdc3c9 100644 --- a/examples/nextjs/app/checkout.tsx +++ b/examples/nextjs/app/checkout.tsx @@ -2,9 +2,7 @@ import type { CheckoutFormSchema, CheckoutSession } from '@godaddy/react'; import { Checkout, GoDaddyProvider } from '@godaddy/react'; -import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; -import { useState } from 'react'; import { z } from 'zod'; /* Override the checkout form schema to make shippingPhone required */ @@ -13,32 +11,28 @@ const customSchema: CheckoutFormSchema = { }; export function CheckoutPage({ session }: { session: CheckoutSession }) { - const [queryClient] = useState(() => new QueryClient()); - return ( - - - - - - + + + + ); } diff --git a/examples/nextjs/app/layout.tsx b/examples/nextjs/app/layout.tsx index d1cb7eeb..95e2a478 100644 --- a/examples/nextjs/app/layout.tsx +++ b/examples/nextjs/app/layout.tsx @@ -2,6 +2,7 @@ import type { Metadata } from 'next'; import { Geist, Geist_Mono } from 'next/font/google'; import './globals.css'; import '@godaddy/react/styles.css'; +import { Providers } from './providers'; const geistSans = Geist({ variable: '--font-geist-sans', @@ -28,7 +29,7 @@ export default function RootLayout({ - {children} + {children} ); diff --git a/examples/nextjs/app/providers.tsx b/examples/nextjs/app/providers.tsx new file mode 100644 index 00000000..33a381d4 --- /dev/null +++ b/examples/nextjs/app/providers.tsx @@ -0,0 +1,14 @@ +'use client'; + +import { QueryClient, QueryClientProvider } from '@tanstack/react-query'; +import { useState } from 'react'; + +export function Providers({ children }: { children: React.ReactNode }) { + const [queryClient] = useState(() => new QueryClient()); + + return ( + + {children} + + ); +} diff --git a/packages/react/package.json b/packages/react/package.json index 268f26b1..fd3b6f53 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -107,8 +107,8 @@ "biome-config-godaddy": "workspace:*", "globals": "^15.14.0", "jsdom": "^26.0.0", - "react": "^19.0.0", - "react-dom": "^19.0.0", + "react": "^19", + "react-dom": "^19", "react-hook-form": "^7.54.2", "tsdown": "^0.15.6", "typescript": "~5.7.3", diff --git a/packages/react/src/components/checkout/address/utils/use-address-matches.ts b/packages/react/src/components/checkout/address/utils/use-address-matches.ts index 46f03596..3f1e9a47 100644 --- a/packages/react/src/components/checkout/address/utils/use-address-matches.ts +++ b/packages/react/src/components/checkout/address/utils/use-address-matches.ts @@ -1,6 +1,7 @@ -import { useQuery } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { getAddressMatches } from '@/lib/godaddy/godaddy'; +import { useQuery } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { getAddressMatches } from "@/lib/godaddy/godaddy"; /** * Hook to fetch address matches for address autocomplete @@ -10,18 +11,24 @@ import { getAddressMatches } from '@/lib/godaddy/godaddy'; * @returns Query result with address matches data */ export function useAddressMatches( - debouncedAddressValue: string, - options: { - enabled: boolean; - } = { enabled: true } + debouncedAddressValue: string, + options: { + enabled: boolean; + } = { enabled: true }, ) { - const { session } = useCheckoutContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useQuery({ - queryKey: ['addressMatchesQuery', debouncedAddressValue], - queryFn: () => getAddressMatches({ query: debouncedAddressValue }, session), - enabled: !!debouncedAddressValue && !!session?.id && options.enabled, - placeholderData: prev => prev, - select: data => data.checkoutSession?.addresses, - }); + return useQuery({ + queryKey: ["addressMatchesQuery", debouncedAddressValue], + queryFn: () => + getAddressMatches( + { query: debouncedAddressValue }, + { accessToken: jwt }, + apiHost, + ), + enabled: !!debouncedAddressValue && !!session?.id && options.enabled, + placeholderData: (prev) => prev, + select: (data) => data.checkoutSession?.addresses, + }); } diff --git a/packages/react/src/components/checkout/address/utils/use-address-verification.ts b/packages/react/src/components/checkout/address/utils/use-address-verification.ts index 879f27f8..4e4a0f9a 100644 --- a/packages/react/src/components/checkout/address/utils/use-address-verification.ts +++ b/packages/react/src/components/checkout/address/utils/use-address-verification.ts @@ -1,20 +1,21 @@ -import { useQuery } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { verifyAddress } from '@/lib/godaddy/godaddy'; +import { useQuery } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { verifyAddress } from "@/lib/godaddy/godaddy"; /** * Address input for verification */ export interface AddressVerificationInput { - addressLine1: string; - addressLine2: string; - addressLine3: string; - postalCode: string; - countryCode: string; - adminArea1?: string; - adminArea2?: string; - adminArea3?: string; - adminArea4?: string; + addressLine1: string; + addressLine2: string; + addressLine3: string; + postalCode: string; + countryCode: string; + adminArea1?: string; + adminArea2?: string; + adminArea3?: string; + adminArea4?: string; } /** @@ -25,34 +26,35 @@ export interface AddressVerificationInput { * @returns Query result with verified address data */ export function useAddressVerification( - address: AddressVerificationInput, - options: { - enabled: boolean; - } = { enabled: true } + address: AddressVerificationInput, + options: { + enabled: boolean; + } = { enabled: true }, ) { - const { session } = useCheckoutContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - const queryKey = [ - 'verifyAddressQuery', - { - sessionId: session?.id, - addressLine1: address?.addressLine1?.toLowerCase(), - postalCode: address?.postalCode?.toLowerCase(), - countryCode: address?.countryCode?.toLowerCase(), - city: address?.adminArea3?.toLowerCase(), - state: address?.adminArea1?.toLowerCase(), - }, - ]; + const queryKey = [ + "verifyAddressQuery", + { + sessionId: session?.id, + addressLine1: address?.addressLine1?.toLowerCase(), + postalCode: address?.postalCode?.toLowerCase(), + countryCode: address?.countryCode?.toLowerCase(), + city: address?.adminArea3?.toLowerCase(), + state: address?.adminArea1?.toLowerCase(), + }, + ]; - return useQuery({ - queryKey, - queryFn: async () => verifyAddress(address, session), - enabled: - options.enabled && - !!session?.id && - !!address?.addressLine1 && - !!address?.postalCode && - !!address?.countryCode, - select: data => data.verifyAddress, - }); + return useQuery({ + queryKey, + queryFn: async () => verifyAddress(address, { accessToken: jwt }, apiHost), + enabled: + options.enabled && + !!session?.id && + !!address?.addressLine1 && + !!address?.postalCode && + !!address?.countryCode, + select: (data) => data.verifyAddress, + }); } diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 5a693fe0..3d4b9348 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -1,369 +1,373 @@ -'use client'; - -import React, { type ReactNode } from 'react'; -import { z } from 'zod'; -import { hasRegionData } from '@/components/checkout/address'; -import { checkIsValidPhone } from '@/components/checkout/address/utils/check-is-valid-phone'; -import { DeliveryMethods } from '@/components/checkout/delivery/delivery-method'; -import { getRequiredFieldsFromSchema } from '@/components/checkout/form/utils/get-required-fields-from-schema'; -import { type GoDaddyVariables, useGoDaddyContext } from '@/godaddy-provider'; -import { type Theme, useTheme } from '@/hooks/use-theme'; -import { useVariables } from '@/hooks/use-variables'; -import type { TrackingProperties } from '@/tracking/event-properties'; -import { TrackingProvider } from '@/tracking/tracking-provider'; -import type { CheckoutSession } from '@/types'; -import { CheckoutFormContainer } from './form/checkout-form-container'; -import type { Target } from './target/target'; +"use client"; + +import React, { type ReactNode } from "react"; +import { z } from "zod"; +import { hasRegionData } from "@/components/checkout/address"; +import { checkIsValidPhone } from "@/components/checkout/address/utils/check-is-valid-phone"; +import { DeliveryMethods } from "@/components/checkout/delivery/delivery-method"; +import { getRequiredFieldsFromSchema } from "@/components/checkout/form/utils/get-required-fields-from-schema"; +import { type GoDaddyVariables, useGoDaddyContext } from "@/godaddy-provider"; +import { useCheckoutSession } from "@/hooks/use-checkout-session"; +import { type Theme, useTheme } from "@/hooks/use-theme"; +import { useVariables } from "@/hooks/use-variables"; +import type { TrackingProperties } from "@/tracking/event-properties"; +import { TrackingProvider } from "@/tracking/tracking-provider"; +import type { CheckoutSession } from "@/types"; +import { CheckoutFormContainer } from "./form/checkout-form-container"; +import type { Target } from "./target/target"; // Utility function for redirecting to success URL after checkout export function redirectToSuccessUrl(successUrl?: string): void { - if (successUrl && typeof window !== 'undefined') { - setTimeout(() => { - window.location.href = successUrl; - }, 1000); - } + if (successUrl && typeof window !== "undefined") { + setTimeout(() => { + window.location.href = successUrl; + }, 1000); + } } export interface CheckoutElements { - input?: string; - select?: string; - button?: string; - card?: string; - checkbox?: string; - radio?: string; + input?: string; + select?: string; + button?: string; + card?: string; + checkbox?: string; + radio?: string; } interface Appearance { - theme?: Theme; - elements?: CheckoutElements; - variables?: Omit; + theme?: Theme; + elements?: CheckoutElements; + variables?: Omit; } export type LayoutSection = - | 'express-checkout' - | 'contact' - | 'shipping' - | 'payment' - | 'pickup' - | 'tips' - | 'delivery'; + | "express-checkout" + | "contact" + | "shipping" + | "payment" + | "pickup" + | "tips" + | "delivery"; export const LayoutSections = { - EXPRESS_CHECKOUT: 'express-checkout', - CONTACT: 'contact', - SHIPPING: 'shipping', - PAYMENT: 'payment', - PICKUP: 'pickup', - DELIVERY: 'delivery', - TIPS: 'tips', + EXPRESS_CHECKOUT: "express-checkout", + CONTACT: "contact", + SHIPPING: "shipping", + PAYMENT: "payment", + PICKUP: "pickup", + DELIVERY: "delivery", + TIPS: "tips", } as const; export type StripeConfig = { - publishableKey: string; - testMode?: boolean; + publishableKey: string; + testMode?: boolean; }; export type GodaddyPaymentsConfig = { - businessId: string; - appId: string; + businessId: string; + appId: string; }; export type SquareConfig = { - locationId: string; - appId: string; + locationId: string; + appId: string; }; export type PayPalConfig = { - clientId: string; - disableFunding?: Array<'credit' | 'card' | 'paylater' | 'venmo'>; + clientId: string; + disableFunding?: Array<"credit" | "card" | "paylater" | "venmo">; }; interface CheckoutContextValue { - elements?: CheckoutElements; - targets?: Partial ReactNode>>; - session?: CheckoutSession; - isCheckoutDisabled?: boolean; - stripeConfig?: StripeConfig; - godaddyPaymentsConfig?: GodaddyPaymentsConfig; - squareConfig?: SquareConfig; - paypalConfig?: PayPalConfig; - isConfirmingCheckout: boolean; - setIsConfirmingCheckout: (isConfirming: boolean) => void; - checkoutErrors?: string[] | undefined; - setCheckoutErrors: (error?: string[] | undefined) => void; - requiredFields?: { [key: string]: boolean }; + elements?: CheckoutElements; + targets?: Partial ReactNode>>; + session?: CheckoutSession | null; + jwt?: string; + isCheckoutDisabled?: boolean; + stripeConfig?: StripeConfig; + godaddyPaymentsConfig?: GodaddyPaymentsConfig; + squareConfig?: SquareConfig; + paypalConfig?: PayPalConfig; + isConfirmingCheckout: boolean; + setIsConfirmingCheckout: (isConfirming: boolean) => void; + checkoutErrors?: string[] | undefined; + setCheckoutErrors: (error?: string[] | undefined) => void; + requiredFields?: { [key: string]: boolean }; } export const checkoutContext = React.createContext({ - isConfirmingCheckout: false, - setIsConfirmingCheckout: () => { - // no op - }, - checkoutErrors: undefined, - setCheckoutErrors: () => { - // no op - }, + isConfirmingCheckout: false, + setIsConfirmingCheckout: () => { + // no op + }, + checkoutErrors: undefined, + setCheckoutErrors: () => { + // no op + }, }); export const useCheckoutContext = () => React.useContext(checkoutContext); export const baseCheckoutSchema = z.object({ - contactEmail: z - .string() - .min(1, 'Enter an email') - .email('Enter a valid email'), - deliveryMethod: z.nativeEnum(DeliveryMethods).describe('fulfillmentModes'), - paymentUseShippingAddress: z.boolean().default(true), - shippingFirstName: z.string().max(60), - shippingLastName: z.string().max(60), - shippingPhone: z.string().max(15, 'Phone number too long').optional(), - shippingAddressLine1: z.string().max(300), - shippingAddressLine2: z.string().max(300).optional(), - shippingAddressLine3: z.string().max(300).optional(), - shippingAdminArea4: z - .string() - .max(100) - .describe('The neighborhood') - .optional(), - shippingAdminArea3: z - .string() - .max(100) - .describe('City, town, or village') - .optional(), - shippingAdminArea2: z.string().max(100).describe('Sub-locality or suburb'), - shippingAdminArea1: z.string().max(100).describe('State or province'), - shippingPostalCode: z.string().max(60), - shippingCountryCode: z.string().max(2), - shippingMethod: z.string().optional(), - shippingValid: z.literal(true, { - errorMap: () => ({ message: 'Invalid shipping address' }), - }), - billingFirstName: z.string().max(60), - billingLastName: z.string().max(60), - billingPhone: z.string().max(15, 'Phone number too long').optional(), - billingAddressLine1: z.string().max(300), - billingAddressLine2: z.string().max(300).optional(), - billingAddressLine3: z.string().max(300).optional(), - billingAdminArea4: z - .string() - .max(100) - .describe('The neighborhood') - .optional(), - billingAdminArea3: z - .string() - .max(100) - .describe('City, town, or village') - .optional(), - billingAdminArea2: z.string().max(100).describe('Sub-locality or suburb'), - billingAdminArea1: z.string().max(100).describe('State or province'), - billingPostalCode: z.string().max(60), - billingCountryCode: z.string().max(2), - billingValid: z.literal(true, { - errorMap: () => ({ message: 'Invalid billing address' }), - }), - paymentCardNumber: z.string().optional(), - paymentCardNumberDisplay: z.string().optional(), - paymentCardType: z.string().optional(), - paymentExpiryDate: z.string().optional(), - paymentMonth: z.string().nullish(), - paymentYear: z.string().nullish(), - paymentSecurityCode: z.string().optional(), - paymentNameOnCard: z.string().optional(), - notes: z.string().optional(), - pickupDate: z.union([z.string(), z.date()]).nullish(), - pickupTime: z.string().nullish(), - pickupLocationId: z.string().nullish(), - pickupLeadTime: z.number().nullish(), - pickupTimezone: z.string().nullish(), - tipAmount: z.number().optional(), - tipPercentage: z.number().optional(), - paymentMethod: z.string().min(1, 'Select a payment method'), - stripePaymentIntent: z.string().optional(), - stripePaymentIntentId: z.string().optional(), + contactEmail: z + .string() + .min(1, "Enter an email") + .email("Enter a valid email"), + deliveryMethod: z.nativeEnum(DeliveryMethods).describe("fulfillmentModes"), + paymentUseShippingAddress: z.boolean().default(true), + shippingFirstName: z.string().max(60), + shippingLastName: z.string().max(60), + shippingPhone: z.string().max(15, "Phone number too long").optional(), + shippingAddressLine1: z.string().max(300), + shippingAddressLine2: z.string().max(300).optional(), + shippingAddressLine3: z.string().max(300).optional(), + shippingAdminArea4: z + .string() + .max(100) + .describe("The neighborhood") + .optional(), + shippingAdminArea3: z + .string() + .max(100) + .describe("City, town, or village") + .optional(), + shippingAdminArea2: z.string().max(100).describe("Sub-locality or suburb"), + shippingAdminArea1: z.string().max(100).describe("State or province"), + shippingPostalCode: z.string().max(60), + shippingCountryCode: z.string().max(2), + shippingMethod: z.string().optional(), + shippingValid: z.literal(true, { + errorMap: () => ({ message: "Invalid shipping address" }), + }), + billingFirstName: z.string().max(60), + billingLastName: z.string().max(60), + billingPhone: z.string().max(15, "Phone number too long").optional(), + billingAddressLine1: z.string().max(300), + billingAddressLine2: z.string().max(300).optional(), + billingAddressLine3: z.string().max(300).optional(), + billingAdminArea4: z + .string() + .max(100) + .describe("The neighborhood") + .optional(), + billingAdminArea3: z + .string() + .max(100) + .describe("City, town, or village") + .optional(), + billingAdminArea2: z.string().max(100).describe("Sub-locality or suburb"), + billingAdminArea1: z.string().max(100).describe("State or province"), + billingPostalCode: z.string().max(60), + billingCountryCode: z.string().max(2), + billingValid: z.literal(true, { + errorMap: () => ({ message: "Invalid billing address" }), + }), + paymentCardNumber: z.string().optional(), + paymentCardNumberDisplay: z.string().optional(), + paymentCardType: z.string().optional(), + paymentExpiryDate: z.string().optional(), + paymentMonth: z.string().nullish(), + paymentYear: z.string().nullish(), + paymentSecurityCode: z.string().optional(), + paymentNameOnCard: z.string().optional(), + notes: z.string().optional(), + pickupDate: z.union([z.string(), z.date()]).nullish(), + pickupTime: z.string().nullish(), + pickupLocationId: z.string().nullish(), + pickupLeadTime: z.number().nullish(), + pickupTimezone: z.string().nullish(), + tipAmount: z.number().optional(), + tipPercentage: z.number().optional(), + paymentMethod: z.string().min(1, "Select a payment method"), + stripePaymentIntent: z.string().optional(), + stripePaymentIntentId: z.string().optional(), }); // We cannot use refine here, as it would not allow extending the schema with session overrides. export type CheckoutFormSchema = Partial<{ - [K in keyof z.infer]: z.ZodTypeAny; + [K in keyof z.infer]: z.ZodTypeAny; }> & - z.ZodRawShape; + z.ZodRawShape; export type CheckoutFormData = z.infer; export interface CheckoutProps { - session: CheckoutSession | undefined; - appearance?: Appearance; - isCheckoutDisabled?: boolean; - stripeConfig?: StripeConfig; - godaddyPaymentsConfig?: GodaddyPaymentsConfig; - squareConfig?: SquareConfig; - paypalConfig?: PayPalConfig; - layout?: LayoutSection[]; - direction?: 'ltr' | 'rtl'; - showStoreHours?: boolean; - enableTracking?: boolean; - trackingProperties?: TrackingProperties; - targets?: Partial ReactNode>>; - checkoutFormSchema?: CheckoutFormSchema; - defaultValues?: Pick; + session?: CheckoutSession | undefined; + appearance?: Appearance; + isCheckoutDisabled?: boolean; + stripeConfig?: StripeConfig; + godaddyPaymentsConfig?: GodaddyPaymentsConfig; + squareConfig?: SquareConfig; + paypalConfig?: PayPalConfig; + layout?: LayoutSection[]; + direction?: "ltr" | "rtl"; + showStoreHours?: boolean; + enableTracking?: boolean; + trackingProperties?: TrackingProperties; + targets?: Partial ReactNode>>; + checkoutFormSchema?: CheckoutFormSchema; + defaultValues?: Pick; } export function Checkout(props: CheckoutProps) { - const { - session, - checkoutFormSchema, - enableTracking = false, - trackingProperties, - stripeConfig, - godaddyPaymentsConfig, - squareConfig, - paypalConfig, - isCheckoutDisabled, - } = props; - - const [isConfirmingCheckout, setIsConfirmingCheckout] = React.useState(false); - const [checkoutErrors, setCheckoutErrors] = React.useState< - string[] | undefined - >(undefined); - const { t } = useGoDaddyContext(); - - useTheme(); - useVariables(props?.appearance?.variables); - - const formSchema = React.useMemo(() => { - const extendedSchema = checkoutFormSchema - ? baseCheckoutSchema.extend(checkoutFormSchema) - : baseCheckoutSchema; - - return extendedSchema.superRefine((data, ctx) => { - if (data.billingPhone) { - if (!checkIsValidPhone(String(data?.billingPhone))) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: 'Enter a valid billing phone number', - path: ['billingPhone'], - }); - } - } - - if (data.shippingPhone) { - if (!checkIsValidPhone(String(data?.shippingPhone))) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: 'Enter a valid shipping phone number', - path: ['shippingPhone'], - }); - } - } - - // Billing address validation - only required if not using shipping address OR pickup - const requireBillingAddress = - !data.paymentUseShippingAddress || - data.deliveryMethod === DeliveryMethods.PICKUP; - - if (requireBillingAddress) { - // Basic billing fields required for all countries - const billingFields = [ - { key: 'billingFirstName', message: t.validation.enterFirstName }, - { key: 'billingLastName', message: t.validation.enterLastName }, - { key: 'billingAddressLine1', message: t.validation.enterAddress }, - { key: 'billingAdminArea2', message: t.validation.enterCity }, - { - key: 'billingPostalCode', - message: t.validation.enterZipPostalCode, - }, - { key: 'billingCountryCode', message: t.validation.enterCountry }, - ]; - - if (hasRegionData(String(data.billingCountryCode))) { - billingFields.push({ - key: 'billingAdminArea1', - message: t.validation.selectState, - }); - } - - for (const { key, message } of billingFields) { - if (!data[key as keyof typeof data]) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message, - path: [key], - }); - } - } - } - - // Shipping address validation - only required if delivery method is SHIP - const requireShippingAddress = - data.deliveryMethod === DeliveryMethods.SHIP; - - if (requireShippingAddress) { - // Basic shipping fields required for all countries - const shippingFields = [ - { key: 'shippingFirstName', message: t.validation.enterFirstName }, - { key: 'shippingLastName', message: t.validation.enterLastName }, - { key: 'shippingAddressLine1', message: t.validation.enterAddress }, - { key: 'shippingAdminArea2', message: t.validation.enterCity }, - { - key: 'shippingPostalCode', - message: t.validation.enterZipPostalCode, - }, - { key: 'shippingCountryCode', message: t.validation.enterCountry }, - ]; - - if (hasRegionData(String(data.shippingCountryCode))) { - shippingFields.push({ - key: 'shippingAdminArea1', - message: t.validation.selectState, - }); - } - - for (const { key, message } of shippingFields) { - if (!data[key as keyof typeof data]) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message, - path: [key], - }); - } - } - } - }); - }, [checkoutFormSchema, t]); - // }, [checkoutFormSchema, session?.paymentMethods]); - - const requiredFields = React.useMemo(() => { - return getRequiredFieldsFromSchema(formSchema); - }, [formSchema]); - - return ( - - - - - - ); + const { + checkoutFormSchema, + enableTracking = false, + trackingProperties, + stripeConfig, + godaddyPaymentsConfig, + squareConfig, + paypalConfig, + isCheckoutDisabled, + } = props; + + const [isConfirmingCheckout, setIsConfirmingCheckout] = React.useState(false); + const [checkoutErrors, setCheckoutErrors] = React.useState< + string[] | undefined + >(undefined); + const { t } = useGoDaddyContext(); + + useTheme(); + useVariables(props?.appearance?.variables); + + const { session, jwt } = useCheckoutSession(props); + + const formSchema = React.useMemo(() => { + const extendedSchema = checkoutFormSchema + ? baseCheckoutSchema.extend(checkoutFormSchema) + : baseCheckoutSchema; + + return extendedSchema.superRefine((data, ctx) => { + if (data.billingPhone) { + if (!checkIsValidPhone(String(data?.billingPhone))) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Enter a valid billing phone number", + path: ["billingPhone"], + }); + } + } + + if (data.shippingPhone) { + if (!checkIsValidPhone(String(data?.shippingPhone))) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Enter a valid shipping phone number", + path: ["shippingPhone"], + }); + } + } + + // Billing address validation - only required if not using shipping address OR pickup + const requireBillingAddress = + !data.paymentUseShippingAddress || + data.deliveryMethod === DeliveryMethods.PICKUP; + + if (requireBillingAddress) { + // Basic billing fields required for all countries + const billingFields = [ + { key: "billingFirstName", message: t.validation.enterFirstName }, + { key: "billingLastName", message: t.validation.enterLastName }, + { key: "billingAddressLine1", message: t.validation.enterAddress }, + { key: "billingAdminArea2", message: t.validation.enterCity }, + { + key: "billingPostalCode", + message: t.validation.enterZipPostalCode, + }, + { key: "billingCountryCode", message: t.validation.enterCountry }, + ]; + + if (hasRegionData(String(data.billingCountryCode))) { + billingFields.push({ + key: "billingAdminArea1", + message: t.validation.selectState, + }); + } + + for (const { key, message } of billingFields) { + if (!data[key as keyof typeof data]) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message, + path: [key], + }); + } + } + } + + // Shipping address validation - only required if delivery method is SHIP + const requireShippingAddress = + data.deliveryMethod === DeliveryMethods.SHIP; + + if (requireShippingAddress) { + // Basic shipping fields required for all countries + const shippingFields = [ + { key: "shippingFirstName", message: t.validation.enterFirstName }, + { key: "shippingLastName", message: t.validation.enterLastName }, + { key: "shippingAddressLine1", message: t.validation.enterAddress }, + { key: "shippingAdminArea2", message: t.validation.enterCity }, + { + key: "shippingPostalCode", + message: t.validation.enterZipPostalCode, + }, + { key: "shippingCountryCode", message: t.validation.enterCountry }, + ]; + + if (hasRegionData(String(data.shippingCountryCode))) { + shippingFields.push({ + key: "shippingAdminArea1", + message: t.validation.selectState, + }); + } + + for (const { key, message } of shippingFields) { + if (!data[key as keyof typeof data]) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message, + path: [key], + }); + } + } + } + }); + }, [checkoutFormSchema, t]); + // }, [checkoutFormSchema, session?.paymentMethods]); + + const requiredFields = React.useMemo(() => { + return getRequiredFieldsFromSchema(formSchema); + }, [formSchema]); + + return ( + + + + + + ); } diff --git a/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts b/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts index d2141a77..1869d277 100644 --- a/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts +++ b/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts @@ -1,18 +1,22 @@ -import { useMutation } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { applyDeliveryMethod } from '@/lib/godaddy/godaddy'; -import type { ApplyCheckoutSessionDeliveryMethodInput } from '@/types'; +import { useMutation } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { applyDeliveryMethod } from "@/lib/godaddy/godaddy"; +import type { ApplyCheckoutSessionDeliveryMethodInput } from "@/types"; export function useApplyDeliveryMethod() { - const { session } = useCheckoutContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: ['apply-delivery-method', { sessionId: session?.id }], - mutationFn: async ( - mode: ApplyCheckoutSessionDeliveryMethodInput['input']['mode'] - ) => { - if (!session) return; - return await applyDeliveryMethod({ mode }, session); - }, - }); + return useMutation({ + mutationKey: session?.id + ? ["apply-delivery-method", session.id] + : ["apply-delivery-method"], + mutationFn: async ( + mode: ApplyCheckoutSessionDeliveryMethodInput["input"]["mode"], + ) => { + if (!session) return; + return await applyDeliveryMethod({ mode }, { accessToken: jwt }, apiHost); + }, + }); } diff --git a/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts b/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts index d9c539cc..af25d3cb 100644 --- a/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts +++ b/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts @@ -1,53 +1,61 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { useUpdateTaxes } from '@/components/checkout/order/use-update-taxes'; -import { applyFulfillmentLocation } from '@/lib/godaddy/godaddy'; -import type { ApplyCheckoutSessionFulfillmentLocationInput } from '@/types'; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useUpdateTaxes } from "@/components/checkout/order/use-update-taxes"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { applyFulfillmentLocation } from "@/lib/godaddy/godaddy"; +import type { ApplyCheckoutSessionFulfillmentLocationInput } from "@/types"; export function useApplyFulfillmentLocation() { - const { session } = useCheckoutContext(); - const updateTaxes = useUpdateTaxes(); - const queryClient = useQueryClient(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const updateTaxes = useUpdateTaxes(); + const queryClient = useQueryClient(); - return useMutation({ - mutationKey: ['apply-fulfillment-location', { sessionId: session?.id }], - mutationFn: async ({ - fulfillmentLocationId, - }: { - fulfillmentLocationId: ApplyCheckoutSessionFulfillmentLocationInput['input']['fulfillmentLocationId']; - locationAddress?: { - addressLine1?: string | null; - addressLine2?: string | null; - addressLine3?: string | null; - adminArea1?: string | null; - adminArea2?: string | null; - adminArea3?: string | null; - countryCode?: string | null; - postalCode?: string | null; - }; - }) => { - // Don't process empty string or undefined location IDs - if (!session || !fulfillmentLocationId) return; + return useMutation({ + mutationKey: session?.id + ? ["apply-fulfillment-location", session.id] + : ["apply-fulfillment-location"], + mutationFn: async ({ + fulfillmentLocationId, + }: { + fulfillmentLocationId: ApplyCheckoutSessionFulfillmentLocationInput["input"]["fulfillmentLocationId"]; + locationAddress?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }; + }) => { + // Don't process empty string or undefined location IDs + if (!session || !fulfillmentLocationId) return; - return await applyFulfillmentLocation({ fulfillmentLocationId }, session); - }, - onSuccess: (_data, { locationAddress }) => { - if (!session) return; + return await applyFulfillmentLocation( + { fulfillmentLocationId }, + { accessToken: jwt }, + apiHost, + ); + }, + onSuccess: (_data, { locationAddress }) => { + if (!session) return; - if (session?.enableTaxCollection && locationAddress) { - updateTaxes.mutate(locationAddress); - } else { - queryClient.invalidateQueries({ - queryKey: ['draft-order', { id: session?.id }], - }); - } - }, - onError: (_error, { locationAddress }) => { - // Graceful degradation: still calculate taxes with pickup location address - // even if fulfillment location API fails - if (session?.enableTaxCollection && locationAddress) { - updateTaxes.mutate(locationAddress); - } - }, - }); + if (session?.enableTaxCollection && locationAddress) { + updateTaxes.mutate(locationAddress); + } else { + queryClient.invalidateQueries({ + queryKey: ["draft-order", session.id], + }); + } + }, + onError: (_error, { locationAddress }) => { + // Graceful degradation: still calculate taxes with pickup location address + // even if fulfillment location API fails + if (session?.enableTaxCollection && locationAddress) { + updateTaxes.mutate(locationAddress); + } + }, + }); } diff --git a/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts b/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts index 8071c5e1..9a666034 100644 --- a/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts +++ b/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts @@ -1,167 +1,171 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { useFormContext } from 'react-hook-form'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { DeliveryMethods } from '@/components/checkout/delivery/delivery-method'; -import { useDraftOrder } from '@/components/checkout/order/use-draft-order'; -import { useUpdateTaxes } from '@/components/checkout/order/use-update-taxes'; -import type { ResultOf } from '@/gql.tada'; -import { applyDiscount } from '@/lib/godaddy/godaddy'; -import type { DraftOrderQuery } from '@/lib/godaddy/queries'; -import type { ApplyCheckoutSessionDiscountInput } from '@/types'; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { useFormContext } from "react-hook-form"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { DeliveryMethods } from "@/components/checkout/delivery/delivery-method"; +import { useDraftOrder } from "@/components/checkout/order/use-draft-order"; +import { useUpdateTaxes } from "@/components/checkout/order/use-update-taxes"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import type { ResultOf } from "@/gql.tada"; +import { applyDiscount } from "@/lib/godaddy/godaddy"; +import type { DraftOrderQuery } from "@/lib/godaddy/queries"; +import type { ApplyCheckoutSessionDiscountInput } from "@/types"; export function useDiscountApply() { - const { session } = useCheckoutContext(); - const form = useFormContext(); - const queryClient = useQueryClient(); - const updateTaxes = useUpdateTaxes(); - const { data: draftOrder } = useDraftOrder(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const form = useFormContext(); + const queryClient = useQueryClient(); + const updateTaxes = useUpdateTaxes(); + const { data: draftOrder } = useDraftOrder(); - return useMutation({ - mutationKey: ['apply-discount', { sessionId: session?.id }], - mutationFn: async ({ - discountCodes, - }: { - discountCodes: ApplyCheckoutSessionDiscountInput['input']['discountCodes']; - }) => { - if (!session) return; - return await applyDiscount(discountCodes, session); - }, - onSuccess: (data, { discountCodes }) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ["apply-discount", session.id] + : ["apply-discount"], + mutationFn: async ({ + discountCodes, + }: { + discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"]; + }) => { + if (!session) return; + return await applyDiscount(discountCodes, { accessToken: jwt }, apiHost); + }, + onSuccess: (data, { discountCodes }) => { + if (!session) return; - const discountTotal = - data?.applyCheckoutSessionDiscount?.totals?.discountTotal; - const responseData = data?.applyCheckoutSessionDiscount; - // Update the cached draft-order query (includes totals) + const discountTotal = + data?.applyCheckoutSessionDiscount?.totals?.discountTotal; + const responseData = data?.applyCheckoutSessionDiscount; + // Update the cached draft-order query (includes totals) - if (discountTotal) { - queryClient.setQueryData( - ['draft-order', { id: session.id }], - (old: ResultOf | undefined) => { - if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - totals: { - ...old?.checkoutSession?.draftOrder?.totals, - discountTotal, - total: - responseData?.totals?.total || - old?.checkoutSession?.draftOrder?.totals?.total, - }, - // Update order-level discounts - discounts: - responseData?.discounts || - old?.checkoutSession?.draftOrder?.discounts || - [], - // Update lineItem discounts - lineItems: - responseData?.lineItems - ?.map(responseLineItem => { - const existingLineItem = - old?.checkoutSession?.draftOrder?.lineItems?.find( - li => li.id === responseLineItem.id - ); - return existingLineItem - ? { - ...existingLineItem, - discounts: responseLineItem.discounts || [], - } - : existingLineItem; - }) - .filter(Boolean) || - old?.checkoutSession?.draftOrder?.lineItems, - // Update shippingLine discounts - shippingLines: - responseData?.shippingLines - ?.map((responseShippingLine, index) => { - const existingShippingLine = - old?.checkoutSession?.draftOrder?.shippingLines?.[ - index - ]; - return existingShippingLine - ? { - ...existingShippingLine, - discounts: responseShippingLine.discounts || [], - } - : existingShippingLine; - }) - .filter(Boolean) || - old?.checkoutSession?.draftOrder?.shippingLines, - }, - }, - }; - } - ); - } + if (discountTotal) { + queryClient.setQueryData( + ["draft-order", session.id], + (old: ResultOf | undefined) => { + if (!old) return old; + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + totals: { + ...old?.checkoutSession?.draftOrder?.totals, + discountTotal, + total: + responseData?.totals?.total || + old?.checkoutSession?.draftOrder?.totals?.total, + }, + // Update order-level discounts + discounts: + responseData?.discounts || + old?.checkoutSession?.draftOrder?.discounts || + [], + // Update lineItem discounts + lineItems: + responseData?.lineItems + ?.map((responseLineItem) => { + const existingLineItem = + old?.checkoutSession?.draftOrder?.lineItems?.find( + (li) => li.id === responseLineItem.id, + ); + return existingLineItem + ? { + ...existingLineItem, + discounts: responseLineItem.discounts || [], + } + : existingLineItem; + }) + .filter(Boolean) || + old?.checkoutSession?.draftOrder?.lineItems, + // Update shippingLine discounts + shippingLines: + responseData?.shippingLines + ?.map((responseShippingLine, index) => { + const existingShippingLine = + old?.checkoutSession?.draftOrder?.shippingLines?.[ + index + ]; + return existingShippingLine + ? { + ...existingShippingLine, + discounts: responseShippingLine.discounts || [], + } + : existingShippingLine; + }) + .filter(Boolean) || + old?.checkoutSession?.draftOrder?.shippingLines, + }, + }, + }; + }, + ); + } - if (!discountCodes?.length) { - // If no discount codes, we need to remove any existing discounts from the cache - queryClient.setQueryData( - ['draft-order', { id: session.id }], - (old: ResultOf | undefined) => { - if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - discounts: [], - lineItems: old?.checkoutSession?.draftOrder?.lineItems?.map( - li => ({ - ...li, - discounts: [], - }) - ), - shippingLines: - old?.checkoutSession?.draftOrder?.shippingLines?.map( - sl => ({ - ...sl, - discounts: [], - }) - ) || null, - }, - }, - }; - } - ); - } + if (!discountCodes?.length) { + // If no discount codes, we need to remove any existing discounts from the cache + queryClient.setQueryData( + ["draft-order", session.id], + (old: ResultOf | undefined) => { + if (!old) return old; + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + discounts: [], + lineItems: old?.checkoutSession?.draftOrder?.lineItems?.map( + (li) => ({ + ...li, + discounts: [], + }), + ), + shippingLines: + old?.checkoutSession?.draftOrder?.shippingLines?.map( + (sl) => ({ + ...sl, + discounts: [], + }), + ) || null, + }, + }, + }; + }, + ); + } - if (session?.enableTaxCollection) { - // If the delivery method is pickup, we need to update taxes based on the pickup location - // Otherwise, we can just update taxes without a specific address - // TODO: Move this to API layer - const deliveryMethod = form.getValues('deliveryMethod'); - const isPickup = deliveryMethod === DeliveryMethods.PICKUP; + if (session?.enableTaxCollection) { + // If the delivery method is pickup, we need to update taxes based on the pickup location + // Otherwise, we can just update taxes without a specific address + // TODO: Move this to API layer + const deliveryMethod = form.getValues("deliveryMethod"); + const isPickup = deliveryMethod === DeliveryMethods.PICKUP; - if (isPickup) { - const pickupLocationId = form.getValues('pickupLocationId'); - const locationAddress = session?.locations?.find( - loc => loc.id === pickupLocationId - )?.address; + if (isPickup) { + const pickupLocationId = form.getValues("pickupLocationId"); + const locationAddress = session?.locations?.find( + (loc) => loc.id === pickupLocationId, + )?.address; - if (locationAddress) { - updateTaxes.mutate(locationAddress); - } - } else { - // Only update taxes if we have the required location data - const hasRequiredLocationData = - draftOrder?.shipping?.address?.postalCode && - draftOrder?.shipping?.address?.countryCode; + if (locationAddress) { + updateTaxes.mutate(locationAddress); + } + } else { + // Only update taxes if we have the required location data + const hasRequiredLocationData = + draftOrder?.shipping?.address?.postalCode && + draftOrder?.shipping?.address?.countryCode; - if (hasRequiredLocationData) { - updateTaxes.mutate(undefined); - } - } - } else { - queryClient.invalidateQueries({ - queryKey: ['draft-order', { id: session?.id }], - }); - } - }, - }); + if (hasRequiredLocationData) { + updateTaxes.mutate(undefined); + } + } + } else { + queryClient.invalidateQueries({ + queryKey: ["draft-order", session.id], + }); + } + }, + }); } diff --git a/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts b/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts index 94cbb22a..2ee1a2b7 100644 --- a/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts +++ b/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts @@ -1,34 +1,36 @@ -import { useMutation } from '@tanstack/react-query'; +import { useMutation } from "@tanstack/react-query"; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { getDraftOrderPriceAdjustments } from '@/lib/godaddy/godaddy'; -import type { DraftOrderPriceAdjustmentsQueryInput } from '@/types'; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { getDraftOrderPriceAdjustments } from "@/lib/godaddy/godaddy"; +import type { DraftOrderPriceAdjustmentsQueryInput } from "@/types"; export function useGetPriceAdjustments() { - const { session } = useCheckoutContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: [ - 'get-price-adjustments-by-discount-code', - { sessionId: session?.id }, - ], - mutationFn: async ({ - discountCodes, - shippingLines, - }: { - discountCodes: DraftOrderPriceAdjustmentsQueryInput['discountCodes']; - shippingLines?: DraftOrderPriceAdjustmentsQueryInput['shippingLines']; - }) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ["get-price-adjustments-by-discount-code", session.id] + : ["get-price-adjustments-by-discount-code"], + mutationFn: async ({ + discountCodes, + shippingLines, + }: { + discountCodes: DraftOrderPriceAdjustmentsQueryInput["discountCodes"]; + shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"]; + }) => { + if (!session) return; - const data = await getDraftOrderPriceAdjustments( - session, - discountCodes, - shippingLines - ); + const data = await getDraftOrderPriceAdjustments( + { accessToken: jwt }, + discountCodes, + shippingLines, + apiHost, + ); - return data.checkoutSession?.draftOrder?.calculatedAdjustments - ?.totalDiscountAmount?.value; - }, - }); + return data.checkoutSession?.draftOrder?.calculatedAdjustments + ?.totalDiscountAmount?.value; + }, + }); } diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index 8b1a6585..3a18fdfe 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -1,73 +1,75 @@ -import { useMemo } from 'react'; -import type { z } from 'zod'; +import { useMemo } from "react"; +import type { z } from "zod"; import { - type CheckoutProps, - useCheckoutContext, -} from '@/components/checkout/checkout'; -import { CheckoutSkeleton } from '@/components/checkout/checkout-skeleton'; -import { CheckoutForm } from '@/components/checkout/form/checkout-form'; + type CheckoutProps, + useCheckoutContext, +} from "@/components/checkout/checkout"; +import { CheckoutSkeleton } from "@/components/checkout/checkout-skeleton"; +import { CheckoutForm } from "@/components/checkout/form/checkout-form"; import { - useDraftOrder, - useDraftOrderLineItems, -} from '@/components/checkout/order/use-draft-order'; -import { useDraftOrderProductsMap } from '@/components/checkout/order/use-draft-order-products'; + useDraftOrder, + useDraftOrderLineItems, +} from "@/components/checkout/order/use-draft-order"; +import { useDraftOrderProductsMap } from "@/components/checkout/order/use-draft-order-products"; import { - mapOrderToFormValues, - mapSkusToItemsDisplay, -} from '@/components/checkout/utils/checkout-transformers'; + mapOrderToFormValues, + mapSkusToItemsDisplay, +} from "@/components/checkout/utils/checkout-transformers"; -interface CheckoutFormContainerProps extends Omit { - schema: z.ZodObject | z.ZodEffects; +interface CheckoutFormContainerProps extends Omit { + schema: z.ZodObject | z.ZodEffects; } export function CheckoutFormContainer({ - schema, - ...props + schema, + ...props }: CheckoutFormContainerProps) { - const { session, isConfirmingCheckout } = useCheckoutContext(); + const { session, isConfirmingCheckout } = useCheckoutContext(); - const draftOrderQuery = useDraftOrder(); - const draftOrderLineItemsQuery = useDraftOrderLineItems(); - const skusMap = useDraftOrderProductsMap(); + const draftOrderQuery = useDraftOrder(); + const draftOrderLineItemsQuery = useDraftOrderLineItems(); + const skusMap = useDraftOrderProductsMap(); - const { data: order } = draftOrderQuery; - const { data: lineItems } = draftOrderLineItemsQuery; + const { data: order } = draftOrderQuery; + const { data: lineItems } = draftOrderLineItemsQuery; - const items = useMemo( - () => mapSkusToItemsDisplay(lineItems, skusMap), - [lineItems, skusMap] - ); + console.log(order); - const formValues = useMemo( - () => ({ - ...mapOrderToFormValues({ - order, - defaultValues: props.defaultValues, - defaultCountryCode: session?.shipping?.originAddress?.countryCode, - }), - }), - [order, props.defaultValues, session?.shipping?.originAddress?.countryCode] - ); + const items = useMemo( + () => mapSkusToItemsDisplay(lineItems, skusMap), + [lineItems, skusMap], + ); - if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { - const returnUrl = session?.returnUrl; - if (returnUrl) { - window.location.href = returnUrl; - return null; - } - } + const formValues = useMemo( + () => ({ + ...mapOrderToFormValues({ + order, + defaultValues: props.defaultValues, + defaultCountryCode: session?.shipping?.originAddress?.countryCode, + }), + }), + [order, props.defaultValues, session?.shipping?.originAddress?.countryCode], + ); - if (draftOrderQuery.isLoading) { - return ; - } + if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { + const returnUrl = session?.returnUrl; + if (returnUrl) { + window.location.href = returnUrl; + return null; + } + } - return ( - - ); + if (draftOrderQuery.isLoading) { + return ; + } + + return ( + + ); } diff --git a/packages/react/src/components/checkout/order/use-draft-order-products.ts b/packages/react/src/components/checkout/order/use-draft-order-products.ts index 457ad2e8..ed3e9544 100644 --- a/packages/react/src/components/checkout/order/use-draft-order-products.ts +++ b/packages/react/src/components/checkout/order/use-draft-order-products.ts @@ -1,22 +1,26 @@ -import { useQuery } from '@tanstack/react-query'; -import { useMemo } from 'react'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { getProductsFromOrderSkus } from '@/lib/godaddy/godaddy'; -import type { SKUProduct } from '@/types'; +import { useQuery } from "@tanstack/react-query"; +import { useMemo } from "react"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { getProductsFromOrderSkus } from "@/lib/godaddy/godaddy"; +import type { SKUProduct } from "@/types"; /** * Hook to fetch products from SKUs in the draft order * @returns Query result with SKU product data */ export function useDraftOrderProducts() { - const { session } = useCheckoutContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useQuery({ - queryKey: ['draft-order-products', { id: session?.id }], - queryFn: () => getProductsFromOrderSkus(session), - enabled: !!session?.id, - select: data => data.checkoutSession?.skus?.edges, - }); + return useQuery({ + queryKey: session?.id + ? ["draft-order-products", session.id] + : ["draft-order-products"], + queryFn: () => getProductsFromOrderSkus({ accessToken: jwt }, apiHost), + enabled: !!session?.id, + select: (data) => data.checkoutSession?.skus?.edges, + }); } /** @@ -24,19 +28,19 @@ export function useDraftOrderProducts() { * @returns Map of SKU ID to SKU product data */ export function useDraftOrderProductsMap() { - const { data: skus } = useDraftOrderProducts(); + const { data: skus } = useDraftOrderProducts(); - return useMemo(() => { - if (!skus) return {}; + return useMemo(() => { + if (!skus) return {}; - const result: Record = {}; + const result: Record = {}; - for (const edge of skus) { - if (edge?.node?.code) { - result[edge.node.code] = edge.node; - } - } + for (const edge of skus) { + if (edge?.node?.code) { + result[edge.node.code] = edge.node; + } + } - return result; - }, [skus]); + return result; + }, [skus]); } diff --git a/packages/react/src/components/checkout/order/use-draft-order.ts b/packages/react/src/components/checkout/order/use-draft-order.ts index ad2eb7bc..c21752c1 100644 --- a/packages/react/src/components/checkout/order/use-draft-order.ts +++ b/packages/react/src/components/checkout/order/use-draft-order.ts @@ -1,12 +1,13 @@ -import { type UseQueryResult, useQuery } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { getDraftOrder } from '@/lib/godaddy/godaddy'; +import { type UseQueryResult, useQuery } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { getDraftOrder } from "@/lib/godaddy/godaddy"; import type { - DraftOrder, - DraftOrderSession, - ShippingLines, - Totals, -} from '@/types'; + DraftOrder, + DraftOrderSession, + ShippingLines, + Totals, +} from "@/types"; /** * Hook to fetch the entire draft order @@ -15,44 +16,45 @@ import type { * @returns Query result with draft order data */ export function useDraftOrder( - select?: (data: DraftOrderSession) => TData, - key = 'draft-order' + select?: (data: DraftOrderSession) => TData, + key = "draft-order", ): UseQueryResult { - const { session } = useCheckoutContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useQuery({ - queryKey: [key, { id: session?.id }], - queryFn: () => getDraftOrder(session), - enabled: !!session?.id, - select: select ?? (data => data.checkoutSession?.draftOrder as TData), - retry: 3, - }); + return useQuery({ + queryKey: session?.id ? [key, session.id] : [key], + queryFn: () => getDraftOrder({ accessToken: jwt }, apiHost), + enabled: !!jwt, + select: select ?? ((data) => data.checkoutSession?.draftOrder as TData), + retry: 3, + }); } export function useDraftOrderLineItems() { - return useDraftOrder( - data => data.checkoutSession?.draftOrder?.lineItems ?? null, - 'draft-order' - ); + return useDraftOrder( + (data) => data.checkoutSession?.draftOrder?.lineItems ?? null, + "draft-order", + ); } export function useDraftOrderShippingAddress() { - return useDraftOrder['address']>( - data => data.checkoutSession?.draftOrder?.shipping?.address ?? null, - 'draft-order' - ); + return useDraftOrder["address"]>( + (data) => data.checkoutSession?.draftOrder?.shipping?.address ?? null, + "draft-order", + ); } export function useDraftOrderTotals() { - return useDraftOrder( - data => data.checkoutSession?.draftOrder?.totals ?? null, - 'draft-order' - ); + return useDraftOrder( + (data) => data.checkoutSession?.draftOrder?.totals ?? null, + "draft-order", + ); } export function useDraftOrderShipping() { - return useDraftOrder( - data => data.checkoutSession?.draftOrder?.shippingLines?.[0] ?? null, - 'draft-order' - ); + return useDraftOrder( + (data) => data.checkoutSession?.draftOrder?.shippingLines?.[0] ?? null, + "draft-order", + ); } diff --git a/packages/react/src/components/checkout/order/use-update-order.ts b/packages/react/src/components/checkout/order/use-update-order.ts index 11cbefc7..309a4fa4 100644 --- a/packages/react/src/components/checkout/order/use-update-order.ts +++ b/packages/react/src/components/checkout/order/use-update-order.ts @@ -1,43 +1,45 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { useUpdateTaxes } from '@/components/checkout/order/use-update-taxes'; -import { updateDraftOrder } from '@/lib/godaddy/godaddy'; -import type { UpdateDraftOrderInput } from '@/types'; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useUpdateTaxes } from "@/components/checkout/order/use-update-taxes"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { updateDraftOrder } from "@/lib/godaddy/godaddy"; +import type { UpdateDraftOrderInput } from "@/types"; export function useUpdateOrder() { - const { session } = useCheckoutContext(); - const updateTaxes = useUpdateTaxes(); - const queryClient = useQueryClient(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const updateTaxes = useUpdateTaxes(); + const queryClient = useQueryClient(); - return useMutation({ - mutationKey: ['update-draft-order'], - mutationFn: async ({ - input, - }: { - input: UpdateDraftOrderInput['input']; - }) => { - return await updateDraftOrder(input, session); - }, - onSuccess: (_data, { input }) => { - if (!session) return; + return useMutation({ + mutationKey: ["update-draft-order"], + mutationFn: async ({ + input, + }: { + input: UpdateDraftOrderInput["input"]; + }) => { + return await updateDraftOrder(input, { accessToken: jwt }, apiHost); + }, + onSuccess: (_data, { input }) => { + if (!session) return; - /* Refetch taxes and shipping methods on address changes */ - if ( - input.shipping?.address || - (!input.shipping?.address && input.billing?.address) - ) { - if (session?.enableTaxCollection) { - updateTaxes.mutate(undefined); - } else { - queryClient.invalidateQueries({ - queryKey: ['draft-order', { id: session?.id }], - }); - } - } else { - queryClient.invalidateQueries({ - queryKey: ['draft-order', { id: session?.id }], - }); - } - }, - }); + /* Refetch taxes and shipping methods on address changes */ + if ( + input.shipping?.address || + (!input.shipping?.address && input.billing?.address) + ) { + if (session?.enableTaxCollection) { + updateTaxes.mutate(undefined); + } else { + queryClient.invalidateQueries({ + queryKey: ["draft-order", session.id], + }); + } + } else { + queryClient.invalidateQueries({ + queryKey: ["draft-order", session.id], + }); + } + }, + }); } diff --git a/packages/react/src/components/checkout/order/use-update-taxes.ts b/packages/react/src/components/checkout/order/use-update-taxes.ts index 92faf127..f80b178c 100644 --- a/packages/react/src/components/checkout/order/use-update-taxes.ts +++ b/packages/react/src/components/checkout/order/use-update-taxes.ts @@ -1,62 +1,71 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import type { ResultOf } from '@/gql.tada'; -import { updateDraftOrderTaxes } from '@/lib/godaddy/godaddy'; -import type { DraftOrderQuery } from '@/lib/godaddy/queries'; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import type { ResultOf } from "@/gql.tada"; +import { updateDraftOrderTaxes } from "@/lib/godaddy/godaddy"; +import type { DraftOrderQuery } from "@/lib/godaddy/queries"; export function useUpdateTaxes() { - const { session } = useCheckoutContext(); - const queryClient = useQueryClient(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const queryClient = useQueryClient(); - return useMutation({ - mutationKey: ['update-draft-order-taxes', { id: session?.id }], - mutationFn: async (destination?: { - addressLine1?: string | null; - addressLine2?: string | null; - addressLine3?: string | null; - adminArea1?: string | null; - adminArea2?: string | null; - adminArea3?: string | null; - countryCode?: string | null; - postalCode?: string | null; - }) => { - return await updateDraftOrderTaxes(session, destination); - }, - onSuccess: data => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ["update-draft-order-taxes", session.id] + : ["update-draft-order-taxes"], + mutationFn: async (destination?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }) => { + return await updateDraftOrderTaxes( + { accessToken: jwt }, + destination, + apiHost, + ); + }, + onSuccess: (data) => { + if (!session) return; - // Extract shippingTotal from mutation response - const taxesTotal = data?.calculateCheckoutSessionTaxes?.totalTaxAmount; + // Extract shippingTotal from mutation response + const taxesTotal = data?.calculateCheckoutSessionTaxes?.totalTaxAmount; - // Update the cached draft-order query (includes totals) - if (taxesTotal) { - queryClient.setQueryData( - ['draft-order', { id: session.id }], - (old: ResultOf | undefined) => { - if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - totals: { - ...old?.checkoutSession?.draftOrder?.totals, - taxesTotal: { - ...taxesTotal, - }, - }, - }, - }, - }; - } - ); - } - }, - onSettled: () => { - queryClient.invalidateQueries({ - queryKey: ['draft-order', { id: session?.id }], - }); - }, - }); + // Update the cached draft-order query (includes totals) + if (taxesTotal) { + queryClient.setQueryData( + ["draft-order", session.id], + (old: ResultOf | undefined) => { + if (!old) return old; + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + totals: { + ...old?.checkoutSession?.draftOrder?.totals, + taxesTotal: { + ...taxesTotal, + }, + }, + }, + }, + }; + }, + ); + } + }, + onSettled: () => { + if (!session) return; + queryClient.invalidateQueries({ + queryKey: ["draft-order", session.id], + }); + }, + }); } diff --git a/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts b/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts index 64259df9..838add54 100644 --- a/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts +++ b/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts @@ -1,192 +1,196 @@ -import { useMutation } from '@tanstack/react-query'; -import { useFormContext } from 'react-hook-form'; +import { useMutation } from "@tanstack/react-query"; +import { useFormContext } from "react-hook-form"; import { - redirectToSuccessUrl, - useCheckoutContext, -} from '@/components/checkout/checkout'; -import { DeliveryMethods } from '@/components/checkout/delivery/delivery-method'; -import { buildPickupPayload } from '@/components/checkout/pickup/utils/build-pickup-payload'; -import { confirmCheckout } from '@/lib/godaddy/godaddy'; -import { eventIds } from '@/tracking/events'; + redirectToSuccessUrl, + useCheckoutContext, +} from "@/components/checkout/checkout"; +import { DeliveryMethods } from "@/components/checkout/delivery/delivery-method"; +import { buildPickupPayload } from "@/components/checkout/pickup/utils/build-pickup-payload"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { confirmCheckout } from "@/lib/godaddy/godaddy"; +import { eventIds } from "@/tracking/events"; import { - type TrackingEventId, - TrackingEventType, - track, -} from '@/tracking/track'; -import type { ConfirmCheckoutMutationInput } from '@/types'; + type TrackingEventId, + TrackingEventType, + track, +} from "@/tracking/track"; +import type { ConfirmCheckoutMutationInput } from "@/types"; export enum PaymentProvider { - CHASE_PAYMENTECH = 'CHASE_PAYMENTECH', - REDE = 'REDE', - EVO = 'EVO', - FIRST_DATA = 'FIRST_DATA', - GLOBAL_PAYMENTS = 'GLOBAL_PAYMENTS', - HEARTLAND_PAYMENT_SYSTEM = 'HEARTLAND_PAYMENT_SYSTEM', - ELAVON = 'ELAVON', - MERCURY = 'MERCURY', - MONERIS = 'MONERIS', - PAYPAL = 'PAYPAL', - ELAVON_MX = 'ELAVON_MX', - STRIPE = 'STRIPE', - TSYS = 'TSYS', - VANTIV = 'VANTIV', - WORLDPAY = 'WORLDPAY', - EPX = 'EPX', - WEPAY = 'WEPAY', - MASHREQ = 'MASHREQ', - AXIS = 'AXIS', - KARTUKU = 'KARTUKU', - NEXI = 'NEXI', - DANA = 'DANA', - MYNT = 'MYNT', - POYNT = 'POYNT', - NUVEI = 'NUVEI', - NPAY = 'NPAY', - BRIDGEPAY = 'BRIDGEPAY', - CONVERGE = 'CONVERGE', - MOCK = 'MOCK', - NA_BANCARD = 'NA_BANCARD', - CREDITCALL = 'CREDITCALL', - ELAVON_EU = 'ELAVON_EU', - FUSEBOX = 'FUSEBOX', - EVERTEC = 'EVERTEC', - GHL = 'GHL', - RS2 = 'RS2', - JCN = 'JCN', - PRISMA = 'PRISMA', - VANTIV_EXPRESS = 'VANTIV_EXPRESS', - EZETAP = 'EZETAP', - ADYEN = 'ADYEN', - LETGO = 'LETGO', - CHECK_COMMERCE = 'CHECK_COMMERCE', - SQUARE = 'SQUARE', - OFFLINE = 'OFFLINE', + CHASE_PAYMENTECH = "CHASE_PAYMENTECH", + REDE = "REDE", + EVO = "EVO", + FIRST_DATA = "FIRST_DATA", + GLOBAL_PAYMENTS = "GLOBAL_PAYMENTS", + HEARTLAND_PAYMENT_SYSTEM = "HEARTLAND_PAYMENT_SYSTEM", + ELAVON = "ELAVON", + MERCURY = "MERCURY", + MONERIS = "MONERIS", + PAYPAL = "PAYPAL", + ELAVON_MX = "ELAVON_MX", + STRIPE = "STRIPE", + TSYS = "TSYS", + VANTIV = "VANTIV", + WORLDPAY = "WORLDPAY", + EPX = "EPX", + WEPAY = "WEPAY", + MASHREQ = "MASHREQ", + AXIS = "AXIS", + KARTUKU = "KARTUKU", + NEXI = "NEXI", + DANA = "DANA", + MYNT = "MYNT", + POYNT = "POYNT", + NUVEI = "NUVEI", + NPAY = "NPAY", + BRIDGEPAY = "BRIDGEPAY", + CONVERGE = "CONVERGE", + MOCK = "MOCK", + NA_BANCARD = "NA_BANCARD", + CREDITCALL = "CREDITCALL", + ELAVON_EU = "ELAVON_EU", + FUSEBOX = "FUSEBOX", + EVERTEC = "EVERTEC", + GHL = "GHL", + RS2 = "RS2", + JCN = "JCN", + PRISMA = "PRISMA", + VANTIV_EXPRESS = "VANTIV_EXPRESS", + EZETAP = "EZETAP", + ADYEN = "ADYEN", + LETGO = "LETGO", + CHECK_COMMERCE = "CHECK_COMMERCE", + SQUARE = "SQUARE", + OFFLINE = "OFFLINE", } export function useConfirmCheckout() { - const { - session, - setIsConfirmingCheckout, - isConfirmingCheckout, - setCheckoutErrors, - } = useCheckoutContext(); - const form = useFormContext(); + const { + session, + jwt, + setIsConfirmingCheckout, + isConfirmingCheckout, + setCheckoutErrors, + } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const form = useFormContext(); - return useMutation({ - mutationFn: async ( - input: ConfirmCheckoutMutationInput['input'] & { - paymentProvider: PaymentProvider; - isExpress?: boolean; - } - ) => { - if (!session || !input?.paymentType || isConfirmingCheckout) return; + return useMutation({ + mutationFn: async ( + input: ConfirmCheckoutMutationInput["input"] & { + paymentProvider: PaymentProvider; + isExpress?: boolean; + }, + ) => { + if (!session || !input?.paymentType || isConfirmingCheckout) return; - const { isExpress, ...confirmCheckoutInput } = input; + const { isExpress, ...confirmCheckoutInput } = input; - const isPickup = - form.getValues('deliveryMethod') === DeliveryMethods.PICKUP && - !isExpress; + const isPickup = + form.getValues("deliveryMethod") === DeliveryMethods.PICKUP && + !isExpress; - const pickUpData = isPickup - ? buildPickupPayload({ - pickupDate: form.getValues('pickupDate'), - pickupTime: form.getValues('pickupTime'), - pickupLocationId: form.getValues('pickupLocationId'), - leadTime: form.getValues('pickupLeadTime') || 0, - timezone: form.getValues('pickupTimezone') || 'UTC', - }) - : {}; + const pickUpData = isPickup + ? buildPickupPayload({ + pickupDate: form.getValues("pickupDate"), + pickupTime: form.getValues("pickupTime"), + pickupLocationId: form.getValues("pickupLocationId"), + leadTime: form.getValues("pickupLeadTime") || 0, + timezone: form.getValues("pickupTimezone") || "UTC", + }) + : {}; - // keep for debugging - // console.log({ - // pickupDate: form.getValues("pickupDate"), - // pickupTime: form.getValues("pickupTime"), - // pickupLocationId: form.getValues("pickupLocationId"), - // leadTime: form.getValues("pickupLeadTime") || 0, - // timezone: form.getValues("pickupTimezone") || "UTC", - // pickUpData, - // }); + // keep for debugging + // console.log({ + // pickupDate: form.getValues("pickupDate"), + // pickupTime: form.getValues("pickupTime"), + // pickupLocationId: form.getValues("pickupLocationId"), + // leadTime: form.getValues("pickupLeadTime") || 0, + // timezone: form.getValues("pickupTimezone") || "UTC", + // pickUpData, + // }); - setCheckoutErrors(undefined); - setIsConfirmingCheckout(true); + setCheckoutErrors(undefined); + setIsConfirmingCheckout(true); - track({ - eventId: eventIds.paymentStart, - type: TrackingEventType.EVENT, - properties: { - paymentType: input.paymentType, - provider: input.paymentProvider, - draftOrderId: session?.draftOrder?.id || 'unknown', - }, - }); + track({ + eventId: eventIds.paymentStart, + type: TrackingEventType.EVENT, + properties: { + paymentType: input.paymentType, + provider: input.paymentProvider, + draftOrderId: session?.draftOrder?.id || "unknown", + }, + }); - return await confirmCheckout( - { - ...confirmCheckoutInput, - ...(isPickup ? pickUpData : {}), - }, - session - ); - }, - onSuccess: (_data, input) => { - let completedEventId: TrackingEventId | null = null; - switch (input.paymentType) { - case 'apple_pay': - completedEventId = eventIds.expressApplePayCompleted; - break; - case 'google_pay': - completedEventId = eventIds.expressGooglePayCompleted; - break; - case 'paze': - completedEventId = eventIds.pazePayCompleted; - break; - default: - completedEventId = null; - } + return await confirmCheckout( + { + ...confirmCheckoutInput, + ...(isPickup ? pickUpData : {}), + }, + { accessToken: jwt }, + apiHost, + ); + }, + onSuccess: (_data, input) => { + let completedEventId: TrackingEventId | null = null; + switch (input.paymentType) { + case "apple_pay": + completedEventId = eventIds.expressApplePayCompleted; + break; + case "google_pay": + completedEventId = eventIds.expressGooglePayCompleted; + break; + case "paze": + completedEventId = eventIds.pazePayCompleted; + break; + default: + completedEventId = null; + } - /* Track checkout completed event - if we have a specific event for express checkout */ - if (completedEventId) { - track({ - eventId: completedEventId, - type: TrackingEventType.EVENT, - properties: { - draftOrderId: session?.draftOrder?.id || 'unknown', - paymentType: input.paymentType, - provider: 'poynt', - }, - }); - } + /* Track checkout completed event - if we have a specific event for express checkout */ + if (completedEventId) { + track({ + eventId: completedEventId, + type: TrackingEventType.EVENT, + properties: { + draftOrderId: session?.draftOrder?.id || "unknown", + paymentType: input.paymentType, + provider: "poynt", + }, + }); + } - track({ - eventId: eventIds.checkoutComplete, - type: TrackingEventType.EVENT, - properties: { - draftOrderId: session?.draftOrder?.id || 'unknown', - total: session?.draftOrder?.totals?.total?.value || 0, - currencyCode: - session?.draftOrder?.totals?.total?.currencyCode || 'unknown', - paymentType: input?.paymentType, - provider: input?.paymentProvider || 'unknown', - }, - }); + track({ + eventId: eventIds.checkoutComplete, + type: TrackingEventType.EVENT, + properties: { + draftOrderId: session?.draftOrder?.id || "unknown", + total: session?.draftOrder?.totals?.total?.value || 0, + currencyCode: + session?.draftOrder?.totals?.total?.currencyCode || "unknown", + paymentType: input?.paymentType, + provider: input?.paymentProvider || "unknown", + }, + }); - redirectToSuccessUrl(session?.successUrl); - }, - onError: (error, data) => { - // Track checkout error event - track({ - eventId: eventIds.checkoutError, - type: TrackingEventType.EVENT, - properties: { - errorCodes: error?.name || 'unknown', - errorType: error?.message, - paymentType: data?.paymentType, - provider: data?.paymentProvider || 'unknown', - draftOrderId: session?.draftOrder?.id || 'unknown', - }, - }); + redirectToSuccessUrl(session?.successUrl); + }, + onError: (error, data) => { + // Track checkout error event + track({ + eventId: eventIds.checkoutError, + type: TrackingEventType.EVENT, + properties: { + errorCodes: error?.name || "unknown", + errorType: error?.message, + paymentType: data?.paymentType, + provider: data?.paymentProvider || "unknown", + draftOrderId: session?.draftOrder?.id || "unknown", + }, + }); - setIsConfirmingCheckout(false); - }, - }); + setIsConfirmingCheckout(false); + }, + }); } diff --git a/packages/react/src/components/checkout/payment/utils/use-load-square.ts b/packages/react/src/components/checkout/payment/utils/use-load-square.ts index 93267d6c..3e60db38 100644 --- a/packages/react/src/components/checkout/payment/utils/use-load-square.ts +++ b/packages/react/src/components/checkout/payment/utils/use-load-square.ts @@ -1,5 +1,6 @@ import { useEffect, useState } from 'react'; import { useCheckoutContext } from '@/components/checkout/checkout'; +import { getEnvVar } from '@/lib/utils'; let isSquareLoaded = false; let isSquareCDNLoaded = false; @@ -8,8 +9,7 @@ const listeners = new Set<(loaded: boolean) => void>(); export function useLoadSquare() { const { squareConfig } = useCheckoutContext(); const [loaded, setLoaded] = useState(isSquareLoaded); - const environment = - process.env.GODADDY_ENV || process.env.NEXT_PUBLIC_GODADDY_ENV || 'prod'; + const environment = getEnvVar('GODADDY_ENV') || 'prod'; const squareCDN = environment === 'prod' diff --git a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts index b0460553..7c0f668e 100644 --- a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts +++ b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts @@ -1,8 +1,8 @@ import { useMemo } from 'react'; +import { getEnvVar } from '@/lib/utils'; export const useGetPoyntCollectCdn = () => { - const environment = - process.env.GODADDY_ENV || process.env.NEXT_PUBLIC_GODADDY_ENV || 'prod'; + const environment = getEnvVar('GODADDY_ENV') || 'prod'; return useMemo(() => { switch (environment) { diff --git a/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts b/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts index 63f3f1bd..1e267155 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts @@ -1,110 +1,118 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { useDiscountApply } from '@/components/checkout/discount'; -import { useDraftOrder } from '@/components/checkout/order/use-draft-order'; -import { useUpdateTaxes } from '@/components/checkout/order/use-update-taxes'; -import type { ResultOf } from '@/gql.tada'; -import { applyShippingMethod } from '@/lib/godaddy/godaddy'; -import type { DraftOrderQuery } from '@/lib/godaddy/queries'; -import type { ApplyCheckoutSessionShippingMethodInput } from '@/types'; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useDiscountApply } from "@/components/checkout/discount"; +import { useDraftOrder } from "@/components/checkout/order/use-draft-order"; +import { useUpdateTaxes } from "@/components/checkout/order/use-update-taxes"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import type { ResultOf } from "@/gql.tada"; +import { applyShippingMethod } from "@/lib/godaddy/godaddy"; +import type { DraftOrderQuery } from "@/lib/godaddy/queries"; +import type { ApplyCheckoutSessionShippingMethodInput } from "@/types"; export function useApplyShippingMethod() { - const { session } = useCheckoutContext(); - const { data: order } = useDraftOrder(); - const updateTaxes = useUpdateTaxes(); - const applyDiscount = useDiscountApply(); - const queryClient = useQueryClient(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const { data: order } = useDraftOrder(); + const updateTaxes = useUpdateTaxes(); + const applyDiscount = useDiscountApply(); + const queryClient = useQueryClient(); - return useMutation({ - mutationKey: ['apply-shipping-method', { sessionId: session?.id }], - mutationFn: async ( - shippingMethods: ApplyCheckoutSessionShippingMethodInput['input'] - ) => { - if (!session) return; - return await applyShippingMethod(shippingMethods, session); - }, - onSuccess: async data => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ["apply-shipping-method", session.id] + : ["apply-shipping-method"], + mutationFn: async ( + shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], + ) => { + if (!session) return; + return await applyShippingMethod( + shippingMethods, + { accessToken: jwt }, + apiHost, + ); + }, + onSuccess: async (data) => { + if (!session) return; - // Extract shippingTotal from mutation response - const shippingTotal = - data?.applyCheckoutSessionShippingMethod?.draftOrder?.totals - ?.shippingTotal; + // Extract shippingTotal from mutation response + const shippingTotal = + data?.applyCheckoutSessionShippingMethod?.draftOrder?.totals + ?.shippingTotal; - // Update the cached draft-order query (includes totals) - if (shippingTotal) { - queryClient.setQueryData( - ['draft-order', { id: session.id }], - (old: ResultOf | undefined) => { - if (!old) return old; + // Update the cached draft-order query (includes totals) + if (shippingTotal) { + queryClient.setQueryData( + ["draft-order", session.id], + (old: ResultOf | undefined) => { + if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - shippingLines: [ - { - ...old?.checkoutSession?.draftOrder?.shippingLines?.[0], - amount: { - ...shippingTotal, - }, - }, - ], - totals: { - ...old?.checkoutSession?.draftOrder?.totals, - shippingTotal: { - ...shippingTotal, - }, - }, - }, - }, - }; - } - ); - } + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + shippingLines: [ + { + ...old?.checkoutSession?.draftOrder?.shippingLines?.[0], + amount: { + ...shippingTotal, + }, + }, + ], + totals: { + ...old?.checkoutSession?.draftOrder?.totals, + shippingTotal: { + ...shippingTotal, + }, + }, + }, + }, + }; + }, + ); + } - const allCodes = new Set(); + const allCodes = new Set(); - // Add order-level discount codes - if (order?.discounts) { - for (const discount of order.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } + // Add order-level discount codes + if (order?.discounts) { + for (const discount of order.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } - // Line item-level discount codes do not need to be re-applied as they would not be affected by shipping method changes + // Line item-level discount codes do not need to be re-applied as they would not be affected by shipping method changes - // Add shipping line-level discount codes - if (order?.shippingLines) { - for (const shippingLine of order.shippingLines) { - if (shippingLine.discounts) { - for (const discount of shippingLine.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } - } - } + // Add shipping line-level discount codes + if (order?.shippingLines) { + for (const shippingLine of order.shippingLines) { + if (shippingLine.discounts) { + for (const discount of shippingLine.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } + } + } - const discountCodes = Array.from(allCodes); + const discountCodes = Array.from(allCodes); - if (session?.enablePromotionCodes && discountCodes?.length) { - /* should re-apply discounts if they were previously applied */ - await applyDiscount.mutateAsync({ - discountCodes, - }); - } else if (session?.enableTaxCollection) { - updateTaxes.mutate(undefined); - } else { - queryClient.invalidateQueries({ - queryKey: ['draft-order', { id: session?.id }], - }); - } - }, - }); + if (session?.enablePromotionCodes && discountCodes?.length) { + /* should re-apply discounts if they were previously applied */ + await applyDiscount.mutateAsync({ + discountCodes, + }); + } else if (session?.enableTaxCollection) { + updateTaxes.mutate(undefined); + } else { + queryClient.invalidateQueries({ + queryKey: ["draft-order", session.id], + }); + } + }, + }); } diff --git a/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts b/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts index 5ad6b2fc..feaacd3c 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts @@ -1,37 +1,71 @@ -import { useQuery } from '@tanstack/react-query'; -import { useMemo } from 'react'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { useDraftOrderShippingAddress } from '@/components/checkout/order/use-draft-order'; -import { getDraftOrderShippingMethods } from '@/lib/godaddy/godaddy'; +import { useQuery } from "@tanstack/react-query"; +import { useMemo } from "react"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useDraftOrderShippingAddress } from "@/components/checkout/order/use-draft-order"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { getDraftOrderShippingMethods } from "@/lib/godaddy/godaddy"; /** * Hook to fetch available shipping methods for the draft order * @returns Query result with shipping rates data */ export function useDraftOrderShippingMethods() { - const { session } = useCheckoutContext(); - const { data: shippingAddress } = useDraftOrderShippingAddress(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const { data: shippingAddress } = useDraftOrderShippingAddress(); - const hasShippingAddress = useMemo( - () => !!shippingAddress?.addressLine1, - [shippingAddress?.addressLine1] - ); + const hasShippingAddress = useMemo( + () => !!shippingAddress?.addressLine1, + [shippingAddress?.addressLine1], + ); - return useQuery({ - queryKey: [ - 'draft-order-shipping-methods', - { - id: session?.id, - address: shippingAddress?.addressLine1, - adminArea1: shippingAddress?.adminArea1, - adminArea2: shippingAddress?.adminArea2, - postalCode: shippingAddress?.postalCode, - countryCode: shippingAddress?.countryCode, - }, - ], - queryFn: () => getDraftOrderShippingMethods(session), - enabled: !!session?.id && hasShippingAddress, - select: data => - data?.checkoutSession?.draftOrder?.calculatedShippingRates?.rates, - }); + const destination = useMemo(() => { + if (!shippingAddress?.postalCode || !shippingAddress?.countryCode) { + return undefined; + } + return { + postalCode: shippingAddress.postalCode, + countryCode: shippingAddress.countryCode, + addressLine1: shippingAddress.addressLine1 ?? undefined, + addressLine2: shippingAddress.addressLine2 ?? undefined, + addressLine3: shippingAddress.addressLine3 ?? undefined, + adminArea1: shippingAddress.adminArea1 ?? undefined, + adminArea2: shippingAddress.adminArea2 ?? undefined, + adminArea3: shippingAddress.adminArea3 ?? undefined, + adminArea4: shippingAddress.adminArea4 ?? undefined, + }; + }, [ + shippingAddress?.postalCode, + shippingAddress?.countryCode, + shippingAddress?.addressLine1, + shippingAddress?.addressLine2, + shippingAddress?.addressLine3, + shippingAddress?.adminArea1, + shippingAddress?.adminArea2, + shippingAddress?.adminArea3, + shippingAddress?.adminArea4, + ]); + + return useQuery({ + queryKey: session?.id + ? [ + "draft-order-shipping-methods", + session.id, + shippingAddress?.addressLine1, + shippingAddress?.adminArea1, + shippingAddress?.adminArea2, + shippingAddress?.postalCode, + shippingAddress?.countryCode, + ] + : ["draft-order-shipping-methods"], + queryFn: () => + getDraftOrderShippingMethods( + { accessToken: jwt }, + destination, + apiHost, + ), + enabled: !!session?.id && hasShippingAddress, + select: (data) => + data?.checkoutSession?.draftOrder?.calculatedShippingRates?.rates, + }); } diff --git a/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts b/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts index a7231a02..8fc109e8 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts @@ -1,23 +1,31 @@ -import { useMutation } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { getDraftOrderShippingMethods } from '@/lib/godaddy/godaddy'; -import type { GetCheckoutSessionShippingRatesInput } from '@/types'; +import { useMutation } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { getDraftOrderShippingMethods } from "@/lib/godaddy/godaddy"; +import type { GetCheckoutSessionShippingRatesInput } from "@/types"; export function useGetShippingMethodByAddress() { - const { session } = useCheckoutContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: ['get-shipping-method-by-address', { sessionId: session?.id }], - mutationFn: async ( - destination: GetCheckoutSessionShippingRatesInput['destination'] - ) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ["get-shipping-method-by-address", session.id] + : ["get-shipping-method-by-address"], + mutationFn: async ( + destination: GetCheckoutSessionShippingRatesInput["destination"], + ) => { + if (!session) return; - const data = await getDraftOrderShippingMethods(session, destination); + const data = await getDraftOrderShippingMethods( + { accessToken: jwt }, + destination, + apiHost, + ); - return ( - data.checkoutSession?.draftOrder?.calculatedShippingRates?.rates || [] - ); - }, - }); + return ( + data.checkoutSession?.draftOrder?.calculatedShippingRates?.rates || [] + ); + }, + }); } diff --git a/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts b/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts index ae0f7fe9..94a17d7a 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts @@ -1,112 +1,116 @@ -import { useMutation, useQueryClient } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { useDiscountApply } from '@/components/checkout/discount'; -import { useDraftOrder } from '@/components/checkout/order/use-draft-order'; -import type { ResultOf } from '@/gql.tada'; -import { removeShippingMethod } from '@/lib/godaddy/godaddy'; -import type { DraftOrderQuery } from '@/lib/godaddy/queries'; -import type { RemoveAppliedCheckoutSessionShippingMethodInput } from '@/types'; +import { useMutation, useQueryClient } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useDiscountApply } from "@/components/checkout/discount"; +import { useDraftOrder } from "@/components/checkout/order/use-draft-order"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import type { ResultOf } from "@/gql.tada"; +import { removeShippingMethod } from "@/lib/godaddy/godaddy"; +import type { DraftOrderQuery } from "@/lib/godaddy/queries"; +import type { RemoveAppliedCheckoutSessionShippingMethodInput } from "@/types"; export function useRemoveShippingMethod() { - const { session } = useCheckoutContext(); - const queryClient = useQueryClient(); - const { data: order } = useDraftOrder(); - const applyDiscount = useDiscountApply(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const queryClient = useQueryClient(); + const { data: order } = useDraftOrder(); + const applyDiscount = useDiscountApply(); - return useMutation({ - mutationKey: ['remove-shipping-method', { sessionId: session?.id }], - mutationFn: async ( - input: RemoveAppliedCheckoutSessionShippingMethodInput['input'] - ) => { - if (!session) return; - return await removeShippingMethod(input, session); - }, - onSuccess: async data => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ["remove-shipping-method", session.id] + : ["remove-shipping-method"], + mutationFn: async ( + input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], + ) => { + if (!session) return; + return await removeShippingMethod(input, { accessToken: jwt }, apiHost); + }, + onSuccess: async (data) => { + if (!session) return; - // Extract shippingTotal from mutation response - const shippingTotal = - data?.removeAppliedCheckoutSessionShippingMethod?.draftOrder?.totals - ?.shippingTotal; + // Extract shippingTotal from mutation response + const shippingTotal = + data?.removeAppliedCheckoutSessionShippingMethod?.draftOrder?.totals + ?.shippingTotal; - // Update the cached draft-order query (includes totals) - if (shippingTotal) { - queryClient.setQueryData( - ['draft-order', { id: session.id }], - (old: ResultOf | undefined) => { - if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - shippingLines: [ - { - ...old?.checkoutSession?.draftOrder?.shippingLines?.[0], - amount: { - ...shippingTotal, - }, - }, - ], - totals: { - ...old?.checkoutSession?.draftOrder?.totals, - shippingTotal: { - ...shippingTotal, - }, - }, - }, - }, - }; - } - ); - } + // Update the cached draft-order query (includes totals) + if (shippingTotal) { + queryClient.setQueryData( + ["draft-order", session.id], + (old: ResultOf | undefined) => { + if (!old) return old; + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + shippingLines: [ + { + ...old?.checkoutSession?.draftOrder?.shippingLines?.[0], + amount: { + ...shippingTotal, + }, + }, + ], + totals: { + ...old?.checkoutSession?.draftOrder?.totals, + shippingTotal: { + ...shippingTotal, + }, + }, + }, + }, + }; + }, + ); + } - const allCodes = new Set(); + const allCodes = new Set(); - // Add order-level discount codes - if (order?.discounts) { - for (const discount of order.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } + // Add order-level discount codes + if (order?.discounts) { + for (const discount of order.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } - // Add line item-level discount codes - if (order?.lineItems) { - for (const lineItem of order.lineItems) { - if (lineItem?.discounts) { - for (const discount of lineItem.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } - } - } + // Add line item-level discount codes + if (order?.lineItems) { + for (const lineItem of order.lineItems) { + if (lineItem?.discounts) { + for (const discount of lineItem.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } + } + } - // Add shipping line-level discount codes - if (order?.shippingLines) { - for (const shippingLine of order.shippingLines) { - if (shippingLine.discounts) { - for (const discount of shippingLine.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } - } - } + // Add shipping line-level discount codes + if (order?.shippingLines) { + for (const shippingLine of order.shippingLines) { + if (shippingLine.discounts) { + for (const discount of shippingLine.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } + } + } - const discountCodes = Array.from(allCodes); + const discountCodes = Array.from(allCodes); - if (session?.enablePromotionCodes && discountCodes?.length) { - /* should re-apply discounts if they were previously applied */ - await applyDiscount.mutateAsync({ - discountCodes, - }); - } - }, - }); + if (session?.enablePromotionCodes && discountCodes?.length) { + /* should re-apply discounts if they were previously applied */ + await applyDiscount.mutateAsync({ + discountCodes, + }); + } + }, + }); } diff --git a/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts b/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts index 0d24a335..153a2f28 100644 --- a/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts +++ b/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts @@ -1,25 +1,33 @@ -import { useMutation } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { getDraftOrderTaxes } from '@/lib/godaddy/godaddy'; -import type { GetCheckoutSessionTaxesInput } from '@/types'; +import { useMutation } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { getDraftOrderTaxes } from "@/lib/godaddy/godaddy"; +import type { GetCheckoutSessionTaxesInput } from "@/types"; export function useGetTaxes() { - const { session } = useCheckoutContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: ['get-taxes-without-order', { sessionId: session?.id }], - mutationFn: async ({ - destination, - lines, - }: { - destination?: GetCheckoutSessionTaxesInput['destination']; - lines?: GetCheckoutSessionTaxesInput['lines']; - }) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ["get-taxes-without-order", session.id] + : ["get-taxes-without-order"], + mutationFn: async ({ + destination, + lines, + }: { + destination?: GetCheckoutSessionTaxesInput["destination"]; + lines?: GetCheckoutSessionTaxesInput["lines"]; + }) => { + if (!session) return; - const data = await getDraftOrderTaxes(session, { destination, lines }); + const data = await getDraftOrderTaxes( + { accessToken: jwt }, + { destination, lines }, + apiHost, + ); - return data.checkoutSession?.draftOrder?.calculatedTaxes?.totalTaxAmount; - }, - }); + return data.checkoutSession?.draftOrder?.calculatedTaxes?.totalTaxAmount; + }, + }); } diff --git a/packages/react/src/godaddy-provider.tsx b/packages/react/src/godaddy-provider.tsx index 3d920d31..91121859 100644 --- a/packages/react/src/godaddy-provider.tsx +++ b/packages/react/src/godaddy-provider.tsx @@ -65,6 +65,7 @@ interface GoDaddyContextValue { t: typeof enUs; appearance?: GoDaddyAppearance; debug?: boolean; + apiHost?: string; } const godaddyContext = React.createContext({ @@ -78,6 +79,16 @@ export 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 + * - "https://checkout.commerce.api.dev-godaddy.com" for DEV environment + * - "https://checkout.commerce.api.test-godaddy.com" for TEST environment + */ + apiHost?: string; queryClient?: QueryClient; children: QueryClientProviderProps['children']; } @@ -86,6 +97,7 @@ export function GoDaddyProvider({ localization = enUs, appearance, debug, + apiHost, queryClient: providedQueryClient, children, }: GoDaddyProviderProps) { @@ -110,7 +122,7 @@ export function GoDaddyProvider({ return ( {children} diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx new file mode 100644 index 00000000..dbc64150 --- /dev/null +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -0,0 +1,133 @@ +import { useQuery } from '@tanstack/react-query'; +import { useCallback, useEffect, useRef } from 'react'; +import type { CheckoutProps } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { + exchangeCheckoutToken, + getCheckoutSession, + refreshCheckoutToken, +} from '@/lib/godaddy/godaddy'; +import { getSessionIdFromPath, getUrlHash } from '@/lib/utils'; +import { useSessionStorage } from './use-session-storage'; + +function decodeJwt(token: string): { exp: number } | null { + try { + const base64Url = token.split('.')[1]; + const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/'); + const jsonPayload = decodeURIComponent( + atob(base64) + .split('') + .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)) + .join('') + ); + return JSON.parse(jsonPayload); + } catch { + return null; + } +} + +export function useCheckoutSession(props?: CheckoutProps) { + const { apiHost } = useGoDaddyContext(); + const [jwt, setJwt, removeJwt] = useSessionStorage( + 'godaddy-checkout-jwt', + '' + ); + const refreshTimerRef = useRef(null); + + let sessionId: string; + let sessionToken: string | null; + + if (props?.session) { + sessionId = props?.session.id; + sessionToken = props?.session.token; + } else { + sessionId = + typeof window !== 'undefined' + ? getSessionIdFromPath(window.location) + : ''; + sessionToken = + typeof window !== 'undefined' ? getUrlHash(window.location) : ''; + } + + const scheduleRefresh = useCallback( + (currentJwt: string) => { + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + + const decoded = decodeJwt(currentJwt); + if (!decoded?.exp) return; + + const expiresAt = decoded.exp * 1000; + const now = Date.now(); + const refreshIn = Math.max(0, expiresAt - now - 60000); + + refreshTimerRef.current = window.setTimeout(async () => { + try { + const result = await refreshCheckoutToken(currentJwt, apiHost); + if (result?.jwt) { + setJwt(result.jwt); + scheduleRefresh(result.jwt); + } + } catch (_error) { + removeJwt(); + } + }, refreshIn); + }, + [setJwt, removeJwt, apiHost] + ); + + useEffect(() => { + if (!sessionId || !sessionToken || jwt) return; + + let cancelled = false; + + (async () => { + try { + const result = await exchangeCheckoutToken({ + sessionId, + token: sessionToken, + }, apiHost); + if (cancelled) return; + if (!result?.jwt) return; + + setJwt(result.jwt); + if (typeof window !== 'undefined') { + window.history.replaceState( + null, + '', + window.location.pathname + window.location.search + ); + } + scheduleRefresh(result.jwt); + } catch (_error) { + removeJwt(); + } + })(); + + return () => { + cancelled = true; + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + }; + }, [sessionId, sessionToken, jwt, setJwt, removeJwt, scheduleRefresh]); + + useEffect(() => { + if (!jwt) return; + scheduleRefresh(jwt); + return () => { + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + }; + }, [jwt, scheduleRefresh]); + + const checkoutSessionQuery = useQuery({ + queryKey: ['checkout-session', sessionId], + queryFn: () => getCheckoutSession({ accessToken: jwt }, apiHost), + enabled: !!jwt, + }); + + return { session: checkoutSessionQuery.data, jwt }; +} diff --git a/packages/react/src/hooks/use-event-callback.ts b/packages/react/src/hooks/use-event-callback.ts new file mode 100644 index 00000000..cc2bfd1f --- /dev/null +++ b/packages/react/src/hooks/use-event-callback.ts @@ -0,0 +1,40 @@ +import { useCallback, useRef } from 'react'; + +import { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect'; + +/** + * Custom hook that creates a memoized event callback. + * @template Args - An array of argument types for the event callback. + * @template R - The return type of the event callback. + * @param {(...args: Args) => R} fn - The callback function. + * @returns {(...args: Args) => R} A memoized event callback function. + * @public + * @see [Documentation](https://usehooks-ts.com/react-hook/use-event-callback) + * @example + * ```tsx + * const handleClick = useEventCallback((event) => { + * // Handle the event here + * }); + * ``` + */ +export function useEventCallback( + fn: (...args: Args) => R +): (...args: Args) => R; +export function useEventCallback( + fn: ((...args: Args) => R) | undefined +): ((...args: Args) => R) | undefined; +export function useEventCallback( + fn: ((...args: Args) => R) | undefined +): ((...args: Args) => R) | undefined { + const ref = useRef(() => { + throw new Error('Cannot call an event handler while rendering.'); + }); + + useIsomorphicLayoutEffect(() => { + ref.current = fn; + }, [fn]); + + return useCallback((...args: Args) => ref.current?.(...args), [ref]) as ( + ...args: Args + ) => R; +} diff --git a/packages/react/src/hooks/use-event-listener.ts b/packages/react/src/hooks/use-event-listener.ts new file mode 100644 index 00000000..7498546e --- /dev/null +++ b/packages/react/src/hooks/use-event-listener.ts @@ -0,0 +1,120 @@ +import type { RefObject } from 'react'; +import { useEffect, useRef } from 'react'; + +import { useIsomorphicLayoutEffect } from './use-isomorphic-layout-effect'; + +// MediaQueryList Event based useEventListener interface +function useEventListener( + eventName: K, + handler: (event: MediaQueryListEventMap[K]) => void, + element: RefObject, + options?: boolean | AddEventListenerOptions +): void; + +// Window Event based useEventListener interface +function useEventListener( + eventName: K, + handler: (event: WindowEventMap[K]) => void, + element?: undefined, + options?: boolean | AddEventListenerOptions +): void; + +// Element Event based useEventListener interface +function useEventListener< + K extends keyof HTMLElementEventMap & keyof SVGElementEventMap, + T extends Element = K extends keyof HTMLElementEventMap + ? HTMLDivElement + : SVGElement, +>( + eventName: K, + handler: + | ((event: HTMLElementEventMap[K]) => void) + | ((event: SVGElementEventMap[K]) => void), + element: RefObject, + options?: boolean | AddEventListenerOptions +): void; + +// Document Event based useEventListener interface +function useEventListener( + eventName: K, + handler: (event: DocumentEventMap[K]) => void, + element: RefObject, + options?: boolean | AddEventListenerOptions +): void; + +/** + * Custom hook that attaches event listeners to DOM elements, the window, or media query lists. + * @template KW - The type of event for window events. + * @template KH - The type of event for HTML or SVG element events. + * @template KM - The type of event for media query list events. + * @template T - The type of the DOM element (default is `HTMLElement`). + * @param {KW | KH | KM} eventName - The name of the event to listen for. + * @param {(event: WindowEventMap[KW] | HTMLElementEventMap[KH] | SVGElementEventMap[KH] | MediaQueryListEventMap[KM] | Event) => void} handler - The event handler function. + * @param {RefObject} [element] - The DOM element or media query list to attach the event listener to (optional). + * @param {boolean | AddEventListenerOptions} [options] - An options object that specifies characteristics about the event listener (optional). + * @public + * @see [Documentation](https://usehooks-ts.com/react-hook/use-event-listener) + * @example + * ```tsx + * // Example 1: Attach a window event listener + * useEventListener('resize', handleResize); + * ``` + * @example + * ```tsx + * // Example 2: Attach a document event listener with options + * const elementRef = useRef(document); + * useEventListener('click', handleClick, elementRef, { capture: true }); + * ``` + * @example + * ```tsx + * // Example 3: Attach an element event listener + * const buttonRef = useRef(null); + * useEventListener('click', handleButtonClick, buttonRef); + * ``` + */ +function useEventListener< + KW extends keyof WindowEventMap, + KH extends keyof HTMLElementEventMap & keyof SVGElementEventMap, + KM extends keyof MediaQueryListEventMap, + T extends HTMLElement | SVGAElement | MediaQueryList = HTMLElement, +>( + eventName: KW | KH | KM, + handler: ( + event: + | WindowEventMap[KW] + | HTMLElementEventMap[KH] + | SVGElementEventMap[KH] + | MediaQueryListEventMap[KM] + | Event + ) => void, + element?: RefObject, + options?: boolean | AddEventListenerOptions +) { + // Create a ref that stores handler + const savedHandler = useRef(handler); + + useIsomorphicLayoutEffect(() => { + savedHandler.current = handler; + }, [handler]); + + useEffect(() => { + // Define the listening target + const targetElement: T | Window = element?.current ?? window; + + if (!(targetElement && targetElement.addEventListener)) return; + + // Create event listener that calls handler function stored in ref + const listener: typeof handler = event => { + savedHandler.current(event); + }; + + targetElement.addEventListener(eventName, listener, options); + + // Remove event listener on cleanup + return () => { + targetElement.removeEventListener(eventName, listener, options); + }; + }, [eventName, element, options]); +} + +export { useEventListener }; diff --git a/packages/react/src/hooks/use-isomorphic-layout-effect.ts b/packages/react/src/hooks/use-isomorphic-layout-effect.ts new file mode 100644 index 00000000..5058e8f7 --- /dev/null +++ b/packages/react/src/hooks/use-isomorphic-layout-effect.ts @@ -0,0 +1,17 @@ +import { useEffect, useLayoutEffect } from 'react'; + +/** + * Custom hook that uses either `useLayoutEffect` or `useEffect` based on the environment (client-side or server-side). + * @param {Function} effect - The effect function to be executed. + * @param {Array} [dependencies] - An array of dependencies for the effect (optional). + * @public + * @see [Documentation](https://usehooks-ts.com/react-hook/use-isomorphic-layout-effect) + * @example + * ```tsx + * useIsomorphicLayoutEffect(() => { + * // Code to be executed during the layout phase on the client side + * }, [dependency1, dependency2]); + * ``` + */ +export const useIsomorphicLayoutEffect = + typeof window !== 'undefined' ? useLayoutEffect : useEffect; diff --git a/packages/react/src/hooks/use-session-storage.ts b/packages/react/src/hooks/use-session-storage.ts new file mode 100644 index 00000000..20cd28e2 --- /dev/null +++ b/packages/react/src/hooks/use-session-storage.ts @@ -0,0 +1,191 @@ +import type { Dispatch, SetStateAction } from 'react'; +import { useCallback, useEffect, useState } from 'react'; + +import { useEventCallback } from './use-event-callback'; +import { useEventListener } from './use-event-listener'; + +declare global { + // eslint-disable-next-line @typescript-eslint/consistent-type-definitions + interface WindowEventMap { + 'godaddy:session-storage': CustomEvent; + } +} + +/** + * Represents the options for customizing the behavior of serialization and deserialization. + * @template T - The type of the state to be stored in session storage. + */ +type UseSessionStorageOptions = { + /** A function to serialize the value before storing it. */ + serializer?: (value: T) => string; + /** A function to deserialize the stored value. */ + deserializer?: (value: string) => T; + /** + * If `true` (default), the hook will initialize reading the session storage. In SSR, you should set it to `false`, returning the initial value initially. + * @default true + */ + initializeWithValue?: boolean; +}; + +const IS_SERVER = typeof window === 'undefined'; + +/** + * Custom hook that uses the [`sessionStorage API`](https://developer.mozilla.org/en-US/docs/Web/API/Window/sessionStorage) to persist state across page reloads. + * @template T - The type of the state to be stored in session storage. + * @param {string} key - The key under which the value will be stored in session storage. + * @param {T | (() => T)} initialValue - The initial value of the state or a function that returns the initial value. + * @param {?UseSessionStorageOptions} [options] - Options for customizing the behavior of serialization and deserialization (optional). + * @returns {[T, Dispatch>, () => void]} A tuple containing the stored value, a function to set the value and a function to remove the key from storage. + * @public + * @see [Documentation](https://usehooks-ts.com/react-hook/use-session-storage) + * @example + * ```tsx + * const [count, setCount, removeCount] = useSessionStorage('count', 0); + * // Access the `count` value, the `setCount` function to update it and `removeCount` function to remove the key from storage. + * ``` + */ +export function useSessionStorage( + key: string, + initialValue: T | (() => T), + options: UseSessionStorageOptions = {} +): [T, Dispatch>, () => void] { + const { initializeWithValue = true } = options; + + const serializer = useCallback<(value: T) => string>( + value => { + if (options.serializer) { + return options.serializer(value); + } + + return JSON.stringify(value); + }, + [options] + ); + + const deserializer = useCallback<(value: string) => T>( + value => { + if (options.deserializer) { + return options.deserializer(value); + } + // Support 'undefined' as a value + if (value === 'undefined') { + return undefined as unknown as T; + } + + const defaultValue = + initialValue instanceof Function ? initialValue() : initialValue; + + let parsed: unknown; + try { + parsed = JSON.parse(value); + } catch (_error) { + return defaultValue; // Return initialValue if parsing fails + } + + return parsed as T; + }, + [options, initialValue] + ); + + // Get from session storage then + // parse stored json or return initialValue + const readValue = useCallback((): T => { + const initialValueToUse = + initialValue instanceof Function ? initialValue() : initialValue; + + // Prevent build error "window is undefined" but keep working + if (IS_SERVER) { + return initialValueToUse; + } + + try { + const raw = window.sessionStorage.getItem(key); + return raw ? deserializer(raw) : initialValueToUse; + } catch (_error) { + return initialValueToUse; + } + }, [initialValue, key, deserializer]); + + const [storedValue, setStoredValue] = useState(() => { + if (initializeWithValue) { + return readValue(); + } + + return initialValue instanceof Function ? initialValue() : initialValue; + }); + + // Return a wrapped version of useState's setter function that ... + // ... persists the new value to sessionStorage. + const setValue: Dispatch> = useEventCallback(value => { + // Prevent build error "window is undefined" but keeps working + if (IS_SERVER) { + return; + } + + try { + // Allow value to be a function so we have the same API as useState + const newValue = value instanceof Function ? value(readValue()) : value; + + // Save to session storage + window.sessionStorage.setItem(key, serializer(newValue)); + + // Save state + setStoredValue(newValue); + + // We dispatch a custom event so every similar useSessionStorage hook is notified + window.dispatchEvent( + new CustomEvent('godaddy:session-storage', { detail: { key } }) + ); + } catch (_error) { + // Silently fail + } + }); + + const removeValue = useEventCallback(() => { + // Prevent build error "window is undefined" but keeps working + if (IS_SERVER) { + return; + } + + const defaultValue = + initialValue instanceof Function ? initialValue() : initialValue; + + // Remove the key from session storage + window.sessionStorage.removeItem(key); + + // Save state with default value + setStoredValue(defaultValue); + + // We dispatch a custom event so every similar useSessionStorage hook is notified + window.dispatchEvent( + new CustomEvent('godaddy:session-storage', { detail: { key } }) + ); + }); + + useEffect(() => { + setStoredValue(readValue()); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, [key]); + + const handleStorageChange = useCallback( + (event: StorageEvent | CustomEvent<{ key?: string }>) => { + const eventKey = + (event as StorageEvent).key ?? + (event as CustomEvent<{ key?: string }>).detail?.key; + if (eventKey && eventKey !== key) { + return; + } + setStoredValue(readValue()); + }, + [key, readValue] + ); + + // this only works for other documents, not the current one + useEventListener('storage', handleStorageChange); + + // this is a custom event, triggered in writeValueToSessionStorage + // See: useSessionStorage() + useEventListener('godaddy:session-storage', handleStorageChange); + + return [storedValue, setValue, removeValue]; +} diff --git a/packages/react/src/lib/godaddy/godaddy.ts b/packages/react/src/lib/godaddy/godaddy.ts index d3318c97..6420b88b 100644 --- a/packages/react/src/lib/godaddy/godaddy.ts +++ b/packages/react/src/lib/godaddy/godaddy.ts @@ -1,431 +1,982 @@ -'use server'; - -import type { ResultOf } from '@/gql.tada'; -import { graphqlRequestWithErrors } from '@/lib/graphql-with-errors'; +import type { ResultOf } from "@/gql.tada"; +import { graphqlRequestWithErrors } from "@/lib/graphql-with-errors"; import type { - ApplyCheckoutSessionDeliveryMethodInput, - ApplyCheckoutSessionDiscountInput, - ApplyCheckoutSessionFulfillmentLocationInput, - ApplyCheckoutSessionShippingMethodInput, - CheckoutSession, - CheckoutSessionInput, - ConfirmCheckoutMutationInput, - DraftOrderPriceAdjustmentsQueryInput, - Environments, - GetCheckoutSessionShippingRatesInput, - GetCheckoutSessionTaxesInput, - RemoveAppliedCheckoutSessionShippingMethodInput, - UpdateDraftOrderInput, -} from '@/types'; + ApplyCheckoutSessionDeliveryMethodInput, + ApplyCheckoutSessionDiscountInput, + ApplyCheckoutSessionFulfillmentLocationInput, + ApplyCheckoutSessionShippingMethodInput, + CheckoutSession, + ConfirmCheckoutMutationInput, + DraftOrderPriceAdjustmentsQueryInput, + GetCheckoutSessionShippingRatesInput, + GetCheckoutSessionTaxesInput, + RemoveAppliedCheckoutSessionShippingMethodInput, + UpdateDraftOrderInput, +} from "@/types"; import { - ApplyCheckoutSessionDeliveryMethodMutation, - ApplyCheckoutSessionDiscountMutation, - ApplyCheckoutSessionFulfillmentLocationMutation, - ApplyCheckoutSessionShippingMethodMutation, - CalculateCheckoutSessionTaxesMutation, - ConfirmCheckoutSessionMutation, - CreateCheckoutSessionMutation, - RemoveAppliedCheckoutSessionShippingMethodMutation, - UpdateCheckoutSessionDraftOrderMutation, - VerifyCheckoutSessionAddressMutation, -} from './mutations'; + ApplyCheckoutSessionDeliveryMethodMutation, + ApplyCheckoutSessionDiscountMutation, + ApplyCheckoutSessionFulfillmentLocationMutation, + ApplyCheckoutSessionShippingMethodMutation, + CalculateCheckoutSessionTaxesMutation, + ConfirmCheckoutSessionMutation, + ExchangeCheckoutTokenMutation, + RefreshCheckoutTokenMutation, + RemoveAppliedCheckoutSessionShippingMethodMutation, + UpdateCheckoutSessionDraftOrderMutation, + VerifyCheckoutSessionAddressMutation, +} from "./mutations"; import { - AddressMatchesQuery, - DraftOrderPriceAdjustmentsQuery, - DraftOrderQuery, - DraftOrderShippingRatesQuery, - DraftOrderSkusQuery, - DraftOrderTaxesQuery, -} from './queries'; - -function getHostByEnvironment(): string { - return `https://checkout.commerce.${process.env.GODADDY_HOST || process.env.NEXT_PUBLIC_GODADDY_HOST || 'api.godaddy.com'}`; + AddressMatchesQuery, + DraftOrderPriceAdjustmentsQuery, + DraftOrderQuery, + DraftOrderShippingRatesQuery, + DraftOrderSkusQuery, + DraftOrderTaxesQuery, + GetCheckoutSessionQuery, +} from "./queries"; + +function getHostByEnvironment(apiHost?: string): string { + // Use provided apiHost, otherwise default to production + return apiHost || "https://checkout.commerce.api.godaddy.com"; } -export async function createCheckoutSession( - input: CheckoutSessionInput['input'], - { accessToken }: { accessToken: string } -): Promise< - ResultOf['createCheckoutSession'] -> { - if (!accessToken) { - throw new Error('No public access token provided'); - } - - const GODADDY_HOST = getHostByEnvironment(); - const response = await graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - CreateCheckoutSessionMutation, - { input }, - { Authorization: `Bearer ${accessToken}` } - ); - - return response.createCheckoutSession; +export async function exchangeCheckoutToken( + input: { + sessionId: string; + token: string; + }, + apiHost?: string, +) { + if (!input.sessionId || !input.token) { + throw new Error("No session ID or token provided"); + } + + const GODADDY_HOST = getHostByEnvironment(apiHost); + // Browser automatically sends Origin header for CORS requests + // No need to manually set it + const response = await graphqlRequestWithErrors< + ResultOf + >(GODADDY_HOST, ExchangeCheckoutTokenMutation, { input }); + return response.exchangeCheckoutToken; +} + +export async function refreshCheckoutToken( + accessToken: string, + apiHost?: string, +) { + if (!accessToken) { + throw new Error("No access token provided"); + } + + const GODADDY_HOST = getHostByEnvironment(apiHost); + const response = await graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + RefreshCheckoutTokenMutation, + {}, + { + Authorization: `Bearer ${accessToken}`, + }, + ); + return response.refreshCheckoutToken; +} + +export async function getCheckoutSession( + { accessToken }: { accessToken: string }, + apiHost?: string, +) { + const GODADDY_HOST = getHostByEnvironment(apiHost); + const response = await graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + GetCheckoutSessionQuery, + {}, + { + Authorization: `Bearer ${accessToken}`, + }, + ); + return response.checkoutSession; } export async function getAddressMatches( - input: { query: string }, - session: CheckoutSession | undefined + input: { query: string }, + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export async function getAddressMatches( + input: { query: string }, + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export async function getAddressMatches( + input: { query: string }, + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors>( - GODADDY_HOST, - AddressMatchesQuery, - input, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors>( + GODADDY_HOST, + AddressMatchesQuery, + input, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors>( + GODADDY_HOST, + AddressMatchesQuery, + input, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } -export function getDraftOrder(session: CheckoutSession | undefined) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderQuery, - undefined, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); +export function getDraftOrder( + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export function getDraftOrder( + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export function getDraftOrder( + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, +) { + const GODADDY_HOST = getHostByEnvironment(apiHost); + console.log(sessionOrAuth); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderQuery, + undefined, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderQuery, + undefined, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function getDraftOrderTaxes( - session: CheckoutSession | undefined, - { - destination, - lines, - }: { - destination?: GetCheckoutSessionTaxesInput['destination']; - lines?: GetCheckoutSessionTaxesInput['lines']; - } + session: CheckoutSession | undefined, + params: { + destination?: GetCheckoutSessionTaxesInput["destination"]; + lines?: GetCheckoutSessionTaxesInput["lines"]; + }, + apiHost?: string, +): Promise>; +export function getDraftOrderTaxes( + auth: { accessToken: string | undefined }, + params: { + destination?: GetCheckoutSessionTaxesInput["destination"]; + lines?: GetCheckoutSessionTaxesInput["lines"]; + }, + apiHost?: string, +): Promise>; +export function getDraftOrderTaxes( + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + { + destination, + lines, + }: { + destination?: GetCheckoutSessionTaxesInput["destination"]; + lines?: GetCheckoutSessionTaxesInput["lines"]; + }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderTaxesQuery, - { destination, lines }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderTaxesQuery, + { destination, lines }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderTaxesQuery, + { destination, lines }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export async function verifyAddress( - input: { - addressLine1: string; - addressLine2: string; - addressLine3: string; - postalCode: string; - countryCode: string; - adminArea1?: string; - adminArea2?: string; - adminArea3?: string; - adminArea4?: string; - }, - session: CheckoutSession | undefined + input: { + addressLine1: string; + addressLine2: string; + addressLine3: string; + postalCode: string; + countryCode: string; + adminArea1?: string; + adminArea2?: string; + adminArea3?: string; + adminArea4?: string; + }, + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export async function verifyAddress( + input: { + addressLine1: string; + addressLine2: string; + addressLine3: string; + postalCode: string; + countryCode: string; + adminArea1?: string; + adminArea2?: string; + adminArea3?: string; + adminArea4?: string; + }, + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export async function verifyAddress( + input: { + addressLine1: string; + addressLine2: string; + addressLine3: string; + postalCode: string; + countryCode: string; + adminArea1?: string; + adminArea2?: string; + adminArea3?: string; + adminArea4?: string; + }, + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No public access token provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - VerifyCheckoutSessionAddressMutation, - { input: { ...input, adminArea3: input.adminArea2, adminArea2: '' } }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + VerifyCheckoutSessionAddressMutation, + { input: { ...input, adminArea3: input.adminArea2, adminArea2: "" } }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + VerifyCheckoutSessionAddressMutation, + { input: { ...input, adminArea3: input.adminArea2, adminArea2: "" } }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export async function updateDraftOrder( - input: UpdateDraftOrderInput['input'], - session: CheckoutSession | undefined + input: UpdateDraftOrderInput["input"], + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export async function updateDraftOrder( + input: UpdateDraftOrderInput["input"], + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export async function updateDraftOrder( + input: UpdateDraftOrderInput["input"], + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No public access token provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - UpdateCheckoutSessionDraftOrderMutation, - { input }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + UpdateCheckoutSessionDraftOrderMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + UpdateCheckoutSessionDraftOrderMutation, + { input }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export async function getProductsFromOrderSkus( - session: CheckoutSession | undefined + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export async function getProductsFromOrderSkus( + auth: { + accessToken: string | undefined; + }, + apiHost?: string, +): Promise>; +export async function getProductsFromOrderSkus( + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderSkusQuery, - undefined, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderSkusQuery, + undefined, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderSkusQuery, + undefined, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function updateDraftOrderTaxes( - session: CheckoutSession | undefined, - destination?: { - addressLine1?: string | null; - addressLine2?: string | null; - addressLine3?: string | null; - adminArea1?: string | null; - adminArea2?: string | null; - adminArea3?: string | null; - countryCode?: string | null; - postalCode?: string | null; - } + session: CheckoutSession | undefined, + destination?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }, + apiHost?: string, +): Promise>; +export function updateDraftOrderTaxes( + auth: { accessToken: string | undefined }, + destination?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }, + apiHost?: string, +): Promise>; +export function updateDraftOrderTaxes( + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + destination?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - CalculateCheckoutSessionTaxesMutation, - { destination }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + CalculateCheckoutSessionTaxesMutation, + { destination }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + CalculateCheckoutSessionTaxesMutation, + { destination }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function applyDiscount( - discountCodes: ApplyCheckoutSessionDiscountInput['input']['discountCodes'], - session: CheckoutSession | undefined + discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"], + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export function applyDiscount( + discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"], + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export function applyDiscount( + discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"], + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionDiscountMutation, - { input: { discountCodes }, sessionId: session.id }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionDiscountMutation, + { input: { discountCodes } }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionDiscountMutation, + { input: { discountCodes }, sessionId: session.id }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function applyShippingMethod( - shippingMethods: ApplyCheckoutSessionShippingMethodInput['input'], - session: CheckoutSession | undefined + shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export function applyShippingMethod( + shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export function applyShippingMethod( + shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionShippingMethodMutation, - { input: [...shippingMethods] }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionShippingMethodMutation, + { input: [...shippingMethods] }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionShippingMethodMutation, + { input: [...shippingMethods] }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function removeShippingMethod( - input: RemoveAppliedCheckoutSessionShippingMethodInput['input'], - session: CheckoutSession | undefined + input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export function removeShippingMethod( + input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export function removeShippingMethod( + input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ): Promise< - ResultOf + ResultOf > { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - RemoveAppliedCheckoutSessionShippingMethodMutation, - { input }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + RemoveAppliedCheckoutSessionShippingMethodMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + RemoveAppliedCheckoutSessionShippingMethodMutation, + { input }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function confirmCheckout( - input: ConfirmCheckoutMutationInput['input'], - session: CheckoutSession | undefined + input: ConfirmCheckoutMutationInput["input"], + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export function confirmCheckout( + input: ConfirmCheckoutMutationInput["input"], + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export function confirmCheckout( + input: ConfirmCheckoutMutationInput["input"], + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ConfirmCheckoutSessionMutation, - { input, sessionId: session.id }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ConfirmCheckoutSessionMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ConfirmCheckoutSessionMutation, + { input, sessionId: session.id }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function getDraftOrderShippingMethods( - session: CheckoutSession | undefined, - destination?: GetCheckoutSessionShippingRatesInput['destination'] + session: CheckoutSession | undefined, + destination?: GetCheckoutSessionShippingRatesInput["destination"], + apiHost?: string, +): Promise>; +export function getDraftOrderShippingMethods( + auth: { accessToken: string | undefined }, + destination?: GetCheckoutSessionShippingRatesInput["destination"], + apiHost?: string, +): Promise>; +export function getDraftOrderShippingMethods( + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + destination?: GetCheckoutSessionShippingRatesInput["destination"], + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - DraftOrderShippingRatesQuery, - { destination }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + DraftOrderShippingRatesQuery, + { destination }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + DraftOrderShippingRatesQuery, + { destination }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function applyDeliveryMethod( - input: ApplyCheckoutSessionDeliveryMethodInput['input'], - session: CheckoutSession | undefined + input: ApplyCheckoutSessionDeliveryMethodInput["input"], + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export function applyDeliveryMethod( + input: ApplyCheckoutSessionDeliveryMethodInput["input"], + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export function applyDeliveryMethod( + input: ApplyCheckoutSessionDeliveryMethodInput["input"], + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionDeliveryMethodMutation, - { input }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionDeliveryMethodMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionDeliveryMethodMutation, + { input }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function getDraftOrderPriceAdjustments( - session: CheckoutSession | undefined, - discountCodes?: DraftOrderPriceAdjustmentsQueryInput['discountCodes'], - shippingLines?: DraftOrderPriceAdjustmentsQueryInput['shippingLines'] + session: CheckoutSession | undefined, + discountCodes?: DraftOrderPriceAdjustmentsQueryInput["discountCodes"], + shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"], + apiHost?: string, +): Promise>; +export function getDraftOrderPriceAdjustments( + auth: { accessToken: string | undefined }, + discountCodes?: DraftOrderPriceAdjustmentsQueryInput["discountCodes"], + shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"], + apiHost?: string, +): Promise>; +export function getDraftOrderPriceAdjustments( + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + discountCodes?: DraftOrderPriceAdjustmentsQueryInput["discountCodes"], + shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"], + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - DraftOrderPriceAdjustmentsQuery, - { shippingLines, discountCodes }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + DraftOrderPriceAdjustmentsQuery, + { shippingLines, discountCodes }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + DraftOrderPriceAdjustmentsQuery, + { shippingLines, discountCodes }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } export function applyFulfillmentLocation( - input: ApplyCheckoutSessionFulfillmentLocationInput['input'], - session: CheckoutSession | undefined + input: ApplyCheckoutSessionFulfillmentLocationInput["input"], + session: CheckoutSession | undefined, + apiHost?: string, +): Promise>; +export function applyFulfillmentLocation( + input: ApplyCheckoutSessionFulfillmentLocationInput["input"], + auth: { accessToken: string | undefined }, + apiHost?: string, +): Promise>; +export function applyFulfillmentLocation( + input: ApplyCheckoutSessionFulfillmentLocationInput["input"], + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string, ) { - if (!session?.token || !session?.id) { - throw new Error('No session token or ID provided'); - } - const GODADDY_HOST = getHostByEnvironment(); - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionFulfillmentLocationMutation, - { input }, - { - 'x-session-token': `${session.token}`, - 'x-session-id': session.id, - 'x-store-id': session.storeId, - } - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && "accessToken" in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error("No access token provided"); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionFulfillmentLocationMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + }, + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error("No session token or ID provided"); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionFulfillmentLocationMutation, + { input }, + { + "x-session-token": `${session.token}`, + "x-session-id": session.id, + "x-store-id": session.storeId, + }, + ); } diff --git a/packages/react/src/lib/godaddy/graphql-env.ts b/packages/react/src/lib/godaddy/graphql-env.ts index a490c872..e51c5b1f 100644 --- a/packages/react/src/lib/godaddy/graphql-env.ts +++ b/packages/react/src/lib/godaddy/graphql-env.ts @@ -23,9580 +23,9812 @@ * ``` */ const introspection = { - "__schema": { - "queryType": { - "name": "Query" + __schema: { + queryType: { + name: 'Query', }, - "mutationType": { - "name": "Mutation" + mutationType: { + name: 'Mutation', }, - "subscriptionType": null, - "types": [ + subscriptionType: null, + types: [ { - "kind": "OBJECT", - "name": "Address", - "fields": [ + kind: 'OBJECT', + name: 'Address', + fields: [ { - "name": "addressDetails", - "type": { - "kind": "OBJECT", - "name": "AddressDetails" + name: 'addressDetails', + type: { + kind: 'OBJECT', + name: 'AddressDetails', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "AddressDetails", - "fields": [ + kind: 'OBJECT', + name: 'AddressDetails', + fields: [ { - "name": "addressType", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressType', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "buildingName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'buildingName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "deliveryService", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'deliveryService', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "geoCoordinates", - "type": { - "kind": "OBJECT", - "name": "GeoCoordinates" + name: 'geoCoordinates', + type: { + kind: 'OBJECT', + name: 'GeoCoordinates', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "streetName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'streetName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "streetNumber", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'streetNumber', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "streetType", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'streetType', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "subBuilding", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'subBuilding', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "AddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'AddressInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'addressLine1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'adminArea1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "adminArea2", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'adminArea2', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "AdjustmentAmount", - "fields": [ + kind: 'OBJECT', + name: 'AdjustmentAmount', + fields: [ { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'amount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "AdjustmentPercentage", - "fields": [ + kind: 'OBJECT', + name: 'AdjustmentPercentage', + fields: [ { - "name": "maximumAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'maximumAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "percentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'percentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "UNION", - "name": "AdjustmentValue", - "possibleTypes": [ + kind: 'UNION', + name: 'AdjustmentValue', + possibleTypes: [ { - "kind": "OBJECT", - "name": "AdjustmentAmount" + kind: 'OBJECT', + name: 'AdjustmentAmount', }, { - "kind": "OBJECT", - "name": "AdjustmentPercentage" - } - ] + kind: 'OBJECT', + name: 'AdjustmentPercentage', + }, + ], }, { - "kind": "INPUT_OBJECT", - "name": "ApplyShippingMethodInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'ApplyShippingMethodInput', + inputFields: [ { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "subTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } + name: 'subTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, { - "name": "taxTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'taxTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "SCALAR", - "name": "Boolean" + kind: 'SCALAR', + name: 'Boolean', }, { - "kind": "UNION", - "name": "CalculatedAdjustment", - "possibleTypes": [ + kind: 'UNION', + name: 'CalculatedAdjustment', + possibleTypes: [ { - "kind": "OBJECT", - "name": "CalculatedDiscount" + kind: 'OBJECT', + name: 'CalculatedDiscount', }, { - "kind": "OBJECT", - "name": "CalculatedFee" - } - ] + kind: 'OBJECT', + name: 'CalculatedFee', + }, + ], }, { - "kind": "OBJECT", - "name": "CalculatedAdjustmentOutput", - "fields": [ + kind: 'OBJECT', + name: 'CalculatedAdjustmentOutput', + fields: [ { - "name": "adjustment", - "type": { - "kind": "UNION", - "name": "CalculatedAdjustment" + name: 'adjustment', + type: { + kind: 'UNION', + name: 'CalculatedAdjustment', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'totalAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CalculatedDiscount", - "fields": [ + kind: 'OBJECT', + name: 'CalculatedDiscount', + fields: [ { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "ID" + name: 'id', + type: { + kind: 'SCALAR', + name: 'ID', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "UNION", - "name": "AdjustmentValue" + name: 'value', + type: { + kind: 'UNION', + name: 'AdjustmentValue', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CalculatedFee", - "fields": [ + kind: 'OBJECT', + name: 'CalculatedFee', + fields: [ { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "ID" + name: 'id', + type: { + kind: 'SCALAR', + name: 'ID', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "UNION", - "name": "AdjustmentValue" + name: 'value', + type: { + kind: 'UNION', + name: 'AdjustmentValue', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CalculatedLineOutput", - "fields": [ + kind: 'OBJECT', + name: 'CalculatedLineOutput', + fields: [ + { + name: 'adjustments', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CalculatedAdjustmentOutput', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'calculationLine', + type: { + kind: 'OBJECT', + name: 'CalculationLineOutput', + }, + args: [], + isDeprecated: false, + }, { - "name": "adjustments", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CalculatedAdjustmentOutput" - } - } + name: 'totalDiscountAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "calculationLine", - "type": { - "kind": "OBJECT", - "name": "CalculationLineOutput" + name: 'totalFeeAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'CalculationLineOutput', + fields: [ { - "name": "totalDiscountAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalFeeAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'type', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CalculationLineOutput", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutAuthToken', + fields: [ + { + name: 'expiresAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'expiresIn', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, + args: [], + isDeprecated: false, + }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'jwt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "type", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSession", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSession', + fields: [ { - "name": "addresses", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Address" - } - } + name: 'addresses', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'Address', + }, + }, }, - "args": [ + args: [ { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressesInput" - } - } - } + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressesInput', + }, + }, + }, ], - "isDeprecated": false + isDeprecated: false, }, { - "name": "channelId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'channelId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'createdAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "defaultOperatingHours", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours" + name: 'defaultOperatingHours', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "draftOrder", - "type": { - "kind": "OBJECT", - "name": "DraftOrder" + name: 'draftOrder', + type: { + kind: 'OBJECT', + name: 'DraftOrder', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableAddressAutocomplete", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableAddressAutocomplete', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableBillingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableBillingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableLocalPickup", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableLocalPickup', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableNotesCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableNotesCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enablePaymentMethodCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enablePaymentMethodCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enablePhoneCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enablePhoneCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enablePromotionCodes", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enablePromotionCodes', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableShippingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableShippingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableSurcharge", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableSurcharge', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableTaxCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableTaxCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableTips", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableTips', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enabledLocales", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'enabledLocales', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enabledPaymentProviders", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'enabledPaymentProviders', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "environment", - "type": { - "kind": "ENUM", - "name": "CheckoutSessionEnvironment" + name: 'environment', + type: { + kind: 'ENUM', + name: 'CheckoutSessionEnvironment', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "experimental_rules", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionExperimentalRules" + name: 'experimental_rules', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionExperimentalRules', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "expiresAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'expiresAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "lineItems", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "DraftOrderLineItem" - } - } + name: 'lineItems', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'DraftOrderLineItem', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "locations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionLocation" - } - } + name: 'locations', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionLocation', + }, + }, }, - "args": [], - "isDeprecated": false - }, - { - "name": "paymentMethods", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethods" + args: [], + isDeprecated: false, + }, + { + name: 'paymentMethods', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethods', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "returnUrl", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'returnUrl', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "shipping", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionShippingOptions" + name: 'shipping', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionShippingOptions', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "skus", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionSkusConnection" - } + name: 'skus', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionSkusConnection', + }, }, - "args": [ + args: [ { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'after', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'before', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Int" - } + name: 'first', + type: { + kind: 'SCALAR', + name: 'Int', + }, }, { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Int" - } - } + name: 'last', + type: { + kind: 'SCALAR', + name: 'Int', + }, + }, ], - "isDeprecated": false + isDeprecated: false, }, { - "name": "sourceApp", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'sourceApp', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "ENUM", - "name": "CheckoutSessionStatus" - } + name: 'status', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'ENUM', + name: 'CheckoutSessionStatus', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "storeId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'storeId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "storeName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'storeName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "successUrl", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'successUrl', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxes", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionTaxesOptions" + name: 'taxes', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionTaxesOptions', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "token", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'token', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "updatedAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'updatedAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "url", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'url', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionAddress", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionAddress', + fields: [ { - "name": "addressDetails", - "type": { - "kind": "OBJECT", - "name": "AddressDetails" + name: 'addressDetails', + type: { + kind: 'OBJECT', + name: 'AddressDetails', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressDetailsInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressDetailsInput', + inputFields: [ { - "name": "addressType", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressType', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "buildingName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'buildingName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "deliveryService", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'deliveryService', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "geoCoordinates", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionGeoCoordinatesInput" - } + name: 'geoCoordinates', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionGeoCoordinatesInput', + }, }, { - "name": "streetName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'streetName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "streetNumber", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'streetNumber', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "streetType", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'streetType', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "subBuilding", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'subBuilding', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressInput', + inputFields: [ { - "name": "addressDetails", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressDetailsInput" - } + name: 'addressDetails', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressDetailsInput', + }, }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressesInput', + inputFields: [ { - "name": "query", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'query', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculateTaxesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculateTaxesInput', + inputFields: [ { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput" - } + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + }, }, { - "name": "lines", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLineInput" - } - } - } - } + name: 'lines', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLineInput', + }, + }, + }, + }, }, { - "name": "origin", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput" - } - } + name: 'origin', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedLine", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedLine', + fields: [ { - "name": "calculationLine", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationLine" + name: 'calculationLine', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculationLine', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxAmounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionTaxAmount" - } - } + name: 'taxAmounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionTaxAmount', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalTaxAmount", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionTotalTaxAmount" + name: 'totalTaxAmount', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionTotalTaxAmount', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedRate", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedRate', + fields: [ { - "name": "calculationMethod", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'calculationMethod', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedRateValue" + name: 'value', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedRateValue', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedRateValue", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedRateValue', + fields: [ { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "appliedAmount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'appliedAmount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "appliedPercentage", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'appliedPercentage', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "percentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'percentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationAddressInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationLine", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculationLine', + fields: [ { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLineInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLineInput', + inputFields: [ { - "name": "classification", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'classification', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput" - } + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + }, }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "origin", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput" - } + name: 'origin', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + }, }, { - "name": "quantity", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } - } + name: 'quantity', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, + }, }, { - "name": "subtotalPrice", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'subtotalPrice', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, }, { - "name": "type", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'type', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "unitPrice", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'unitPrice', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + inputFields: [ { - "name": "address", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationAddressInput" - } - } - } + name: 'address', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationAddressInput', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationResult", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculationResult', + fields: [ { - "name": "lines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedLine" - } - } + name: 'lines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedLine', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxAmounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionTaxAmount" - } - } + name: 'taxAmounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionTaxAmount', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalTaxAmount", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionTotalTaxAmount" + name: 'totalTaxAmount', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionTotalTaxAmount', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + fields: [ { - "name": "closeTime", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'closeTime', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "openTime", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'openTime', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + inputFields: [ { - "name": "closeTime", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'closeTime', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, }, { - "name": "openTime", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'openTime', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "ENUM", - "name": "CheckoutSessionEnvironment", - "enumValues": [ + kind: 'ENUM', + name: 'CheckoutSessionEnvironment', + enumValues: [ { - "name": "dev", - "isDeprecated": false + name: 'dev', + isDeprecated: false, }, { - "name": "ote", - "isDeprecated": false + name: 'ote', + isDeprecated: false, }, { - "name": "prod", - "isDeprecated": false + name: 'prod', + isDeprecated: false, }, { - "name": "test", - "isDeprecated": false - } - ] + name: 'test', + isDeprecated: false, + }, + ], }, { - "kind": "OBJECT", - "name": "CheckoutSessionExperimentalRules", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionExperimentalRules', + fields: [ { - "name": "freeShipping", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionFreeShippingRule" + name: 'freeShipping', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionFreeShippingRule', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "localDelivery", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionLocalDeliveryRule" + name: 'localDelivery', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionLocalDeliveryRule', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionExperimentalRulesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionExperimentalRulesInput', + inputFields: [ { - "name": "freeShipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionFreeShippingRuleInput" - } - } + name: 'freeShipping', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionFreeShippingRuleInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionFreeShippingRule", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionFreeShippingRule', + fields: [ { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "minimumOrderTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } + name: 'minimumOrderTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionFreeShippingRuleInput", - "inputFields": [ - { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - } + args: [], + isDeprecated: false, }, - { - "name": "minimumOrderTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - } - } ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionGeoCoordinatesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionFreeShippingRuleInput', + inputFields: [ { - "name": "latitude", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, }, { - "name": "longitude", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } - } - } + name: 'minimumOrderTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionLocalDeliveryRule", - "fields": [ - { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "minimumOrderTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionLocation", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionGeoCoordinatesInput', + inputFields: [ { - "name": "address", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionAddress" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'latitude', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "isDefault", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'longitude', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, }, - "args": [], - "isDeprecated": false }, - { - "name": "operatingHours", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours" - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLocationInput", - "inputFields": [ - { - "name": "address", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressInput" - } - } - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "isDefault", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionOperatingHoursMap", - "fields": [ - { - "name": "default", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "locations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours" - } - } - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionOperatingHoursMapInput", - "inputFields": [ - { - "name": "default", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionStoreHoursInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig", - "fields": [ - { - "name": "checkoutTypes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "processor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLineItemInput', + inputFields: [ { - "name": "checkoutTypes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - } + name: 'quantity', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, }, { - "name": "processor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'skuId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethods", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionLocalDeliveryRule', + fields: [ { - "name": "applePay", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "card", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'minimumOrderTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'CheckoutSessionLocation', + fields: [ { - "name": "express", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'address', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionAddress', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "googlePay", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "offline", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'isDefault', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "paypal", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'operatingHours', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, - { - "name": "paze", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodsInput", - "inputFields": [ - { - "name": "applePay", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - }, - { - "name": "card", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - }, - { - "name": "express", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - }, + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLocationInput', + inputFields: [ { - "name": "googlePay", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } + name: 'address', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressInput', + }, + }, }, { - "name": "offline", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "paypal", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } + name: 'isDefault', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, }, - { - "name": "paze", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionShippingOptions", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionOperatingHoursMap', + fields: [ { - "name": "fulfillmentLocationId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'default', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "originAddress", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionAddress" + name: 'locations', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', + }, + }, }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionShippingOptionsInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionOperatingHoursMapInput', + inputFields: [ { - "name": "fulfillmentLocationId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'default', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionStoreHoursInput', + }, + }, }, - { - "name": "originAddress", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressInput" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionSkusConnection", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + fields: [ { - "name": "edges", - "type": { - "kind": "LIST", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionSkusConnectionEdge" - } + name: 'checkoutTypes', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo" - } + name: 'processor', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionSkusConnectionEdge", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + inputFields: [ { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'checkoutTypes', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "node", - "type": { - "kind": "OBJECT", - "name": "SKU" + name: 'processor', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "ENUM", - "name": "CheckoutSessionStatus", - "enumValues": [ - { - "name": "ACTIVE", - "isDeprecated": false - }, + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethods', + fields: [ { - "name": "CANCELLED", - "isDeprecated": false + name: 'applePay', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + }, + args: [], + isDeprecated: false, }, { - "name": "COMPLETED", - "isDeprecated": false + name: 'card', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + }, + args: [], + isDeprecated: false, }, { - "name": "CREATED", - "isDeprecated": false + name: 'express', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + }, + args: [], + isDeprecated: false, }, { - "name": "EXPIRED", - "isDeprecated": false - } - ] - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours", - "fields": [ - { - "name": "hours", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionWeekHours" - } + name: 'googlePay', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "leadTime", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } + name: 'offline', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "pickupWindowInDays", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } + name: 'paypal', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "timeZone", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'paze', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionStoreHoursInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodsInput', + inputFields: [ { - "name": "hours", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionWeekHoursInput" - } - } + name: 'applePay', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + }, }, { - "name": "leadTime", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - } + name: 'card', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + }, }, { - "name": "pickupWindowInDays", - "type": { - "kind": "SCALAR", - "name": "Int" - } + name: 'express', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + }, }, { - "name": "timeZone", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionTaxAmount", - "fields": [ - { - "name": "rate", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedRate" + name: 'googlePay', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', }, - "args": [], - "isDeprecated": false }, { - "name": "totalTaxAmount", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionTotalTaxAmount" + name: 'offline', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionTaxesOptions", - "fields": [ + }, { - "name": "originAddress", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionAddress" + name: 'paypal', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionTaxesOptionsInput", - "inputFields": [ + }, { - "name": "originAddress", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressInput" - } - } + name: 'paze', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionTotalTaxAmount", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionShippingOptions', + fields: [ { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fulfillmentLocationId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'originAddress', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionAddress', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionWeekHours", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionShippingOptionsInput', + inputFields: [ { - "name": "friday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'fulfillmentLocationId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "monday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'originAddress', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressInput', }, - "args": [], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'CheckoutSessionSkusConnection', + fields: [ { - "name": "saturday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'edges', + type: { + kind: 'LIST', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionSkusConnectionEdge', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "sunday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'pageInfo', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'PageInfo', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'CheckoutSessionSkusConnectionEdge', + fields: [ { - "name": "thursday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'cursor', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "tuesday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'node', + type: { + kind: 'OBJECT', + name: 'SKU', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, - { - "name": "wednesday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionWeekHoursInput", - "inputFields": [ - { - "name": "friday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } - }, + kind: 'ENUM', + name: 'CheckoutSessionStatus', + enumValues: [ { - "name": "monday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'ACTIVE', + isDeprecated: false, }, { - "name": "saturday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'CANCELLED', + isDeprecated: false, }, { - "name": "sunday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'COMPLETED', + isDeprecated: false, }, { - "name": "thursday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'CREATED', + isDeprecated: false, }, { - "name": "tuesday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'EXPIRED', + isDeprecated: false, }, - { - "name": "wednesday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } - } ], - "isOneOf": false }, { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutBillingInfoInput", - "inputFields": [ + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', + fields: [ { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutDestinationAddressInput" - } + name: 'hours', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionWeekHours', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'leadTime', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'pickupWindowInDays', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'timeZone', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, }, - { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutDestinationAddressInput", - "inputFields": [ - { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionStoreHoursInput', + inputFields: [ { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'hours', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionWeekHoursInput', + }, + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'leadTime', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'pickupWindowInDays', + type: { + kind: 'SCALAR', + name: 'Int', + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'timeZone', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingInfoInput", - "inputFields": [ - { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutDestinationAddressInput" - } - }, + kind: 'OBJECT', + name: 'CheckoutSessionTaxAmount', + fields: [ { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'rate', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedRate', + }, + args: [], + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'totalTaxAmount', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionTotalTaxAmount', + }, + args: [], + isDeprecated: false, }, - { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + interfaces: [], }, - { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingLineInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutTaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingLineTotalsInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingLineTotalsInput", - "inputFields": [ - { - "name": "subTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "taxTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutTaxInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "ContactInput", - "inputFields": [ - { - "name": "address", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DraftOrderAddressInput" - } - } - }, - { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "firstName", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "lastName", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "CreateDraftLineItemInput", - "inputFields": [ - { - "name": "details", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputDetailsInfo" - } - }, - { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DiscountInput" - } - } - } - }, - { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "FeeInput" - } - } - } - }, - { - "name": "fulfillmentChannelId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fulfillmentMode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "ENUM", - "name": "LineItemModeInput" - } - } - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - }, - "defaultValue": "[]" - }, - { - "name": "productId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "quantity", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } - } - }, - { - "name": "serviceEndsAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "serviceStartAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputShippingInfo" - } - }, - { - "name": "skuId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "LineItemTotalsInput" - } - } - }, + { + kind: 'OBJECT', + name: 'CheckoutSessionTaxesOptions', + fields: [ { - "name": "type", - "type": { - "kind": "ENUM", - "name": "LineItemTypesInput" + name: 'originAddress', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionAddress', }, - "defaultValue": "PHYSICAL" + args: [], + isDeprecated: false, }, - { - "name": "unitAmount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } ], - "isOneOf": false - }, - { - "kind": "SCALAR", - "name": "DateTime" + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "DestinationAddressInput", - "inputFields": [ - { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionTaxesOptionsInput', + inputFields: [ { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'originAddress', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressInput', + }, }, - { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "DiscountInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, + kind: 'OBJECT', + name: 'CheckoutSessionTotalTaxAmount', + fields: [ { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "false" - }, - { - "name": "code", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "DraftOrder", - "fields": [ - { - "name": "billing", - "type": { - "kind": "OBJECT", - "name": "DraftOrderContact" + name: 'value', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'CheckoutSessionWeekHours', + fields: [ { - "name": "calculatedAdjustments", - "type": { - "kind": "OBJECT", - "name": "PriceAdjustmentsCalculationResult" + name: 'friday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', }, - "args": [ - { - "name": "discountCodes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "shippingLines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "PriceAdjustmentShippingLineInput" - } - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "calculatedShippingRates", - "type": { - "kind": "OBJECT", - "name": "ShippingRateCalculationResult" + name: 'monday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', }, - "args": [ - { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "DestinationAddressInput" - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "calculatedTaxes", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationResult" + name: 'saturday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', }, - "args": [ - { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput" - } - }, - { - "name": "lines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxLineInput" - } - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "cartId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'sunday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "context", - "type": { - "kind": "OBJECT", - "name": "DraftOrderContext" + name: 'thursday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "createdAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" + name: 'tuesday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'wednesday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionWeekHoursInput', + inputFields: [ { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemDiscount" - } - } + name: 'friday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', }, - "args": [], - "isDeprecated": false }, { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'monday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', }, - "args": [], - "isDeprecated": false }, { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemFee" - } - } + name: 'saturday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', }, - "args": [], - "isDeprecated": false }, { - "name": "fulfillmentModes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'sunday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "ID" + name: 'thursday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', }, - "args": [], - "isDeprecated": false }, { - "name": "lineItems", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "DraftOrderLineItem" - } - } + name: 'tuesday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'wednesday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', }, - "args": [], - "isDeprecated": false - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemNote" - } - } - }, - "args": [], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'CheckoutTokenValidation', + fields: [ { - "name": "number", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'expiresAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "numberDisplay", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'sessionId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "shipping", - "type": { - "kind": "OBJECT", - "name": "DraftOrderContact" + name: 'valid', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutBillingInfoInput', + inputFields: [ { - "name": "shippingLines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "ShippingLine" - } - } + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutDestinationAddressInput', }, - "args": [], - "isDeprecated": false }, { - "name": "statuses", - "type": { - "kind": "OBJECT", - "name": "DraftOrderStatuses" + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "taxExempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemTax" - } - } + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "totals", - "type": { - "kind": "OBJECT", - "name": "DraftOrderTotals" + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, - { - "name": "updatedAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "DraftOrderAddress", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutDestinationAddressInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "DraftOrderAddressInput", - "inputFields": [ - { - "name": "addressLine1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingInfoInput', + inputFields: [ { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutDestinationAddressInput', + }, }, { - "name": "adminArea1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, }, - { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "DraftOrderContact", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingLineInput', + inputFields: [ { - "name": "address", - "type": { - "kind": "OBJECT", - "name": "DraftOrderAddress" + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutTaxInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'totals', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingLineTotalsInput', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "DraftOrderContext", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingLineTotalsInput', + inputFields: [ { - "name": "channelId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'subTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "owner", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'taxTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false }, - { - "name": "storeId", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "DraftOrderLineItem", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutTaxInput', + inputFields: [ { - "name": "createdAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "details", - "type": { - "kind": "OBJECT", - "name": "LineItemDetails" + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false }, { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemDiscount" - } - } + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false }, { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemFee" - } - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'ContactInput', + inputFields: [ { - "name": "fulfilledAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'address', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'DraftOrderAddressInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "fulfillmentChannelId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": true }, { - "name": "fulfillmentMode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'firstName', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'lastName', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'CreateDraftLineItemInput', + inputFields: [ { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemNote" - } - } + name: 'details', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputDetailsInfo', }, - "args": [], - "isDeprecated": false }, { - "name": "orderVersion", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'DiscountInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "productId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "quantity", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'FeeInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "returnQuantity", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'fulfillmentChannelId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "returnTotals", - "type": { - "kind": "OBJECT", - "name": "LineItemReturnTotals" + name: 'fulfillmentMode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'ENUM', + name: 'LineItemModeInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "returnedAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "serviceEndsAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "serviceStartAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "shipping", - "type": { - "kind": "OBJECT", - "name": "DraftOrderContact" + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, }, - "args": [], - "isDeprecated": false + defaultValue: '[]', }, { - "name": "skuId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'productId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "status", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'quantity', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'serviceEndsAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false }, { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemTax" - } - } + name: 'serviceStartAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false }, { - "name": "totals", - "type": { - "kind": "OBJECT", - "name": "LineItemTotals" + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputShippingInfo', }, - "args": [], - "isDeprecated": false }, { - "name": "type", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'skuId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "unitAmount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "updatedAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxInput', + }, + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "DraftOrderLineItemInput", - "inputFields": [ - { - "name": "details", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputDetailsInfo" - } }, { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DiscountInput" - } - } - } + name: 'totals', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'LineItemTotalsInput', + }, + }, }, { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'type', + type: { + kind: 'ENUM', + name: 'LineItemTypesInput', + }, + defaultValue: 'PHYSICAL', }, { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "FeeInput" - } - } - } + name: 'unitAmount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, }, + ], + isOneOf: false, + }, + { + kind: 'SCALAR', + name: 'DateTime', + }, + { + kind: 'INPUT_OBJECT', + name: 'DestinationAddressInput', + inputFields: [ { - "name": "fulfillmentMode", - "type": { - "kind": "ENUM", - "name": "LineItemModeInput" - } + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - }, - "defaultValue": "[]" - }, - { - "name": "productId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "quantity", - "type": { - "kind": "SCALAR", - "name": "Float" - } - }, - { - "name": "serviceEndsAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "serviceStartAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputShippingInfo" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "skuId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxInput" - } - } - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemTotalsInput" - } + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "type", - "type": { - "kind": "ENUM", - "name": "LineItemTypesInput" + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "defaultValue": "PHYSICAL" }, { - "name": "unitAmount", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "DraftOrderStatuses", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'DiscountInput', + inputFields: [ { - "name": "fulfillmentStatus", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "paymentStatus", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + defaultValue: 'false', }, { - "name": "status", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "DraftOrderTotals", - "fields": [ - { - "name": "discountTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'code', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "feeTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "shippingTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "subTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "taxTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "total", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput", - "inputFields": [ - { - "name": "type", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } }, - { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "FeeInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, + kind: 'OBJECT', + name: 'DraftOrder', + fields: [ { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'billing', + type: { + kind: 'OBJECT', + name: 'DraftOrderContact', }, - "defaultValue": "false" + args: [], + isDeprecated: false, }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'calculatedAdjustments', + type: { + kind: 'OBJECT', + name: 'PriceAdjustmentsCalculationResult', + }, + args: [ + { + name: 'discountCodes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'shippingLines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'PriceAdjustmentShippingLineInput', + }, + }, + }, + }, + ], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'calculatedShippingRates', + type: { + kind: 'OBJECT', + name: 'ShippingRateCalculationResult', + }, + args: [ + { + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'DestinationAddressInput', + }, + }, + ], + isDeprecated: false, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'calculatedTaxes', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculationResult', + }, + args: [ + { + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', + }, + }, + { + name: 'lines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxLineInput', + }, + }, + }, + }, + ], + isDeprecated: false, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "SCALAR", - "name": "Float" - }, - { - "kind": "ENUM", - "name": "FulfillmentModeInput", - "enumValues": [ - { - "name": "CURBSIDE", - "isDeprecated": false + name: 'cartId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "DELIVERY", - "isDeprecated": false + name: 'context', + type: { + kind: 'OBJECT', + name: 'DraftOrderContext', + }, + args: [], + isDeprecated: false, }, { - "name": "DIGITAL", - "isDeprecated": false + name: 'createdAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + args: [], + isDeprecated: false, }, { - "name": "DRIVE_THRU", - "isDeprecated": false + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "FOR_HERE", - "isDeprecated": false + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemDiscount', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "GENERAL_CONTAINER", - "isDeprecated": false + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "GIFT_CARD", - "isDeprecated": false + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemFee', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "NONE", - "isDeprecated": false + name: 'fulfillmentModes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "NON_LODGING_NRR", - "isDeprecated": false + name: 'id', + type: { + kind: 'SCALAR', + name: 'ID', + }, + args: [], + isDeprecated: false, }, { - "name": "NON_LODGING_SALE", - "isDeprecated": false + name: 'lineItems', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'DraftOrderLineItem', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "PICKUP", - "isDeprecated": false + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "PURCHASE", - "isDeprecated": false + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemNote', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "QUICK_STAY", - "isDeprecated": false + name: 'number', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "REGULAR_STAY", - "isDeprecated": false + name: 'numberDisplay', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "SHIP", - "isDeprecated": false + name: 'shipping', + type: { + kind: 'OBJECT', + name: 'DraftOrderContact', + }, + args: [], + isDeprecated: false, }, { - "name": "TO_GO", - "isDeprecated": false - } - ] - }, - { - "kind": "OBJECT", - "name": "GeoCoordinates", - "fields": [ - { - "name": "latitude", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'shippingLines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'ShippingLine', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "longitude", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'statuses', + type: { + kind: 'OBJECT', + name: 'DraftOrderStatuses', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "SCALAR", - "name": "ID" - }, - { - "kind": "SCALAR", - "name": "Int" - }, - { - "kind": "OBJECT", - "name": "LineItemDetails", - "fields": [ + args: [], + isDeprecated: false, + }, { - "name": "productAssetUrl", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "selectedAddons", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SelectedAddon" - } - } + name: 'taxExempted', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "selectedOptions", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SelectedOption" - } - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemTax', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "sku", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'totals', + type: { + kind: 'OBJECT', + name: 'DraftOrderTotals', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "unitOfMeasure", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'updatedAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "LineItemDiscount", - "fields": [ + kind: 'OBJECT', + name: 'DraftOrderAddress', + fields: [ + { + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "code", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, + { + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "LineItemFee", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'DraftOrderAddressInput', + inputFields: [ { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'addressLine1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'adminArea1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "LineItemInputDetailsInfo", - "inputFields": [ - { - "name": "productAssetUrl", - "type": { - "kind": "SCALAR", - "name": "String" - } }, { - "name": "selectedAddons", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "SelectedAddonInput" - } - } - } + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "selectedOptions", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "SelectedOptionInput" - } - } - } + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "sku", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - { - "name": "unitOfMeasure", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "LineItemInputShippingInfo", - "inputFields": [ + kind: 'OBJECT', + name: 'DraftOrderContact', + fields: [ { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderAddressInput" - } + name: 'address', + type: { + kind: 'OBJECT', + name: 'DraftOrderAddress', + }, + args: [], + isDeprecated: false, }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "ENUM", - "name": "LineItemModeInput", - "enumValues": [ + kind: 'OBJECT', + name: 'DraftOrderContext', + fields: [ { - "name": "CURBSIDE", - "isDeprecated": false + name: 'channelId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "DELIVERY", - "isDeprecated": false + name: 'owner', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "DIGITAL", - "isDeprecated": false + name: 'storeId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'DraftOrderLineItem', + fields: [ { - "name": "DRIVE_THRU", - "isDeprecated": false + name: 'createdAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "FOR_HERE", - "isDeprecated": false + name: 'details', + type: { + kind: 'OBJECT', + name: 'LineItemDetails', + }, + args: [], + isDeprecated: false, }, { - "name": "GENERAL_CONTAINER", - "isDeprecated": false - }, + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemDiscount', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemFee', + }, + }, + }, + args: [], + isDeprecated: false, + }, { - "name": "GIFT_CARD", - "isDeprecated": false + name: 'fulfilledAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "NONE", - "isDeprecated": false + name: 'fulfillmentChannelId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: true, }, { - "name": "NON_LODGING_NRR", - "isDeprecated": false + name: 'fulfillmentMode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "NON_LODGING_SALE", - "isDeprecated": false + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "PICKUP", - "isDeprecated": false + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "PURCHASE", - "isDeprecated": false + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "QUICK_STAY", - "isDeprecated": false + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemNote', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "REGULAR_STAY", - "isDeprecated": false + name: 'orderVersion', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "SHIP", - "isDeprecated": false + name: 'productId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "TO_GO", - "isDeprecated": false - } - ] - }, - { - "kind": "OBJECT", - "name": "LineItemNote", - "fields": [ + name: 'quantity', + type: { + kind: 'SCALAR', + name: 'Float', + }, + args: [], + isDeprecated: false, + }, { - "name": "author", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'returnQuantity', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "authorType", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'returnTotals', + type: { + kind: 'OBJECT', + name: 'LineItemReturnTotals', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "content", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'returnedAt', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "createdAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'serviceEndsAt', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "deletedAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'serviceStartAt', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'shipping', + type: { + kind: 'OBJECT', + name: 'DraftOrderContact', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'skuId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "shouldNotifyCustomer", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'status', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "LineItemReturnTotals", - "fields": [ + args: [], + isDeprecated: false, + }, + { + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + args: [], + isDeprecated: false, + }, { - "name": "discountTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemTax', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "feeTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'totals', + type: { + kind: 'OBJECT', + name: 'LineItemTotals', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "subTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'type', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'unitAmount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "total", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'updatedAt', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "LineItemTax", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'DraftOrderLineItemInput', + inputFields: [ { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'details', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputDetailsInfo', }, - "args": [], - "isDeprecated": false }, { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'DiscountInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'FeeInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'fulfillmentMode', + type: { + kind: 'ENUM', + name: 'LineItemModeInput', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "LineItemTotals", - "fields": [ + }, { - "name": "discountTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "feeTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, }, - "args": [], - "isDeprecated": false + defaultValue: '[]', }, { - "name": "subTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'productId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "taxTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'quantity', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "LineItemTotalsInput", - "inputFields": [ - { - "name": "discountTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } }, { - "name": "feeTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'serviceEndsAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, }, { - "name": "subTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'serviceStartAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, }, { - "name": "taxTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "ENUM", - "name": "LineItemTypesInput", - "enumValues": [ + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputShippingInfo', + }, + }, { - "name": "ALL", - "isDeprecated": false + name: 'skuId', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "DIGITAL", - "isDeprecated": false + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, }, { - "name": "PAY_LINK", - "isDeprecated": false + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxInput', + }, + }, + }, }, { - "name": "PHYSICAL", - "isDeprecated": false + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemTotalsInput', + }, }, { - "name": "SERVICE", - "isDeprecated": false + name: 'type', + type: { + kind: 'ENUM', + name: 'LineItemTypesInput', + }, + defaultValue: 'PHYSICAL', }, { - "name": "STAY", - "isDeprecated": false - } - ] + name: 'unitAmount', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + ], + isOneOf: false, }, { - "kind": "ENUM", - "name": "MetafieldTypeInput", - "enumValues": [ + kind: 'OBJECT', + name: 'DraftOrderStatuses', + fields: [ { - "name": "JSON", - "isDeprecated": false - } - ] - }, - { - "kind": "INPUT_OBJECT", - "name": "MoneyInput", - "inputFields": [ + name: 'fulfillmentStatus', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, { - "name": "currencyCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'paymentStatus', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - } - } + name: 'status', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "MoneyValue", - "fields": [ + kind: 'OBJECT', + name: 'DraftOrderTotals', + fields: [ { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'discountTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Int" + name: 'feeTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "Mutation", - "fields": [ + args: [], + isDeprecated: false, + }, { - "name": "applyCheckoutSessionDeliveryMethod", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'shippingTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionDeliveryMethodInput" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "applyCheckoutSessionDiscount", - "type": { - "kind": "OBJECT", - "name": "DraftOrder" + name: 'subTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionDiscountInput" - } - } - }, - { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "applyCheckoutSessionFulfillmentLocation", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'taxTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionFulfillmentLocationInput" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "applyCheckoutSessionShippingMethod", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'total', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ApplyShippingMethodInput" - } - } - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'ExchangeCheckoutTokenInput', + inputFields: [ { - "name": "calculateCheckoutSessionTaxes", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationResult" - }, - "args": [ - { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput" - } + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', }, - { - "name": "lines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxLineInput" - } - } - } - } - ], - "isDeprecated": false + }, }, { - "name": "confirmCheckoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'token', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationConfirmCheckoutSessionInput" - } - } + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + inputFields: [ + { + name: 'type', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', }, - { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isDeprecated": false + }, }, { - "name": "createCheckoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationCreateCheckoutSessionInput" - } - } - } - ], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'FeeInput', + inputFields: [ { - "name": "expireCheckoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isDeprecated": false }, { - "name": "removeAppliedCheckoutSessionShippingMethod", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "RemoveShippingMethodInput" - } - } - } - ], - "isDeprecated": false + defaultValue: 'false', }, { - "name": "updateCheckoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + }, + { + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', }, - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationUpdateCheckoutSessionInput" - } - } - } - ], - "isDeprecated": false + }, }, { - "name": "updateCheckoutSessionDraftOrder", - "type": { - "kind": "OBJECT", - "name": "DraftOrder" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationUpdateCheckoutSessionDraftOrderInput" - } - } - } - ], - "isDeprecated": false }, { - "name": "verifyAddress", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Address" - } - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationVerifyAddressInput" - } - } - } - ], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionDeliveryMethodInput", - "inputFields": [ - { - "name": "mode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "ENUM", - "name": "FulfillmentModeInput" - } - } - } - ], - "isOneOf": false + kind: 'SCALAR', + name: 'Float', }, { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionDiscountInput", - "inputFields": [ - { - "name": "discountCodes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionFulfillmentLocationInput", - "inputFields": [ - { - "name": "fulfillmentLocationId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationConfirmCheckoutSessionInput", - "inputFields": [ - { - "name": "billing", - "type": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutBillingInfoInput" - } - }, + kind: 'ENUM', + name: 'FulfillmentModeInput', + enumValues: [ { - "name": "fulfillmentEndAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "fulfillmentLocationId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fulfillmentStartAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "paymentProcessor", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "paymentProvider", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "paymentToken", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'CURBSIDE', + isDeprecated: false, }, { - "name": "paymentType", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingInfoInput" - } + name: 'DELIVERY', + isDeprecated: false, }, { - "name": "shippingLines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingLineInput" - } - } - } + name: 'DIGITAL', + isDeprecated: false, }, { - "name": "shippingTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } + name: 'DRIVE_THRU', + isDeprecated: false, }, { - "name": "taxTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationCreateCheckoutSessionInput", - "inputFields": [ - { - "name": "channelId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'FOR_HERE', + isDeprecated: false, }, { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + name: 'GENERAL_CONTAINER', + isDeprecated: false, + }, { - "name": "draftOrderId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "enableAddressAutocomplete", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableBillingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableLocalPickup", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'GIFT_CARD', + isDeprecated: false, }, { - "name": "enableNotesCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'NONE', + isDeprecated: false, }, { - "name": "enablePaymentMethodCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enablePhoneCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enablePromotionCodes", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'NON_LODGING_NRR', + isDeprecated: false, }, { - "name": "enableShippingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'NON_LODGING_SALE', + isDeprecated: false, }, { - "name": "enableSurcharge", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'PICKUP', + isDeprecated: false, }, { - "name": "enableTaxCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'PURCHASE', + isDeprecated: false, }, - { - "name": "enableTips", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + { + name: 'QUICK_STAY', + isDeprecated: false, }, { - "name": "enabledLocales", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'REGULAR_STAY', + isDeprecated: false, }, - { - "name": "enabledPaymentProviders", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + { + name: 'SHIP', + isDeprecated: false, }, { - "name": "environment", - "type": { - "kind": "ENUM", - "name": "CheckoutSessionEnvironment" - } + name: 'TO_GO', + isDeprecated: false, }, + ], + }, + { + kind: 'OBJECT', + name: 'GeoCoordinates', + fields: [ { - "name": "experimental_rules", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionExperimentalRulesInput" - } - }, - { - "name": "expiresAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'latitude', + type: { + kind: 'SCALAR', + name: 'Float', + }, + args: [], + isDeprecated: false, }, { - "name": "locations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLocationInput" - } - } - } - }, + name: 'longitude', + type: { + kind: 'SCALAR', + name: 'Float', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'SCALAR', + name: 'ID', + }, + { + kind: 'SCALAR', + name: 'Int', + }, + { + kind: 'OBJECT', + name: 'LineItemDetails', + fields: [ { - "name": "operatingHours", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionOperatingHoursMapInput" - } - }, - { - "name": "paymentMethods", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodsInput" - } - }, - { - "name": "returnUrl", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionShippingOptionsInput" - } - }, - { - "name": "sourceApp", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "storeId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "storeName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "successUrl", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "taxes", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionTaxesOptionsInput" - } - }, - { - "name": "url", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationUpdateCheckoutSessionDraftOrderInput", - "inputFields": [ - { - "name": "billing", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderBillingInfoInput" - } - }, - { - "name": "cartId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "context", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderContextInputUpdate" - } - } - }, - { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateDiscountInput" - } - } - } - }, - { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateFeeInput" - } - } - } - }, - { - "name": "lineItems", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftOrderLineItemsInput" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderShippingInfoInput" - } - }, - { - "name": "shippingLines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftShippingLineInput" - } - } - } - }, - { - "name": "staffUserIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "taxExempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateOrderTaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderTotalsInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationUpdateCheckoutSessionInput", - "inputFields": [ - { - "name": "channelId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "enableAddressAutocomplete", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableBillingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableLocalPickup", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableNotesCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enablePaymentMethodCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enablePhoneCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enablePromotionCodes", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'productAssetUrl', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "enableShippingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'selectedAddons', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SelectedAddon', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "enableSurcharge", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'selectedOptions', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SelectedOption', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "enableTaxCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'sku', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "enableTips", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'unitOfMeasure', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'LineItemDiscount', + fields: [ { - "name": "enabledLocales", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "enabledPaymentProviders", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, }, { - "name": "environment", - "type": { - "kind": "ENUM", - "name": "CheckoutSessionEnvironment" - } + name: 'code', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "experimental_rules", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionExperimentalRulesInput" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "expiresAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "locations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLocationInput" - } - } - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "operatingHours", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionOperatingHoursMapInput" - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'LineItemFee', + fields: [ { - "name": "paymentMethods", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodsInput" - } + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "returnUrl", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, }, { - "name": "sourceApp", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "storeId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "storeName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, + }, { - "name": "successUrl", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "url", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "MutationVerifyAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'LineItemInputDetailsInfo', + inputFields: [ + { + name: 'productAssetUrl', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, { - "name": "addressLine1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'selectedAddons', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'SelectedAddonInput', + }, + }, + }, + }, + { + name: 'selectedOptions', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'SelectedOptionInput', + }, + }, + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'sku', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'unitOfMeasure', + type: { + kind: 'SCALAR', + name: 'String', + }, }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'LineItemInputShippingInfo', + inputFields: [ { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderAddressInput', + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "ENUM", - "name": "NoteAuthorTypeInput", - "enumValues": [ + kind: 'ENUM', + name: 'LineItemModeInput', + enumValues: [ { - "name": "CUSTOMER", - "isDeprecated": false + name: 'CURBSIDE', + isDeprecated: false, }, { - "name": "MERCHANT", - "isDeprecated": false + name: 'DELIVERY', + isDeprecated: false, }, { - "name": "NONE", - "isDeprecated": false - } - ] - }, - { - "kind": "INPUT_OBJECT", - "name": "NoteInput", - "inputFields": [ + name: 'DIGITAL', + isDeprecated: false, + }, + { + name: 'DRIVE_THRU', + isDeprecated: false, + }, + { + name: 'FOR_HERE', + isDeprecated: false, + }, + { + name: 'GENERAL_CONTAINER', + isDeprecated: false, + }, + { + name: 'GIFT_CARD', + isDeprecated: false, + }, { - "name": "author", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'NONE', + isDeprecated: false, }, { - "name": "authorType", - "type": { - "kind": "ENUM", - "name": "NoteAuthorTypeInput" - } + name: 'NON_LODGING_NRR', + isDeprecated: false, }, { - "name": "content", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'NON_LODGING_SALE', + isDeprecated: false, }, { - "name": "createdAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'PICKUP', + isDeprecated: false, }, { - "name": "deletedAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'PURCHASE', + isDeprecated: false, }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'QUICK_STAY', + isDeprecated: false, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } + name: 'REGULAR_STAY', + isDeprecated: false, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'SHIP', + isDeprecated: false, }, { - "name": "shouldNotifyCustomer", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - } + name: 'TO_GO', + isDeprecated: false, + }, ], - "isOneOf": false }, { - "kind": "SCALAR", - "name": "Null" + kind: 'OBJECT', + name: 'LineItemNote', + fields: [ + { + name: 'author', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'authorType', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'content', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'createdAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'deletedAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'shouldNotifyCustomer', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "OrderAddressInput", - "inputFields": [ + kind: 'OBJECT', + name: 'LineItemReturnTotals', + fields: [ { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'discountTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'feeTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'subTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'taxTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'total', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'LineItemTax', + fields: [ { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, + }, + { + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'LineItemTotals', + fields: [ + { + name: 'discountTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'feeTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'subTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'taxTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'LineItemTotalsInput', + inputFields: [ + { + name: 'discountTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'feeTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'subTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'taxTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'ENUM', + name: 'LineItemTypesInput', + enumValues: [ + { + name: 'ALL', + isDeprecated: false, + }, + { + name: 'DIGITAL', + isDeprecated: false, + }, + { + name: 'PAY_LINK', + isDeprecated: false, + }, + { + name: 'PHYSICAL', + isDeprecated: false, + }, + { + name: 'SERVICE', + isDeprecated: false, + }, + { + name: 'STAY', + isDeprecated: false, + }, + ], + }, + { + kind: 'ENUM', + name: 'MetafieldTypeInput', + enumValues: [ + { + name: 'JSON', + isDeprecated: false, + }, + ], + }, + { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + inputFields: [ + { + name: 'currencyCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'MoneyValue', + fields: [ + { + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'value', + type: { + kind: 'SCALAR', + name: 'Int', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'Mutation', + fields: [ + { + name: 'applyCheckoutSessionDeliveryMethod', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionDeliveryMethodInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'applyCheckoutSessionDiscount', + type: { + kind: 'OBJECT', + name: 'DraftOrder', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionDiscountInput', + }, + }, + }, + { + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'applyCheckoutSessionFulfillmentLocation', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionFulfillmentLocationInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'applyCheckoutSessionShippingMethod', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ApplyShippingMethodInput', + }, + }, + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'calculateCheckoutSessionTaxes', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculationResult', + }, + args: [ + { + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', + }, + }, + { + name: 'lines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxLineInput', + }, + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'confirmCheckoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationConfirmCheckoutSessionInput', + }, + }, + }, + { + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'createCheckoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationCreateCheckoutSessionInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'exchangeCheckoutToken', + type: { + kind: 'OBJECT', + name: 'CheckoutAuthToken', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationExchangeCheckoutTokenInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'expireCheckoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'refreshCheckoutToken', + type: { + kind: 'OBJECT', + name: 'CheckoutAuthToken', + }, + args: [], + isDeprecated: false, + }, + { + name: 'removeAppliedCheckoutSessionShippingMethod', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'RemoveShippingMethodInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'updateCheckoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationUpdateCheckoutSessionInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'updateCheckoutSessionDraftOrder', + type: { + kind: 'OBJECT', + name: 'DraftOrder', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationUpdateCheckoutSessionDraftOrderInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'verifyAddress', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'Address', + }, + }, + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationVerifyAddressInput', + }, + }, + }, + ], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionDeliveryMethodInput', + inputFields: [ + { + name: 'mode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'ENUM', + name: 'FulfillmentModeInput', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionDiscountInput', + inputFields: [ + { + name: 'discountCodes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionFulfillmentLocationInput', + inputFields: [ + { + name: 'fulfillmentLocationId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationConfirmCheckoutSessionInput', + inputFields: [ + { + name: 'billing', + type: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutBillingInfoInput', + }, + }, + { + name: 'fulfillmentEndAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'fulfillmentLocationId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'fulfillmentStartAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'paymentProcessor', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'paymentProvider', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'paymentToken', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'paymentType', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingInfoInput', + }, + }, + { + name: 'shippingLines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingLineInput', + }, + }, + }, + }, + { + name: 'shippingTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + { + name: 'taxTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationCreateCheckoutSessionInput', + inputFields: [ + { + name: 'channelId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'draftOrderId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'enableAddressAutocomplete', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableBillingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableLocalPickup', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableNotesCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePaymentMethodCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePhoneCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePromotionCodes', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableShippingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableSurcharge', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableTaxCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableTips', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enabledLocales', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'enabledPaymentProviders', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'environment', + type: { + kind: 'ENUM', + name: 'CheckoutSessionEnvironment', + }, + }, + { + name: 'experimental_rules', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionExperimentalRulesInput', + }, + }, + { + name: 'expiresAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'lineItems', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLineItemInput', + }, + }, + }, + }, + { + name: 'locations', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLocationInput', + }, + }, + }, + }, + { + name: 'operatingHours', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionOperatingHoursMapInput', + }, + }, + { + name: 'paymentMethods', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodsInput', + }, + }, + { + name: 'returnUrl', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionShippingOptionsInput', + }, + }, + { + name: 'sourceApp', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'storeId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'storeName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'successUrl', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'taxes', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionTaxesOptionsInput', + }, + }, + { + name: 'url', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationExchangeCheckoutTokenInput', + inputFields: [ + { + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'token', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationUpdateCheckoutSessionDraftOrderInput', + inputFields: [ + { + name: 'billing', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderBillingInfoInput', + }, + }, + { + name: 'cartId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'context', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderContextInputUpdate', + }, + }, + }, + { + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateDiscountInput', + }, + }, + }, + }, + { + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateFeeInput', + }, + }, + }, + }, + { + name: 'lineItems', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftOrderLineItemsInput', + }, + }, + { + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, + }, + { + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, + }, + }, + { + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderShippingInfoInput', + }, + }, + { + name: 'shippingLines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftShippingLineInput', + }, + }, + }, + }, + { + name: 'staffUserIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'taxExempted', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateOrderTaxInput', + }, + }, + }, + }, + { + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderTotalsInput', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationUpdateCheckoutSessionInput', + inputFields: [ + { + name: 'channelId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'enableAddressAutocomplete', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableBillingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableLocalPickup', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableNotesCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePaymentMethodCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePhoneCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePromotionCodes', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableShippingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableSurcharge', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableTaxCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableTips', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enabledLocales', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'enabledPaymentProviders', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'environment', + type: { + kind: 'ENUM', + name: 'CheckoutSessionEnvironment', + }, + }, + { + name: 'experimental_rules', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionExperimentalRulesInput', + }, + }, + { + name: 'expiresAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'locations', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLocationInput', + }, + }, + }, + }, + { + name: 'operatingHours', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionOperatingHoursMapInput', + }, + }, + { + name: 'paymentMethods', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodsInput', + }, + }, + { + name: 'returnUrl', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'sourceApp', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'storeId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'storeName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'successUrl', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'url', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationVerifyAddressInput', + inputFields: [ + { + name: 'addressLine1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'ENUM', + name: 'NoteAuthorTypeInput', + enumValues: [ + { + name: 'CUSTOMER', + isDeprecated: false, + }, + { + name: 'MERCHANT', + isDeprecated: false, + }, + { + name: 'NONE', + isDeprecated: false, + }, + ], + }, + { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + inputFields: [ + { + name: 'author', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'authorType', + type: { + kind: 'ENUM', + name: 'NoteAuthorTypeInput', + }, + }, + { + name: 'content', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'createdAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'deletedAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, + }, + { + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, + }, + { + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'shouldNotifyCustomer', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'SCALAR', + name: 'Null', + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderAddressInput', + inputFields: [ + { + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderBillingInfoInput', + inputFields: [ + { + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderAddressInput', + }, + }, + { + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderContextInputUpdate', + inputFields: [ + { + name: 'channelId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'storeId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'OrderMetafield', + fields: [ + { + name: 'key', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'type', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'value', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + inputFields: [ + { + name: 'key', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'type', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'ENUM', + name: 'MetafieldTypeInput', + }, + }, + defaultValue: 'JSON', + }, + { + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderShippingInfoInput', + inputFields: [ + { + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderAddressInput', + }, + }, + { + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderTotalsInput', + inputFields: [ + { + name: 'discountTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'feeTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'shippingTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'subTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'taxTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'total', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'PageInfo', + fields: [ + { + name: 'endCursor', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'hasNextPage', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'hasPreviousPage', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'startCursor', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'PriceAdjustmentShippingLineInput', + inputFields: [ + { + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'subTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'PriceAdjustmentsCalculationResult', + fields: [ + { + name: 'adjustments', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CalculatedAdjustmentOutput', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'lines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CalculatedLineOutput', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'totalDiscountAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', + }, + args: [], + isDeprecated: false, + }, + { + name: 'totalFeeAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'Query', + fields: [ + { + name: 'checkoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [], + isDeprecated: false, + }, + { + name: 'validateCheckoutToken', + type: { + kind: 'OBJECT', + name: 'CheckoutTokenValidation', + }, + args: [ + { + name: 'token', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'RemoveShippingMethodInput', + inputFields: [ + { + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'serviceCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'SKU', + fields: [ + { + name: 'attributeValues', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUAttributeValue', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'attributes', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUAttribute', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'code', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'createdAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'disableShipping', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, + }, + { + name: 'htmlDescription', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'mediaUrls', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'metafields', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUMetafieldsConnection', + }, + }, + args: [ + { + name: 'after', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'before', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'first', + type: { + kind: 'SCALAR', + name: 'Int', + }, + }, + { + name: 'last', + type: { + kind: 'SCALAR', + name: 'Int', + }, + }, + ], + isDeprecated: false, + }, + { + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'prices', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUPrice', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'status', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'unitOfWeight', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'updatedAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'weight', + type: { + kind: 'SCALAR', + name: 'Float', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUAttribute', + fields: [ + { + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'htmlDescription', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'values', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUAttributeValue', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUAttributeValue', + fields: [ + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUMetafield', + fields: [ + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'key', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'namespace', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUMetafieldsConnection', + fields: [ + { + name: 'edges', + type: { + kind: 'LIST', + ofType: { + kind: 'OBJECT', + name: 'SKUMetafieldsConnectionEdge', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'pageInfo', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'PageInfo', + }, + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUMetafieldsConnectionEdge', + fields: [ + { + name: 'cursor', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'node', + type: { + kind: 'OBJECT', + name: 'SKUMetafield', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUPrice', + fields: [ + { + name: 'currencyCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SelectedAddon', + fields: [ + { + name: 'attribute', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'sku', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'values', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SelectedAddonValue', + }, + }, + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'SelectedAddonInput', + inputFields: [ + { + name: 'attribute', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'sku', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'values', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'SelectedAddonValueInput', + }, + }, + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'SelectedAddonValue', + fields: [ + { + name: 'costAdjustment', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'SelectedAddonValueInput', + inputFields: [ + { + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + { + name: 'amountIncreased', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'costAdjustment', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'SelectedOption', + fields: [ + { + name: 'attribute', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'values', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'SelectedOptionInput', + inputFields: [ + { + name: 'attribute', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'values', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, }, - { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "OrderBillingInfoInput", - "inputFields": [ + kind: 'OBJECT', + name: 'ShippingLine', + fields: [ { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderAddressInput" - } + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemDiscount', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "OrderContextInputUpdate", - "inputFields": [ - { - "name": "channelId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "storeId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "OrderMetafield", - "fields": [ - { - "name": "key", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "type", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemTax', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'totals', + type: { + kind: 'OBJECT', + name: 'ShippingLineTotals', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput", - "inputFields": [ + kind: 'OBJECT', + name: 'ShippingLineTotals', + fields: [ { - "name": "key", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'subTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "type", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "ENUM", - "name": "MetafieldTypeInput" - } + name: 'taxTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "defaultValue": "JSON" + args: [], + isDeprecated: false, }, - { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "OrderShippingInfoInput", - "inputFields": [ - { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderAddressInput" - } - }, + kind: 'ENUM', + name: 'ShippingLineType', + enumValues: [ { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'FEE', + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'SHIPPING', + isDeprecated: false, }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'SKU', + isDeprecated: false, }, - { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false }, { - "kind": "INPUT_OBJECT", - "name": "OrderTotalsInput", - "inputFields": [ + kind: 'OBJECT', + name: 'ShippingRate', + fields: [ { - "name": "discountTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "feeTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'carrierCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "shippingTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'cost', + type: { + kind: 'OBJECT', + name: 'ShippingRateMoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "subTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "taxTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'displayName', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "total", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "PageInfo", - "fields": [ - { - "name": "endCursor", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "hasNextPage", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "hasPreviousPage", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - "args": [], - "isDeprecated": false + name: 'features', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "startCursor", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'maxDeliveryDate', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "PriceAdjustmentShippingLineInput", - "inputFields": [ - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'minDeliveryDate', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "subTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } + name: 'serviceCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "PriceAdjustmentsCalculationResult", - "fields": [ + kind: 'OBJECT', + name: 'ShippingRateCalculationResult', + fields: [ { - "name": "adjustments", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CalculatedAdjustmentOutput" - } - } + name: 'rates', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'ShippingRate', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, - { - "name": "lines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CalculatedLineOutput" - } - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "totalDiscountAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "totalFeeAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] - }, + interfaces: [], + }, { - "kind": "OBJECT", - "name": "Query", - "fields": [ + kind: 'OBJECT', + name: 'ShippingRateMoneyValue', + fields: [ { - "name": "checkoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "RemoveShippingMethodInput", - "inputFields": [ - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + args: [], + isDeprecated: false, }, { - "name": "serviceCode", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'value', + type: { + kind: 'SCALAR', + name: 'Float', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "SKU", - "fields": [ + kind: 'OBJECT', + name: 'SimpleMoney', + fields: [ { - "name": "attributeValues", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUAttributeValue" - } - } - } + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "attributes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUAttribute" - } - } - } + name: 'value', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'SCALAR', + name: 'String', + }, + { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', + inputFields: [ { - "name": "code", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - }, - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false }, { - "name": "disableShipping", - "type": { - "kind": "SCALAR", - "name": "Boolean" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "htmlDescription", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "ID" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "mediaUrls", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUMetafieldsConnection" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Int" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Int" - } - } - ], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "prices", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUPrice" - } - } - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "status", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "unitOfWeight", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "updatedAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "weight", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "SKUAttribute", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'TaxInput', + inputFields: [ { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "htmlDescription", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + defaultValue: 'false', }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "ID" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "values", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUAttributeValue" - } - } - } - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SKUAttributeValue", - "fields": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "ID" - } + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "SKUMetafield", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'TaxLineInput', + inputFields: [ { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "ID" - } + name: 'classification', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "key", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', }, - "args": [], - "isDeprecated": false }, { - "name": "namespace", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'origin', + type: { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SKUMetafieldsConnection", - "fields": [ + }, { - "name": "edges", - "type": { - "kind": "LIST", - "ofType": { - "kind": "OBJECT", - "name": "SKUMetafieldsConnectionEdge" - } + name: 'quantity', + type: { + kind: 'SCALAR', + name: 'Int', }, - "args": [], - "isDeprecated": false }, { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo" - } + name: 'subtotalPrice', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SKUMetafieldsConnectionEdge", - "fields": [ + }, { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'type', + type: { + kind: 'ENUM', + name: 'ShippingLineType', }, - "args": [], - "isDeprecated": false }, { - "name": "node", - "type": { - "kind": "OBJECT", - "name": "SKUMetafield" + name: 'unitPrice', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "SKUPrice", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDiscountInput', + inputFields: [ { - "name": "currencyCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', }, - "args": [], - "isDeprecated": false }, { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SelectedAddon", - "fields": [ + defaultValue: 'false', + }, { - "name": "attribute", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'code', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "sku", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "values", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SelectedAddonValue" - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "SelectedAddonInput", - "inputFields": [ - { - "name": "attribute", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } }, { - "name": "sku", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "values", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "SelectedAddonValueInput" - } - } - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "SelectedAddonValue", - "fields": [ - { - "name": "costAdjustment", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "SelectedAddonValueInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - }, - { - "name": "amountIncreased", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "costAdjustment", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "SelectedOption", - "fields": [ - { - "name": "attribute", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "values", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + }, + { + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "SelectedOptionInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftLineItemInput', + inputFields: [ { - "name": "attribute", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'details', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputDetailsInfo', + }, }, { - "name": "values", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "ShippingLine", - "fields": [ - { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'DiscountInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemDiscount" - } - } + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'FeeInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'fulfillmentChannelId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fulfillmentMode', + type: { + kind: 'ENUM', + name: 'LineItemModeInput', }, - "args": [], - "isDeprecated": false }, { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemTax" - } - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "totals", - "type": { - "kind": "OBJECT", - "name": "ShippingLineTotals" + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "ShippingLineTotals", - "fields": [ + defaultValue: '[]', + }, { - "name": "subTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'productId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "taxTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'quantity', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "ENUM", - "name": "ShippingLineType", - "enumValues": [ - { - "name": "FEE", - "isDeprecated": false }, { - "name": "SHIPPING", - "isDeprecated": false + name: 'serviceEndsAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, }, { - "name": "SKU", - "isDeprecated": false - } - ] - }, - { - "kind": "OBJECT", - "name": "ShippingRate", - "fields": [ - { - "name": "carrierCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'serviceStartAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false }, { - "name": "cost", - "type": { - "kind": "OBJECT", - "name": "ShippingRateMoneyValue" + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputShippingInfo', }, - "args": [], - "isDeprecated": false }, { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'skuId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "displayName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "features", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "maxDeliveryDate", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemTotalsInput', }, - "args": [], - "isDeprecated": false }, { - "name": "minDeliveryDate", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'type', + type: { + kind: 'ENUM', + name: 'LineItemTypesInput', }, - "args": [], - "isDeprecated": false }, { - "name": "serviceCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'unitAmount', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "ShippingRateCalculationResult", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftOrderInput', + inputFields: [ { - "name": "rates", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "ShippingRate" - } - } + name: 'lineItems', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftOrderLineItemsInput', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "ShippingRateMoneyValue", - "fields": [ + }, { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'taxExempted', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "SimpleMoney", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftOrderLineItemsInput', + inputFields: [ + { + name: 'add', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CreateDraftLineItemInput', + }, + }, + }, + }, { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'remove', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'update', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftLineItemInput', + }, + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "SCALAR", - "name": "String" - }, - { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftShippingLineInput', + inputFields: [ + { + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, + }, + { + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateDiscountInput', + }, + }, + }, + }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateFeeInput', + }, + }, + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateTaxInput', + }, + }, + }, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftShippingLineTotalsInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "TaxInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftShippingLineTotalsInput', + inputFields: [ + { + name: 'subTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, + }, { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'taxTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'UpdateFeeInput', + inputFields: [ { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', }, - "defaultValue": "false" }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "TaxLineInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + inputFields: [ { - "name": "classification", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput" - } + name: 'value', + type: { + kind: 'SCALAR', + name: 'Int', + }, }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'UpdateNoteInput', + inputFields: [ { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + name: 'author', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, { - "name": "origin", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput" - } + name: 'authorType', + type: { + kind: 'ENUM', + name: 'NoteAuthorTypeInput', + }, }, { - "name": "quantity", - "type": { - "kind": "SCALAR", - "name": "Int" - } + name: 'content', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "subtotalPrice", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "type", - "type": { - "kind": "ENUM", - "name": "ShippingLineType" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "unitPrice", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'shouldNotifyCustomer', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "UpdateDiscountInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateOrderTaxInput', + inputFields: [ { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'additional', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', }, - "defaultValue": "false" }, { - "name": "code", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftLineItemInput", - "inputFields": [ - { - "name": "details", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputDetailsInfo" - } - }, - { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DiscountInput" - } - } - } - }, - { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "FeeInput" - } - } - } - }, - { - "name": "fulfillmentChannelId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fulfillmentMode", - "type": { - "kind": "ENUM", - "name": "LineItemModeInput" - } - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - }, - "defaultValue": "[]" - }, - { - "name": "productId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "quantity", - "type": { - "kind": "SCALAR", - "name": "Float" - } - }, - { - "name": "serviceEndsAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "serviceStartAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputShippingInfo" - } - }, - { - "name": "skuId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemTotalsInput" - } - }, - { - "name": "type", - "type": { - "kind": "ENUM", - "name": "LineItemTypesInput" - } - }, - { - "name": "unitAmount", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftOrderInput", - "inputFields": [ - { - "name": "lineItems", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftOrderLineItemsInput" - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - } - }, - { - "name": "taxExempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftOrderLineItemsInput", - "inputFields": [ - { - "name": "add", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CreateDraftLineItemInput" - } - } - } - }, - { - "name": "remove", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "update", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftLineItemInput" - } - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftShippingLineInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - }, - { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateDiscountInput" - } - } - } - }, - { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } - }, - { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateFeeInput" - } - } - } - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateTaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftShippingLineTotalsInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftShippingLineTotalsInput", - "inputFields": [ - { - "name": "subTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "taxTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateFeeInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "false" }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput", - "inputFields": [ - { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, }, - { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Int" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "UpdateNoteInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateShippingLineInput', + inputFields: [ { - "name": "author", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, }, { - "name": "authorType", - "type": { - "kind": "ENUM", - "name": "NoteAuthorTypeInput" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "content", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "shouldNotifyCustomer", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "false" - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateOrderTaxInput", - "inputFields": [ + }, { - "name": "additional", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "false" }, { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateTaxInput', + }, + }, + }, }, { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateShippingLineTotalsInput', }, - "defaultValue": "false" }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'UpdateShippingLineTotalsInput', + inputFields: [ { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'subTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'taxTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, }, - { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "UpdateShippingLineInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateTaxInput', + inputFields: [ + { + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, + }, { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateTaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateShippingLineTotalsInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateShippingLineTotalsInput", - "inputFields": [ - { - "name": "subTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - }, - { - "name": "taxTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateTaxInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - }, - { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" - }, - "defaultValue": "false" - }, - { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, }, { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false - } + isOneOf: false, + }, ], - "directives": [] - } + directives: [], + }, } as const; -export { introspection }; \ No newline at end of file +export { introspection }; diff --git a/packages/react/src/lib/godaddy/mutations.ts b/packages/react/src/lib/godaddy/mutations.ts index a05f89c2..8e01fb28 100644 --- a/packages/react/src/lib/godaddy/mutations.ts +++ b/packages/react/src/lib/godaddy/mutations.ts @@ -394,3 +394,23 @@ export const ApplyCheckoutSessionFulfillmentLocationMutation = graphql(` } } `); + +export const ExchangeCheckoutTokenMutation = graphql(` + mutation ExchangeCheckoutToken($input: MutationExchangeCheckoutTokenInput!) { + exchangeCheckoutToken(input: $input) { + jwt + expiresAt + expiresIn + } + } +`); + +export const RefreshCheckoutTokenMutation = graphql(` + mutation RefreshCheckoutToken { + refreshCheckoutToken { + jwt + expiresAt + expiresIn + } + } +`); diff --git a/packages/react/src/lib/godaddy/queries.ts b/packages/react/src/lib/godaddy/queries.ts index d341621b..859e71fb 100644 --- a/packages/react/src/lib/godaddy/queries.ts +++ b/packages/react/src/lib/godaddy/queries.ts @@ -1,4 +1,194 @@ -import { graphql } from '@/gql.tada'; +import { graphql } from "@/gql.tada"; + +export const GetCheckoutSessionQuery = graphql(` + query GetCheckoutSession { + checkoutSession { + id + token + sourceApp + returnUrl + successUrl + storeId + channelId + customerId + storeName + environment + enableTips + enabledLocales + enableSurcharge + enableLocalPickup + enablePhoneCollection + enableNotesCollection + enablePromotionCodes + enableTaxCollection + enableShippingAddressCollection + enableBillingAddressCollection + enableAddressAutocomplete + experimental_rules { + freeShipping { + enabled + minimumOrderTotal + } + } + shipping { + originAddress { + addressLine1 + addressLine2 + addressLine3 + postalCode + countryCode + adminArea1 + adminArea2 + adminArea3 + adminArea4 + } + } + paymentMethods { + card { + processor + checkoutTypes + } + express { + processor + checkoutTypes + } + applePay { + processor + checkoutTypes + } + googlePay { + processor + checkoutTypes + } + paypal { + processor + checkoutTypes + } + paze { + processor + checkoutTypes + } + offline { + processor + checkoutTypes + } + } + locations { + id + isDefault + address { + addressLine1 + addressLine2 + addressLine3 + postalCode + countryCode + adminArea1 + adminArea2 + adminArea3 + adminArea4 + } + operatingHours { + pickupWindowInDays + leadTime + timeZone + hours { + monday { + enabled + openTime + closeTime + } + tuesday { + enabled + openTime + closeTime + } + wednesday { + enabled + openTime + closeTime + } + thursday { + enabled + openTime + closeTime + } + friday { + enabled + openTime + closeTime + } + saturday { + enabled + openTime + closeTime + } + sunday { + enabled + openTime + closeTime + } + } + } + } + defaultOperatingHours { + pickupWindowInDays + leadTime + timeZone + hours { + monday { + enabled + openTime + closeTime + } + tuesday { + enabled + openTime + closeTime + } + wednesday { + enabled + openTime + closeTime + } + thursday { + enabled + openTime + closeTime + } + friday { + enabled + openTime + closeTime + } + saturday { + enabled + openTime + closeTime + } + sunday { + enabled + openTime + closeTime + } + } + } + draftOrder { + id + statuses { + fulfillmentStatus + paymentStatus + status + } + totals { + subTotal { + currencyCode + value + } + } + } + } + } +`); export const AddressMatchesQuery = graphql(` query CheckoutSessionWithAddressMatches($query: String!) { diff --git a/packages/react/src/lib/godaddy/server.ts b/packages/react/src/lib/godaddy/server.ts new file mode 100644 index 00000000..4f354412 --- /dev/null +++ b/packages/react/src/lib/godaddy/server.ts @@ -0,0 +1,37 @@ +'use server'; + +import type { ResultOf } from '@/gql.tada'; +import { graphqlRequestWithErrors } from '@/lib/graphql-with-errors'; +import { getEnvVar } from '@/lib/utils'; +import type { CheckoutSessionInput } from '@/types'; +import { CreateCheckoutSessionMutation } from './mutations'; + +function getHostByEnvironment(): string { + if (getEnvVar('GODADDY_ENV') === 'local') { + return 'http://localhost:3000'; + } + return `https://checkout.commerce.${getEnvVar('GODADDY_HOST') || 'api.godaddy.com'}`; +} + +export async function createCheckoutSession( + input: CheckoutSessionInput['input'], + { accessToken }: { accessToken: string } +): Promise< + ResultOf['createCheckoutSession'] +> { + if (!accessToken) { + throw new Error('No public access token provided'); + } + + const GODADDY_HOST = getHostByEnvironment(); + const response = await graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + CreateCheckoutSessionMutation, + { input }, + { Authorization: `Bearer ${accessToken}` } + ); + + return response.createCheckoutSession; +} diff --git a/packages/react/src/lib/graphql-with-errors.ts b/packages/react/src/lib/graphql-with-errors.ts index e27b7755..250db318 100644 --- a/packages/react/src/lib/graphql-with-errors.ts +++ b/packages/react/src/lib/graphql-with-errors.ts @@ -1,5 +1,3 @@ -'use server'; - import type { DocumentNode } from 'graphql'; import { ClientError, request, type Variables } from 'graphql-request'; diff --git a/packages/react/src/lib/utils.ts b/packages/react/src/lib/utils.ts index 9ad0df42..86722cd4 100644 --- a/packages/react/src/lib/utils.ts +++ b/packages/react/src/lib/utils.ts @@ -4,3 +4,42 @@ import { twMerge } from 'tailwind-merge'; export function cn(...inputs: ClassValue[]) { return twMerge(clsx(inputs)); } + +export function getUrlHash(location: Location) { + return location.hash.replace(/^#/, ''); +} + +export function getSessionIdFromPath(location: Location) { + const segments = location.pathname.split('/').filter(Boolean); + return segments[segments.length - 1]; +} + +/** + * Get an environment variable with framework-specific prefix detection. + * Checks for Next.js (NEXT_PUBLIC_), Vite (VITE_), and unprefixed variables. + * + * @param key - The environment variable name without framework prefix + * @returns The environment variable value or empty string if not found + * + * @example + * ```ts + * // Automatically checks NEXT_PUBLIC_STRIPE_KEY, VITE_STRIPE_KEY, and STRIPE_KEY + * const stripeKey = getEnvVar('STRIPE_KEY'); + * ``` + */ +export function getEnvVar(key: string): string { + const prefixes = ['NEXT_PUBLIC_', 'VITE_', '']; + + for (const prefix of prefixes) { + // In Next.js, process.env.NEXT_PUBLIC_* is replaced at build time + // But since this is a library, we need to access it from the consuming app's env + if (typeof process !== 'undefined' && process.env) { + const value = process.env[`${prefix}${key}`]; + if (value !== undefined) { + return value; + } + } + } + + return ''; +} diff --git a/packages/react/src/server.ts b/packages/react/src/server.ts index 34dc7c19..40174066 100644 --- a/packages/react/src/server.ts +++ b/packages/react/src/server.ts @@ -1,87 +1 @@ -'use server'; - -import type { CheckoutSessionInput, CheckoutSessionOptions } from '@/types'; -import * as GoDaddy from './lib/godaddy/godaddy'; - -let accessToken: string | undefined; -let accessTokenExpiresAt: number | undefined; - -export async function createCheckoutSession( - input: CheckoutSessionInput['input'], - options?: CheckoutSessionOptions -) { - const CLIENT_ID = options?.auth?.clientId || ''; - const CLIENT_SECRET = options?.auth?.clientSecret || ''; - - const now = Date.now() / 1000; // seconds - - if ( - !accessToken || - !accessTokenExpiresAt || - accessTokenExpiresAt - 60 < now // refresh 1 min before expiry - ) { - const getAccessTokenResponse = await getAccessToken({ - clientId: CLIENT_ID, - clientSecret: CLIENT_SECRET, - }); - - accessToken = getAccessTokenResponse?.access_token; - accessTokenExpiresAt = now + (getAccessTokenResponse?.expires_in || 0); - } - - if (!accessToken) { - throw new Error('Failed to get access token'); - } - - return await GoDaddy.createCheckoutSession(input, { - accessToken, - }); -} - -function getHostByEnvironment(): string { - return `https://${process.env.GODADDY_HOST || process.env.NEXT_PUBLIC_GODADDY_HOST || 'api.godaddy.com'}`; -} - -async function getAccessToken({ - clientId, - clientSecret, -}: { - clientId: string; - clientSecret: string; -}) { - if (!clientId || !clientSecret) { - return; - } - - const host = getHostByEnvironment(); - - const data = new URLSearchParams(); - data.append('grant_type', 'client_credentials'); - data.append('client_id', clientId); - data.append('client_secret', clientSecret); - data.append( - 'scope', - 'commerce.product:read commerce.order:read commerce.order:update location.address-verification:execute' - ); - const response = await fetch(`${host}/v2/oauth2/token`, { - method: 'POST', - headers: { - 'Content-Type': 'application/x-www-form-urlencoded', - }, - body: data.toString(), - cache: 'no-store', - }); - - if (!response.ok) { - throw new Error( - `Failed to get access token: ${response.status} ${response.statusText}` - ); - } - - const result = (await response.json()) as { - access_token: string; - scope: string; - expires_in: number; - }; - return result; -} +export { createCheckoutSession } from './lib/godaddy/server'; diff --git a/packages/react/src/tracking/tracking-provider.tsx b/packages/react/src/tracking/tracking-provider.tsx index 3b8ddc97..a0f7808d 100644 --- a/packages/react/src/tracking/tracking-provider.tsx +++ b/packages/react/src/tracking/tracking-provider.tsx @@ -18,7 +18,7 @@ export function TrackingProvider({ trackingProperties, }: { children: React.ReactNode; - session?: CheckoutSession; + session?: CheckoutSession | null; trackingEnabled?: boolean; trackingProperties?: TrackingProperties; }) { @@ -40,7 +40,7 @@ function TrackingInitializer({ trackingEnabled, trackingProperties = {}, }: { - session?: CheckoutSession; + session?: CheckoutSession | null; trackingEnabled: boolean; trackingProperties?: TrackingProperties; }) { diff --git a/packages/react/tsdown.config.ts b/packages/react/tsdown.config.ts index 59b43183..b9087090 100644 --- a/packages/react/tsdown.config.ts +++ b/packages/react/tsdown.config.ts @@ -9,6 +9,7 @@ export default defineConfig({ plugins: [], tsconfig: './tsconfig.json', dts: true, + external: [/^react($|\/)/, /^react-dom($|\/)/], onSuccess: async () => { // biome-ignore lint/suspicious/noConsole: check build status console.log('Transpiling CSS...'); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 85b62e10..affc2909 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -256,76 +256,76 @@ importers: dependencies: '@floating-ui/react': specifier: ^0.27.8 - version: 0.27.16(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 0.27.16(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@godaddy/localizations': specifier: workspace:* version: link:../localizations '@hookform/resolvers': specifier: ^4.0.0 - version: 4.1.3(react-hook-form@7.65.0(react@19.1.1)) + version: 4.1.3(react-hook-form@7.65.0(react@19.2.0)) '@paypal/react-paypal-js': specifier: ^8.8.3 - version: 8.9.2(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 8.9.2(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-accordion': specifier: ^1.2.3 - version: 1.2.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.2.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-alert-dialog': specifier: ^1.1.6 - version: 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-aspect-ratio': specifier: ^1.1.2 - version: 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-avatar': specifier: ^1.1.3 - version: 1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-checkbox': specifier: ^1.1.4 - version: 1.3.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.3.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-collapsible': specifier: ^1.1.3 - version: 1.1.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-dialog': specifier: ^1.1.6 - version: 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-label': specifier: ^2.1.2 - version: 2.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 2.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-popover': specifier: ^1.1.6 - version: 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-radio-group': specifier: ^1.2.3 - version: 1.3.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.3.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-scroll-area': specifier: ^1.2.3 - version: 1.2.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.2.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-select': specifier: ^2.1.6 - version: 2.2.6(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 2.2.6(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-separator': specifier: ^1.1.2 - version: 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-slot': specifier: ^1.1.2 - version: 1.2.3(@types/react@19.2.2)(react@19.1.1) + version: 1.2.3(@types/react@19.2.2)(react@19.2.0) '@radix-ui/react-switch': specifier: ^1.1.3 - version: 1.2.6(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.2.6(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-toast': specifier: ^1.2.6 - version: 1.2.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.2.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-toggle': specifier: ^1.1.2 - version: 1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-toggle-group': specifier: ^1.1.2 - version: 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@radix-ui/react-tooltip': specifier: ^1.1.8 - version: 1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@stripe/react-stripe-js': specifier: ^3.7.0 - version: 3.10.0(@stripe/stripe-js@7.9.0)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 3.10.0(@stripe/stripe-js@7.9.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@stripe/stripe-js': specifier: ^7.3.1 version: 7.9.0 @@ -337,10 +337,10 @@ importers: version: 4.1.15(vite@5.4.21(@types/node@22.18.12)(lightningcss@1.30.2)) '@tanstack/react-pacer': specifier: ^0.2.0 - version: 0.2.0(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 0.2.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@tanstack/react-query': specifier: ^5.66.0 - version: 5.90.5(react@19.1.1) + version: 5.90.5(react@19.2.0) class-variance-authority: specifier: ^0.7.1 version: 0.7.1 @@ -349,7 +349,7 @@ importers: version: 2.1.1 cmdk: specifier: 1.0.0 - version: 1.0.0(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.0.0(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) date-fns: specifier: ^4.1.0 version: 4.1.0 @@ -358,7 +358,7 @@ importers: version: 3.2.0(date-fns@4.1.0) embla-carousel-react: specifier: ^8.5.2 - version: 8.6.0(react@19.1.1) + version: 8.6.0(react@19.2.0) fast-deep-equal: specifier: ^3.1.3 version: 3.1.3 @@ -373,16 +373,16 @@ importers: version: 5.2.0(graphql@16.11.0) lucide-react: specifier: ^0.475.0 - version: 0.475.0(react@19.1.1) + version: 0.475.0(react@19.2.0) react-day-picker: specifier: 8.10.1 - version: 8.10.1(date-fns@4.1.0)(react@19.1.1) + version: 8.10.1(date-fns@4.1.0)(react@19.2.0) react-phone-number-input: specifier: ^3.4.12 - version: 3.4.12(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 3.4.12(react-dom@19.2.0(react@19.2.0))(react@19.2.0) react-resizable-panels: specifier: ^2.1.7 - version: 2.1.9(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 2.1.9(react-dom@19.2.0(react@19.2.0))(react@19.2.0) tailwind-merge: specifier: ^3.0.1 version: 3.3.1 @@ -394,7 +394,7 @@ importers: version: 3.0.1 vaul: specifier: ^1.1.2 - version: 1.1.2(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + version: 1.1.2(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) zod: specifier: ^3.24.1 version: 3.25.76 @@ -424,14 +424,14 @@ importers: specifier: ^26.0.0 version: 26.1.0 react: - specifier: ^19.0.0 - version: 19.1.1 + specifier: ^19 + version: 19.2.0 react-dom: - specifier: ^19.0.0 - version: 19.2.0(react@19.1.1) + specifier: ^19 + version: 19.2.0(react@19.2.0) react-hook-form: specifier: ^7.54.2 - version: 7.65.0(react@19.1.1) + version: 7.65.0(react@19.2.0) tsdown: specifier: ^0.15.6 version: 0.15.9(typescript@5.7.3) @@ -6311,18 +6311,18 @@ snapshots: '@floating-ui/core': 1.7.3 '@floating-ui/utils': 0.2.10 - '@floating-ui/react-dom@2.1.6(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@floating-ui/react-dom@2.1.6(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@floating-ui/dom': 1.7.4 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) - '@floating-ui/react@0.27.16(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@floating-ui/react@0.27.16(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@floating-ui/react-dom': 2.1.6(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + '@floating-ui/react-dom': 2.1.6(react-dom@19.2.0(react@19.2.0))(react@19.2.0) '@floating-ui/utils': 0.2.10 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) tabbable: 6.3.0 '@floating-ui/utils@0.2.10': {} @@ -6344,10 +6344,10 @@ snapshots: dependencies: graphql: 16.11.0 - '@hookform/resolvers@4.1.3(react-hook-form@7.65.0(react@19.1.1))': + '@hookform/resolvers@4.1.3(react-hook-form@7.65.0(react@19.2.0))': dependencies: '@standard-schema/utils': 0.3.0 - react-hook-form: 7.65.0(react@19.1.1) + react-hook-form: 7.65.0(react@19.2.0) '@humanfs/core@0.19.1': {} @@ -6644,12 +6644,12 @@ snapshots: dependencies: promise-polyfill: 8.3.0 - '@paypal/react-paypal-js@8.9.2(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@paypal/react-paypal-js@8.9.2(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@paypal/paypal-js': 9.0.1 '@paypal/sdk-constants': 1.0.157 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) '@paypal/sdk-constants@1.0.157': dependencies: @@ -6669,659 +6669,659 @@ snapshots: '@radix-ui/primitive@1.1.3': {} - '@radix-ui/react-accordion@1.2.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-accordion@1.2.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-collapsible': 1.1.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-alert-dialog@1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-alert-dialog@1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-arrow@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-aspect-ratio@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-aspect-ratio@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-avatar@1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-avatar@1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-is-hydrated': 0.1.0(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-checkbox@1.3.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-checkbox@1.3.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-collapsible@1.1.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-collapsible@1.1.12(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-collection@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-collection@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-compose-refs@1.0.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-compose-refs@1.0.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-compose-refs@1.1.2(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-compose-refs@1.1.2(@types/react@19.2.2)(react@19.2.0)': dependencies: - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-context@1.0.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-context@1.0.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-context@1.1.2(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-context@1.1.2(@types/react@19.2.2)(react@19.2.0)': dependencies: - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-dialog@1.0.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-dialog@1.0.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.0.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.0.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.0.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-portal': 1.0.4(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.0.1(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.0.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@19.2.2)(react@19.1.1) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.0.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-dismissable-layer': 1.0.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-focus-guards': 1.0.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-focus-scope': 1.0.4(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-id': 1.0.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-portal': 1.0.4(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-presence': 1.0.1(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-slot': 1.0.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.0.1(@types/react@19.2.2)(react@19.2.0) aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) - react-remove-scroll: 2.5.5(@types/react@19.2.2)(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) + react-remove-scroll: 2.5.5(@types/react@19.2.2)(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-dialog@1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-dialog@1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-direction@1.1.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-direction@1.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-dismissable-layer@1.0.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-dismissable-layer@1.0.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 '@radix-ui/primitive': 1.0.1 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-escape-keydown': 1.0.3(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-dismissable-layer@1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-escape-keydown': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-focus-guards@1.0.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-focus-guards@1.0.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-focus-guards@1.1.3(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-focus-guards@1.1.3(@types/react@19.2.2)(react@19.2.0)': dependencies: - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-focus-scope@1.0.4(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-focus-scope@1.0.4(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-focus-scope@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-id@1.0.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-id@1.0.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-id@1.1.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-id@1.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-label@2.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-label@2.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-popover@1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-popper@1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': - dependencies: - '@floating-ui/react-dom': 2.1.6(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.1.1) + '@radix-ui/react-popper@1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': + dependencies: + '@floating-ui/react-dom': 2.1.6(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-arrow': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-rect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.2.0) '@radix-ui/rect': 1.1.1 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-portal@1.0.4(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-portal@1.0.4(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-portal@1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-portal@1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-presence@1.0.1(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-presence@1.0.1(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.0.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-presence@1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-presence@1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-primitive@1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-primitive@1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - '@radix-ui/react-slot': 1.0.2(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-slot': 1.0.2(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-primitive@2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-radio-group@1.3.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-radio-group@1.3.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-roving-focus@1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-roving-focus@1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-scroll-area@1.2.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-scroll-area@1.2.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/number': 1.1.1 '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-select@2.2.6(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-select@2.2.6(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/number': 1.1.1 '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-focus-guards': 1.1.3(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-focus-scope': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) aria-hidden: 1.2.6 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) - react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) + react-remove-scroll: 2.7.1(@types/react@19.2.2)(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-separator@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-separator@1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-slot@1.0.2(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-slot@1.0.2(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-slot@1.2.3(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-slot@1.2.3(@types/react@19.2.2)(react@19.2.0)': dependencies: - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-switch@1.2.6(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-switch@1.2.6(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-previous': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-size': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-toast@1.2.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-toast@1.2.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-collection': 1.1.7(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-toggle-group@1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-toggle-group@1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-toggle': 1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-direction': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-roving-focus': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-toggle': 1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-toggle@1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-toggle@1.1.10(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-tooltip@1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-tooltip@1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@radix-ui/primitive': 1.1.3 - '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-compose-refs': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-context': 1.1.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-dismissable-layer': 1.1.11(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-id': 1.1.1(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-popper': 1.2.8(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-portal': 1.1.9(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-presence': 1.1.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-slot': 1.2.3(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-controllable-state': 1.2.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-visually-hidden': 1.2.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) - '@radix-ui/react-use-callback-ref@1.0.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-callback-ref@1.0.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-callback-ref@1.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-controllable-state@1.0.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-controllable-state@1.0.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-controllable-state@1.2.2(@types/react@19.2.2)(react@19.2.0)': dependencies: - '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.2)(react@19.1.1) - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-effect-event': 0.0.2(@types/react@19.2.2)(react@19.2.0) + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-effect-event@0.0.2(@types/react@19.2.2)(react@19.2.0)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-escape-keydown@1.0.3(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-escape-keydown@1.0.3(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-callback-ref': 1.0.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-escape-keydown@1.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: - '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-callback-ref': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-is-hydrated@0.1.0(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-is-hydrated@0.1.0(@types/react@19.2.2)(react@19.2.0)': dependencies: - react: 19.1.1 - use-sync-external-store: 1.6.0(react@19.1.1) + react: 19.2.0 + use-sync-external-store: 1.6.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-layout-effect@1.0.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-layout-effect@1.0.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@babel/runtime': 7.28.3 - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-layout-effect@1.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-previous@1.1.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-previous@1.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-rect@1.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: '@radix-ui/rect': 1.1.1 - react: 19.1.1 + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-use-size@1.1.1(@types/react@19.2.2)(react@19.1.1)': + '@radix-ui/react-use-size@1.1.1(@types/react@19.2.2)(react@19.2.0)': dependencies: - '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.1.1) - react: 19.1.1 + '@radix-ui/react-use-layout-effect': 1.1.1(@types/react@19.2.2)(react@19.2.0) + react: 19.2.0 optionalDependencies: '@types/react': 19.2.2 - '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@radix-ui/react-visually-hidden@1.2.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: - '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-primitive': 2.1.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 '@types/react-dom': 19.2.2(@types/react@19.2.2) @@ -7448,12 +7448,12 @@ snapshots: '@standard-schema/utils@0.3.0': {} - '@stripe/react-stripe-js@3.10.0(@stripe/stripe-js@7.9.0)(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@stripe/react-stripe-js@3.10.0(@stripe/stripe-js@7.9.0)(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@stripe/stripe-js': 7.9.0 prop-types: 15.8.1 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) '@stripe/stripe-js@7.9.0': {} @@ -7630,11 +7630,11 @@ snapshots: '@tanstack/query-devtools@5.90.1': {} - '@tanstack/react-pacer@0.2.0(react-dom@19.2.0(react@19.1.1))(react@19.1.1)': + '@tanstack/react-pacer@0.2.0(react-dom@19.2.0(react@19.2.0))(react@19.2.0)': dependencies: '@tanstack/pacer': 0.2.0 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) '@tanstack/react-query-devtools@5.90.2(@tanstack/react-query@5.90.5(react@19.2.0))(react@19.2.0)': dependencies: @@ -7642,11 +7642,6 @@ snapshots: '@tanstack/react-query': 5.90.5(react@19.2.0) react: 19.2.0 - '@tanstack/react-query@5.90.5(react@19.1.1)': - dependencies: - '@tanstack/query-core': 5.90.5 - react: 19.1.1 - '@tanstack/react-query@5.90.5(react@19.2.0)': dependencies: '@tanstack/query-core': 5.90.5 @@ -8410,12 +8405,12 @@ snapshots: clsx@2.1.1: {} - cmdk@1.0.0(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1): + cmdk@1.0.0(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0): dependencies: - '@radix-ui/react-dialog': 1.0.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-dialog': 1.0.5(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + '@radix-ui/react-primitive': 1.0.3(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) transitivePeerDependencies: - '@types/react' - '@types/react-dom' @@ -8590,11 +8585,11 @@ snapshots: electron-to-chromium@1.5.211: {} - embla-carousel-react@8.6.0(react@19.1.1): + embla-carousel-react@8.6.0(react@19.2.0): dependencies: embla-carousel: 8.6.0 embla-carousel-reactive-utils: 8.6.0(embla-carousel@8.6.0) - react: 19.1.1 + react: 19.2.0 embla-carousel-reactive-utils@8.6.0(embla-carousel@8.6.0): dependencies: @@ -9259,12 +9254,12 @@ snapshots: imurmurhash@0.1.4: {} - input-format@0.3.14(react-dom@19.2.0(react@19.1.1))(react@19.1.1): + input-format@0.3.14(react-dom@19.2.0(react@19.2.0))(react@19.2.0): dependencies: prop-types: 15.8.1 optionalDependencies: - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) internal-slot@1.1.0: dependencies: @@ -9586,9 +9581,9 @@ snapshots: dependencies: yallist: 3.1.1 - lucide-react@0.475.0(react@19.1.1): + lucide-react@0.475.0(react@19.2.0): dependencies: - react: 19.1.1 + react: 19.2.0 magic-string@0.30.19: dependencies: @@ -9931,80 +9926,75 @@ snapshots: rambda@7.5.0: {} - react-day-picker@8.10.1(date-fns@4.1.0)(react@19.1.1): + react-day-picker@8.10.1(date-fns@4.1.0)(react@19.2.0): dependencies: date-fns: 4.1.0 - react: 19.1.1 - - react-dom@19.2.0(react@19.1.1): - dependencies: - react: 19.1.1 - scheduler: 0.27.0 + react: 19.2.0 react-dom@19.2.0(react@19.2.0): dependencies: react: 19.2.0 scheduler: 0.27.0 - react-hook-form@7.65.0(react@19.1.1): + react-hook-form@7.65.0(react@19.2.0): dependencies: - react: 19.1.1 + react: 19.2.0 react-is@16.13.1: {} react-is@18.3.1: {} - react-phone-number-input@3.4.12(react-dom@19.2.0(react@19.1.1))(react@19.1.1): + react-phone-number-input@3.4.12(react-dom@19.2.0(react@19.2.0))(react@19.2.0): dependencies: classnames: 2.5.1 country-flag-icons: 1.5.21 - input-format: 0.3.14(react-dom@19.2.0(react@19.1.1))(react@19.1.1) + input-format: 0.3.14(react-dom@19.2.0(react@19.2.0))(react@19.2.0) libphonenumber-js: 1.12.24 prop-types: 15.8.1 - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) react-refresh@0.17.0: {} - react-remove-scroll-bar@2.3.8(@types/react@19.2.2)(react@19.1.1): + react-remove-scroll-bar@2.3.8(@types/react@19.2.2)(react@19.2.0): dependencies: - react: 19.1.1 - react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.1.1) + react: 19.2.0 + react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.2.0) tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.2 - react-remove-scroll@2.5.5(@types/react@19.2.2)(react@19.1.1): + react-remove-scroll@2.5.5(@types/react@19.2.2)(react@19.2.0): dependencies: - react: 19.1.1 - react-remove-scroll-bar: 2.3.8(@types/react@19.2.2)(react@19.1.1) - react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.1.1) + react: 19.2.0 + react-remove-scroll-bar: 2.3.8(@types/react@19.2.2)(react@19.2.0) + react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.2.0) tslib: 2.8.1 - use-callback-ref: 1.3.3(@types/react@19.2.2)(react@19.1.1) - use-sidecar: 1.1.3(@types/react@19.2.2)(react@19.1.1) + use-callback-ref: 1.3.3(@types/react@19.2.2)(react@19.2.0) + use-sidecar: 1.1.3(@types/react@19.2.2)(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 - react-remove-scroll@2.7.1(@types/react@19.2.2)(react@19.1.1): + react-remove-scroll@2.7.1(@types/react@19.2.2)(react@19.2.0): dependencies: - react: 19.1.1 - react-remove-scroll-bar: 2.3.8(@types/react@19.2.2)(react@19.1.1) - react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.1.1) + react: 19.2.0 + react-remove-scroll-bar: 2.3.8(@types/react@19.2.2)(react@19.2.0) + react-style-singleton: 2.2.3(@types/react@19.2.2)(react@19.2.0) tslib: 2.8.1 - use-callback-ref: 1.3.3(@types/react@19.2.2)(react@19.1.1) - use-sidecar: 1.1.3(@types/react@19.2.2)(react@19.1.1) + use-callback-ref: 1.3.3(@types/react@19.2.2)(react@19.2.0) + use-sidecar: 1.1.3(@types/react@19.2.2)(react@19.2.0) optionalDependencies: '@types/react': 19.2.2 - react-resizable-panels@2.1.9(react-dom@19.2.0(react@19.1.1))(react@19.1.1): + react-resizable-panels@2.1.9(react-dom@19.2.0(react@19.2.0))(react@19.2.0): dependencies: - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) - react-style-singleton@2.2.3(@types/react@19.2.2)(react@19.1.1): + react-style-singleton@2.2.3(@types/react@19.2.2)(react@19.2.0): dependencies: get-nonce: 1.0.1 - react: 19.1.1 + react: 19.2.0 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.2 @@ -10609,34 +10599,30 @@ snapshots: dependencies: punycode: 2.3.1 - use-callback-ref@1.3.3(@types/react@19.2.2)(react@19.1.1): + use-callback-ref@1.3.3(@types/react@19.2.2)(react@19.2.0): dependencies: - react: 19.1.1 + react: 19.2.0 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.2 - use-sidecar@1.1.3(@types/react@19.2.2)(react@19.1.1): + use-sidecar@1.1.3(@types/react@19.2.2)(react@19.2.0): dependencies: detect-node-es: 1.1.0 - react: 19.1.1 + react: 19.2.0 tslib: 2.8.1 optionalDependencies: '@types/react': 19.2.2 - use-sync-external-store@1.6.0(react@19.1.1): - dependencies: - react: 19.1.1 - use-sync-external-store@1.6.0(react@19.2.0): dependencies: react: 19.2.0 - vaul@1.1.2(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1): + vaul@1.1.2(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0): dependencies: - '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.1.1))(react@19.1.1) - react: 19.1.1 - react-dom: 19.2.0(react@19.1.1) + '@radix-ui/react-dialog': 1.1.15(@types/react-dom@19.2.2(@types/react@19.2.2))(@types/react@19.2.2)(react-dom@19.2.0(react@19.2.0))(react@19.2.0) + react: 19.2.0 + react-dom: 19.2.0(react@19.2.0) transitivePeerDependencies: - '@types/react' - '@types/react-dom' From 4c4e221733d4c336566e36aca0d589b587f374ef Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Tue, 4 Nov 2025 12:57:52 -0500 Subject: [PATCH 02/23] refactor: improve auth handling and type safety in godaddy hooks - Remove blocking early returns that prevented JWT-only auth flows - Add explicit type generics to all useMutation calls - Simplify auth pattern to match godaddy.ts overload structure - Use direct ternary for jwt vs session auth selection - Remove unnecessary wrapper functions for cleaner code - Let React Query handle error throwing automatically Amp-Thread-ID: https://ampcode.com/threads/T-2469796c-8d8e-4450-be09-b8dfe01f101a Co-authored-by: Amp --- .../app/c/[sessionId]/HostedCheckout.tsx | 6 +- examples/nextjs/app/checkout.tsx | 59 ++++++------ .../address/utils/use-address-matches.ts | 12 +-- .../address/utils/use-address-verification.ts | 5 +- .../utils/use-apply-delivery-method.ts | 5 +- .../utils/use-apply-fulfillment-location.ts | 17 ++-- .../discount/utils/use-discount-apply.ts | 6 +- .../utils/use-get-price-adjustments.ts | 40 +++++---- .../order/use-draft-order-products.ts | 5 +- .../checkout/order/use-draft-order.ts | 5 +- .../checkout/order/use-update-order.ts | 5 +- .../checkout/order/use-update-taxes.ts | 13 +-- .../payment/utils/use-confirm-checkout.ts | 26 ++++-- .../utils/use-apply-shipping-method.ts | 13 +-- .../utils/use-draft-order-shipping-methods.ts | 12 +-- .../utils/use-get-shipping-methods.ts | 12 +-- .../utils/use-remove-shipping-method.ts | 6 +- .../checkout/taxes/utils/use-get-taxes.ts | 12 +-- packages/react/src/lib/godaddy/godaddy.ts | 66 +++++++++++--- packages/react/src/lib/godaddy/server.ts | 37 -------- packages/react/src/lib/graphql-with-errors.ts | 79 ++++++++-------- packages/react/src/server.ts | 90 ++++++++++++++++++- 22 files changed, 337 insertions(+), 194 deletions(-) delete mode 100644 packages/react/src/lib/godaddy/server.ts diff --git a/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx b/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx index f82e1041..a5e7689a 100644 --- a/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx +++ b/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx @@ -5,11 +5,11 @@ import { Checkout, GoDaddyProvider } from "@godaddy/react"; export default function HostedCheckout() { return (
- + diff --git a/examples/nextjs/app/checkout.tsx b/examples/nextjs/app/checkout.tsx index 7bbdc3c9..596351a8 100644 --- a/examples/nextjs/app/checkout.tsx +++ b/examples/nextjs/app/checkout.tsx @@ -1,38 +1,37 @@ -'use client'; +"use client"; -import type { CheckoutFormSchema, CheckoutSession } from '@godaddy/react'; -import { Checkout, GoDaddyProvider } from '@godaddy/react'; -import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; -import { z } from 'zod'; +import type { CheckoutFormSchema, CheckoutSession } from "@godaddy/react"; +import { Checkout, GoDaddyProvider } from "@godaddy/react"; +import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; +import { z } from "zod"; /* Override the checkout form schema to make shippingPhone required */ const customSchema: CheckoutFormSchema = { - shippingPhone: z.string().min(1, 'Phone number is required'), + shippingPhone: z.string().min(1, "Phone number is required"), }; export function CheckoutPage({ session }: { session: CheckoutSession }) { - return ( - - - - - ); + return ( + + + + + ); } diff --git a/packages/react/src/components/checkout/address/utils/use-address-matches.ts b/packages/react/src/components/checkout/address/utils/use-address-matches.ts index 3f1e9a47..a26c1e65 100644 --- a/packages/react/src/components/checkout/address/utils/use-address-matches.ts +++ b/packages/react/src/components/checkout/address/utils/use-address-matches.ts @@ -22,11 +22,13 @@ export function useAddressMatches( return useQuery({ queryKey: ["addressMatchesQuery", debouncedAddressValue], queryFn: () => - getAddressMatches( - { query: debouncedAddressValue }, - { accessToken: jwt }, - apiHost, - ), + jwt + ? getAddressMatches( + { query: debouncedAddressValue }, + { accessToken: jwt }, + apiHost, + ) + : getAddressMatches({ query: debouncedAddressValue }, session, apiHost), enabled: !!debouncedAddressValue && !!session?.id && options.enabled, placeholderData: (prev) => prev, select: (data) => data.checkoutSession?.addresses, diff --git a/packages/react/src/components/checkout/address/utils/use-address-verification.ts b/packages/react/src/components/checkout/address/utils/use-address-verification.ts index 4e4a0f9a..86b25b3f 100644 --- a/packages/react/src/components/checkout/address/utils/use-address-verification.ts +++ b/packages/react/src/components/checkout/address/utils/use-address-verification.ts @@ -48,7 +48,10 @@ export function useAddressVerification( return useQuery({ queryKey, - queryFn: async () => verifyAddress(address, { accessToken: jwt }, apiHost), + queryFn: async () => + jwt + ? verifyAddress(address, { accessToken: jwt }, apiHost) + : verifyAddress(address, session, apiHost), enabled: options.enabled && !!session?.id && diff --git a/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts b/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts index 1869d277..0e6be47d 100644 --- a/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts +++ b/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts @@ -16,7 +16,10 @@ export function useApplyDeliveryMethod() { mode: ApplyCheckoutSessionDeliveryMethodInput["input"]["mode"], ) => { if (!session) return; - return await applyDeliveryMethod({ mode }, { accessToken: jwt }, apiHost); + const data = jwt + ? await applyDeliveryMethod({ mode }, { accessToken: jwt }, apiHost) + : await applyDeliveryMethod({ mode }, session, apiHost); + return data; }, }); } diff --git a/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts b/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts index af25d3cb..e525d42c 100644 --- a/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts +++ b/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts @@ -33,11 +33,18 @@ export function useApplyFulfillmentLocation() { // Don't process empty string or undefined location IDs if (!session || !fulfillmentLocationId) return; - return await applyFulfillmentLocation( - { fulfillmentLocationId }, - { accessToken: jwt }, - apiHost, - ); + const data = jwt + ? await applyFulfillmentLocation( + { fulfillmentLocationId }, + { accessToken: jwt }, + apiHost, + ) + : await applyFulfillmentLocation( + { fulfillmentLocationId }, + session, + apiHost, + ); + return data; }, onSuccess: (_data, { locationAddress }) => { if (!session) return; diff --git a/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts b/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts index 9a666034..b6494c82 100644 --- a/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts +++ b/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts @@ -27,8 +27,10 @@ export function useDiscountApply() { }: { discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"]; }) => { - if (!session) return; - return await applyDiscount(discountCodes, { accessToken: jwt }, apiHost); + const data = jwt + ? await applyDiscount(discountCodes, { accessToken: jwt }, apiHost) + : await applyDiscount(discountCodes, session, apiHost); + return data; }, onSuccess: (data, { discountCodes }) => { if (!session) return; diff --git a/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts b/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts index 2ee1a2b7..0d160127 100644 --- a/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts +++ b/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts @@ -5,29 +5,31 @@ import { useGoDaddyContext } from "@/godaddy-provider"; import { getDraftOrderPriceAdjustments } from "@/lib/godaddy/godaddy"; import type { DraftOrderPriceAdjustmentsQueryInput } from "@/types"; +type Vars = { + discountCodes: DraftOrderPriceAdjustmentsQueryInput["discountCodes"]; + shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"]; +}; + export function useGetPriceAdjustments() { const { session, jwt } = useCheckoutContext(); const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: session?.id - ? ["get-price-adjustments-by-discount-code", session.id] - : ["get-price-adjustments-by-discount-code"], - mutationFn: async ({ - discountCodes, - shippingLines, - }: { - discountCodes: DraftOrderPriceAdjustmentsQueryInput["discountCodes"]; - shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"]; - }) => { - if (!session) return; - - const data = await getDraftOrderPriceAdjustments( - { accessToken: jwt }, - discountCodes, - shippingLines, - apiHost, - ); + return useMutation({ + mutationKey: ["get-price-adjustments-by-discount-code", session?.id ?? "no-session"], + mutationFn: async ({ discountCodes, shippingLines }) => { + const data = jwt + ? await getDraftOrderPriceAdjustments( + { accessToken: jwt }, + discountCodes, + shippingLines, + apiHost, + ) + : await getDraftOrderPriceAdjustments( + session, + discountCodes, + shippingLines, + apiHost, + ); return data.checkoutSession?.draftOrder?.calculatedAdjustments ?.totalDiscountAmount?.value; diff --git a/packages/react/src/components/checkout/order/use-draft-order-products.ts b/packages/react/src/components/checkout/order/use-draft-order-products.ts index ed3e9544..589198c4 100644 --- a/packages/react/src/components/checkout/order/use-draft-order-products.ts +++ b/packages/react/src/components/checkout/order/use-draft-order-products.ts @@ -17,7 +17,10 @@ export function useDraftOrderProducts() { queryKey: session?.id ? ["draft-order-products", session.id] : ["draft-order-products"], - queryFn: () => getProductsFromOrderSkus({ accessToken: jwt }, apiHost), + queryFn: () => + jwt + ? getProductsFromOrderSkus({ accessToken: jwt }, apiHost) + : getProductsFromOrderSkus(session, apiHost), enabled: !!session?.id, select: (data) => data.checkoutSession?.skus?.edges, }); diff --git a/packages/react/src/components/checkout/order/use-draft-order.ts b/packages/react/src/components/checkout/order/use-draft-order.ts index c21752c1..dc988731 100644 --- a/packages/react/src/components/checkout/order/use-draft-order.ts +++ b/packages/react/src/components/checkout/order/use-draft-order.ts @@ -24,7 +24,10 @@ export function useDraftOrder( return useQuery({ queryKey: session?.id ? [key, session.id] : [key], - queryFn: () => getDraftOrder({ accessToken: jwt }, apiHost), + queryFn: () => + jwt + ? getDraftOrder({ accessToken: jwt }, apiHost) + : getDraftOrder(session, apiHost), enabled: !!jwt, select: select ?? ((data) => data.checkoutSession?.draftOrder as TData), retry: 3, diff --git a/packages/react/src/components/checkout/order/use-update-order.ts b/packages/react/src/components/checkout/order/use-update-order.ts index 309a4fa4..039aa047 100644 --- a/packages/react/src/components/checkout/order/use-update-order.ts +++ b/packages/react/src/components/checkout/order/use-update-order.ts @@ -18,7 +18,10 @@ export function useUpdateOrder() { }: { input: UpdateDraftOrderInput["input"]; }) => { - return await updateDraftOrder(input, { accessToken: jwt }, apiHost); + const data = jwt + ? await updateDraftOrder(input, { accessToken: jwt }, apiHost) + : await updateDraftOrder(input, session, apiHost); + return data; }, onSuccess: (_data, { input }) => { if (!session) return; diff --git a/packages/react/src/components/checkout/order/use-update-taxes.ts b/packages/react/src/components/checkout/order/use-update-taxes.ts index f80b178c..4aadff74 100644 --- a/packages/react/src/components/checkout/order/use-update-taxes.ts +++ b/packages/react/src/components/checkout/order/use-update-taxes.ts @@ -24,11 +24,14 @@ export function useUpdateTaxes() { countryCode?: string | null; postalCode?: string | null; }) => { - return await updateDraftOrderTaxes( - { accessToken: jwt }, - destination, - apiHost, - ); + const data = jwt + ? await updateDraftOrderTaxes( + { accessToken: jwt }, + destination, + apiHost, + ) + : await updateDraftOrderTaxes(session, destination, apiHost); + return data; }, onSuccess: (data) => { if (!session) return; diff --git a/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts b/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts index 838add54..2ae0e4c8 100644 --- a/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts +++ b/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts @@ -123,14 +123,24 @@ export function useConfirmCheckout() { }, }); - return await confirmCheckout( - { - ...confirmCheckoutInput, - ...(isPickup ? pickUpData : {}), - }, - { accessToken: jwt }, - apiHost, - ); + const data = jwt + ? await confirmCheckout( + { + ...confirmCheckoutInput, + ...(isPickup ? pickUpData : {}), + }, + { accessToken: jwt }, + apiHost, + ) + : await confirmCheckout( + { + ...confirmCheckoutInput, + ...(isPickup ? pickUpData : {}), + }, + session, + apiHost, + ); + return data; }, onSuccess: (_data, input) => { let completedEventId: TrackingEventId | null = null; diff --git a/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts b/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts index 1e267155..3027a8c2 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts @@ -25,11 +25,14 @@ export function useApplyShippingMethod() { shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], ) => { if (!session) return; - return await applyShippingMethod( - shippingMethods, - { accessToken: jwt }, - apiHost, - ); + const data = jwt + ? await applyShippingMethod( + shippingMethods, + { accessToken: jwt }, + apiHost, + ) + : await applyShippingMethod(shippingMethods, session, apiHost); + return data; }, onSuccess: async (data) => { if (!session) return; diff --git a/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts b/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts index feaacd3c..010475c0 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts @@ -59,11 +59,13 @@ export function useDraftOrderShippingMethods() { ] : ["draft-order-shipping-methods"], queryFn: () => - getDraftOrderShippingMethods( - { accessToken: jwt }, - destination, - apiHost, - ), + jwt + ? getDraftOrderShippingMethods( + { accessToken: jwt }, + destination, + apiHost, + ) + : getDraftOrderShippingMethods(session, destination, apiHost), enabled: !!session?.id && hasShippingAddress, select: (data) => data?.checkoutSession?.draftOrder?.calculatedShippingRates?.rates, diff --git a/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts b/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts index 8fc109e8..7aad65ce 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts @@ -17,11 +17,13 @@ export function useGetShippingMethodByAddress() { ) => { if (!session) return; - const data = await getDraftOrderShippingMethods( - { accessToken: jwt }, - destination, - apiHost, - ); + const data = jwt + ? await getDraftOrderShippingMethods( + { accessToken: jwt }, + destination, + apiHost, + ) + : await getDraftOrderShippingMethods(session, destination, apiHost); return ( data.checkoutSession?.draftOrder?.calculatedShippingRates?.rates || [] diff --git a/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts b/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts index 94a17d7a..9a4996ba 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts @@ -22,8 +22,10 @@ export function useRemoveShippingMethod() { mutationFn: async ( input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], ) => { - if (!session) return; - return await removeShippingMethod(input, { accessToken: jwt }, apiHost); + const data = jwt + ? await removeShippingMethod(input, { accessToken: jwt }, apiHost) + : await removeShippingMethod(input, session, apiHost); + return data; }, onSuccess: async (data) => { if (!session) return; diff --git a/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts b/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts index 153a2f28..394daf62 100644 --- a/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts +++ b/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts @@ -21,11 +21,13 @@ export function useGetTaxes() { }) => { if (!session) return; - const data = await getDraftOrderTaxes( - { accessToken: jwt }, - { destination, lines }, - apiHost, - ); + const data = jwt + ? await getDraftOrderTaxes( + { accessToken: jwt }, + { destination, lines }, + apiHost, + ) + : await getDraftOrderTaxes(session, { destination, lines }, apiHost); return data.checkoutSession?.draftOrder?.calculatedTaxes?.totalTaxAmount; }, diff --git a/packages/react/src/lib/godaddy/godaddy.ts b/packages/react/src/lib/godaddy/godaddy.ts index 6420b88b..d31f9213 100644 --- a/packages/react/src/lib/godaddy/godaddy.ts +++ b/packages/react/src/lib/godaddy/godaddy.ts @@ -6,6 +6,7 @@ import type { ApplyCheckoutSessionFulfillmentLocationInput, ApplyCheckoutSessionShippingMethodInput, CheckoutSession, + CheckoutSessionInput, ConfirmCheckoutMutationInput, DraftOrderPriceAdjustmentsQueryInput, GetCheckoutSessionShippingRatesInput, @@ -13,6 +14,7 @@ import type { RemoveAppliedCheckoutSessionShippingMethodInput, UpdateDraftOrderInput, } from "@/types"; +import { getEnvVar } from "../utils"; import { ApplyCheckoutSessionDeliveryMethodMutation, ApplyCheckoutSessionDiscountMutation, @@ -20,6 +22,7 @@ import { ApplyCheckoutSessionShippingMethodMutation, CalculateCheckoutSessionTaxesMutation, ConfirmCheckoutSessionMutation, + CreateCheckoutSessionMutation, ExchangeCheckoutTokenMutation, RefreshCheckoutTokenMutation, RemoveAppliedCheckoutSessionShippingMethodMutation, @@ -41,6 +44,30 @@ function getHostByEnvironment(apiHost?: string): string { return apiHost || "https://checkout.commerce.api.godaddy.com"; } +export async function createCheckoutSession( + input: CheckoutSessionInput["input"], + { accessToken }: { accessToken: string }, +): Promise< + ResultOf["createCheckoutSession"] +> { + if (!accessToken) { + throw new Error("No public access token provided"); + } + + const GODADDY_HOST = getHostByEnvironment(getEnvVar("GODADDY_API_HOST")); + console.log(GODADDY_HOST); + const response = await graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + CreateCheckoutSessionMutation, + { input }, + { Authorization: `Bearer ${accessToken}` }, + ); + + return response.createCheckoutSession; +} + export async function exchangeCheckoutToken( input: { sessionId: string; @@ -103,7 +130,7 @@ export async function getCheckoutSession( export async function getAddressMatches( input: { query: string }, - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export async function getAddressMatches( @@ -116,6 +143,7 @@ export async function getAddressMatches( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -153,7 +181,7 @@ export async function getAddressMatches( } export function getDraftOrder( - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export function getDraftOrder( @@ -164,6 +192,7 @@ export function getDraftOrder( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -276,7 +305,7 @@ export async function verifyAddress( adminArea3?: string; adminArea4?: string; }, - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export async function verifyAddress( @@ -309,6 +338,7 @@ export async function verifyAddress( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -351,7 +381,7 @@ export async function verifyAddress( export async function updateDraftOrder( input: UpdateDraftOrderInput["input"], - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export async function updateDraftOrder( @@ -364,6 +394,7 @@ export async function updateDraftOrder( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -405,7 +436,7 @@ export async function updateDraftOrder( } export async function getProductsFromOrderSkus( - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export async function getProductsFromOrderSkus( @@ -418,6 +449,7 @@ export async function getProductsFromOrderSkus( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -455,7 +487,7 @@ export async function getProductsFromOrderSkus( } export function updateDraftOrderTaxes( - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, destination?: { addressLine1?: string | null; addressLine2?: string | null; @@ -486,6 +518,7 @@ export function updateDraftOrderTaxes( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, destination?: { addressLine1?: string | null; @@ -538,7 +571,7 @@ export function updateDraftOrderTaxes( export function applyDiscount( discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"], - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export function applyDiscount( @@ -551,6 +584,7 @@ export function applyDiscount( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -593,7 +627,7 @@ export function applyDiscount( export function applyShippingMethod( shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export function applyShippingMethod( @@ -606,6 +640,7 @@ export function applyShippingMethod( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -648,7 +683,7 @@ export function applyShippingMethod( export function removeShippingMethod( input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export function removeShippingMethod( @@ -661,6 +696,7 @@ export function removeShippingMethod( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ): Promise< @@ -705,7 +741,7 @@ export function removeShippingMethod( export function confirmCheckout( input: ConfirmCheckoutMutationInput["input"], - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export function confirmCheckout( @@ -718,6 +754,7 @@ export function confirmCheckout( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -759,7 +796,7 @@ export function confirmCheckout( } export function getDraftOrderShippingMethods( - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, destination?: GetCheckoutSessionShippingRatesInput["destination"], apiHost?: string, ): Promise>; @@ -772,6 +809,7 @@ export function getDraftOrderShippingMethods( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, destination?: GetCheckoutSessionShippingRatesInput["destination"], apiHost?: string, @@ -815,7 +853,7 @@ export function getDraftOrderShippingMethods( export function applyDeliveryMethod( input: ApplyCheckoutSessionDeliveryMethodInput["input"], - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, apiHost?: string, ): Promise>; export function applyDeliveryMethod( @@ -828,6 +866,7 @@ export function applyDeliveryMethod( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, apiHost?: string, ) { @@ -869,7 +908,7 @@ export function applyDeliveryMethod( } export function getDraftOrderPriceAdjustments( - session: CheckoutSession | undefined, + session: CheckoutSession | undefined | null, discountCodes?: DraftOrderPriceAdjustmentsQueryInput["discountCodes"], shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"], apiHost?: string, @@ -884,6 +923,7 @@ export function getDraftOrderPriceAdjustments( sessionOrAuth: | CheckoutSession | undefined + | null | { accessToken: string | undefined }, discountCodes?: DraftOrderPriceAdjustmentsQueryInput["discountCodes"], shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"], diff --git a/packages/react/src/lib/godaddy/server.ts b/packages/react/src/lib/godaddy/server.ts deleted file mode 100644 index 4f354412..00000000 --- a/packages/react/src/lib/godaddy/server.ts +++ /dev/null @@ -1,37 +0,0 @@ -'use server'; - -import type { ResultOf } from '@/gql.tada'; -import { graphqlRequestWithErrors } from '@/lib/graphql-with-errors'; -import { getEnvVar } from '@/lib/utils'; -import type { CheckoutSessionInput } from '@/types'; -import { CreateCheckoutSessionMutation } from './mutations'; - -function getHostByEnvironment(): string { - if (getEnvVar('GODADDY_ENV') === 'local') { - return 'http://localhost:3000'; - } - return `https://checkout.commerce.${getEnvVar('GODADDY_HOST') || 'api.godaddy.com'}`; -} - -export async function createCheckoutSession( - input: CheckoutSessionInput['input'], - { accessToken }: { accessToken: string } -): Promise< - ResultOf['createCheckoutSession'] -> { - if (!accessToken) { - throw new Error('No public access token provided'); - } - - const GODADDY_HOST = getHostByEnvironment(); - const response = await graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - CreateCheckoutSessionMutation, - { input }, - { Authorization: `Bearer ${accessToken}` } - ); - - return response.createCheckoutSession; -} diff --git a/packages/react/src/lib/graphql-with-errors.ts b/packages/react/src/lib/graphql-with-errors.ts index 250db318..1b04156d 100644 --- a/packages/react/src/lib/graphql-with-errors.ts +++ b/packages/react/src/lib/graphql-with-errors.ts @@ -1,51 +1,52 @@ -import type { DocumentNode } from 'graphql'; -import { ClientError, request, type Variables } from 'graphql-request'; +import type { DocumentNode } from "graphql"; +import { ClientError, request, type Variables } from "graphql-request"; // Define the shape of GraphQL errors explicitly export class GraphQLErrorWithCodes< - T extends { message?: string; code?: string } = { - message?: string; - code?: string; - }, + T extends { message?: string; code?: string } = { + message?: string; + code?: string; + }, > extends Error { - constructor(public errors: T[]) { - const errorMessage = - errors.length === 1 - ? `${errors[0].message || 'Unknown error'}` - : `${errors - .map(e => e.message) - .filter(Boolean) - .join('; ')}`; + constructor(public errors: T[]) { + const errorMessage = + errors.length === 1 + ? `${errors[0].message || "Unknown error"}` + : `${errors + .map((e) => e.message) + .filter(Boolean) + .join("; ")}`; - super(errorMessage); - this.name = 'GraphQLErrorWithCodes'; - } + super(errorMessage); + this.name = "GraphQLErrorWithCodes"; + } - get codes(): string[] { - return this.errors.map(e => e.code).filter(Boolean) as string[]; - } + get codes(): string[] { + return this.errors.map((e) => e.code).filter(Boolean) as string[]; + } - get messages(): string[] { - return this.errors.map(e => e.message).filter(Boolean) as string[]; - } + get messages(): string[] { + return this.errors.map((e) => e.message).filter(Boolean) as string[]; + } } export async function graphqlRequestWithErrors( - endpoint: string, - query: DocumentNode, - variables?: Variables, - headers?: HeadersInit + endpoint: string, + query: DocumentNode, + variables?: Variables, + headers?: HeadersInit, ): Promise { - try { - return await request(endpoint, query, variables, headers); - } catch (err) { - if (err instanceof ClientError && err.response?.errors?.length) { - const parsedErrors = err.response.errors.map(e => ({ - message: e.message as string, - code: e.extensions?.code as string, - })); - throw new GraphQLErrorWithCodes(parsedErrors); - } - throw err; // network or unknown error - } + try { + return await request(endpoint, query, variables, headers); + } catch (err) { + console.error("graphqlRequestWithErrors error:", err); + if (err instanceof ClientError && err.response?.errors?.length) { + const parsedErrors = err.response.errors.map((e) => ({ + message: e.message as string, + code: e.extensions?.code as string, + })); + throw new GraphQLErrorWithCodes(parsedErrors); + } + throw err; // network or unknown error + } } diff --git a/packages/react/src/server.ts b/packages/react/src/server.ts index 40174066..3023a2a8 100644 --- a/packages/react/src/server.ts +++ b/packages/react/src/server.ts @@ -1 +1,89 @@ -export { createCheckoutSession } from './lib/godaddy/server'; +"use server"; + +import * as GoDaddy from "@/lib/godaddy/godaddy"; +import { getEnvVar } from "@/lib/utils"; +import type { CheckoutSessionInput, CheckoutSessionOptions } from "@/types"; + +let accessToken: string | undefined; +let accessTokenExpiresAt: number | undefined; + +export async function createCheckoutSession( + input: CheckoutSessionInput["input"], + options?: CheckoutSessionOptions, +) { + const CLIENT_ID = options?.auth?.clientId || ""; + const CLIENT_SECRET = options?.auth?.clientSecret || ""; + + const now = Date.now() / 1000; // seconds + + if ( + !accessToken || + !accessTokenExpiresAt || + accessTokenExpiresAt - 60 < now // refresh 1 min before expiry + ) { + const getAccessTokenResponse = await getAccessToken({ + clientId: CLIENT_ID, + clientSecret: CLIENT_SECRET, + }); + + accessToken = getAccessTokenResponse?.access_token; + accessTokenExpiresAt = now + (getAccessTokenResponse?.expires_in || 0); + } + + if (!accessToken) { + throw new Error("Failed to get access token"); + } + console.log(accessToken); + + return await GoDaddy.createCheckoutSession(input, { + accessToken, + }); +} + +function getHostByEnvironment(): string { + return `https://${getEnvVar("GODADDY_HOST") || "api.godaddy.com"}`; +} + +async function getAccessToken({ + clientId, + clientSecret, +}: { + clientId: string; + clientSecret: string; +}) { + if (!clientId || !clientSecret) { + return; + } + + const host = getHostByEnvironment(); + + const data = new URLSearchParams(); + data.append("grant_type", "client_credentials"); + data.append("client_id", clientId); + data.append("client_secret", clientSecret); + data.append( + "scope", + "commerce.product:read commerce.order:read commerce.order:update location.address-verification:execute", + ); + const response = await fetch(`${host}/v2/oauth2/token`, { + method: "POST", + headers: { + "Content-Type": "application/x-www-form-urlencoded", + }, + body: data.toString(), + cache: "no-store", + }); + + if (!response.ok) { + throw new Error( + `Failed to get access token: ${response.status} ${response.statusText}`, + ); + } + + const result = (await response.json()) as { + access_token: string; + scope: string; + expires_in: number; + }; + return result; +} From 0c03f66dd80597c17c395390f33e82f508eeeeee Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Tue, 4 Nov 2025 13:25:15 -0500 Subject: [PATCH 03/23] Fix JWT session scoping to prevent reuse across different checkout sessions Amp-Thread-ID: https://ampcode.com/threads/T-65c39e0f-21b4-4900-a6a6-35c262cb3ec0 Co-authored-by: Amp --- .../src/components/checkout/checkout.tsx | 3 ++ .../checkout/form/checkout-form-container.tsx | 2 - .../react/src/hooks/use-checkout-session.tsx | 37 ++++++++++++++++--- packages/react/src/lib/godaddy/godaddy.ts | 2 - packages/react/src/server.ts | 1 - 5 files changed, 34 insertions(+), 11 deletions(-) diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 3d4b9348..eb0a74ae 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -232,6 +232,9 @@ export function Checkout(props: CheckoutProps) { const { session, jwt } = useCheckoutSession(props); + console.log("SESSION", session); + console.log("JWT", jwt); + const formSchema = React.useMemo(() => { const extendedSchema = checkoutFormSchema ? baseCheckoutSchema.extend(checkoutFormSchema) diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index 3a18fdfe..221600e6 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -33,8 +33,6 @@ export function CheckoutFormContainer({ const { data: order } = draftOrderQuery; const { data: lineItems } = draftOrderLineItemsQuery; - console.log(order); - const items = useMemo( () => mapSkusToItemsDisplay(lineItems, skusMap), [lineItems, skusMap], diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index dbc64150..272e62c2 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -32,6 +32,8 @@ export function useCheckoutSession(props?: CheckoutProps) { 'godaddy-checkout-jwt', '' ); + const [storedSessionId, setStoredSessionId, removeStoredSessionId] = + useSessionStorage('godaddy-checkout-session-id', ''); const refreshTimerRef = useRef(null); let sessionId: string; @@ -71,17 +73,27 @@ export function useCheckoutSession(props?: CheckoutProps) { } } catch (_error) { removeJwt(); + removeStoredSessionId(); } }, refreshIn); }, - [setJwt, removeJwt, apiHost] + [setJwt, removeJwt, removeStoredSessionId, apiHost] ); useEffect(() => { - if (!sessionId || !sessionToken || jwt) return; + if (!sessionId || !sessionToken) return; let cancelled = false; + // If we have a JWT for a different session, clear it + if (jwt && storedSessionId && storedSessionId !== sessionId) { + removeJwt(); + if (refreshTimerRef.current) clearTimeout(refreshTimerRef.current); + } + + // If we already have a JWT for this session, nothing to do + if (jwt && storedSessionId === sessionId) return; + (async () => { try { const result = await exchangeCheckoutToken({ @@ -92,6 +104,7 @@ export function useCheckoutSession(props?: CheckoutProps) { if (!result?.jwt) return; setJwt(result.jwt); + setStoredSessionId(sessionId); if (typeof window !== 'undefined') { window.history.replaceState( null, @@ -102,6 +115,7 @@ export function useCheckoutSession(props?: CheckoutProps) { scheduleRefresh(result.jwt); } catch (_error) { removeJwt(); + removeStoredSessionId(); } })(); @@ -111,22 +125,33 @@ export function useCheckoutSession(props?: CheckoutProps) { clearTimeout(refreshTimerRef.current); } }; - }, [sessionId, sessionToken, jwt, setJwt, removeJwt, scheduleRefresh]); + }, [ + sessionId, + sessionToken, + jwt, + storedSessionId, + setJwt, + removeJwt, + setStoredSessionId, + removeStoredSessionId, + scheduleRefresh, + apiHost, + ]); useEffect(() => { - if (!jwt) return; + if (!jwt || storedSessionId !== sessionId) return; scheduleRefresh(jwt); return () => { if (refreshTimerRef.current) { clearTimeout(refreshTimerRef.current); } }; - }, [jwt, scheduleRefresh]); + }, [jwt, sessionId, storedSessionId, scheduleRefresh]); const checkoutSessionQuery = useQuery({ queryKey: ['checkout-session', sessionId], queryFn: () => getCheckoutSession({ accessToken: jwt }, apiHost), - enabled: !!jwt, + enabled: !!jwt && storedSessionId === sessionId, }); return { session: checkoutSessionQuery.data, jwt }; diff --git a/packages/react/src/lib/godaddy/godaddy.ts b/packages/react/src/lib/godaddy/godaddy.ts index d31f9213..e112165a 100644 --- a/packages/react/src/lib/godaddy/godaddy.ts +++ b/packages/react/src/lib/godaddy/godaddy.ts @@ -55,7 +55,6 @@ export async function createCheckoutSession( } const GODADDY_HOST = getHostByEnvironment(getEnvVar("GODADDY_API_HOST")); - console.log(GODADDY_HOST); const response = await graphqlRequestWithErrors< ResultOf >( @@ -197,7 +196,6 @@ export function getDraftOrder( apiHost?: string, ) { const GODADDY_HOST = getHostByEnvironment(apiHost); - console.log(sessionOrAuth); if (sessionOrAuth && "accessToken" in sessionOrAuth) { if (!sessionOrAuth.accessToken) { diff --git a/packages/react/src/server.ts b/packages/react/src/server.ts index 3023a2a8..5116a64e 100644 --- a/packages/react/src/server.ts +++ b/packages/react/src/server.ts @@ -33,7 +33,6 @@ export async function createCheckoutSession( if (!accessToken) { throw new Error("Failed to get access token"); } - console.log(accessToken); return await GoDaddy.createCheckoutSession(input, { accessToken, From e849de806e85b853a7d77e8063a58349db39fc78 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Tue, 4 Nov 2025 13:41:49 -0500 Subject: [PATCH 04/23] Add legacy flow fallback when JWT exchange fails Amp-Thread-ID: https://ampcode.com/threads/T-65c39e0f-21b4-4900-a6a6-35c262cb3ec0 Co-authored-by: Amp --- .../react/src/components/checkout/checkout.tsx | 3 --- packages/react/src/hooks/use-checkout-session.tsx | 15 +++++++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index eb0a74ae..3d4b9348 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -232,9 +232,6 @@ export function Checkout(props: CheckoutProps) { const { session, jwt } = useCheckoutSession(props); - console.log("SESSION", session); - console.log("JWT", jwt); - const formSchema = React.useMemo(() => { const extendedSchema = checkoutFormSchema ? baseCheckoutSchema.extend(checkoutFormSchema) diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index 272e62c2..9bb26655 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -1,5 +1,5 @@ import { useQuery } from '@tanstack/react-query'; -import { useCallback, useEffect, useRef } from 'react'; +import { useCallback, useEffect, useRef, useState } from 'react'; import type { CheckoutProps } from '@/components/checkout/checkout'; import { useGoDaddyContext } from '@/godaddy-provider'; import { @@ -34,6 +34,7 @@ export function useCheckoutSession(props?: CheckoutProps) { ); const [storedSessionId, setStoredSessionId, removeStoredSessionId] = useSessionStorage('godaddy-checkout-session-id', ''); + const [exchangeFailed, setExchangeFailed] = useState(false); const refreshTimerRef = useRef(null); let sessionId: string; @@ -101,10 +102,14 @@ export function useCheckoutSession(props?: CheckoutProps) { token: sessionToken, }, apiHost); if (cancelled) return; - if (!result?.jwt) return; + if (!result?.jwt) { + setExchangeFailed(true); + return; + } setJwt(result.jwt); setStoredSessionId(sessionId); + setExchangeFailed(false); if (typeof window !== 'undefined') { window.history.replaceState( null, @@ -116,6 +121,7 @@ export function useCheckoutSession(props?: CheckoutProps) { } catch (_error) { removeJwt(); removeStoredSessionId(); + setExchangeFailed(true); } })(); @@ -154,5 +160,10 @@ export function useCheckoutSession(props?: CheckoutProps) { enabled: !!jwt && storedSessionId === sessionId, }); + // If exchange failed and we have a session prop, use legacy flow + if (exchangeFailed && props?.session) { + return { session: props.session, jwt: null }; + } + return { session: checkoutSessionQuery.data, jwt }; } From b3da7b5b5e30954130b5899ae2e46340e129a384 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Tue, 4 Nov 2025 14:17:04 -0500 Subject: [PATCH 05/23] Fix JWT type to use undefined instead of null for consistency Amp-Thread-ID: https://ampcode.com/threads/T-65c39e0f-21b4-4900-a6a6-35c262cb3ec0 Co-authored-by: Amp --- packages/react/src/hooks/use-checkout-session.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index 9bb26655..24dca8fa 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -162,8 +162,8 @@ export function useCheckoutSession(props?: CheckoutProps) { // If exchange failed and we have a session prop, use legacy flow if (exchangeFailed && props?.session) { - return { session: props.session, jwt: null }; + return { session: props.session, jwt: undefined }; } - return { session: checkoutSessionQuery.data, jwt }; + return { session: checkoutSessionQuery.data, jwt: jwt || undefined }; } From 6af82d3ddb243a3792149cb2494a93ee1a745c30 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Wed, 5 Nov 2025 09:44:15 -0500 Subject: [PATCH 06/23] chore: format code with consistent style - Convert double quotes to single quotes - Standardize indentation (2 spaces) - Apply formatting across React components and utilities Amp-Thread-ID: https://ampcode.com/threads/T-1d878f81-bcc4-4acd-a1d8-11f31b88ecee Co-authored-by: Amp --- .../app/c/[sessionId]/HostedCheckout.tsx | 28 +- examples/nextjs/app/c/[sessionId]/page.tsx | 6 +- examples/nextjs/app/c/page.tsx | 4 +- examples/nextjs/app/checkout.tsx | 58 +- examples/nextjs/app/providers.tsx | 4 +- .../address/utils/use-address-matches.ts | 48 +- .../address/utils/use-address-verification.ts | 88 +- .../src/components/checkout/checkout.tsx | 650 +++--- .../utils/use-apply-delivery-method.ts | 42 +- .../utils/use-apply-fulfillment-location.ts | 124 +- .../discount/utils/use-discount-apply.ts | 324 +-- .../utils/use-get-price-adjustments.ts | 61 +- .../checkout/form/checkout-form-container.tsx | 114 +- .../checkout/form/checkout-form.tsx | 30 +- .../order/use-draft-order-products.ts | 60 +- .../checkout/order/use-draft-order.ts | 78 +- .../checkout/order/use-update-order.ts | 86 +- .../checkout/order/use-update-taxes.ts | 136 +- .../checkout/payment/payment-form.tsx | 4 +- .../payment-methods/credit-card/container.tsx | 10 +- .../payment/utils/use-confirm-checkout.ts | 372 ++-- .../utils/use-apply-shipping-method.ts | 216 +- .../utils/use-draft-order-shipping-methods.ts | 126 +- .../utils/use-get-shipping-methods.ts | 54 +- .../utils/use-remove-shipping-method.ts | 212 +- .../src/components/checkout/target/target.tsx | 4 +- .../checkout/taxes/utils/use-get-taxes.ts | 58 +- packages/react/src/godaddy-provider.tsx | 9 +- .../react/src/hooks/use-checkout-session.tsx | 11 +- packages/react/src/lib/godaddy/godaddy.ts | 1752 ++++++++--------- packages/react/src/lib/godaddy/mutations.ts | 1 + packages/react/src/lib/godaddy/queries.ts | 3 +- packages/react/src/lib/graphql-with-errors.ts | 79 +- packages/react/src/server.ts | 126 +- 34 files changed, 2498 insertions(+), 2480 deletions(-) diff --git a/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx b/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx index a5e7689a..2b8a23e8 100644 --- a/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx +++ b/examples/nextjs/app/c/[sessionId]/HostedCheckout.tsx @@ -1,18 +1,18 @@ -"use client"; +'use client'; -import { Checkout, GoDaddyProvider } from "@godaddy/react"; +import { Checkout, GoDaddyProvider } from '@godaddy/react'; export default function HostedCheckout() { - return ( -
- - - -
- ); + return ( +
+ + + +
+ ); } diff --git a/examples/nextjs/app/c/[sessionId]/page.tsx b/examples/nextjs/app/c/[sessionId]/page.tsx index 56d58a43..bfed8f47 100644 --- a/examples/nextjs/app/c/[sessionId]/page.tsx +++ b/examples/nextjs/app/c/[sessionId]/page.tsx @@ -1,7 +1,7 @@ -import HostedCheckout from "./HostedCheckout"; +import HostedCheckout from './HostedCheckout'; -export const dynamic = "force-dynamic"; +export const dynamic = 'force-dynamic'; export default async function HostedCheckoutPage() { - return ; + return ; } diff --git a/examples/nextjs/app/c/page.tsx b/examples/nextjs/app/c/page.tsx index 4d558f08..a204b22f 100644 --- a/examples/nextjs/app/c/page.tsx +++ b/examples/nextjs/app/c/page.tsx @@ -1,5 +1,5 @@ -export const dynamic = "force-dynamic"; +export const dynamic = 'force-dynamic'; export default async function HostedCheckout() { - return
Test
; + return
Test
; } diff --git a/examples/nextjs/app/checkout.tsx b/examples/nextjs/app/checkout.tsx index 596351a8..f49875e1 100644 --- a/examples/nextjs/app/checkout.tsx +++ b/examples/nextjs/app/checkout.tsx @@ -1,37 +1,37 @@ -"use client"; +'use client'; -import type { CheckoutFormSchema, CheckoutSession } from "@godaddy/react"; -import { Checkout, GoDaddyProvider } from "@godaddy/react"; -import { ReactQueryDevtools } from "@tanstack/react-query-devtools"; -import { z } from "zod"; +import type { CheckoutFormSchema, CheckoutSession } from '@godaddy/react'; +import { Checkout, GoDaddyProvider } from '@godaddy/react'; +import { ReactQueryDevtools } from '@tanstack/react-query-devtools'; +import { z } from 'zod'; /* Override the checkout form schema to make shippingPhone required */ const customSchema: CheckoutFormSchema = { - shippingPhone: z.string().min(1, "Phone number is required"), + shippingPhone: z.string().min(1, 'Phone number is required'), }; export function CheckoutPage({ session }: { session: CheckoutSession }) { - return ( - - - - - ); + return ( + + + + + ); } diff --git a/examples/nextjs/app/providers.tsx b/examples/nextjs/app/providers.tsx index 33a381d4..6af0a6e0 100644 --- a/examples/nextjs/app/providers.tsx +++ b/examples/nextjs/app/providers.tsx @@ -7,8 +7,6 @@ export function Providers({ children }: { children: React.ReactNode }) { const [queryClient] = useState(() => new QueryClient()); return ( - - {children} - + {children} ); } diff --git a/packages/react/src/components/checkout/address/utils/use-address-matches.ts b/packages/react/src/components/checkout/address/utils/use-address-matches.ts index a26c1e65..777dbdbf 100644 --- a/packages/react/src/components/checkout/address/utils/use-address-matches.ts +++ b/packages/react/src/components/checkout/address/utils/use-address-matches.ts @@ -1,7 +1,7 @@ -import { useQuery } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { getAddressMatches } from "@/lib/godaddy/godaddy"; +import { useQuery } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { getAddressMatches } from '@/lib/godaddy/godaddy'; /** * Hook to fetch address matches for address autocomplete @@ -11,26 +11,26 @@ import { getAddressMatches } from "@/lib/godaddy/godaddy"; * @returns Query result with address matches data */ export function useAddressMatches( - debouncedAddressValue: string, - options: { - enabled: boolean; - } = { enabled: true }, + debouncedAddressValue: string, + options: { + enabled: boolean; + } = { enabled: true } ) { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useQuery({ - queryKey: ["addressMatchesQuery", debouncedAddressValue], - queryFn: () => - jwt - ? getAddressMatches( - { query: debouncedAddressValue }, - { accessToken: jwt }, - apiHost, - ) - : getAddressMatches({ query: debouncedAddressValue }, session, apiHost), - enabled: !!debouncedAddressValue && !!session?.id && options.enabled, - placeholderData: (prev) => prev, - select: (data) => data.checkoutSession?.addresses, - }); + return useQuery({ + queryKey: ['addressMatchesQuery', debouncedAddressValue], + queryFn: () => + jwt + ? getAddressMatches( + { query: debouncedAddressValue }, + { accessToken: jwt }, + apiHost + ) + : getAddressMatches({ query: debouncedAddressValue }, session, apiHost), + enabled: !!debouncedAddressValue && !!session?.id && options.enabled, + placeholderData: prev => prev, + select: data => data.checkoutSession?.addresses, + }); } diff --git a/packages/react/src/components/checkout/address/utils/use-address-verification.ts b/packages/react/src/components/checkout/address/utils/use-address-verification.ts index 86b25b3f..4b7598bc 100644 --- a/packages/react/src/components/checkout/address/utils/use-address-verification.ts +++ b/packages/react/src/components/checkout/address/utils/use-address-verification.ts @@ -1,21 +1,21 @@ -import { useQuery } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { verifyAddress } from "@/lib/godaddy/godaddy"; +import { useQuery } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { verifyAddress } from '@/lib/godaddy/godaddy'; /** * Address input for verification */ export interface AddressVerificationInput { - addressLine1: string; - addressLine2: string; - addressLine3: string; - postalCode: string; - countryCode: string; - adminArea1?: string; - adminArea2?: string; - adminArea3?: string; - adminArea4?: string; + addressLine1: string; + addressLine2: string; + addressLine3: string; + postalCode: string; + countryCode: string; + adminArea1?: string; + adminArea2?: string; + adminArea3?: string; + adminArea4?: string; } /** @@ -26,38 +26,38 @@ export interface AddressVerificationInput { * @returns Query result with verified address data */ export function useAddressVerification( - address: AddressVerificationInput, - options: { - enabled: boolean; - } = { enabled: true }, + address: AddressVerificationInput, + options: { + enabled: boolean; + } = { enabled: true } ) { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - const queryKey = [ - "verifyAddressQuery", - { - sessionId: session?.id, - addressLine1: address?.addressLine1?.toLowerCase(), - postalCode: address?.postalCode?.toLowerCase(), - countryCode: address?.countryCode?.toLowerCase(), - city: address?.adminArea3?.toLowerCase(), - state: address?.adminArea1?.toLowerCase(), - }, - ]; + const queryKey = [ + 'verifyAddressQuery', + { + sessionId: session?.id, + addressLine1: address?.addressLine1?.toLowerCase(), + postalCode: address?.postalCode?.toLowerCase(), + countryCode: address?.countryCode?.toLowerCase(), + city: address?.adminArea3?.toLowerCase(), + state: address?.adminArea1?.toLowerCase(), + }, + ]; - return useQuery({ - queryKey, - queryFn: async () => - jwt - ? verifyAddress(address, { accessToken: jwt }, apiHost) - : verifyAddress(address, session, apiHost), - enabled: - options.enabled && - !!session?.id && - !!address?.addressLine1 && - !!address?.postalCode && - !!address?.countryCode, - select: (data) => data.verifyAddress, - }); + return useQuery({ + queryKey, + queryFn: async () => + jwt + ? verifyAddress(address, { accessToken: jwt }, apiHost) + : verifyAddress(address, session, apiHost), + enabled: + options.enabled && + !!session?.id && + !!address?.addressLine1 && + !!address?.postalCode && + !!address?.countryCode, + select: data => data.verifyAddress, + }); } diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 3d4b9348..8632ebc5 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -1,373 +1,375 @@ -"use client"; - -import React, { type ReactNode } from "react"; -import { z } from "zod"; -import { hasRegionData } from "@/components/checkout/address"; -import { checkIsValidPhone } from "@/components/checkout/address/utils/check-is-valid-phone"; -import { DeliveryMethods } from "@/components/checkout/delivery/delivery-method"; -import { getRequiredFieldsFromSchema } from "@/components/checkout/form/utils/get-required-fields-from-schema"; -import { type GoDaddyVariables, useGoDaddyContext } from "@/godaddy-provider"; -import { useCheckoutSession } from "@/hooks/use-checkout-session"; -import { type Theme, useTheme } from "@/hooks/use-theme"; -import { useVariables } from "@/hooks/use-variables"; -import type { TrackingProperties } from "@/tracking/event-properties"; -import { TrackingProvider } from "@/tracking/tracking-provider"; -import type { CheckoutSession } from "@/types"; -import { CheckoutFormContainer } from "./form/checkout-form-container"; -import type { Target } from "./target/target"; +'use client'; + +import React, { type ReactNode } from 'react'; +import { z } from 'zod'; +import { hasRegionData } from '@/components/checkout/address'; +import { checkIsValidPhone } from '@/components/checkout/address/utils/check-is-valid-phone'; +import { DeliveryMethods } from '@/components/checkout/delivery/delivery-method'; +import { getRequiredFieldsFromSchema } from '@/components/checkout/form/utils/get-required-fields-from-schema'; +import { type GoDaddyVariables, useGoDaddyContext } from '@/godaddy-provider'; +import { useCheckoutSession } from '@/hooks/use-checkout-session'; +import { type Theme, useTheme } from '@/hooks/use-theme'; +import { useVariables } from '@/hooks/use-variables'; +import type { TrackingProperties } from '@/tracking/event-properties'; +import { TrackingProvider } from '@/tracking/tracking-provider'; +import type { CheckoutSession } from '@/types'; +import { CheckoutFormContainer } from './form/checkout-form-container'; +import type { Target } from './target/target'; // Utility function for redirecting to success URL after checkout export function redirectToSuccessUrl(successUrl?: string): void { - if (successUrl && typeof window !== "undefined") { - setTimeout(() => { - window.location.href = successUrl; - }, 1000); - } + if (successUrl && typeof window !== 'undefined') { + setTimeout(() => { + window.location.href = successUrl; + }, 1000); + } } export interface CheckoutElements { - input?: string; - select?: string; - button?: string; - card?: string; - checkbox?: string; - radio?: string; + input?: string; + select?: string; + button?: string; + card?: string; + checkbox?: string; + radio?: string; } interface Appearance { - theme?: Theme; - elements?: CheckoutElements; - variables?: Omit; + theme?: Theme; + elements?: CheckoutElements; + variables?: Omit; } export type LayoutSection = - | "express-checkout" - | "contact" - | "shipping" - | "payment" - | "pickup" - | "tips" - | "delivery"; + | 'express-checkout' + | 'contact' + | 'shipping' + | 'payment' + | 'pickup' + | 'tips' + | 'delivery'; export const LayoutSections = { - EXPRESS_CHECKOUT: "express-checkout", - CONTACT: "contact", - SHIPPING: "shipping", - PAYMENT: "payment", - PICKUP: "pickup", - DELIVERY: "delivery", - TIPS: "tips", + EXPRESS_CHECKOUT: 'express-checkout', + CONTACT: 'contact', + SHIPPING: 'shipping', + PAYMENT: 'payment', + PICKUP: 'pickup', + DELIVERY: 'delivery', + TIPS: 'tips', } as const; export type StripeConfig = { - publishableKey: string; - testMode?: boolean; + publishableKey: string; + testMode?: boolean; }; export type GodaddyPaymentsConfig = { - businessId: string; - appId: string; + businessId: string; + appId: string; }; export type SquareConfig = { - locationId: string; - appId: string; + locationId: string; + appId: string; }; export type PayPalConfig = { - clientId: string; - disableFunding?: Array<"credit" | "card" | "paylater" | "venmo">; + clientId: string; + disableFunding?: Array<'credit' | 'card' | 'paylater' | 'venmo'>; }; interface CheckoutContextValue { - elements?: CheckoutElements; - targets?: Partial ReactNode>>; - session?: CheckoutSession | null; - jwt?: string; - isCheckoutDisabled?: boolean; - stripeConfig?: StripeConfig; - godaddyPaymentsConfig?: GodaddyPaymentsConfig; - squareConfig?: SquareConfig; - paypalConfig?: PayPalConfig; - isConfirmingCheckout: boolean; - setIsConfirmingCheckout: (isConfirming: boolean) => void; - checkoutErrors?: string[] | undefined; - setCheckoutErrors: (error?: string[] | undefined) => void; - requiredFields?: { [key: string]: boolean }; + elements?: CheckoutElements; + targets?: Partial< + Record ReactNode> + >; + session?: CheckoutSession | null; + jwt?: string; + isCheckoutDisabled?: boolean; + stripeConfig?: StripeConfig; + godaddyPaymentsConfig?: GodaddyPaymentsConfig; + squareConfig?: SquareConfig; + paypalConfig?: PayPalConfig; + isConfirmingCheckout: boolean; + setIsConfirmingCheckout: (isConfirming: boolean) => void; + checkoutErrors?: string[] | undefined; + setCheckoutErrors: (error?: string[] | undefined) => void; + requiredFields?: { [key: string]: boolean }; } export const checkoutContext = React.createContext({ - isConfirmingCheckout: false, - setIsConfirmingCheckout: () => { - // no op - }, - checkoutErrors: undefined, - setCheckoutErrors: () => { - // no op - }, + isConfirmingCheckout: false, + setIsConfirmingCheckout: () => { + // no op + }, + checkoutErrors: undefined, + setCheckoutErrors: () => { + // no op + }, }); export const useCheckoutContext = () => React.useContext(checkoutContext); export const baseCheckoutSchema = z.object({ - contactEmail: z - .string() - .min(1, "Enter an email") - .email("Enter a valid email"), - deliveryMethod: z.nativeEnum(DeliveryMethods).describe("fulfillmentModes"), - paymentUseShippingAddress: z.boolean().default(true), - shippingFirstName: z.string().max(60), - shippingLastName: z.string().max(60), - shippingPhone: z.string().max(15, "Phone number too long").optional(), - shippingAddressLine1: z.string().max(300), - shippingAddressLine2: z.string().max(300).optional(), - shippingAddressLine3: z.string().max(300).optional(), - shippingAdminArea4: z - .string() - .max(100) - .describe("The neighborhood") - .optional(), - shippingAdminArea3: z - .string() - .max(100) - .describe("City, town, or village") - .optional(), - shippingAdminArea2: z.string().max(100).describe("Sub-locality or suburb"), - shippingAdminArea1: z.string().max(100).describe("State or province"), - shippingPostalCode: z.string().max(60), - shippingCountryCode: z.string().max(2), - shippingMethod: z.string().optional(), - shippingValid: z.literal(true, { - errorMap: () => ({ message: "Invalid shipping address" }), - }), - billingFirstName: z.string().max(60), - billingLastName: z.string().max(60), - billingPhone: z.string().max(15, "Phone number too long").optional(), - billingAddressLine1: z.string().max(300), - billingAddressLine2: z.string().max(300).optional(), - billingAddressLine3: z.string().max(300).optional(), - billingAdminArea4: z - .string() - .max(100) - .describe("The neighborhood") - .optional(), - billingAdminArea3: z - .string() - .max(100) - .describe("City, town, or village") - .optional(), - billingAdminArea2: z.string().max(100).describe("Sub-locality or suburb"), - billingAdminArea1: z.string().max(100).describe("State or province"), - billingPostalCode: z.string().max(60), - billingCountryCode: z.string().max(2), - billingValid: z.literal(true, { - errorMap: () => ({ message: "Invalid billing address" }), - }), - paymentCardNumber: z.string().optional(), - paymentCardNumberDisplay: z.string().optional(), - paymentCardType: z.string().optional(), - paymentExpiryDate: z.string().optional(), - paymentMonth: z.string().nullish(), - paymentYear: z.string().nullish(), - paymentSecurityCode: z.string().optional(), - paymentNameOnCard: z.string().optional(), - notes: z.string().optional(), - pickupDate: z.union([z.string(), z.date()]).nullish(), - pickupTime: z.string().nullish(), - pickupLocationId: z.string().nullish(), - pickupLeadTime: z.number().nullish(), - pickupTimezone: z.string().nullish(), - tipAmount: z.number().optional(), - tipPercentage: z.number().optional(), - paymentMethod: z.string().min(1, "Select a payment method"), - stripePaymentIntent: z.string().optional(), - stripePaymentIntentId: z.string().optional(), + contactEmail: z + .string() + .min(1, 'Enter an email') + .email('Enter a valid email'), + deliveryMethod: z.nativeEnum(DeliveryMethods).describe('fulfillmentModes'), + paymentUseShippingAddress: z.boolean().default(true), + shippingFirstName: z.string().max(60), + shippingLastName: z.string().max(60), + shippingPhone: z.string().max(15, 'Phone number too long').optional(), + shippingAddressLine1: z.string().max(300), + shippingAddressLine2: z.string().max(300).optional(), + shippingAddressLine3: z.string().max(300).optional(), + shippingAdminArea4: z + .string() + .max(100) + .describe('The neighborhood') + .optional(), + shippingAdminArea3: z + .string() + .max(100) + .describe('City, town, or village') + .optional(), + shippingAdminArea2: z.string().max(100).describe('Sub-locality or suburb'), + shippingAdminArea1: z.string().max(100).describe('State or province'), + shippingPostalCode: z.string().max(60), + shippingCountryCode: z.string().max(2), + shippingMethod: z.string().optional(), + shippingValid: z.literal(true, { + errorMap: () => ({ message: 'Invalid shipping address' }), + }), + billingFirstName: z.string().max(60), + billingLastName: z.string().max(60), + billingPhone: z.string().max(15, 'Phone number too long').optional(), + billingAddressLine1: z.string().max(300), + billingAddressLine2: z.string().max(300).optional(), + billingAddressLine3: z.string().max(300).optional(), + billingAdminArea4: z + .string() + .max(100) + .describe('The neighborhood') + .optional(), + billingAdminArea3: z + .string() + .max(100) + .describe('City, town, or village') + .optional(), + billingAdminArea2: z.string().max(100).describe('Sub-locality or suburb'), + billingAdminArea1: z.string().max(100).describe('State or province'), + billingPostalCode: z.string().max(60), + billingCountryCode: z.string().max(2), + billingValid: z.literal(true, { + errorMap: () => ({ message: 'Invalid billing address' }), + }), + paymentCardNumber: z.string().optional(), + paymentCardNumberDisplay: z.string().optional(), + paymentCardType: z.string().optional(), + paymentExpiryDate: z.string().optional(), + paymentMonth: z.string().nullish(), + paymentYear: z.string().nullish(), + paymentSecurityCode: z.string().optional(), + paymentNameOnCard: z.string().optional(), + notes: z.string().optional(), + pickupDate: z.union([z.string(), z.date()]).nullish(), + pickupTime: z.string().nullish(), + pickupLocationId: z.string().nullish(), + pickupLeadTime: z.number().nullish(), + pickupTimezone: z.string().nullish(), + tipAmount: z.number().optional(), + tipPercentage: z.number().optional(), + paymentMethod: z.string().min(1, 'Select a payment method'), + stripePaymentIntent: z.string().optional(), + stripePaymentIntentId: z.string().optional(), }); // We cannot use refine here, as it would not allow extending the schema with session overrides. export type CheckoutFormSchema = Partial<{ - [K in keyof z.infer]: z.ZodTypeAny; + [K in keyof z.infer]: z.ZodTypeAny; }> & - z.ZodRawShape; + z.ZodRawShape; export type CheckoutFormData = z.infer; export interface CheckoutProps { - session?: CheckoutSession | undefined; - appearance?: Appearance; - isCheckoutDisabled?: boolean; - stripeConfig?: StripeConfig; - godaddyPaymentsConfig?: GodaddyPaymentsConfig; - squareConfig?: SquareConfig; - paypalConfig?: PayPalConfig; - layout?: LayoutSection[]; - direction?: "ltr" | "rtl"; - showStoreHours?: boolean; - enableTracking?: boolean; - trackingProperties?: TrackingProperties; - targets?: Partial ReactNode>>; - checkoutFormSchema?: CheckoutFormSchema; - defaultValues?: Pick; + session?: CheckoutSession | undefined; + appearance?: Appearance; + isCheckoutDisabled?: boolean; + stripeConfig?: StripeConfig; + godaddyPaymentsConfig?: GodaddyPaymentsConfig; + squareConfig?: SquareConfig; + paypalConfig?: PayPalConfig; + layout?: LayoutSection[]; + direction?: 'ltr' | 'rtl'; + showStoreHours?: boolean; + enableTracking?: boolean; + trackingProperties?: TrackingProperties; + targets?: Partial ReactNode>>; + checkoutFormSchema?: CheckoutFormSchema; + defaultValues?: Pick; } export function Checkout(props: CheckoutProps) { - const { - checkoutFormSchema, - enableTracking = false, - trackingProperties, - stripeConfig, - godaddyPaymentsConfig, - squareConfig, - paypalConfig, - isCheckoutDisabled, - } = props; - - const [isConfirmingCheckout, setIsConfirmingCheckout] = React.useState(false); - const [checkoutErrors, setCheckoutErrors] = React.useState< - string[] | undefined - >(undefined); - const { t } = useGoDaddyContext(); - - useTheme(); - useVariables(props?.appearance?.variables); - - const { session, jwt } = useCheckoutSession(props); - - const formSchema = React.useMemo(() => { - const extendedSchema = checkoutFormSchema - ? baseCheckoutSchema.extend(checkoutFormSchema) - : baseCheckoutSchema; - - return extendedSchema.superRefine((data, ctx) => { - if (data.billingPhone) { - if (!checkIsValidPhone(String(data?.billingPhone))) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Enter a valid billing phone number", - path: ["billingPhone"], - }); - } - } - - if (data.shippingPhone) { - if (!checkIsValidPhone(String(data?.shippingPhone))) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Enter a valid shipping phone number", - path: ["shippingPhone"], - }); - } - } - - // Billing address validation - only required if not using shipping address OR pickup - const requireBillingAddress = - !data.paymentUseShippingAddress || - data.deliveryMethod === DeliveryMethods.PICKUP; - - if (requireBillingAddress) { - // Basic billing fields required for all countries - const billingFields = [ - { key: "billingFirstName", message: t.validation.enterFirstName }, - { key: "billingLastName", message: t.validation.enterLastName }, - { key: "billingAddressLine1", message: t.validation.enterAddress }, - { key: "billingAdminArea2", message: t.validation.enterCity }, - { - key: "billingPostalCode", - message: t.validation.enterZipPostalCode, - }, - { key: "billingCountryCode", message: t.validation.enterCountry }, - ]; - - if (hasRegionData(String(data.billingCountryCode))) { - billingFields.push({ - key: "billingAdminArea1", - message: t.validation.selectState, - }); - } - - for (const { key, message } of billingFields) { - if (!data[key as keyof typeof data]) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message, - path: [key], - }); - } - } - } - - // Shipping address validation - only required if delivery method is SHIP - const requireShippingAddress = - data.deliveryMethod === DeliveryMethods.SHIP; - - if (requireShippingAddress) { - // Basic shipping fields required for all countries - const shippingFields = [ - { key: "shippingFirstName", message: t.validation.enterFirstName }, - { key: "shippingLastName", message: t.validation.enterLastName }, - { key: "shippingAddressLine1", message: t.validation.enterAddress }, - { key: "shippingAdminArea2", message: t.validation.enterCity }, - { - key: "shippingPostalCode", - message: t.validation.enterZipPostalCode, - }, - { key: "shippingCountryCode", message: t.validation.enterCountry }, - ]; - - if (hasRegionData(String(data.shippingCountryCode))) { - shippingFields.push({ - key: "shippingAdminArea1", - message: t.validation.selectState, - }); - } - - for (const { key, message } of shippingFields) { - if (!data[key as keyof typeof data]) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message, - path: [key], - }); - } - } - } - }); - }, [checkoutFormSchema, t]); - // }, [checkoutFormSchema, session?.paymentMethods]); - - const requiredFields = React.useMemo(() => { - return getRequiredFieldsFromSchema(formSchema); - }, [formSchema]); - - return ( - - - - - - ); + const { + checkoutFormSchema, + enableTracking = false, + trackingProperties, + stripeConfig, + godaddyPaymentsConfig, + squareConfig, + paypalConfig, + isCheckoutDisabled, + } = props; + + const [isConfirmingCheckout, setIsConfirmingCheckout] = React.useState(false); + const [checkoutErrors, setCheckoutErrors] = React.useState< + string[] | undefined + >(undefined); + const { t } = useGoDaddyContext(); + + useTheme(); + useVariables(props?.appearance?.variables); + + const { session, jwt } = useCheckoutSession(props); + + const formSchema = React.useMemo(() => { + const extendedSchema = checkoutFormSchema + ? baseCheckoutSchema.extend(checkoutFormSchema) + : baseCheckoutSchema; + + return extendedSchema.superRefine((data, ctx) => { + if (data.billingPhone) { + if (!checkIsValidPhone(String(data?.billingPhone))) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: 'Enter a valid billing phone number', + path: ['billingPhone'], + }); + } + } + + if (data.shippingPhone) { + if (!checkIsValidPhone(String(data?.shippingPhone))) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: 'Enter a valid shipping phone number', + path: ['shippingPhone'], + }); + } + } + + // Billing address validation - only required if not using shipping address OR pickup + const requireBillingAddress = + !data.paymentUseShippingAddress || + data.deliveryMethod === DeliveryMethods.PICKUP; + + if (requireBillingAddress) { + // Basic billing fields required for all countries + const billingFields = [ + { key: 'billingFirstName', message: t.validation.enterFirstName }, + { key: 'billingLastName', message: t.validation.enterLastName }, + { key: 'billingAddressLine1', message: t.validation.enterAddress }, + { key: 'billingAdminArea2', message: t.validation.enterCity }, + { + key: 'billingPostalCode', + message: t.validation.enterZipPostalCode, + }, + { key: 'billingCountryCode', message: t.validation.enterCountry }, + ]; + + if (hasRegionData(String(data.billingCountryCode))) { + billingFields.push({ + key: 'billingAdminArea1', + message: t.validation.selectState, + }); + } + + for (const { key, message } of billingFields) { + if (!data[key as keyof typeof data]) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message, + path: [key], + }); + } + } + } + + // Shipping address validation - only required if delivery method is SHIP + const requireShippingAddress = + data.deliveryMethod === DeliveryMethods.SHIP; + + if (requireShippingAddress) { + // Basic shipping fields required for all countries + const shippingFields = [ + { key: 'shippingFirstName', message: t.validation.enterFirstName }, + { key: 'shippingLastName', message: t.validation.enterLastName }, + { key: 'shippingAddressLine1', message: t.validation.enterAddress }, + { key: 'shippingAdminArea2', message: t.validation.enterCity }, + { + key: 'shippingPostalCode', + message: t.validation.enterZipPostalCode, + }, + { key: 'shippingCountryCode', message: t.validation.enterCountry }, + ]; + + if (hasRegionData(String(data.shippingCountryCode))) { + shippingFields.push({ + key: 'shippingAdminArea1', + message: t.validation.selectState, + }); + } + + for (const { key, message } of shippingFields) { + if (!data[key as keyof typeof data]) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message, + path: [key], + }); + } + } + } + }); + }, [checkoutFormSchema, t]); + // }, [checkoutFormSchema, session?.paymentMethods]); + + const requiredFields = React.useMemo(() => { + return getRequiredFieldsFromSchema(formSchema); + }, [formSchema]); + + return ( + + + + + + ); } diff --git a/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts b/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts index 0e6be47d..01a6879f 100644 --- a/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts +++ b/packages/react/src/components/checkout/delivery/utils/use-apply-delivery-method.ts @@ -1,25 +1,25 @@ -import { useMutation } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { applyDeliveryMethod } from "@/lib/godaddy/godaddy"; -import type { ApplyCheckoutSessionDeliveryMethodInput } from "@/types"; +import { useMutation } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { applyDeliveryMethod } from '@/lib/godaddy/godaddy'; +import type { ApplyCheckoutSessionDeliveryMethodInput } from '@/types'; export function useApplyDeliveryMethod() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: session?.id - ? ["apply-delivery-method", session.id] - : ["apply-delivery-method"], - mutationFn: async ( - mode: ApplyCheckoutSessionDeliveryMethodInput["input"]["mode"], - ) => { - if (!session) return; - const data = jwt - ? await applyDeliveryMethod({ mode }, { accessToken: jwt }, apiHost) - : await applyDeliveryMethod({ mode }, session, apiHost); - return data; - }, - }); + return useMutation({ + mutationKey: session?.id + ? ['apply-delivery-method', session.id] + : ['apply-delivery-method'], + mutationFn: async ( + mode: ApplyCheckoutSessionDeliveryMethodInput['input']['mode'] + ) => { + if (!session) return; + const data = jwt + ? await applyDeliveryMethod({ mode }, { accessToken: jwt }, apiHost) + : await applyDeliveryMethod({ mode }, session, apiHost); + return data; + }, + }); } diff --git a/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts b/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts index e525d42c..e94e92d9 100644 --- a/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts +++ b/packages/react/src/components/checkout/delivery/utils/use-apply-fulfillment-location.ts @@ -1,68 +1,68 @@ -import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useUpdateTaxes } from "@/components/checkout/order/use-update-taxes"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { applyFulfillmentLocation } from "@/lib/godaddy/godaddy"; -import type { ApplyCheckoutSessionFulfillmentLocationInput } from "@/types"; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useUpdateTaxes } from '@/components/checkout/order/use-update-taxes'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { applyFulfillmentLocation } from '@/lib/godaddy/godaddy'; +import type { ApplyCheckoutSessionFulfillmentLocationInput } from '@/types'; export function useApplyFulfillmentLocation() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); - const updateTaxes = useUpdateTaxes(); - const queryClient = useQueryClient(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const updateTaxes = useUpdateTaxes(); + const queryClient = useQueryClient(); - return useMutation({ - mutationKey: session?.id - ? ["apply-fulfillment-location", session.id] - : ["apply-fulfillment-location"], - mutationFn: async ({ - fulfillmentLocationId, - }: { - fulfillmentLocationId: ApplyCheckoutSessionFulfillmentLocationInput["input"]["fulfillmentLocationId"]; - locationAddress?: { - addressLine1?: string | null; - addressLine2?: string | null; - addressLine3?: string | null; - adminArea1?: string | null; - adminArea2?: string | null; - adminArea3?: string | null; - countryCode?: string | null; - postalCode?: string | null; - }; - }) => { - // Don't process empty string or undefined location IDs - if (!session || !fulfillmentLocationId) return; + return useMutation({ + mutationKey: session?.id + ? ['apply-fulfillment-location', session.id] + : ['apply-fulfillment-location'], + mutationFn: async ({ + fulfillmentLocationId, + }: { + fulfillmentLocationId: ApplyCheckoutSessionFulfillmentLocationInput['input']['fulfillmentLocationId']; + locationAddress?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }; + }) => { + // Don't process empty string or undefined location IDs + if (!session || !fulfillmentLocationId) return; - const data = jwt - ? await applyFulfillmentLocation( - { fulfillmentLocationId }, - { accessToken: jwt }, - apiHost, - ) - : await applyFulfillmentLocation( - { fulfillmentLocationId }, - session, - apiHost, - ); - return data; - }, - onSuccess: (_data, { locationAddress }) => { - if (!session) return; + const data = jwt + ? await applyFulfillmentLocation( + { fulfillmentLocationId }, + { accessToken: jwt }, + apiHost + ) + : await applyFulfillmentLocation( + { fulfillmentLocationId }, + session, + apiHost + ); + return data; + }, + onSuccess: (_data, { locationAddress }) => { + if (!session) return; - if (session?.enableTaxCollection && locationAddress) { - updateTaxes.mutate(locationAddress); - } else { - queryClient.invalidateQueries({ - queryKey: ["draft-order", session.id], - }); - } - }, - onError: (_error, { locationAddress }) => { - // Graceful degradation: still calculate taxes with pickup location address - // even if fulfillment location API fails - if (session?.enableTaxCollection && locationAddress) { - updateTaxes.mutate(locationAddress); - } - }, - }); + if (session?.enableTaxCollection && locationAddress) { + updateTaxes.mutate(locationAddress); + } else { + queryClient.invalidateQueries({ + queryKey: ['draft-order', session.id], + }); + } + }, + onError: (_error, { locationAddress }) => { + // Graceful degradation: still calculate taxes with pickup location address + // even if fulfillment location API fails + if (session?.enableTaxCollection && locationAddress) { + updateTaxes.mutate(locationAddress); + } + }, + }); } diff --git a/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts b/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts index b6494c82..b235bbbf 100644 --- a/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts +++ b/packages/react/src/components/checkout/discount/utils/use-discount-apply.ts @@ -1,173 +1,173 @@ -import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { useFormContext } from "react-hook-form"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { DeliveryMethods } from "@/components/checkout/delivery/delivery-method"; -import { useDraftOrder } from "@/components/checkout/order/use-draft-order"; -import { useUpdateTaxes } from "@/components/checkout/order/use-update-taxes"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import type { ResultOf } from "@/gql.tada"; -import { applyDiscount } from "@/lib/godaddy/godaddy"; -import type { DraftOrderQuery } from "@/lib/godaddy/queries"; -import type { ApplyCheckoutSessionDiscountInput } from "@/types"; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { useFormContext } from 'react-hook-form'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { DeliveryMethods } from '@/components/checkout/delivery/delivery-method'; +import { useDraftOrder } from '@/components/checkout/order/use-draft-order'; +import { useUpdateTaxes } from '@/components/checkout/order/use-update-taxes'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import type { ResultOf } from '@/gql.tada'; +import { applyDiscount } from '@/lib/godaddy/godaddy'; +import type { DraftOrderQuery } from '@/lib/godaddy/queries'; +import type { ApplyCheckoutSessionDiscountInput } from '@/types'; export function useDiscountApply() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); - const form = useFormContext(); - const queryClient = useQueryClient(); - const updateTaxes = useUpdateTaxes(); - const { data: draftOrder } = useDraftOrder(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const form = useFormContext(); + const queryClient = useQueryClient(); + const updateTaxes = useUpdateTaxes(); + const { data: draftOrder } = useDraftOrder(); - return useMutation({ - mutationKey: session?.id - ? ["apply-discount", session.id] - : ["apply-discount"], - mutationFn: async ({ - discountCodes, - }: { - discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"]; - }) => { - const data = jwt - ? await applyDiscount(discountCodes, { accessToken: jwt }, apiHost) - : await applyDiscount(discountCodes, session, apiHost); - return data; - }, - onSuccess: (data, { discountCodes }) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ['apply-discount', session.id] + : ['apply-discount'], + mutationFn: async ({ + discountCodes, + }: { + discountCodes: ApplyCheckoutSessionDiscountInput['input']['discountCodes']; + }) => { + const data = jwt + ? await applyDiscount(discountCodes, { accessToken: jwt }, apiHost) + : await applyDiscount(discountCodes, session, apiHost); + return data; + }, + onSuccess: (data, { discountCodes }) => { + if (!session) return; - const discountTotal = - data?.applyCheckoutSessionDiscount?.totals?.discountTotal; - const responseData = data?.applyCheckoutSessionDiscount; - // Update the cached draft-order query (includes totals) + const discountTotal = + data?.applyCheckoutSessionDiscount?.totals?.discountTotal; + const responseData = data?.applyCheckoutSessionDiscount; + // Update the cached draft-order query (includes totals) - if (discountTotal) { - queryClient.setQueryData( - ["draft-order", session.id], - (old: ResultOf | undefined) => { - if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - totals: { - ...old?.checkoutSession?.draftOrder?.totals, - discountTotal, - total: - responseData?.totals?.total || - old?.checkoutSession?.draftOrder?.totals?.total, - }, - // Update order-level discounts - discounts: - responseData?.discounts || - old?.checkoutSession?.draftOrder?.discounts || - [], - // Update lineItem discounts - lineItems: - responseData?.lineItems - ?.map((responseLineItem) => { - const existingLineItem = - old?.checkoutSession?.draftOrder?.lineItems?.find( - (li) => li.id === responseLineItem.id, - ); - return existingLineItem - ? { - ...existingLineItem, - discounts: responseLineItem.discounts || [], - } - : existingLineItem; - }) - .filter(Boolean) || - old?.checkoutSession?.draftOrder?.lineItems, - // Update shippingLine discounts - shippingLines: - responseData?.shippingLines - ?.map((responseShippingLine, index) => { - const existingShippingLine = - old?.checkoutSession?.draftOrder?.shippingLines?.[ - index - ]; - return existingShippingLine - ? { - ...existingShippingLine, - discounts: responseShippingLine.discounts || [], - } - : existingShippingLine; - }) - .filter(Boolean) || - old?.checkoutSession?.draftOrder?.shippingLines, - }, - }, - }; - }, - ); - } + if (discountTotal) { + queryClient.setQueryData( + ['draft-order', session.id], + (old: ResultOf | undefined) => { + if (!old) return old; + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + totals: { + ...old?.checkoutSession?.draftOrder?.totals, + discountTotal, + total: + responseData?.totals?.total || + old?.checkoutSession?.draftOrder?.totals?.total, + }, + // Update order-level discounts + discounts: + responseData?.discounts || + old?.checkoutSession?.draftOrder?.discounts || + [], + // Update lineItem discounts + lineItems: + responseData?.lineItems + ?.map(responseLineItem => { + const existingLineItem = + old?.checkoutSession?.draftOrder?.lineItems?.find( + li => li.id === responseLineItem.id + ); + return existingLineItem + ? { + ...existingLineItem, + discounts: responseLineItem.discounts || [], + } + : existingLineItem; + }) + .filter(Boolean) || + old?.checkoutSession?.draftOrder?.lineItems, + // Update shippingLine discounts + shippingLines: + responseData?.shippingLines + ?.map((responseShippingLine, index) => { + const existingShippingLine = + old?.checkoutSession?.draftOrder?.shippingLines?.[ + index + ]; + return existingShippingLine + ? { + ...existingShippingLine, + discounts: responseShippingLine.discounts || [], + } + : existingShippingLine; + }) + .filter(Boolean) || + old?.checkoutSession?.draftOrder?.shippingLines, + }, + }, + }; + } + ); + } - if (!discountCodes?.length) { - // If no discount codes, we need to remove any existing discounts from the cache - queryClient.setQueryData( - ["draft-order", session.id], - (old: ResultOf | undefined) => { - if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - discounts: [], - lineItems: old?.checkoutSession?.draftOrder?.lineItems?.map( - (li) => ({ - ...li, - discounts: [], - }), - ), - shippingLines: - old?.checkoutSession?.draftOrder?.shippingLines?.map( - (sl) => ({ - ...sl, - discounts: [], - }), - ) || null, - }, - }, - }; - }, - ); - } + if (!discountCodes?.length) { + // If no discount codes, we need to remove any existing discounts from the cache + queryClient.setQueryData( + ['draft-order', session.id], + (old: ResultOf | undefined) => { + if (!old) return old; + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + discounts: [], + lineItems: old?.checkoutSession?.draftOrder?.lineItems?.map( + li => ({ + ...li, + discounts: [], + }) + ), + shippingLines: + old?.checkoutSession?.draftOrder?.shippingLines?.map( + sl => ({ + ...sl, + discounts: [], + }) + ) || null, + }, + }, + }; + } + ); + } - if (session?.enableTaxCollection) { - // If the delivery method is pickup, we need to update taxes based on the pickup location - // Otherwise, we can just update taxes without a specific address - // TODO: Move this to API layer - const deliveryMethod = form.getValues("deliveryMethod"); - const isPickup = deliveryMethod === DeliveryMethods.PICKUP; + if (session?.enableTaxCollection) { + // If the delivery method is pickup, we need to update taxes based on the pickup location + // Otherwise, we can just update taxes without a specific address + // TODO: Move this to API layer + const deliveryMethod = form.getValues('deliveryMethod'); + const isPickup = deliveryMethod === DeliveryMethods.PICKUP; - if (isPickup) { - const pickupLocationId = form.getValues("pickupLocationId"); - const locationAddress = session?.locations?.find( - (loc) => loc.id === pickupLocationId, - )?.address; + if (isPickup) { + const pickupLocationId = form.getValues('pickupLocationId'); + const locationAddress = session?.locations?.find( + loc => loc.id === pickupLocationId + )?.address; - if (locationAddress) { - updateTaxes.mutate(locationAddress); - } - } else { - // Only update taxes if we have the required location data - const hasRequiredLocationData = - draftOrder?.shipping?.address?.postalCode && - draftOrder?.shipping?.address?.countryCode; + if (locationAddress) { + updateTaxes.mutate(locationAddress); + } + } else { + // Only update taxes if we have the required location data + const hasRequiredLocationData = + draftOrder?.shipping?.address?.postalCode && + draftOrder?.shipping?.address?.countryCode; - if (hasRequiredLocationData) { - updateTaxes.mutate(undefined); - } - } - } else { - queryClient.invalidateQueries({ - queryKey: ["draft-order", session.id], - }); - } - }, - }); + if (hasRequiredLocationData) { + updateTaxes.mutate(undefined); + } + } + } else { + queryClient.invalidateQueries({ + queryKey: ['draft-order', session.id], + }); + } + }, + }); } diff --git a/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts b/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts index 0d160127..eebfdf1a 100644 --- a/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts +++ b/packages/react/src/components/checkout/discount/utils/use-get-price-adjustments.ts @@ -1,38 +1,41 @@ -import { useMutation } from "@tanstack/react-query"; +import { useMutation } from '@tanstack/react-query'; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { getDraftOrderPriceAdjustments } from "@/lib/godaddy/godaddy"; -import type { DraftOrderPriceAdjustmentsQueryInput } from "@/types"; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { getDraftOrderPriceAdjustments } from '@/lib/godaddy/godaddy'; +import type { DraftOrderPriceAdjustmentsQueryInput } from '@/types'; type Vars = { - discountCodes: DraftOrderPriceAdjustmentsQueryInput["discountCodes"]; - shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"]; + discountCodes: DraftOrderPriceAdjustmentsQueryInput['discountCodes']; + shippingLines?: DraftOrderPriceAdjustmentsQueryInput['shippingLines']; }; export function useGetPriceAdjustments() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: ["get-price-adjustments-by-discount-code", session?.id ?? "no-session"], - mutationFn: async ({ discountCodes, shippingLines }) => { - const data = jwt - ? await getDraftOrderPriceAdjustments( - { accessToken: jwt }, - discountCodes, - shippingLines, - apiHost, - ) - : await getDraftOrderPriceAdjustments( - session, - discountCodes, - shippingLines, - apiHost, - ); + return useMutation({ + mutationKey: [ + 'get-price-adjustments-by-discount-code', + session?.id ?? 'no-session', + ], + mutationFn: async ({ discountCodes, shippingLines }) => { + const data = jwt + ? await getDraftOrderPriceAdjustments( + { accessToken: jwt }, + discountCodes, + shippingLines, + apiHost + ) + : await getDraftOrderPriceAdjustments( + session, + discountCodes, + shippingLines, + apiHost + ); - return data.checkoutSession?.draftOrder?.calculatedAdjustments - ?.totalDiscountAmount?.value; - }, - }); + return data.checkoutSession?.draftOrder?.calculatedAdjustments + ?.totalDiscountAmount?.value; + }, + }); } diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index 221600e6..8b1a6585 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -1,73 +1,73 @@ -import { useMemo } from "react"; -import type { z } from "zod"; +import { useMemo } from 'react'; +import type { z } from 'zod'; import { - type CheckoutProps, - useCheckoutContext, -} from "@/components/checkout/checkout"; -import { CheckoutSkeleton } from "@/components/checkout/checkout-skeleton"; -import { CheckoutForm } from "@/components/checkout/form/checkout-form"; + type CheckoutProps, + useCheckoutContext, +} from '@/components/checkout/checkout'; +import { CheckoutSkeleton } from '@/components/checkout/checkout-skeleton'; +import { CheckoutForm } from '@/components/checkout/form/checkout-form'; import { - useDraftOrder, - useDraftOrderLineItems, -} from "@/components/checkout/order/use-draft-order"; -import { useDraftOrderProductsMap } from "@/components/checkout/order/use-draft-order-products"; + useDraftOrder, + useDraftOrderLineItems, +} from '@/components/checkout/order/use-draft-order'; +import { useDraftOrderProductsMap } from '@/components/checkout/order/use-draft-order-products'; import { - mapOrderToFormValues, - mapSkusToItemsDisplay, -} from "@/components/checkout/utils/checkout-transformers"; + mapOrderToFormValues, + mapSkusToItemsDisplay, +} from '@/components/checkout/utils/checkout-transformers'; -interface CheckoutFormContainerProps extends Omit { - schema: z.ZodObject | z.ZodEffects; +interface CheckoutFormContainerProps extends Omit { + schema: z.ZodObject | z.ZodEffects; } export function CheckoutFormContainer({ - schema, - ...props + schema, + ...props }: CheckoutFormContainerProps) { - const { session, isConfirmingCheckout } = useCheckoutContext(); + const { session, isConfirmingCheckout } = useCheckoutContext(); - const draftOrderQuery = useDraftOrder(); - const draftOrderLineItemsQuery = useDraftOrderLineItems(); - const skusMap = useDraftOrderProductsMap(); + const draftOrderQuery = useDraftOrder(); + const draftOrderLineItemsQuery = useDraftOrderLineItems(); + const skusMap = useDraftOrderProductsMap(); - const { data: order } = draftOrderQuery; - const { data: lineItems } = draftOrderLineItemsQuery; + const { data: order } = draftOrderQuery; + const { data: lineItems } = draftOrderLineItemsQuery; - const items = useMemo( - () => mapSkusToItemsDisplay(lineItems, skusMap), - [lineItems, skusMap], - ); + const items = useMemo( + () => mapSkusToItemsDisplay(lineItems, skusMap), + [lineItems, skusMap] + ); - const formValues = useMemo( - () => ({ - ...mapOrderToFormValues({ - order, - defaultValues: props.defaultValues, - defaultCountryCode: session?.shipping?.originAddress?.countryCode, - }), - }), - [order, props.defaultValues, session?.shipping?.originAddress?.countryCode], - ); + const formValues = useMemo( + () => ({ + ...mapOrderToFormValues({ + order, + defaultValues: props.defaultValues, + defaultCountryCode: session?.shipping?.originAddress?.countryCode, + }), + }), + [order, props.defaultValues, session?.shipping?.originAddress?.countryCode] + ); - if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { - const returnUrl = session?.returnUrl; - if (returnUrl) { - window.location.href = returnUrl; - return null; - } - } + if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { + const returnUrl = session?.returnUrl; + if (returnUrl) { + window.location.href = returnUrl; + return null; + } + } - if (draftOrderQuery.isLoading) { - return ; - } + if (draftOrderQuery.isLoading) { + return ; + } - return ( - - ); + return ( + + ); } diff --git a/packages/react/src/components/checkout/form/checkout-form.tsx b/packages/react/src/components/checkout/form/checkout-form.tsx index e0381b53..d0db5fae 100644 --- a/packages/react/src/components/checkout/form/checkout-form.tsx +++ b/packages/react/src/components/checkout/form/checkout-form.tsx @@ -308,13 +308,15 @@ export function CheckoutForm({ - - - - - - - {session?.enableTips && ( + {session?.enableShipping ? ( + + + + + + + ) : null} + {session?.enableTips ? ( @@ -324,8 +326,8 @@ export function CheckoutForm({ /> - )} - {isPickup && session?.enableLocalPickup && ( + ) : null} + {isPickup && session?.enableLocalPickup ? ( - )} - {isShipping && ( + ) : null} + {isShipping && session?.enableShipping ? ( - )} + ) : null} ) : ( diff --git a/packages/react/src/components/checkout/order/use-draft-order-products.ts b/packages/react/src/components/checkout/order/use-draft-order-products.ts index 589198c4..544bbb67 100644 --- a/packages/react/src/components/checkout/order/use-draft-order-products.ts +++ b/packages/react/src/components/checkout/order/use-draft-order-products.ts @@ -1,29 +1,29 @@ -import { useQuery } from "@tanstack/react-query"; -import { useMemo } from "react"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { getProductsFromOrderSkus } from "@/lib/godaddy/godaddy"; -import type { SKUProduct } from "@/types"; +import { useQuery } from '@tanstack/react-query'; +import { useMemo } from 'react'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { getProductsFromOrderSkus } from '@/lib/godaddy/godaddy'; +import type { SKUProduct } from '@/types'; /** * Hook to fetch products from SKUs in the draft order * @returns Query result with SKU product data */ export function useDraftOrderProducts() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useQuery({ - queryKey: session?.id - ? ["draft-order-products", session.id] - : ["draft-order-products"], - queryFn: () => - jwt - ? getProductsFromOrderSkus({ accessToken: jwt }, apiHost) - : getProductsFromOrderSkus(session, apiHost), - enabled: !!session?.id, - select: (data) => data.checkoutSession?.skus?.edges, - }); + return useQuery({ + queryKey: session?.id + ? ['draft-order-products', session.id] + : ['draft-order-products'], + queryFn: () => + jwt + ? getProductsFromOrderSkus({ accessToken: jwt }, apiHost) + : getProductsFromOrderSkus(session, apiHost), + enabled: !!session?.id, + select: data => data.checkoutSession?.skus?.edges, + }); } /** @@ -31,19 +31,19 @@ export function useDraftOrderProducts() { * @returns Map of SKU ID to SKU product data */ export function useDraftOrderProductsMap() { - const { data: skus } = useDraftOrderProducts(); + const { data: skus } = useDraftOrderProducts(); - return useMemo(() => { - if (!skus) return {}; + return useMemo(() => { + if (!skus) return {}; - const result: Record = {}; + const result: Record = {}; - for (const edge of skus) { - if (edge?.node?.code) { - result[edge.node.code] = edge.node; - } - } + for (const edge of skus) { + if (edge?.node?.code) { + result[edge.node.code] = edge.node; + } + } - return result; - }, [skus]); + return result; + }, [skus]); } diff --git a/packages/react/src/components/checkout/order/use-draft-order.ts b/packages/react/src/components/checkout/order/use-draft-order.ts index dc988731..ceb4329f 100644 --- a/packages/react/src/components/checkout/order/use-draft-order.ts +++ b/packages/react/src/components/checkout/order/use-draft-order.ts @@ -1,13 +1,13 @@ -import { type UseQueryResult, useQuery } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { getDraftOrder } from "@/lib/godaddy/godaddy"; +import { type UseQueryResult, useQuery } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { getDraftOrder } from '@/lib/godaddy/godaddy'; import type { - DraftOrder, - DraftOrderSession, - ShippingLines, - Totals, -} from "@/types"; + DraftOrder, + DraftOrderSession, + ShippingLines, + Totals, +} from '@/types'; /** * Hook to fetch the entire draft order @@ -16,48 +16,48 @@ import type { * @returns Query result with draft order data */ export function useDraftOrder( - select?: (data: DraftOrderSession) => TData, - key = "draft-order", + select?: (data: DraftOrderSession) => TData, + key = 'draft-order' ): UseQueryResult { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useQuery({ - queryKey: session?.id ? [key, session.id] : [key], - queryFn: () => - jwt - ? getDraftOrder({ accessToken: jwt }, apiHost) - : getDraftOrder(session, apiHost), - enabled: !!jwt, - select: select ?? ((data) => data.checkoutSession?.draftOrder as TData), - retry: 3, - }); + return useQuery({ + queryKey: session?.id ? [key, session.id] : [key], + queryFn: () => + jwt + ? getDraftOrder({ accessToken: jwt }, apiHost) + : getDraftOrder(session, apiHost), + enabled: !!jwt, + select: select ?? (data => data.checkoutSession?.draftOrder as TData), + retry: 3, + }); } export function useDraftOrderLineItems() { - return useDraftOrder( - (data) => data.checkoutSession?.draftOrder?.lineItems ?? null, - "draft-order", - ); + return useDraftOrder( + data => data.checkoutSession?.draftOrder?.lineItems ?? null, + 'draft-order' + ); } export function useDraftOrderShippingAddress() { - return useDraftOrder["address"]>( - (data) => data.checkoutSession?.draftOrder?.shipping?.address ?? null, - "draft-order", - ); + return useDraftOrder['address']>( + data => data.checkoutSession?.draftOrder?.shipping?.address ?? null, + 'draft-order' + ); } export function useDraftOrderTotals() { - return useDraftOrder( - (data) => data.checkoutSession?.draftOrder?.totals ?? null, - "draft-order", - ); + return useDraftOrder( + data => data.checkoutSession?.draftOrder?.totals ?? null, + 'draft-order' + ); } export function useDraftOrderShipping() { - return useDraftOrder( - (data) => data.checkoutSession?.draftOrder?.shippingLines?.[0] ?? null, - "draft-order", - ); + return useDraftOrder( + data => data.checkoutSession?.draftOrder?.shippingLines?.[0] ?? null, + 'draft-order' + ); } diff --git a/packages/react/src/components/checkout/order/use-update-order.ts b/packages/react/src/components/checkout/order/use-update-order.ts index 039aa047..3297e72c 100644 --- a/packages/react/src/components/checkout/order/use-update-order.ts +++ b/packages/react/src/components/checkout/order/use-update-order.ts @@ -1,48 +1,48 @@ -import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useUpdateTaxes } from "@/components/checkout/order/use-update-taxes"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { updateDraftOrder } from "@/lib/godaddy/godaddy"; -import type { UpdateDraftOrderInput } from "@/types"; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useUpdateTaxes } from '@/components/checkout/order/use-update-taxes'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { updateDraftOrder } from '@/lib/godaddy/godaddy'; +import type { UpdateDraftOrderInput } from '@/types'; export function useUpdateOrder() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); - const updateTaxes = useUpdateTaxes(); - const queryClient = useQueryClient(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const updateTaxes = useUpdateTaxes(); + const queryClient = useQueryClient(); - return useMutation({ - mutationKey: ["update-draft-order"], - mutationFn: async ({ - input, - }: { - input: UpdateDraftOrderInput["input"]; - }) => { - const data = jwt - ? await updateDraftOrder(input, { accessToken: jwt }, apiHost) - : await updateDraftOrder(input, session, apiHost); - return data; - }, - onSuccess: (_data, { input }) => { - if (!session) return; + return useMutation({ + mutationKey: ['update-draft-order'], + mutationFn: async ({ + input, + }: { + input: UpdateDraftOrderInput['input']; + }) => { + const data = jwt + ? await updateDraftOrder(input, { accessToken: jwt }, apiHost) + : await updateDraftOrder(input, session, apiHost); + return data; + }, + onSuccess: (_data, { input }) => { + if (!session) return; - /* Refetch taxes and shipping methods on address changes */ - if ( - input.shipping?.address || - (!input.shipping?.address && input.billing?.address) - ) { - if (session?.enableTaxCollection) { - updateTaxes.mutate(undefined); - } else { - queryClient.invalidateQueries({ - queryKey: ["draft-order", session.id], - }); - } - } else { - queryClient.invalidateQueries({ - queryKey: ["draft-order", session.id], - }); - } - }, - }); + /* Refetch taxes and shipping methods on address changes */ + if ( + input.shipping?.address || + (!input.shipping?.address && input.billing?.address) + ) { + if (session?.enableTaxCollection) { + updateTaxes.mutate(undefined); + } else { + queryClient.invalidateQueries({ + queryKey: ['draft-order', session.id], + }); + } + } else { + queryClient.invalidateQueries({ + queryKey: ['draft-order', session.id], + }); + } + }, + }); } diff --git a/packages/react/src/components/checkout/order/use-update-taxes.ts b/packages/react/src/components/checkout/order/use-update-taxes.ts index 4aadff74..2dbc88cf 100644 --- a/packages/react/src/components/checkout/order/use-update-taxes.ts +++ b/packages/react/src/components/checkout/order/use-update-taxes.ts @@ -1,74 +1,74 @@ -import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import type { ResultOf } from "@/gql.tada"; -import { updateDraftOrderTaxes } from "@/lib/godaddy/godaddy"; -import type { DraftOrderQuery } from "@/lib/godaddy/queries"; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import type { ResultOf } from '@/gql.tada'; +import { updateDraftOrderTaxes } from '@/lib/godaddy/godaddy'; +import type { DraftOrderQuery } from '@/lib/godaddy/queries'; export function useUpdateTaxes() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); - const queryClient = useQueryClient(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const queryClient = useQueryClient(); - return useMutation({ - mutationKey: session?.id - ? ["update-draft-order-taxes", session.id] - : ["update-draft-order-taxes"], - mutationFn: async (destination?: { - addressLine1?: string | null; - addressLine2?: string | null; - addressLine3?: string | null; - adminArea1?: string | null; - adminArea2?: string | null; - adminArea3?: string | null; - countryCode?: string | null; - postalCode?: string | null; - }) => { - const data = jwt - ? await updateDraftOrderTaxes( - { accessToken: jwt }, - destination, - apiHost, - ) - : await updateDraftOrderTaxes(session, destination, apiHost); - return data; - }, - onSuccess: (data) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ['update-draft-order-taxes', session.id] + : ['update-draft-order-taxes'], + mutationFn: async (destination?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }) => { + const data = jwt + ? await updateDraftOrderTaxes( + { accessToken: jwt }, + destination, + apiHost + ) + : await updateDraftOrderTaxes(session, destination, apiHost); + return data; + }, + onSuccess: data => { + if (!session) return; - // Extract shippingTotal from mutation response - const taxesTotal = data?.calculateCheckoutSessionTaxes?.totalTaxAmount; + // Extract shippingTotal from mutation response + const taxesTotal = data?.calculateCheckoutSessionTaxes?.totalTaxAmount; - // Update the cached draft-order query (includes totals) - if (taxesTotal) { - queryClient.setQueryData( - ["draft-order", session.id], - (old: ResultOf | undefined) => { - if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - totals: { - ...old?.checkoutSession?.draftOrder?.totals, - taxesTotal: { - ...taxesTotal, - }, - }, - }, - }, - }; - }, - ); - } - }, - onSettled: () => { - if (!session) return; - queryClient.invalidateQueries({ - queryKey: ["draft-order", session.id], - }); - }, - }); + // Update the cached draft-order query (includes totals) + if (taxesTotal) { + queryClient.setQueryData( + ['draft-order', session.id], + (old: ResultOf | undefined) => { + if (!old) return old; + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + totals: { + ...old?.checkoutSession?.draftOrder?.totals, + taxesTotal: { + ...taxesTotal, + }, + }, + }, + }, + }; + } + ); + } + }, + onSettled: () => { + if (!session) return; + queryClient.invalidateQueries({ + queryKey: ['draft-order', session.id], + }); + }, + }); } diff --git a/packages/react/src/components/checkout/payment/payment-form.tsx b/packages/react/src/components/checkout/payment/payment-form.tsx index 90090bee..ca227327 100644 --- a/packages/react/src/components/checkout/payment/payment-form.tsx +++ b/packages/react/src/components/checkout/payment/payment-form.tsx @@ -420,8 +420,8 @@ export function PaymentForm( ) : null} {isShipping && - paymentMethod !== PaymentMethodType.CREDIT_CARD && - session?.enableBillingAddressCollection ? ( + session?.enableShipping && + paymentMethod !== PaymentMethodType.CREDIT_CARD ? ( ) : null} {isBillingAddressRequired ? ( diff --git a/packages/react/src/components/checkout/payment/payment-methods/credit-card/container.tsx b/packages/react/src/components/checkout/payment/payment-methods/credit-card/container.tsx index 54ccdea4..24f693f1 100644 --- a/packages/react/src/components/checkout/payment/payment-methods/credit-card/container.tsx +++ b/packages/react/src/components/checkout/payment/payment-methods/credit-card/container.tsx @@ -20,9 +20,10 @@ export function CreditCardContainer({ children }: { children?: ReactNode }) { const isShipping = deliveryMethod === DeliveryMethods.SHIP; const isPickup = deliveryMethod === DeliveryMethods.PICKUP; const isBillingAddressRequired = - session?.enableBillingAddressCollection && - (!useShippingAddress || isPickup) && - paymentMethod === PaymentMethodType.CREDIT_CARD; + !session?.enableShipping || + (session?.enableBillingAddressCollection && + (!useShippingAddress || isPickup) && + paymentMethod === PaymentMethodType.CREDIT_CARD); const getPaymentMethodDescription = useCallback((): string | undefined => { if (paymentMethod === 'card') { @@ -39,7 +40,8 @@ export function CreditCardContainer({ children }: { children?: ReactNode }) { <> {description &&
{description}
} {children} - {isShipping && + {session?.enableShipping && + isShipping && paymentMethod === PaymentMethodType.CREDIT_CARD && session?.enableBillingAddressCollection && ( diff --git a/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts b/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts index 2ae0e4c8..ebed921a 100644 --- a/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts +++ b/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts @@ -1,206 +1,206 @@ -import { useMutation } from "@tanstack/react-query"; -import { useFormContext } from "react-hook-form"; +import { useMutation } from '@tanstack/react-query'; +import { useFormContext } from 'react-hook-form'; import { - redirectToSuccessUrl, - useCheckoutContext, -} from "@/components/checkout/checkout"; -import { DeliveryMethods } from "@/components/checkout/delivery/delivery-method"; -import { buildPickupPayload } from "@/components/checkout/pickup/utils/build-pickup-payload"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { confirmCheckout } from "@/lib/godaddy/godaddy"; -import { eventIds } from "@/tracking/events"; + redirectToSuccessUrl, + useCheckoutContext, +} from '@/components/checkout/checkout'; +import { DeliveryMethods } from '@/components/checkout/delivery/delivery-method'; +import { buildPickupPayload } from '@/components/checkout/pickup/utils/build-pickup-payload'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { confirmCheckout } from '@/lib/godaddy/godaddy'; +import { eventIds } from '@/tracking/events'; import { - type TrackingEventId, - TrackingEventType, - track, -} from "@/tracking/track"; -import type { ConfirmCheckoutMutationInput } from "@/types"; + type TrackingEventId, + TrackingEventType, + track, +} from '@/tracking/track'; +import type { ConfirmCheckoutMutationInput } from '@/types'; export enum PaymentProvider { - CHASE_PAYMENTECH = "CHASE_PAYMENTECH", - REDE = "REDE", - EVO = "EVO", - FIRST_DATA = "FIRST_DATA", - GLOBAL_PAYMENTS = "GLOBAL_PAYMENTS", - HEARTLAND_PAYMENT_SYSTEM = "HEARTLAND_PAYMENT_SYSTEM", - ELAVON = "ELAVON", - MERCURY = "MERCURY", - MONERIS = "MONERIS", - PAYPAL = "PAYPAL", - ELAVON_MX = "ELAVON_MX", - STRIPE = "STRIPE", - TSYS = "TSYS", - VANTIV = "VANTIV", - WORLDPAY = "WORLDPAY", - EPX = "EPX", - WEPAY = "WEPAY", - MASHREQ = "MASHREQ", - AXIS = "AXIS", - KARTUKU = "KARTUKU", - NEXI = "NEXI", - DANA = "DANA", - MYNT = "MYNT", - POYNT = "POYNT", - NUVEI = "NUVEI", - NPAY = "NPAY", - BRIDGEPAY = "BRIDGEPAY", - CONVERGE = "CONVERGE", - MOCK = "MOCK", - NA_BANCARD = "NA_BANCARD", - CREDITCALL = "CREDITCALL", - ELAVON_EU = "ELAVON_EU", - FUSEBOX = "FUSEBOX", - EVERTEC = "EVERTEC", - GHL = "GHL", - RS2 = "RS2", - JCN = "JCN", - PRISMA = "PRISMA", - VANTIV_EXPRESS = "VANTIV_EXPRESS", - EZETAP = "EZETAP", - ADYEN = "ADYEN", - LETGO = "LETGO", - CHECK_COMMERCE = "CHECK_COMMERCE", - SQUARE = "SQUARE", - OFFLINE = "OFFLINE", + CHASE_PAYMENTECH = 'CHASE_PAYMENTECH', + REDE = 'REDE', + EVO = 'EVO', + FIRST_DATA = 'FIRST_DATA', + GLOBAL_PAYMENTS = 'GLOBAL_PAYMENTS', + HEARTLAND_PAYMENT_SYSTEM = 'HEARTLAND_PAYMENT_SYSTEM', + ELAVON = 'ELAVON', + MERCURY = 'MERCURY', + MONERIS = 'MONERIS', + PAYPAL = 'PAYPAL', + ELAVON_MX = 'ELAVON_MX', + STRIPE = 'STRIPE', + TSYS = 'TSYS', + VANTIV = 'VANTIV', + WORLDPAY = 'WORLDPAY', + EPX = 'EPX', + WEPAY = 'WEPAY', + MASHREQ = 'MASHREQ', + AXIS = 'AXIS', + KARTUKU = 'KARTUKU', + NEXI = 'NEXI', + DANA = 'DANA', + MYNT = 'MYNT', + POYNT = 'POYNT', + NUVEI = 'NUVEI', + NPAY = 'NPAY', + BRIDGEPAY = 'BRIDGEPAY', + CONVERGE = 'CONVERGE', + MOCK = 'MOCK', + NA_BANCARD = 'NA_BANCARD', + CREDITCALL = 'CREDITCALL', + ELAVON_EU = 'ELAVON_EU', + FUSEBOX = 'FUSEBOX', + EVERTEC = 'EVERTEC', + GHL = 'GHL', + RS2 = 'RS2', + JCN = 'JCN', + PRISMA = 'PRISMA', + VANTIV_EXPRESS = 'VANTIV_EXPRESS', + EZETAP = 'EZETAP', + ADYEN = 'ADYEN', + LETGO = 'LETGO', + CHECK_COMMERCE = 'CHECK_COMMERCE', + SQUARE = 'SQUARE', + OFFLINE = 'OFFLINE', } export function useConfirmCheckout() { - const { - session, - jwt, - setIsConfirmingCheckout, - isConfirmingCheckout, - setCheckoutErrors, - } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); - const form = useFormContext(); + const { + session, + jwt, + setIsConfirmingCheckout, + isConfirmingCheckout, + setCheckoutErrors, + } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const form = useFormContext(); - return useMutation({ - mutationFn: async ( - input: ConfirmCheckoutMutationInput["input"] & { - paymentProvider: PaymentProvider; - isExpress?: boolean; - }, - ) => { - if (!session || !input?.paymentType || isConfirmingCheckout) return; + return useMutation({ + mutationFn: async ( + input: ConfirmCheckoutMutationInput['input'] & { + paymentProvider: PaymentProvider; + isExpress?: boolean; + } + ) => { + if (!session || !input?.paymentType || isConfirmingCheckout) return; - const { isExpress, ...confirmCheckoutInput } = input; + const { isExpress, ...confirmCheckoutInput } = input; - const isPickup = - form.getValues("deliveryMethod") === DeliveryMethods.PICKUP && - !isExpress; + const isPickup = + form.getValues('deliveryMethod') === DeliveryMethods.PICKUP && + !isExpress; - const pickUpData = isPickup - ? buildPickupPayload({ - pickupDate: form.getValues("pickupDate"), - pickupTime: form.getValues("pickupTime"), - pickupLocationId: form.getValues("pickupLocationId"), - leadTime: form.getValues("pickupLeadTime") || 0, - timezone: form.getValues("pickupTimezone") || "UTC", - }) - : {}; + const pickUpData = isPickup + ? buildPickupPayload({ + pickupDate: form.getValues('pickupDate'), + pickupTime: form.getValues('pickupTime'), + pickupLocationId: form.getValues('pickupLocationId'), + leadTime: form.getValues('pickupLeadTime') || 0, + timezone: form.getValues('pickupTimezone') || 'UTC', + }) + : {}; - // keep for debugging - // console.log({ - // pickupDate: form.getValues("pickupDate"), - // pickupTime: form.getValues("pickupTime"), - // pickupLocationId: form.getValues("pickupLocationId"), - // leadTime: form.getValues("pickupLeadTime") || 0, - // timezone: form.getValues("pickupTimezone") || "UTC", - // pickUpData, - // }); + // keep for debugging + // console.log({ + // pickupDate: form.getValues("pickupDate"), + // pickupTime: form.getValues("pickupTime"), + // pickupLocationId: form.getValues("pickupLocationId"), + // leadTime: form.getValues("pickupLeadTime") || 0, + // timezone: form.getValues("pickupTimezone") || "UTC", + // pickUpData, + // }); - setCheckoutErrors(undefined); - setIsConfirmingCheckout(true); + setCheckoutErrors(undefined); + setIsConfirmingCheckout(true); - track({ - eventId: eventIds.paymentStart, - type: TrackingEventType.EVENT, - properties: { - paymentType: input.paymentType, - provider: input.paymentProvider, - draftOrderId: session?.draftOrder?.id || "unknown", - }, - }); + track({ + eventId: eventIds.paymentStart, + type: TrackingEventType.EVENT, + properties: { + paymentType: input.paymentType, + provider: input.paymentProvider, + draftOrderId: session?.draftOrder?.id || 'unknown', + }, + }); - const data = jwt - ? await confirmCheckout( - { - ...confirmCheckoutInput, - ...(isPickup ? pickUpData : {}), - }, - { accessToken: jwt }, - apiHost, - ) - : await confirmCheckout( - { - ...confirmCheckoutInput, - ...(isPickup ? pickUpData : {}), - }, - session, - apiHost, - ); - return data; - }, - onSuccess: (_data, input) => { - let completedEventId: TrackingEventId | null = null; - switch (input.paymentType) { - case "apple_pay": - completedEventId = eventIds.expressApplePayCompleted; - break; - case "google_pay": - completedEventId = eventIds.expressGooglePayCompleted; - break; - case "paze": - completedEventId = eventIds.pazePayCompleted; - break; - default: - completedEventId = null; - } + const data = jwt + ? await confirmCheckout( + { + ...confirmCheckoutInput, + ...(isPickup ? pickUpData : {}), + }, + { accessToken: jwt }, + apiHost + ) + : await confirmCheckout( + { + ...confirmCheckoutInput, + ...(isPickup ? pickUpData : {}), + }, + session, + apiHost + ); + return data; + }, + onSuccess: (_data, input) => { + let completedEventId: TrackingEventId | null = null; + switch (input.paymentType) { + case 'apple_pay': + completedEventId = eventIds.expressApplePayCompleted; + break; + case 'google_pay': + completedEventId = eventIds.expressGooglePayCompleted; + break; + case 'paze': + completedEventId = eventIds.pazePayCompleted; + break; + default: + completedEventId = null; + } - /* Track checkout completed event - if we have a specific event for express checkout */ - if (completedEventId) { - track({ - eventId: completedEventId, - type: TrackingEventType.EVENT, - properties: { - draftOrderId: session?.draftOrder?.id || "unknown", - paymentType: input.paymentType, - provider: "poynt", - }, - }); - } + /* Track checkout completed event - if we have a specific event for express checkout */ + if (completedEventId) { + track({ + eventId: completedEventId, + type: TrackingEventType.EVENT, + properties: { + draftOrderId: session?.draftOrder?.id || 'unknown', + paymentType: input.paymentType, + provider: 'poynt', + }, + }); + } - track({ - eventId: eventIds.checkoutComplete, - type: TrackingEventType.EVENT, - properties: { - draftOrderId: session?.draftOrder?.id || "unknown", - total: session?.draftOrder?.totals?.total?.value || 0, - currencyCode: - session?.draftOrder?.totals?.total?.currencyCode || "unknown", - paymentType: input?.paymentType, - provider: input?.paymentProvider || "unknown", - }, - }); + track({ + eventId: eventIds.checkoutComplete, + type: TrackingEventType.EVENT, + properties: { + draftOrderId: session?.draftOrder?.id || 'unknown', + total: session?.draftOrder?.totals?.total?.value || 0, + currencyCode: + session?.draftOrder?.totals?.total?.currencyCode || 'unknown', + paymentType: input?.paymentType, + provider: input?.paymentProvider || 'unknown', + }, + }); - redirectToSuccessUrl(session?.successUrl); - }, - onError: (error, data) => { - // Track checkout error event - track({ - eventId: eventIds.checkoutError, - type: TrackingEventType.EVENT, - properties: { - errorCodes: error?.name || "unknown", - errorType: error?.message, - paymentType: data?.paymentType, - provider: data?.paymentProvider || "unknown", - draftOrderId: session?.draftOrder?.id || "unknown", - }, - }); + redirectToSuccessUrl(session?.successUrl); + }, + onError: (error, data) => { + // Track checkout error event + track({ + eventId: eventIds.checkoutError, + type: TrackingEventType.EVENT, + properties: { + errorCodes: error?.name || 'unknown', + errorType: error?.message, + paymentType: data?.paymentType, + provider: data?.paymentProvider || 'unknown', + draftOrderId: session?.draftOrder?.id || 'unknown', + }, + }); - setIsConfirmingCheckout(false); - }, - }); + setIsConfirmingCheckout(false); + }, + }); } diff --git a/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts b/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts index 3027a8c2..701fe3d0 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-apply-shipping-method.ts @@ -1,121 +1,121 @@ -import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useDiscountApply } from "@/components/checkout/discount"; -import { useDraftOrder } from "@/components/checkout/order/use-draft-order"; -import { useUpdateTaxes } from "@/components/checkout/order/use-update-taxes"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import type { ResultOf } from "@/gql.tada"; -import { applyShippingMethod } from "@/lib/godaddy/godaddy"; -import type { DraftOrderQuery } from "@/lib/godaddy/queries"; -import type { ApplyCheckoutSessionShippingMethodInput } from "@/types"; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useDiscountApply } from '@/components/checkout/discount'; +import { useDraftOrder } from '@/components/checkout/order/use-draft-order'; +import { useUpdateTaxes } from '@/components/checkout/order/use-update-taxes'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import type { ResultOf } from '@/gql.tada'; +import { applyShippingMethod } from '@/lib/godaddy/godaddy'; +import type { DraftOrderQuery } from '@/lib/godaddy/queries'; +import type { ApplyCheckoutSessionShippingMethodInput } from '@/types'; export function useApplyShippingMethod() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); - const { data: order } = useDraftOrder(); - const updateTaxes = useUpdateTaxes(); - const applyDiscount = useDiscountApply(); - const queryClient = useQueryClient(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const { data: order } = useDraftOrder(); + const updateTaxes = useUpdateTaxes(); + const applyDiscount = useDiscountApply(); + const queryClient = useQueryClient(); - return useMutation({ - mutationKey: session?.id - ? ["apply-shipping-method", session.id] - : ["apply-shipping-method"], - mutationFn: async ( - shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], - ) => { - if (!session) return; - const data = jwt - ? await applyShippingMethod( - shippingMethods, - { accessToken: jwt }, - apiHost, - ) - : await applyShippingMethod(shippingMethods, session, apiHost); - return data; - }, - onSuccess: async (data) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ['apply-shipping-method', session.id] + : ['apply-shipping-method'], + mutationFn: async ( + shippingMethods: ApplyCheckoutSessionShippingMethodInput['input'] + ) => { + if (!session) return; + const data = jwt + ? await applyShippingMethod( + shippingMethods, + { accessToken: jwt }, + apiHost + ) + : await applyShippingMethod(shippingMethods, session, apiHost); + return data; + }, + onSuccess: async data => { + if (!session) return; - // Extract shippingTotal from mutation response - const shippingTotal = - data?.applyCheckoutSessionShippingMethod?.draftOrder?.totals - ?.shippingTotal; + // Extract shippingTotal from mutation response + const shippingTotal = + data?.applyCheckoutSessionShippingMethod?.draftOrder?.totals + ?.shippingTotal; - // Update the cached draft-order query (includes totals) - if (shippingTotal) { - queryClient.setQueryData( - ["draft-order", session.id], - (old: ResultOf | undefined) => { - if (!old) return old; + // Update the cached draft-order query (includes totals) + if (shippingTotal) { + queryClient.setQueryData( + ['draft-order', session.id], + (old: ResultOf | undefined) => { + if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - shippingLines: [ - { - ...old?.checkoutSession?.draftOrder?.shippingLines?.[0], - amount: { - ...shippingTotal, - }, - }, - ], - totals: { - ...old?.checkoutSession?.draftOrder?.totals, - shippingTotal: { - ...shippingTotal, - }, - }, - }, - }, - }; - }, - ); - } + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + shippingLines: [ + { + ...old?.checkoutSession?.draftOrder?.shippingLines?.[0], + amount: { + ...shippingTotal, + }, + }, + ], + totals: { + ...old?.checkoutSession?.draftOrder?.totals, + shippingTotal: { + ...shippingTotal, + }, + }, + }, + }, + }; + } + ); + } - const allCodes = new Set(); + const allCodes = new Set(); - // Add order-level discount codes - if (order?.discounts) { - for (const discount of order.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } + // Add order-level discount codes + if (order?.discounts) { + for (const discount of order.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } - // Line item-level discount codes do not need to be re-applied as they would not be affected by shipping method changes + // Line item-level discount codes do not need to be re-applied as they would not be affected by shipping method changes - // Add shipping line-level discount codes - if (order?.shippingLines) { - for (const shippingLine of order.shippingLines) { - if (shippingLine.discounts) { - for (const discount of shippingLine.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } - } - } + // Add shipping line-level discount codes + if (order?.shippingLines) { + for (const shippingLine of order.shippingLines) { + if (shippingLine.discounts) { + for (const discount of shippingLine.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } + } + } - const discountCodes = Array.from(allCodes); + const discountCodes = Array.from(allCodes); - if (session?.enablePromotionCodes && discountCodes?.length) { - /* should re-apply discounts if they were previously applied */ - await applyDiscount.mutateAsync({ - discountCodes, - }); - } else if (session?.enableTaxCollection) { - updateTaxes.mutate(undefined); - } else { - queryClient.invalidateQueries({ - queryKey: ["draft-order", session.id], - }); - } - }, - }); + if (session?.enablePromotionCodes && discountCodes?.length) { + /* should re-apply discounts if they were previously applied */ + await applyDiscount.mutateAsync({ + discountCodes, + }); + } else if (session?.enableTaxCollection) { + updateTaxes.mutate(undefined); + } else { + queryClient.invalidateQueries({ + queryKey: ['draft-order', session.id], + }); + } + }, + }); } diff --git a/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts b/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts index 010475c0..5e53352c 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-draft-order-shipping-methods.ts @@ -1,73 +1,73 @@ -import { useQuery } from "@tanstack/react-query"; -import { useMemo } from "react"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useDraftOrderShippingAddress } from "@/components/checkout/order/use-draft-order"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { getDraftOrderShippingMethods } from "@/lib/godaddy/godaddy"; +import { useQuery } from '@tanstack/react-query'; +import { useMemo } from 'react'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useDraftOrderShippingAddress } from '@/components/checkout/order/use-draft-order'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { getDraftOrderShippingMethods } from '@/lib/godaddy/godaddy'; /** * Hook to fetch available shipping methods for the draft order * @returns Query result with shipping rates data */ export function useDraftOrderShippingMethods() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); - const { data: shippingAddress } = useDraftOrderShippingAddress(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const { data: shippingAddress } = useDraftOrderShippingAddress(); - const hasShippingAddress = useMemo( - () => !!shippingAddress?.addressLine1, - [shippingAddress?.addressLine1], - ); + const hasShippingAddress = useMemo( + () => !!shippingAddress?.addressLine1, + [shippingAddress?.addressLine1] + ); - const destination = useMemo(() => { - if (!shippingAddress?.postalCode || !shippingAddress?.countryCode) { - return undefined; - } - return { - postalCode: shippingAddress.postalCode, - countryCode: shippingAddress.countryCode, - addressLine1: shippingAddress.addressLine1 ?? undefined, - addressLine2: shippingAddress.addressLine2 ?? undefined, - addressLine3: shippingAddress.addressLine3 ?? undefined, - adminArea1: shippingAddress.adminArea1 ?? undefined, - adminArea2: shippingAddress.adminArea2 ?? undefined, - adminArea3: shippingAddress.adminArea3 ?? undefined, - adminArea4: shippingAddress.adminArea4 ?? undefined, - }; - }, [ - shippingAddress?.postalCode, - shippingAddress?.countryCode, - shippingAddress?.addressLine1, - shippingAddress?.addressLine2, - shippingAddress?.addressLine3, - shippingAddress?.adminArea1, - shippingAddress?.adminArea2, - shippingAddress?.adminArea3, - shippingAddress?.adminArea4, - ]); + const destination = useMemo(() => { + if (!shippingAddress?.postalCode || !shippingAddress?.countryCode) { + return undefined; + } + return { + postalCode: shippingAddress.postalCode, + countryCode: shippingAddress.countryCode, + addressLine1: shippingAddress.addressLine1 ?? undefined, + addressLine2: shippingAddress.addressLine2 ?? undefined, + addressLine3: shippingAddress.addressLine3 ?? undefined, + adminArea1: shippingAddress.adminArea1 ?? undefined, + adminArea2: shippingAddress.adminArea2 ?? undefined, + adminArea3: shippingAddress.adminArea3 ?? undefined, + adminArea4: shippingAddress.adminArea4 ?? undefined, + }; + }, [ + shippingAddress?.postalCode, + shippingAddress?.countryCode, + shippingAddress?.addressLine1, + shippingAddress?.addressLine2, + shippingAddress?.addressLine3, + shippingAddress?.adminArea1, + shippingAddress?.adminArea2, + shippingAddress?.adminArea3, + shippingAddress?.adminArea4, + ]); - return useQuery({ - queryKey: session?.id - ? [ - "draft-order-shipping-methods", - session.id, - shippingAddress?.addressLine1, - shippingAddress?.adminArea1, - shippingAddress?.adminArea2, - shippingAddress?.postalCode, - shippingAddress?.countryCode, - ] - : ["draft-order-shipping-methods"], - queryFn: () => - jwt - ? getDraftOrderShippingMethods( - { accessToken: jwt }, - destination, - apiHost, - ) - : getDraftOrderShippingMethods(session, destination, apiHost), - enabled: !!session?.id && hasShippingAddress, - select: (data) => - data?.checkoutSession?.draftOrder?.calculatedShippingRates?.rates, - }); + return useQuery({ + queryKey: session?.id + ? [ + 'draft-order-shipping-methods', + session.id, + shippingAddress?.addressLine1, + shippingAddress?.adminArea1, + shippingAddress?.adminArea2, + shippingAddress?.postalCode, + shippingAddress?.countryCode, + ] + : ['draft-order-shipping-methods'], + queryFn: () => + jwt + ? getDraftOrderShippingMethods( + { accessToken: jwt }, + destination, + apiHost + ) + : getDraftOrderShippingMethods(session, destination, apiHost), + enabled: !!session?.id && hasShippingAddress, + select: data => + data?.checkoutSession?.draftOrder?.calculatedShippingRates?.rates, + }); } diff --git a/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts b/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts index 7aad65ce..27015277 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-get-shipping-methods.ts @@ -1,33 +1,33 @@ -import { useMutation } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { getDraftOrderShippingMethods } from "@/lib/godaddy/godaddy"; -import type { GetCheckoutSessionShippingRatesInput } from "@/types"; +import { useMutation } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { getDraftOrderShippingMethods } from '@/lib/godaddy/godaddy'; +import type { GetCheckoutSessionShippingRatesInput } from '@/types'; export function useGetShippingMethodByAddress() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: session?.id - ? ["get-shipping-method-by-address", session.id] - : ["get-shipping-method-by-address"], - mutationFn: async ( - destination: GetCheckoutSessionShippingRatesInput["destination"], - ) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ['get-shipping-method-by-address', session.id] + : ['get-shipping-method-by-address'], + mutationFn: async ( + destination: GetCheckoutSessionShippingRatesInput['destination'] + ) => { + if (!session) return; - const data = jwt - ? await getDraftOrderShippingMethods( - { accessToken: jwt }, - destination, - apiHost, - ) - : await getDraftOrderShippingMethods(session, destination, apiHost); + const data = jwt + ? await getDraftOrderShippingMethods( + { accessToken: jwt }, + destination, + apiHost + ) + : await getDraftOrderShippingMethods(session, destination, apiHost); - return ( - data.checkoutSession?.draftOrder?.calculatedShippingRates?.rates || [] - ); - }, - }); + return ( + data.checkoutSession?.draftOrder?.calculatedShippingRates?.rates || [] + ); + }, + }); } diff --git a/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts b/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts index 9a4996ba..945b0a3a 100644 --- a/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts +++ b/packages/react/src/components/checkout/shipping/utils/use-remove-shipping-method.ts @@ -1,118 +1,118 @@ -import { useMutation, useQueryClient } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useDiscountApply } from "@/components/checkout/discount"; -import { useDraftOrder } from "@/components/checkout/order/use-draft-order"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import type { ResultOf } from "@/gql.tada"; -import { removeShippingMethod } from "@/lib/godaddy/godaddy"; -import type { DraftOrderQuery } from "@/lib/godaddy/queries"; -import type { RemoveAppliedCheckoutSessionShippingMethodInput } from "@/types"; +import { useMutation, useQueryClient } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useDiscountApply } from '@/components/checkout/discount'; +import { useDraftOrder } from '@/components/checkout/order/use-draft-order'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import type { ResultOf } from '@/gql.tada'; +import { removeShippingMethod } from '@/lib/godaddy/godaddy'; +import type { DraftOrderQuery } from '@/lib/godaddy/queries'; +import type { RemoveAppliedCheckoutSessionShippingMethodInput } from '@/types'; export function useRemoveShippingMethod() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); - const queryClient = useQueryClient(); - const { data: order } = useDraftOrder(); - const applyDiscount = useDiscountApply(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); + const queryClient = useQueryClient(); + const { data: order } = useDraftOrder(); + const applyDiscount = useDiscountApply(); - return useMutation({ - mutationKey: session?.id - ? ["remove-shipping-method", session.id] - : ["remove-shipping-method"], - mutationFn: async ( - input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], - ) => { - const data = jwt - ? await removeShippingMethod(input, { accessToken: jwt }, apiHost) - : await removeShippingMethod(input, session, apiHost); - return data; - }, - onSuccess: async (data) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ['remove-shipping-method', session.id] + : ['remove-shipping-method'], + mutationFn: async ( + input: RemoveAppliedCheckoutSessionShippingMethodInput['input'] + ) => { + const data = jwt + ? await removeShippingMethod(input, { accessToken: jwt }, apiHost) + : await removeShippingMethod(input, session, apiHost); + return data; + }, + onSuccess: async data => { + if (!session) return; - // Extract shippingTotal from mutation response - const shippingTotal = - data?.removeAppliedCheckoutSessionShippingMethod?.draftOrder?.totals - ?.shippingTotal; + // Extract shippingTotal from mutation response + const shippingTotal = + data?.removeAppliedCheckoutSessionShippingMethod?.draftOrder?.totals + ?.shippingTotal; - // Update the cached draft-order query (includes totals) - if (shippingTotal) { - queryClient.setQueryData( - ["draft-order", session.id], - (old: ResultOf | undefined) => { - if (!old) return old; - return { - ...old, - checkoutSession: { - ...old.checkoutSession, - draftOrder: { - ...old?.checkoutSession?.draftOrder, - shippingLines: [ - { - ...old?.checkoutSession?.draftOrder?.shippingLines?.[0], - amount: { - ...shippingTotal, - }, - }, - ], - totals: { - ...old?.checkoutSession?.draftOrder?.totals, - shippingTotal: { - ...shippingTotal, - }, - }, - }, - }, - }; - }, - ); - } + // Update the cached draft-order query (includes totals) + if (shippingTotal) { + queryClient.setQueryData( + ['draft-order', session.id], + (old: ResultOf | undefined) => { + if (!old) return old; + return { + ...old, + checkoutSession: { + ...old.checkoutSession, + draftOrder: { + ...old?.checkoutSession?.draftOrder, + shippingLines: [ + { + ...old?.checkoutSession?.draftOrder?.shippingLines?.[0], + amount: { + ...shippingTotal, + }, + }, + ], + totals: { + ...old?.checkoutSession?.draftOrder?.totals, + shippingTotal: { + ...shippingTotal, + }, + }, + }, + }, + }; + } + ); + } - const allCodes = new Set(); + const allCodes = new Set(); - // Add order-level discount codes - if (order?.discounts) { - for (const discount of order.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } + // Add order-level discount codes + if (order?.discounts) { + for (const discount of order.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } - // Add line item-level discount codes - if (order?.lineItems) { - for (const lineItem of order.lineItems) { - if (lineItem?.discounts) { - for (const discount of lineItem.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } - } - } + // Add line item-level discount codes + if (order?.lineItems) { + for (const lineItem of order.lineItems) { + if (lineItem?.discounts) { + for (const discount of lineItem.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } + } + } - // Add shipping line-level discount codes - if (order?.shippingLines) { - for (const shippingLine of order.shippingLines) { - if (shippingLine.discounts) { - for (const discount of shippingLine.discounts) { - if (discount.code) { - allCodes.add(discount.code); - } - } - } - } - } + // Add shipping line-level discount codes + if (order?.shippingLines) { + for (const shippingLine of order.shippingLines) { + if (shippingLine.discounts) { + for (const discount of shippingLine.discounts) { + if (discount.code) { + allCodes.add(discount.code); + } + } + } + } + } - const discountCodes = Array.from(allCodes); + const discountCodes = Array.from(allCodes); - if (session?.enablePromotionCodes && discountCodes?.length) { - /* should re-apply discounts if they were previously applied */ - await applyDiscount.mutateAsync({ - discountCodes, - }); - } - }, - }); + if (session?.enablePromotionCodes && discountCodes?.length) { + /* should re-apply discounts if they were previously applied */ + await applyDiscount.mutateAsync({ + discountCodes, + }); + } + }, + }); } diff --git a/packages/react/src/components/checkout/target/target.tsx b/packages/react/src/components/checkout/target/target.tsx index d286bf32..a3a84203 100644 --- a/packages/react/src/components/checkout/target/target.tsx +++ b/packages/react/src/components/checkout/target/target.tsx @@ -31,13 +31,13 @@ export type Target = export function Target({ id }: { id: Target }) { const { debug } = useGoDaddyContext(); - const { targets } = useCheckoutContext(); + const { targets, session } = useCheckoutContext(); const target = targets?.[id]; let content: React.ReactNode = null; if (target) { - content = target?.(); + content = target?.(session); } else if (debug) { content = {id}; } diff --git a/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts b/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts index 394daf62..5870cb1e 100644 --- a/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts +++ b/packages/react/src/components/checkout/taxes/utils/use-get-taxes.ts @@ -1,35 +1,35 @@ -import { useMutation } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { getDraftOrderTaxes } from "@/lib/godaddy/godaddy"; -import type { GetCheckoutSessionTaxesInput } from "@/types"; +import { useMutation } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { getDraftOrderTaxes } from '@/lib/godaddy/godaddy'; +import type { GetCheckoutSessionTaxesInput } from '@/types'; export function useGetTaxes() { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useMutation({ - mutationKey: session?.id - ? ["get-taxes-without-order", session.id] - : ["get-taxes-without-order"], - mutationFn: async ({ - destination, - lines, - }: { - destination?: GetCheckoutSessionTaxesInput["destination"]; - lines?: GetCheckoutSessionTaxesInput["lines"]; - }) => { - if (!session) return; + return useMutation({ + mutationKey: session?.id + ? ['get-taxes-without-order', session.id] + : ['get-taxes-without-order'], + mutationFn: async ({ + destination, + lines, + }: { + destination?: GetCheckoutSessionTaxesInput['destination']; + lines?: GetCheckoutSessionTaxesInput['lines']; + }) => { + if (!session) return; - const data = jwt - ? await getDraftOrderTaxes( - { accessToken: jwt }, - { destination, lines }, - apiHost, - ) - : await getDraftOrderTaxes(session, { destination, lines }, apiHost); + const data = jwt + ? await getDraftOrderTaxes( + { accessToken: jwt }, + { destination, lines }, + apiHost + ) + : await getDraftOrderTaxes(session, { destination, lines }, apiHost); - return data.checkoutSession?.draftOrder?.calculatedTaxes?.totalTaxAmount; - }, - }); + return data.checkoutSession?.draftOrder?.calculatedTaxes?.totalTaxAmount; + }, + }); } diff --git a/packages/react/src/godaddy-provider.tsx b/packages/react/src/godaddy-provider.tsx index 91121859..4cb1519f 100644 --- a/packages/react/src/godaddy-provider.tsx +++ b/packages/react/src/godaddy-provider.tsx @@ -82,7 +82,7 @@ export interface GoDaddyProviderProps { /** * 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 * - "https://checkout.commerce.api.dev-godaddy.com" for DEV environment @@ -122,7 +122,12 @@ export function GoDaddyProvider({ return ( {children} diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index 24dca8fa..9d54b464 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -97,10 +97,13 @@ export function useCheckoutSession(props?: CheckoutProps) { (async () => { try { - const result = await exchangeCheckoutToken({ - sessionId, - token: sessionToken, - }, apiHost); + const result = await exchangeCheckoutToken( + { + sessionId, + token: sessionToken, + }, + apiHost + ); if (cancelled) return; if (!result?.jwt) { setExchangeFailed(true); diff --git a/packages/react/src/lib/godaddy/godaddy.ts b/packages/react/src/lib/godaddy/godaddy.ts index e112165a..73b92a0e 100644 --- a/packages/react/src/lib/godaddy/godaddy.ts +++ b/packages/react/src/lib/godaddy/godaddy.ts @@ -1,1020 +1,1020 @@ -import type { ResultOf } from "@/gql.tada"; -import { graphqlRequestWithErrors } from "@/lib/graphql-with-errors"; +import type { ResultOf } from '@/gql.tada'; +import { graphqlRequestWithErrors } from '@/lib/graphql-with-errors'; import type { - ApplyCheckoutSessionDeliveryMethodInput, - ApplyCheckoutSessionDiscountInput, - ApplyCheckoutSessionFulfillmentLocationInput, - ApplyCheckoutSessionShippingMethodInput, - CheckoutSession, - CheckoutSessionInput, - ConfirmCheckoutMutationInput, - DraftOrderPriceAdjustmentsQueryInput, - GetCheckoutSessionShippingRatesInput, - GetCheckoutSessionTaxesInput, - RemoveAppliedCheckoutSessionShippingMethodInput, - UpdateDraftOrderInput, -} from "@/types"; -import { getEnvVar } from "../utils"; + ApplyCheckoutSessionDeliveryMethodInput, + ApplyCheckoutSessionDiscountInput, + ApplyCheckoutSessionFulfillmentLocationInput, + ApplyCheckoutSessionShippingMethodInput, + CheckoutSession, + CheckoutSessionInput, + ConfirmCheckoutMutationInput, + DraftOrderPriceAdjustmentsQueryInput, + GetCheckoutSessionShippingRatesInput, + GetCheckoutSessionTaxesInput, + RemoveAppliedCheckoutSessionShippingMethodInput, + UpdateDraftOrderInput, +} from '@/types'; +import { getEnvVar } from '../utils'; import { - ApplyCheckoutSessionDeliveryMethodMutation, - ApplyCheckoutSessionDiscountMutation, - ApplyCheckoutSessionFulfillmentLocationMutation, - ApplyCheckoutSessionShippingMethodMutation, - CalculateCheckoutSessionTaxesMutation, - ConfirmCheckoutSessionMutation, - CreateCheckoutSessionMutation, - ExchangeCheckoutTokenMutation, - RefreshCheckoutTokenMutation, - RemoveAppliedCheckoutSessionShippingMethodMutation, - UpdateCheckoutSessionDraftOrderMutation, - VerifyCheckoutSessionAddressMutation, -} from "./mutations"; + ApplyCheckoutSessionDeliveryMethodMutation, + ApplyCheckoutSessionDiscountMutation, + ApplyCheckoutSessionFulfillmentLocationMutation, + ApplyCheckoutSessionShippingMethodMutation, + CalculateCheckoutSessionTaxesMutation, + ConfirmCheckoutSessionMutation, + CreateCheckoutSessionMutation, + ExchangeCheckoutTokenMutation, + RefreshCheckoutTokenMutation, + RemoveAppliedCheckoutSessionShippingMethodMutation, + UpdateCheckoutSessionDraftOrderMutation, + VerifyCheckoutSessionAddressMutation, +} from './mutations'; import { - AddressMatchesQuery, - DraftOrderPriceAdjustmentsQuery, - DraftOrderQuery, - DraftOrderShippingRatesQuery, - DraftOrderSkusQuery, - DraftOrderTaxesQuery, - GetCheckoutSessionQuery, -} from "./queries"; + AddressMatchesQuery, + DraftOrderPriceAdjustmentsQuery, + DraftOrderQuery, + DraftOrderShippingRatesQuery, + DraftOrderSkusQuery, + DraftOrderTaxesQuery, + GetCheckoutSessionQuery, +} from './queries'; function getHostByEnvironment(apiHost?: string): string { - // Use provided apiHost, otherwise default to production - return apiHost || "https://checkout.commerce.api.godaddy.com"; + // Use provided apiHost, otherwise default to production + return apiHost || 'https://checkout.commerce.api.godaddy.com'; } export async function createCheckoutSession( - input: CheckoutSessionInput["input"], - { accessToken }: { accessToken: string }, + input: CheckoutSessionInput['input'], + { accessToken }: { accessToken: string } ): Promise< - ResultOf["createCheckoutSession"] + ResultOf['createCheckoutSession'] > { - if (!accessToken) { - throw new Error("No public access token provided"); - } - - const GODADDY_HOST = getHostByEnvironment(getEnvVar("GODADDY_API_HOST")); - const response = await graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - CreateCheckoutSessionMutation, - { input }, - { Authorization: `Bearer ${accessToken}` }, - ); - - return response.createCheckoutSession; + if (!accessToken) { + throw new Error('No public access token provided'); + } + + const GODADDY_HOST = getHostByEnvironment(getEnvVar('GODADDY_API_HOST')); + const response = await graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + CreateCheckoutSessionMutation, + { input }, + { Authorization: `Bearer ${accessToken}` } + ); + + return response.createCheckoutSession; } export async function exchangeCheckoutToken( - input: { - sessionId: string; - token: string; - }, - apiHost?: string, + input: { + sessionId: string; + token: string; + }, + apiHost?: string ) { - if (!input.sessionId || !input.token) { - throw new Error("No session ID or token provided"); - } - - const GODADDY_HOST = getHostByEnvironment(apiHost); - // Browser automatically sends Origin header for CORS requests - // No need to manually set it - const response = await graphqlRequestWithErrors< - ResultOf - >(GODADDY_HOST, ExchangeCheckoutTokenMutation, { input }); - return response.exchangeCheckoutToken; + if (!input.sessionId || !input.token) { + throw new Error('No session ID or token provided'); + } + + const GODADDY_HOST = getHostByEnvironment(apiHost); + // Browser automatically sends Origin header for CORS requests + // No need to manually set it + const response = await graphqlRequestWithErrors< + ResultOf + >(GODADDY_HOST, ExchangeCheckoutTokenMutation, { input }); + return response.exchangeCheckoutToken; } export async function refreshCheckoutToken( - accessToken: string, - apiHost?: string, + accessToken: string, + apiHost?: string ) { - if (!accessToken) { - throw new Error("No access token provided"); - } - - const GODADDY_HOST = getHostByEnvironment(apiHost); - const response = await graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - RefreshCheckoutTokenMutation, - {}, - { - Authorization: `Bearer ${accessToken}`, - }, - ); - return response.refreshCheckoutToken; + if (!accessToken) { + throw new Error('No access token provided'); + } + + const GODADDY_HOST = getHostByEnvironment(apiHost); + const response = await graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + RefreshCheckoutTokenMutation, + {}, + { + Authorization: `Bearer ${accessToken}`, + } + ); + return response.refreshCheckoutToken; } export async function getCheckoutSession( - { accessToken }: { accessToken: string }, - apiHost?: string, + { accessToken }: { accessToken: string }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - const response = await graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - GetCheckoutSessionQuery, - {}, - { - Authorization: `Bearer ${accessToken}`, - }, - ); - return response.checkoutSession; + const GODADDY_HOST = getHostByEnvironment(apiHost); + const response = await graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + GetCheckoutSessionQuery, + {}, + { + Authorization: `Bearer ${accessToken}`, + } + ); + return response.checkoutSession; } export async function getAddressMatches( - input: { query: string }, - session: CheckoutSession | undefined | null, - apiHost?: string, + input: { query: string }, + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export async function getAddressMatches( - input: { query: string }, - auth: { accessToken: string | undefined }, - apiHost?: string, + input: { query: string }, + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export async function getAddressMatches( - input: { query: string }, - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + input: { query: string }, + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors>( - GODADDY_HOST, - AddressMatchesQuery, - input, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors>( - GODADDY_HOST, - AddressMatchesQuery, - input, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors>( + GODADDY_HOST, + AddressMatchesQuery, + input, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors>( + GODADDY_HOST, + AddressMatchesQuery, + input, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function getDraftOrder( - session: CheckoutSession | undefined | null, - apiHost?: string, + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export function getDraftOrder( - auth: { accessToken: string | undefined }, - apiHost?: string, + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export function getDraftOrder( - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderQuery, - undefined, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderQuery, - undefined, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderQuery, + undefined, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderQuery, + undefined, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function getDraftOrderTaxes( - session: CheckoutSession | undefined, - params: { - destination?: GetCheckoutSessionTaxesInput["destination"]; - lines?: GetCheckoutSessionTaxesInput["lines"]; - }, - apiHost?: string, + session: CheckoutSession | undefined, + params: { + destination?: GetCheckoutSessionTaxesInput['destination']; + lines?: GetCheckoutSessionTaxesInput['lines']; + }, + apiHost?: string ): Promise>; export function getDraftOrderTaxes( - auth: { accessToken: string | undefined }, - params: { - destination?: GetCheckoutSessionTaxesInput["destination"]; - lines?: GetCheckoutSessionTaxesInput["lines"]; - }, - apiHost?: string, + auth: { accessToken: string | undefined }, + params: { + destination?: GetCheckoutSessionTaxesInput['destination']; + lines?: GetCheckoutSessionTaxesInput['lines']; + }, + apiHost?: string ): Promise>; export function getDraftOrderTaxes( - sessionOrAuth: - | CheckoutSession - | undefined - | { accessToken: string | undefined }, - { - destination, - lines, - }: { - destination?: GetCheckoutSessionTaxesInput["destination"]; - lines?: GetCheckoutSessionTaxesInput["lines"]; - }, - apiHost?: string, + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + { + destination, + lines, + }: { + destination?: GetCheckoutSessionTaxesInput['destination']; + lines?: GetCheckoutSessionTaxesInput['lines']; + }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderTaxesQuery, - { destination, lines }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderTaxesQuery, - { destination, lines }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderTaxesQuery, + { destination, lines }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderTaxesQuery, + { destination, lines }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export async function verifyAddress( - input: { - addressLine1: string; - addressLine2: string; - addressLine3: string; - postalCode: string; - countryCode: string; - adminArea1?: string; - adminArea2?: string; - adminArea3?: string; - adminArea4?: string; - }, - session: CheckoutSession | undefined | null, - apiHost?: string, + input: { + addressLine1: string; + addressLine2: string; + addressLine3: string; + postalCode: string; + countryCode: string; + adminArea1?: string; + adminArea2?: string; + adminArea3?: string; + adminArea4?: string; + }, + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export async function verifyAddress( - input: { - addressLine1: string; - addressLine2: string; - addressLine3: string; - postalCode: string; - countryCode: string; - adminArea1?: string; - adminArea2?: string; - adminArea3?: string; - adminArea4?: string; - }, - auth: { accessToken: string | undefined }, - apiHost?: string, + input: { + addressLine1: string; + addressLine2: string; + addressLine3: string; + postalCode: string; + countryCode: string; + adminArea1?: string; + adminArea2?: string; + adminArea3?: string; + adminArea4?: string; + }, + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export async function verifyAddress( - input: { - addressLine1: string; - addressLine2: string; - addressLine3: string; - postalCode: string; - countryCode: string; - adminArea1?: string; - adminArea2?: string; - adminArea3?: string; - adminArea4?: string; - }, - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + input: { + addressLine1: string; + addressLine2: string; + addressLine3: string; + postalCode: string; + countryCode: string; + adminArea1?: string; + adminArea2?: string; + adminArea3?: string; + adminArea4?: string; + }, + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - VerifyCheckoutSessionAddressMutation, - { input: { ...input, adminArea3: input.adminArea2, adminArea2: "" } }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - VerifyCheckoutSessionAddressMutation, - { input: { ...input, adminArea3: input.adminArea2, adminArea2: "" } }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + VerifyCheckoutSessionAddressMutation, + { input: { ...input, adminArea3: input.adminArea2, adminArea2: '' } }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + VerifyCheckoutSessionAddressMutation, + { input: { ...input, adminArea3: input.adminArea2, adminArea2: '' } }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export async function updateDraftOrder( - input: UpdateDraftOrderInput["input"], - session: CheckoutSession | undefined | null, - apiHost?: string, + input: UpdateDraftOrderInput['input'], + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export async function updateDraftOrder( - input: UpdateDraftOrderInput["input"], - auth: { accessToken: string | undefined }, - apiHost?: string, + input: UpdateDraftOrderInput['input'], + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export async function updateDraftOrder( - input: UpdateDraftOrderInput["input"], - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + input: UpdateDraftOrderInput['input'], + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - UpdateCheckoutSessionDraftOrderMutation, - { input }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - UpdateCheckoutSessionDraftOrderMutation, - { input }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + UpdateCheckoutSessionDraftOrderMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + UpdateCheckoutSessionDraftOrderMutation, + { input }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export async function getProductsFromOrderSkus( - session: CheckoutSession | undefined | null, - apiHost?: string, + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export async function getProductsFromOrderSkus( - auth: { - accessToken: string | undefined; - }, - apiHost?: string, + auth: { + accessToken: string | undefined; + }, + apiHost?: string ): Promise>; export async function getProductsFromOrderSkus( - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderSkusQuery, - undefined, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors>( - GODADDY_HOST, - DraftOrderSkusQuery, - undefined, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderSkusQuery, + undefined, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors>( + GODADDY_HOST, + DraftOrderSkusQuery, + undefined, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function updateDraftOrderTaxes( - session: CheckoutSession | undefined | null, - destination?: { - addressLine1?: string | null; - addressLine2?: string | null; - addressLine3?: string | null; - adminArea1?: string | null; - adminArea2?: string | null; - adminArea3?: string | null; - countryCode?: string | null; - postalCode?: string | null; - }, - apiHost?: string, + session: CheckoutSession | undefined | null, + destination?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }, + apiHost?: string ): Promise>; export function updateDraftOrderTaxes( - auth: { accessToken: string | undefined }, - destination?: { - addressLine1?: string | null; - addressLine2?: string | null; - addressLine3?: string | null; - adminArea1?: string | null; - adminArea2?: string | null; - adminArea3?: string | null; - countryCode?: string | null; - postalCode?: string | null; - }, - apiHost?: string, + auth: { accessToken: string | undefined }, + destination?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }, + apiHost?: string ): Promise>; export function updateDraftOrderTaxes( - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - destination?: { - addressLine1?: string | null; - addressLine2?: string | null; - addressLine3?: string | null; - adminArea1?: string | null; - adminArea2?: string | null; - adminArea3?: string | null; - countryCode?: string | null; - postalCode?: string | null; - }, - apiHost?: string, + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + destination?: { + addressLine1?: string | null; + addressLine2?: string | null; + addressLine3?: string | null; + adminArea1?: string | null; + adminArea2?: string | null; + adminArea3?: string | null; + countryCode?: string | null; + postalCode?: string | null; + }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - CalculateCheckoutSessionTaxesMutation, - { destination }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - CalculateCheckoutSessionTaxesMutation, - { destination }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + CalculateCheckoutSessionTaxesMutation, + { destination }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + CalculateCheckoutSessionTaxesMutation, + { destination }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function applyDiscount( - discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"], - session: CheckoutSession | undefined | null, - apiHost?: string, + discountCodes: ApplyCheckoutSessionDiscountInput['input']['discountCodes'], + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export function applyDiscount( - discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"], - auth: { accessToken: string | undefined }, - apiHost?: string, + discountCodes: ApplyCheckoutSessionDiscountInput['input']['discountCodes'], + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export function applyDiscount( - discountCodes: ApplyCheckoutSessionDiscountInput["input"]["discountCodes"], - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + discountCodes: ApplyCheckoutSessionDiscountInput['input']['discountCodes'], + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionDiscountMutation, - { input: { discountCodes } }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionDiscountMutation, - { input: { discountCodes }, sessionId: session.id }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionDiscountMutation, + { input: { discountCodes } }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionDiscountMutation, + { input: { discountCodes }, sessionId: session.id }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function applyShippingMethod( - shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], - session: CheckoutSession | undefined | null, - apiHost?: string, + shippingMethods: ApplyCheckoutSessionShippingMethodInput['input'], + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export function applyShippingMethod( - shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], - auth: { accessToken: string | undefined }, - apiHost?: string, + shippingMethods: ApplyCheckoutSessionShippingMethodInput['input'], + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export function applyShippingMethod( - shippingMethods: ApplyCheckoutSessionShippingMethodInput["input"], - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + shippingMethods: ApplyCheckoutSessionShippingMethodInput['input'], + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionShippingMethodMutation, - { input: [...shippingMethods] }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionShippingMethodMutation, - { input: [...shippingMethods] }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionShippingMethodMutation, + { input: [...shippingMethods] }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionShippingMethodMutation, + { input: [...shippingMethods] }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function removeShippingMethod( - input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], - session: CheckoutSession | undefined | null, - apiHost?: string, + input: RemoveAppliedCheckoutSessionShippingMethodInput['input'], + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export function removeShippingMethod( - input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], - auth: { accessToken: string | undefined }, - apiHost?: string, + input: RemoveAppliedCheckoutSessionShippingMethodInput['input'], + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export function removeShippingMethod( - input: RemoveAppliedCheckoutSessionShippingMethodInput["input"], - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + input: RemoveAppliedCheckoutSessionShippingMethodInput['input'], + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ): Promise< - ResultOf + ResultOf > { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - RemoveAppliedCheckoutSessionShippingMethodMutation, - { input }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - RemoveAppliedCheckoutSessionShippingMethodMutation, - { input }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + RemoveAppliedCheckoutSessionShippingMethodMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + RemoveAppliedCheckoutSessionShippingMethodMutation, + { input }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function confirmCheckout( - input: ConfirmCheckoutMutationInput["input"], - session: CheckoutSession | undefined | null, - apiHost?: string, + input: ConfirmCheckoutMutationInput['input'], + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export function confirmCheckout( - input: ConfirmCheckoutMutationInput["input"], - auth: { accessToken: string | undefined }, - apiHost?: string, + input: ConfirmCheckoutMutationInput['input'], + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export function confirmCheckout( - input: ConfirmCheckoutMutationInput["input"], - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + input: ConfirmCheckoutMutationInput['input'], + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ConfirmCheckoutSessionMutation, - { input }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ConfirmCheckoutSessionMutation, - { input, sessionId: session.id }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ConfirmCheckoutSessionMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ConfirmCheckoutSessionMutation, + { input, sessionId: session.id }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function getDraftOrderShippingMethods( - session: CheckoutSession | undefined | null, - destination?: GetCheckoutSessionShippingRatesInput["destination"], - apiHost?: string, + session: CheckoutSession | undefined | null, + destination?: GetCheckoutSessionShippingRatesInput['destination'], + apiHost?: string ): Promise>; export function getDraftOrderShippingMethods( - auth: { accessToken: string | undefined }, - destination?: GetCheckoutSessionShippingRatesInput["destination"], - apiHost?: string, + auth: { accessToken: string | undefined }, + destination?: GetCheckoutSessionShippingRatesInput['destination'], + apiHost?: string ): Promise>; export function getDraftOrderShippingMethods( - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - destination?: GetCheckoutSessionShippingRatesInput["destination"], - apiHost?: string, + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + destination?: GetCheckoutSessionShippingRatesInput['destination'], + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - DraftOrderShippingRatesQuery, - { destination }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - DraftOrderShippingRatesQuery, - { destination }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + DraftOrderShippingRatesQuery, + { destination }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + DraftOrderShippingRatesQuery, + { destination }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function applyDeliveryMethod( - input: ApplyCheckoutSessionDeliveryMethodInput["input"], - session: CheckoutSession | undefined | null, - apiHost?: string, + input: ApplyCheckoutSessionDeliveryMethodInput['input'], + session: CheckoutSession | undefined | null, + apiHost?: string ): Promise>; export function applyDeliveryMethod( - input: ApplyCheckoutSessionDeliveryMethodInput["input"], - auth: { accessToken: string | undefined }, - apiHost?: string, + input: ApplyCheckoutSessionDeliveryMethodInput['input'], + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export function applyDeliveryMethod( - input: ApplyCheckoutSessionDeliveryMethodInput["input"], - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - apiHost?: string, + input: ApplyCheckoutSessionDeliveryMethodInput['input'], + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionDeliveryMethodMutation, - { input }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionDeliveryMethodMutation, - { input }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionDeliveryMethodMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionDeliveryMethodMutation, + { input }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function getDraftOrderPriceAdjustments( - session: CheckoutSession | undefined | null, - discountCodes?: DraftOrderPriceAdjustmentsQueryInput["discountCodes"], - shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"], - apiHost?: string, + session: CheckoutSession | undefined | null, + discountCodes?: DraftOrderPriceAdjustmentsQueryInput['discountCodes'], + shippingLines?: DraftOrderPriceAdjustmentsQueryInput['shippingLines'], + apiHost?: string ): Promise>; export function getDraftOrderPriceAdjustments( - auth: { accessToken: string | undefined }, - discountCodes?: DraftOrderPriceAdjustmentsQueryInput["discountCodes"], - shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"], - apiHost?: string, + auth: { accessToken: string | undefined }, + discountCodes?: DraftOrderPriceAdjustmentsQueryInput['discountCodes'], + shippingLines?: DraftOrderPriceAdjustmentsQueryInput['shippingLines'], + apiHost?: string ): Promise>; export function getDraftOrderPriceAdjustments( - sessionOrAuth: - | CheckoutSession - | undefined - | null - | { accessToken: string | undefined }, - discountCodes?: DraftOrderPriceAdjustmentsQueryInput["discountCodes"], - shippingLines?: DraftOrderPriceAdjustmentsQueryInput["shippingLines"], - apiHost?: string, + sessionOrAuth: + | CheckoutSession + | undefined + | null + | { accessToken: string | undefined }, + discountCodes?: DraftOrderPriceAdjustmentsQueryInput['discountCodes'], + shippingLines?: DraftOrderPriceAdjustmentsQueryInput['shippingLines'], + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - DraftOrderPriceAdjustmentsQuery, - { shippingLines, discountCodes }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - DraftOrderPriceAdjustmentsQuery, - { shippingLines, discountCodes }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + DraftOrderPriceAdjustmentsQuery, + { shippingLines, discountCodes }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + DraftOrderPriceAdjustmentsQuery, + { shippingLines, discountCodes }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } export function applyFulfillmentLocation( - input: ApplyCheckoutSessionFulfillmentLocationInput["input"], - session: CheckoutSession | undefined, - apiHost?: string, + input: ApplyCheckoutSessionFulfillmentLocationInput['input'], + session: CheckoutSession | undefined, + apiHost?: string ): Promise>; export function applyFulfillmentLocation( - input: ApplyCheckoutSessionFulfillmentLocationInput["input"], - auth: { accessToken: string | undefined }, - apiHost?: string, + input: ApplyCheckoutSessionFulfillmentLocationInput['input'], + auth: { accessToken: string | undefined }, + apiHost?: string ): Promise>; export function applyFulfillmentLocation( - input: ApplyCheckoutSessionFulfillmentLocationInput["input"], - sessionOrAuth: - | CheckoutSession - | undefined - | { accessToken: string | undefined }, - apiHost?: string, + input: ApplyCheckoutSessionFulfillmentLocationInput['input'], + sessionOrAuth: + | CheckoutSession + | undefined + | { accessToken: string | undefined }, + apiHost?: string ) { - const GODADDY_HOST = getHostByEnvironment(apiHost); - - if (sessionOrAuth && "accessToken" in sessionOrAuth) { - if (!sessionOrAuth.accessToken) { - throw new Error("No access token provided"); - } - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionFulfillmentLocationMutation, - { input }, - { - Authorization: `Bearer ${sessionOrAuth.accessToken}`, - }, - ); - } - - const session = sessionOrAuth; - if (!session?.token || !session?.id) { - throw new Error("No session token or ID provided"); - } - - return graphqlRequestWithErrors< - ResultOf - >( - GODADDY_HOST, - ApplyCheckoutSessionFulfillmentLocationMutation, - { input }, - { - "x-session-token": `${session.token}`, - "x-session-id": session.id, - "x-store-id": session.storeId, - }, - ); + const GODADDY_HOST = getHostByEnvironment(apiHost); + + if (sessionOrAuth && 'accessToken' in sessionOrAuth) { + if (!sessionOrAuth.accessToken) { + throw new Error('No access token provided'); + } + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionFulfillmentLocationMutation, + { input }, + { + Authorization: `Bearer ${sessionOrAuth.accessToken}`, + } + ); + } + + const session = sessionOrAuth; + if (!session?.token || !session?.id) { + throw new Error('No session token or ID provided'); + } + + return graphqlRequestWithErrors< + ResultOf + >( + GODADDY_HOST, + ApplyCheckoutSessionFulfillmentLocationMutation, + { input }, + { + 'x-session-token': `${session.token}`, + 'x-session-id': session.id, + 'x-store-id': session.storeId, + } + ); } diff --git a/packages/react/src/lib/godaddy/mutations.ts b/packages/react/src/lib/godaddy/mutations.ts index 8e01fb28..3c6f6aff 100644 --- a/packages/react/src/lib/godaddy/mutations.ts +++ b/packages/react/src/lib/godaddy/mutations.ts @@ -17,6 +17,7 @@ export const CreateCheckoutSessionMutation = graphql(` enabledLocales enableSurcharge enableLocalPickup + enableShipping enablePhoneCollection enableNotesCollection enablePromotionCodes diff --git a/packages/react/src/lib/godaddy/queries.ts b/packages/react/src/lib/godaddy/queries.ts index 859e71fb..63d10fb3 100644 --- a/packages/react/src/lib/godaddy/queries.ts +++ b/packages/react/src/lib/godaddy/queries.ts @@ -1,4 +1,4 @@ -import { graphql } from "@/gql.tada"; +import { graphql } from '@/gql.tada'; export const GetCheckoutSessionQuery = graphql(` query GetCheckoutSession { @@ -17,6 +17,7 @@ export const GetCheckoutSessionQuery = graphql(` enabledLocales enableSurcharge enableLocalPickup + enableShipping enablePhoneCollection enableNotesCollection enablePromotionCodes diff --git a/packages/react/src/lib/graphql-with-errors.ts b/packages/react/src/lib/graphql-with-errors.ts index 1b04156d..250db318 100644 --- a/packages/react/src/lib/graphql-with-errors.ts +++ b/packages/react/src/lib/graphql-with-errors.ts @@ -1,52 +1,51 @@ -import type { DocumentNode } from "graphql"; -import { ClientError, request, type Variables } from "graphql-request"; +import type { DocumentNode } from 'graphql'; +import { ClientError, request, type Variables } from 'graphql-request'; // Define the shape of GraphQL errors explicitly export class GraphQLErrorWithCodes< - T extends { message?: string; code?: string } = { - message?: string; - code?: string; - }, + T extends { message?: string; code?: string } = { + message?: string; + code?: string; + }, > extends Error { - constructor(public errors: T[]) { - const errorMessage = - errors.length === 1 - ? `${errors[0].message || "Unknown error"}` - : `${errors - .map((e) => e.message) - .filter(Boolean) - .join("; ")}`; + constructor(public errors: T[]) { + const errorMessage = + errors.length === 1 + ? `${errors[0].message || 'Unknown error'}` + : `${errors + .map(e => e.message) + .filter(Boolean) + .join('; ')}`; - super(errorMessage); - this.name = "GraphQLErrorWithCodes"; - } + super(errorMessage); + this.name = 'GraphQLErrorWithCodes'; + } - get codes(): string[] { - return this.errors.map((e) => e.code).filter(Boolean) as string[]; - } + get codes(): string[] { + return this.errors.map(e => e.code).filter(Boolean) as string[]; + } - get messages(): string[] { - return this.errors.map((e) => e.message).filter(Boolean) as string[]; - } + get messages(): string[] { + return this.errors.map(e => e.message).filter(Boolean) as string[]; + } } export async function graphqlRequestWithErrors( - endpoint: string, - query: DocumentNode, - variables?: Variables, - headers?: HeadersInit, + endpoint: string, + query: DocumentNode, + variables?: Variables, + headers?: HeadersInit ): Promise { - try { - return await request(endpoint, query, variables, headers); - } catch (err) { - console.error("graphqlRequestWithErrors error:", err); - if (err instanceof ClientError && err.response?.errors?.length) { - const parsedErrors = err.response.errors.map((e) => ({ - message: e.message as string, - code: e.extensions?.code as string, - })); - throw new GraphQLErrorWithCodes(parsedErrors); - } - throw err; // network or unknown error - } + try { + return await request(endpoint, query, variables, headers); + } catch (err) { + if (err instanceof ClientError && err.response?.errors?.length) { + const parsedErrors = err.response.errors.map(e => ({ + message: e.message as string, + code: e.extensions?.code as string, + })); + throw new GraphQLErrorWithCodes(parsedErrors); + } + throw err; // network or unknown error + } } diff --git a/packages/react/src/server.ts b/packages/react/src/server.ts index 5116a64e..5f4def8f 100644 --- a/packages/react/src/server.ts +++ b/packages/react/src/server.ts @@ -1,88 +1,88 @@ -"use server"; +'use server'; -import * as GoDaddy from "@/lib/godaddy/godaddy"; -import { getEnvVar } from "@/lib/utils"; -import type { CheckoutSessionInput, CheckoutSessionOptions } from "@/types"; +import * as GoDaddy from '@/lib/godaddy/godaddy'; +import { getEnvVar } from '@/lib/utils'; +import type { CheckoutSessionInput, CheckoutSessionOptions } from '@/types'; let accessToken: string | undefined; let accessTokenExpiresAt: number | undefined; export async function createCheckoutSession( - input: CheckoutSessionInput["input"], - options?: CheckoutSessionOptions, + input: CheckoutSessionInput['input'], + options?: CheckoutSessionOptions ) { - const CLIENT_ID = options?.auth?.clientId || ""; - const CLIENT_SECRET = options?.auth?.clientSecret || ""; + const CLIENT_ID = options?.auth?.clientId || ''; + const CLIENT_SECRET = options?.auth?.clientSecret || ''; - const now = Date.now() / 1000; // seconds + const now = Date.now() / 1000; // seconds - if ( - !accessToken || - !accessTokenExpiresAt || - accessTokenExpiresAt - 60 < now // refresh 1 min before expiry - ) { - const getAccessTokenResponse = await getAccessToken({ - clientId: CLIENT_ID, - clientSecret: CLIENT_SECRET, - }); + if ( + !accessToken || + !accessTokenExpiresAt || + accessTokenExpiresAt - 60 < now // refresh 1 min before expiry + ) { + const getAccessTokenResponse = await getAccessToken({ + clientId: CLIENT_ID, + clientSecret: CLIENT_SECRET, + }); - accessToken = getAccessTokenResponse?.access_token; - accessTokenExpiresAt = now + (getAccessTokenResponse?.expires_in || 0); - } + accessToken = getAccessTokenResponse?.access_token; + accessTokenExpiresAt = now + (getAccessTokenResponse?.expires_in || 0); + } - if (!accessToken) { - throw new Error("Failed to get access token"); - } + if (!accessToken) { + throw new Error('Failed to get access token'); + } - return await GoDaddy.createCheckoutSession(input, { - accessToken, - }); + return await GoDaddy.createCheckoutSession(input, { + accessToken, + }); } function getHostByEnvironment(): string { - return `https://${getEnvVar("GODADDY_HOST") || "api.godaddy.com"}`; + return `https://${getEnvVar('GODADDY_HOST') || 'api.godaddy.com'}`; } async function getAccessToken({ - clientId, - clientSecret, + clientId, + clientSecret, }: { - clientId: string; - clientSecret: string; + clientId: string; + clientSecret: string; }) { - if (!clientId || !clientSecret) { - return; - } + if (!clientId || !clientSecret) { + return; + } - const host = getHostByEnvironment(); + const host = getHostByEnvironment(); - const data = new URLSearchParams(); - data.append("grant_type", "client_credentials"); - data.append("client_id", clientId); - data.append("client_secret", clientSecret); - data.append( - "scope", - "commerce.product:read commerce.order:read commerce.order:update location.address-verification:execute", - ); - const response = await fetch(`${host}/v2/oauth2/token`, { - method: "POST", - headers: { - "Content-Type": "application/x-www-form-urlencoded", - }, - body: data.toString(), - cache: "no-store", - }); + const data = new URLSearchParams(); + data.append('grant_type', 'client_credentials'); + data.append('client_id', clientId); + data.append('client_secret', clientSecret); + data.append( + 'scope', + 'commerce.product:read commerce.order:read commerce.order:update location.address-verification:execute' + ); + const response = await fetch(`${host}/v2/oauth2/token`, { + method: 'POST', + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + }, + body: data.toString(), + cache: 'no-store', + }); - if (!response.ok) { - throw new Error( - `Failed to get access token: ${response.status} ${response.statusText}`, - ); - } + if (!response.ok) { + throw new Error( + `Failed to get access token: ${response.status} ${response.statusText}` + ); + } - const result = (await response.json()) as { - access_token: string; - scope: string; - expires_in: number; - }; - return result; + const result = (await response.json()) as { + access_token: string; + scope: string; + expires_in: number; + }; + return result; } From e0fbd79a2faade5421e839ec8b0449bd243938f8 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Wed, 5 Nov 2025 10:01:15 -0500 Subject: [PATCH 07/23] fix: handle exchangeFailed state correctly when token exchange fails - Return early after clearing mismatched JWT to avoid race condition - Check for missing JWT before cancelled flag to ensure failure is captured - Guard exchangeFailed state updates with cancelled check to prevent updates after unmount Amp-Thread-ID: https://ampcode.com/threads/T-77963656-ab13-4782-b5fb-efcf2be4696a Co-authored-by: Amp --- packages/react/src/hooks/use-checkout-session.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index 9d54b464..af5784ec 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -90,6 +90,7 @@ export function useCheckoutSession(props?: CheckoutProps) { if (jwt && storedSessionId && storedSessionId !== sessionId) { removeJwt(); if (refreshTimerRef.current) clearTimeout(refreshTimerRef.current); + return; } // If we already have a JWT for this session, nothing to do @@ -104,11 +105,11 @@ export function useCheckoutSession(props?: CheckoutProps) { }, apiHost ); - if (cancelled) return; if (!result?.jwt) { - setExchangeFailed(true); + if (!cancelled) setExchangeFailed(true); return; } + if (cancelled) return; setJwt(result.jwt); setStoredSessionId(sessionId); @@ -124,7 +125,7 @@ export function useCheckoutSession(props?: CheckoutProps) { } catch (_error) { removeJwt(); removeStoredSessionId(); - setExchangeFailed(true); + if (!cancelled) setExchangeFailed(true); } })(); From f1e832d5a38b1ee9d7c7136527c3b380ad4cb214 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Wed, 5 Nov 2025 11:22:09 -0500 Subject: [PATCH 08/23] Fix the draft order query --- .../src/components/checkout/checkout.tsx | 652 +++++++++--------- .../checkout/form/checkout-form-container.tsx | 117 ++-- .../checkout/order/use-draft-order.ts | 78 +-- .../react/src/hooks/use-checkout-session.tsx | 332 ++++----- 4 files changed, 591 insertions(+), 588 deletions(-) diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 8632ebc5..40007b20 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -1,375 +1,375 @@ -'use client'; - -import React, { type ReactNode } from 'react'; -import { z } from 'zod'; -import { hasRegionData } from '@/components/checkout/address'; -import { checkIsValidPhone } from '@/components/checkout/address/utils/check-is-valid-phone'; -import { DeliveryMethods } from '@/components/checkout/delivery/delivery-method'; -import { getRequiredFieldsFromSchema } from '@/components/checkout/form/utils/get-required-fields-from-schema'; -import { type GoDaddyVariables, useGoDaddyContext } from '@/godaddy-provider'; -import { useCheckoutSession } from '@/hooks/use-checkout-session'; -import { type Theme, useTheme } from '@/hooks/use-theme'; -import { useVariables } from '@/hooks/use-variables'; -import type { TrackingProperties } from '@/tracking/event-properties'; -import { TrackingProvider } from '@/tracking/tracking-provider'; -import type { CheckoutSession } from '@/types'; -import { CheckoutFormContainer } from './form/checkout-form-container'; -import type { Target } from './target/target'; +"use client"; + +import React, { type ReactNode } from "react"; +import { z } from "zod"; +import { hasRegionData } from "@/components/checkout/address"; +import { checkIsValidPhone } from "@/components/checkout/address/utils/check-is-valid-phone"; +import { DeliveryMethods } from "@/components/checkout/delivery/delivery-method"; +import { getRequiredFieldsFromSchema } from "@/components/checkout/form/utils/get-required-fields-from-schema"; +import { type GoDaddyVariables, useGoDaddyContext } from "@/godaddy-provider"; +import { useCheckoutSession } from "@/hooks/use-checkout-session"; +import { type Theme, useTheme } from "@/hooks/use-theme"; +import { useVariables } from "@/hooks/use-variables"; +import type { TrackingProperties } from "@/tracking/event-properties"; +import { TrackingProvider } from "@/tracking/tracking-provider"; +import type { CheckoutSession } from "@/types"; +import { CheckoutFormContainer } from "./form/checkout-form-container"; +import type { Target } from "./target/target"; // Utility function for redirecting to success URL after checkout export function redirectToSuccessUrl(successUrl?: string): void { - if (successUrl && typeof window !== 'undefined') { - setTimeout(() => { - window.location.href = successUrl; - }, 1000); - } + if (successUrl && typeof window !== "undefined") { + setTimeout(() => { + window.location.href = successUrl; + }, 1000); + } } export interface CheckoutElements { - input?: string; - select?: string; - button?: string; - card?: string; - checkbox?: string; - radio?: string; + input?: string; + select?: string; + button?: string; + card?: string; + checkbox?: string; + radio?: string; } interface Appearance { - theme?: Theme; - elements?: CheckoutElements; - variables?: Omit; + theme?: Theme; + elements?: CheckoutElements; + variables?: Omit; } export type LayoutSection = - | 'express-checkout' - | 'contact' - | 'shipping' - | 'payment' - | 'pickup' - | 'tips' - | 'delivery'; + | "express-checkout" + | "contact" + | "shipping" + | "payment" + | "pickup" + | "tips" + | "delivery"; export const LayoutSections = { - EXPRESS_CHECKOUT: 'express-checkout', - CONTACT: 'contact', - SHIPPING: 'shipping', - PAYMENT: 'payment', - PICKUP: 'pickup', - DELIVERY: 'delivery', - TIPS: 'tips', + EXPRESS_CHECKOUT: "express-checkout", + CONTACT: "contact", + SHIPPING: "shipping", + PAYMENT: "payment", + PICKUP: "pickup", + DELIVERY: "delivery", + TIPS: "tips", } as const; export type StripeConfig = { - publishableKey: string; - testMode?: boolean; + publishableKey: string; + testMode?: boolean; }; export type GodaddyPaymentsConfig = { - businessId: string; - appId: string; + businessId: string; + appId: string; }; export type SquareConfig = { - locationId: string; - appId: string; + locationId: string; + appId: string; }; export type PayPalConfig = { - clientId: string; - disableFunding?: Array<'credit' | 'card' | 'paylater' | 'venmo'>; + clientId: string; + disableFunding?: Array<"credit" | "card" | "paylater" | "venmo">; }; interface CheckoutContextValue { - elements?: CheckoutElements; - targets?: Partial< - Record ReactNode> - >; - session?: CheckoutSession | null; - jwt?: string; - isCheckoutDisabled?: boolean; - stripeConfig?: StripeConfig; - godaddyPaymentsConfig?: GodaddyPaymentsConfig; - squareConfig?: SquareConfig; - paypalConfig?: PayPalConfig; - isConfirmingCheckout: boolean; - setIsConfirmingCheckout: (isConfirming: boolean) => void; - checkoutErrors?: string[] | undefined; - setCheckoutErrors: (error?: string[] | undefined) => void; - requiredFields?: { [key: string]: boolean }; + elements?: CheckoutElements; + targets?: Partial< + Record ReactNode> + >; + session?: CheckoutSession | null; + jwt?: string; + isCheckoutDisabled?: boolean; + stripeConfig?: StripeConfig; + godaddyPaymentsConfig?: GodaddyPaymentsConfig; + squareConfig?: SquareConfig; + paypalConfig?: PayPalConfig; + isConfirmingCheckout: boolean; + setIsConfirmingCheckout: (isConfirming: boolean) => void; + checkoutErrors?: string[] | undefined; + setCheckoutErrors: (error?: string[] | undefined) => void; + requiredFields?: { [key: string]: boolean }; } export const checkoutContext = React.createContext({ - isConfirmingCheckout: false, - setIsConfirmingCheckout: () => { - // no op - }, - checkoutErrors: undefined, - setCheckoutErrors: () => { - // no op - }, + isConfirmingCheckout: false, + setIsConfirmingCheckout: () => { + // no op + }, + checkoutErrors: undefined, + setCheckoutErrors: () => { + // no op + }, }); export const useCheckoutContext = () => React.useContext(checkoutContext); export const baseCheckoutSchema = z.object({ - contactEmail: z - .string() - .min(1, 'Enter an email') - .email('Enter a valid email'), - deliveryMethod: z.nativeEnum(DeliveryMethods).describe('fulfillmentModes'), - paymentUseShippingAddress: z.boolean().default(true), - shippingFirstName: z.string().max(60), - shippingLastName: z.string().max(60), - shippingPhone: z.string().max(15, 'Phone number too long').optional(), - shippingAddressLine1: z.string().max(300), - shippingAddressLine2: z.string().max(300).optional(), - shippingAddressLine3: z.string().max(300).optional(), - shippingAdminArea4: z - .string() - .max(100) - .describe('The neighborhood') - .optional(), - shippingAdminArea3: z - .string() - .max(100) - .describe('City, town, or village') - .optional(), - shippingAdminArea2: z.string().max(100).describe('Sub-locality or suburb'), - shippingAdminArea1: z.string().max(100).describe('State or province'), - shippingPostalCode: z.string().max(60), - shippingCountryCode: z.string().max(2), - shippingMethod: z.string().optional(), - shippingValid: z.literal(true, { - errorMap: () => ({ message: 'Invalid shipping address' }), - }), - billingFirstName: z.string().max(60), - billingLastName: z.string().max(60), - billingPhone: z.string().max(15, 'Phone number too long').optional(), - billingAddressLine1: z.string().max(300), - billingAddressLine2: z.string().max(300).optional(), - billingAddressLine3: z.string().max(300).optional(), - billingAdminArea4: z - .string() - .max(100) - .describe('The neighborhood') - .optional(), - billingAdminArea3: z - .string() - .max(100) - .describe('City, town, or village') - .optional(), - billingAdminArea2: z.string().max(100).describe('Sub-locality or suburb'), - billingAdminArea1: z.string().max(100).describe('State or province'), - billingPostalCode: z.string().max(60), - billingCountryCode: z.string().max(2), - billingValid: z.literal(true, { - errorMap: () => ({ message: 'Invalid billing address' }), - }), - paymentCardNumber: z.string().optional(), - paymentCardNumberDisplay: z.string().optional(), - paymentCardType: z.string().optional(), - paymentExpiryDate: z.string().optional(), - paymentMonth: z.string().nullish(), - paymentYear: z.string().nullish(), - paymentSecurityCode: z.string().optional(), - paymentNameOnCard: z.string().optional(), - notes: z.string().optional(), - pickupDate: z.union([z.string(), z.date()]).nullish(), - pickupTime: z.string().nullish(), - pickupLocationId: z.string().nullish(), - pickupLeadTime: z.number().nullish(), - pickupTimezone: z.string().nullish(), - tipAmount: z.number().optional(), - tipPercentage: z.number().optional(), - paymentMethod: z.string().min(1, 'Select a payment method'), - stripePaymentIntent: z.string().optional(), - stripePaymentIntentId: z.string().optional(), + contactEmail: z + .string() + .min(1, "Enter an email") + .email("Enter a valid email"), + deliveryMethod: z.nativeEnum(DeliveryMethods).describe("fulfillmentModes"), + paymentUseShippingAddress: z.boolean().default(true), + shippingFirstName: z.string().max(60), + shippingLastName: z.string().max(60), + shippingPhone: z.string().max(15, "Phone number too long").optional(), + shippingAddressLine1: z.string().max(300), + shippingAddressLine2: z.string().max(300).optional(), + shippingAddressLine3: z.string().max(300).optional(), + shippingAdminArea4: z + .string() + .max(100) + .describe("The neighborhood") + .optional(), + shippingAdminArea3: z + .string() + .max(100) + .describe("City, town, or village") + .optional(), + shippingAdminArea2: z.string().max(100).describe("Sub-locality or suburb"), + shippingAdminArea1: z.string().max(100).describe("State or province"), + shippingPostalCode: z.string().max(60), + shippingCountryCode: z.string().max(2), + shippingMethod: z.string().optional(), + shippingValid: z.literal(true, { + errorMap: () => ({ message: "Invalid shipping address" }), + }), + billingFirstName: z.string().max(60), + billingLastName: z.string().max(60), + billingPhone: z.string().max(15, "Phone number too long").optional(), + billingAddressLine1: z.string().max(300), + billingAddressLine2: z.string().max(300).optional(), + billingAddressLine3: z.string().max(300).optional(), + billingAdminArea4: z + .string() + .max(100) + .describe("The neighborhood") + .optional(), + billingAdminArea3: z + .string() + .max(100) + .describe("City, town, or village") + .optional(), + billingAdminArea2: z.string().max(100).describe("Sub-locality or suburb"), + billingAdminArea1: z.string().max(100).describe("State or province"), + billingPostalCode: z.string().max(60), + billingCountryCode: z.string().max(2), + billingValid: z.literal(true, { + errorMap: () => ({ message: "Invalid billing address" }), + }), + paymentCardNumber: z.string().optional(), + paymentCardNumberDisplay: z.string().optional(), + paymentCardType: z.string().optional(), + paymentExpiryDate: z.string().optional(), + paymentMonth: z.string().nullish(), + paymentYear: z.string().nullish(), + paymentSecurityCode: z.string().optional(), + paymentNameOnCard: z.string().optional(), + notes: z.string().optional(), + pickupDate: z.union([z.string(), z.date()]).nullish(), + pickupTime: z.string().nullish(), + pickupLocationId: z.string().nullish(), + pickupLeadTime: z.number().nullish(), + pickupTimezone: z.string().nullish(), + tipAmount: z.number().optional(), + tipPercentage: z.number().optional(), + paymentMethod: z.string().min(1, "Select a payment method"), + stripePaymentIntent: z.string().optional(), + stripePaymentIntentId: z.string().optional(), }); // We cannot use refine here, as it would not allow extending the schema with session overrides. export type CheckoutFormSchema = Partial<{ - [K in keyof z.infer]: z.ZodTypeAny; + [K in keyof z.infer]: z.ZodTypeAny; }> & - z.ZodRawShape; + z.ZodRawShape; export type CheckoutFormData = z.infer; export interface CheckoutProps { - session?: CheckoutSession | undefined; - appearance?: Appearance; - isCheckoutDisabled?: boolean; - stripeConfig?: StripeConfig; - godaddyPaymentsConfig?: GodaddyPaymentsConfig; - squareConfig?: SquareConfig; - paypalConfig?: PayPalConfig; - layout?: LayoutSection[]; - direction?: 'ltr' | 'rtl'; - showStoreHours?: boolean; - enableTracking?: boolean; - trackingProperties?: TrackingProperties; - targets?: Partial ReactNode>>; - checkoutFormSchema?: CheckoutFormSchema; - defaultValues?: Pick; + session?: CheckoutSession | undefined; + appearance?: Appearance; + isCheckoutDisabled?: boolean; + stripeConfig?: StripeConfig; + godaddyPaymentsConfig?: GodaddyPaymentsConfig; + squareConfig?: SquareConfig; + paypalConfig?: PayPalConfig; + layout?: LayoutSection[]; + direction?: "ltr" | "rtl"; + showStoreHours?: boolean; + enableTracking?: boolean; + trackingProperties?: TrackingProperties; + targets?: Partial ReactNode>>; + checkoutFormSchema?: CheckoutFormSchema; + defaultValues?: Pick; } export function Checkout(props: CheckoutProps) { - const { - checkoutFormSchema, - enableTracking = false, - trackingProperties, - stripeConfig, - godaddyPaymentsConfig, - squareConfig, - paypalConfig, - isCheckoutDisabled, - } = props; - - const [isConfirmingCheckout, setIsConfirmingCheckout] = React.useState(false); - const [checkoutErrors, setCheckoutErrors] = React.useState< - string[] | undefined - >(undefined); - const { t } = useGoDaddyContext(); - - useTheme(); - useVariables(props?.appearance?.variables); - - const { session, jwt } = useCheckoutSession(props); - - const formSchema = React.useMemo(() => { - const extendedSchema = checkoutFormSchema - ? baseCheckoutSchema.extend(checkoutFormSchema) - : baseCheckoutSchema; - - return extendedSchema.superRefine((data, ctx) => { - if (data.billingPhone) { - if (!checkIsValidPhone(String(data?.billingPhone))) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: 'Enter a valid billing phone number', - path: ['billingPhone'], - }); - } - } - - if (data.shippingPhone) { - if (!checkIsValidPhone(String(data?.shippingPhone))) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: 'Enter a valid shipping phone number', - path: ['shippingPhone'], - }); - } - } - - // Billing address validation - only required if not using shipping address OR pickup - const requireBillingAddress = - !data.paymentUseShippingAddress || - data.deliveryMethod === DeliveryMethods.PICKUP; - - if (requireBillingAddress) { - // Basic billing fields required for all countries - const billingFields = [ - { key: 'billingFirstName', message: t.validation.enterFirstName }, - { key: 'billingLastName', message: t.validation.enterLastName }, - { key: 'billingAddressLine1', message: t.validation.enterAddress }, - { key: 'billingAdminArea2', message: t.validation.enterCity }, - { - key: 'billingPostalCode', - message: t.validation.enterZipPostalCode, - }, - { key: 'billingCountryCode', message: t.validation.enterCountry }, - ]; - - if (hasRegionData(String(data.billingCountryCode))) { - billingFields.push({ - key: 'billingAdminArea1', - message: t.validation.selectState, - }); - } - - for (const { key, message } of billingFields) { - if (!data[key as keyof typeof data]) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message, - path: [key], - }); - } - } - } - - // Shipping address validation - only required if delivery method is SHIP - const requireShippingAddress = - data.deliveryMethod === DeliveryMethods.SHIP; - - if (requireShippingAddress) { - // Basic shipping fields required for all countries - const shippingFields = [ - { key: 'shippingFirstName', message: t.validation.enterFirstName }, - { key: 'shippingLastName', message: t.validation.enterLastName }, - { key: 'shippingAddressLine1', message: t.validation.enterAddress }, - { key: 'shippingAdminArea2', message: t.validation.enterCity }, - { - key: 'shippingPostalCode', - message: t.validation.enterZipPostalCode, - }, - { key: 'shippingCountryCode', message: t.validation.enterCountry }, - ]; - - if (hasRegionData(String(data.shippingCountryCode))) { - shippingFields.push({ - key: 'shippingAdminArea1', - message: t.validation.selectState, - }); - } - - for (const { key, message } of shippingFields) { - if (!data[key as keyof typeof data]) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message, - path: [key], - }); - } - } - } - }); - }, [checkoutFormSchema, t]); - // }, [checkoutFormSchema, session?.paymentMethods]); - - const requiredFields = React.useMemo(() => { - return getRequiredFieldsFromSchema(formSchema); - }, [formSchema]); - - return ( - - - - - - ); + const { + checkoutFormSchema, + enableTracking = false, + trackingProperties, + stripeConfig, + godaddyPaymentsConfig, + squareConfig, + paypalConfig, + isCheckoutDisabled, + } = props; + + const [isConfirmingCheckout, setIsConfirmingCheckout] = React.useState(false); + const [checkoutErrors, setCheckoutErrors] = React.useState< + string[] | undefined + >(undefined); + const { t } = useGoDaddyContext(); + + useTheme(); + useVariables(props?.appearance?.variables); + + const { session, jwt } = useCheckoutSession(props); + + const formSchema = React.useMemo(() => { + const extendedSchema = checkoutFormSchema + ? baseCheckoutSchema.extend(checkoutFormSchema) + : baseCheckoutSchema; + + return extendedSchema.superRefine((data, ctx) => { + if (data.billingPhone) { + if (!checkIsValidPhone(String(data?.billingPhone))) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Enter a valid billing phone number", + path: ["billingPhone"], + }); + } + } + + if (data.shippingPhone) { + if (!checkIsValidPhone(String(data?.shippingPhone))) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: "Enter a valid shipping phone number", + path: ["shippingPhone"], + }); + } + } + + // Billing address validation - only required if not using shipping address OR pickup + const requireBillingAddress = + !data.paymentUseShippingAddress || + data.deliveryMethod === DeliveryMethods.PICKUP; + + if (requireBillingAddress) { + // Basic billing fields required for all countries + const billingFields = [ + { key: "billingFirstName", message: t.validation.enterFirstName }, + { key: "billingLastName", message: t.validation.enterLastName }, + { key: "billingAddressLine1", message: t.validation.enterAddress }, + { key: "billingAdminArea2", message: t.validation.enterCity }, + { + key: "billingPostalCode", + message: t.validation.enterZipPostalCode, + }, + { key: "billingCountryCode", message: t.validation.enterCountry }, + ]; + + if (hasRegionData(String(data.billingCountryCode))) { + billingFields.push({ + key: "billingAdminArea1", + message: t.validation.selectState, + }); + } + + for (const { key, message } of billingFields) { + if (!data[key as keyof typeof data]) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message, + path: [key], + }); + } + } + } + + // Shipping address validation - only required if delivery method is SHIP + const requireShippingAddress = + data.deliveryMethod === DeliveryMethods.SHIP; + + if (requireShippingAddress) { + // Basic shipping fields required for all countries + const shippingFields = [ + { key: "shippingFirstName", message: t.validation.enterFirstName }, + { key: "shippingLastName", message: t.validation.enterLastName }, + { key: "shippingAddressLine1", message: t.validation.enterAddress }, + { key: "shippingAdminArea2", message: t.validation.enterCity }, + { + key: "shippingPostalCode", + message: t.validation.enterZipPostalCode, + }, + { key: "shippingCountryCode", message: t.validation.enterCountry }, + ]; + + if (hasRegionData(String(data.shippingCountryCode))) { + shippingFields.push({ + key: "shippingAdminArea1", + message: t.validation.selectState, + }); + } + + for (const { key, message } of shippingFields) { + if (!data[key as keyof typeof data]) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message, + path: [key], + }); + } + } + } + }); + }, [checkoutFormSchema, t]); + // }, [checkoutFormSchema, session?.paymentMethods]); + + const requiredFields = React.useMemo(() => { + return getRequiredFieldsFromSchema(formSchema); + }, [formSchema]); + + return ( + + + + + + ); } diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index 8b1a6585..19a5d3d4 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -1,73 +1,76 @@ -import { useMemo } from 'react'; -import type { z } from 'zod'; +import { useMemo } from "react"; +import type { z } from "zod"; import { - type CheckoutProps, - useCheckoutContext, -} from '@/components/checkout/checkout'; -import { CheckoutSkeleton } from '@/components/checkout/checkout-skeleton'; -import { CheckoutForm } from '@/components/checkout/form/checkout-form'; + type CheckoutProps, + useCheckoutContext, +} from "@/components/checkout/checkout"; +import { CheckoutSkeleton } from "@/components/checkout/checkout-skeleton"; +import { CheckoutForm } from "@/components/checkout/form/checkout-form"; import { - useDraftOrder, - useDraftOrderLineItems, -} from '@/components/checkout/order/use-draft-order'; -import { useDraftOrderProductsMap } from '@/components/checkout/order/use-draft-order-products'; + useDraftOrder, + useDraftOrderLineItems, +} from "@/components/checkout/order/use-draft-order"; +import { useDraftOrderProductsMap } from "@/components/checkout/order/use-draft-order-products"; import { - mapOrderToFormValues, - mapSkusToItemsDisplay, -} from '@/components/checkout/utils/checkout-transformers'; + mapOrderToFormValues, + mapSkusToItemsDisplay, +} from "@/components/checkout/utils/checkout-transformers"; -interface CheckoutFormContainerProps extends Omit { - schema: z.ZodObject | z.ZodEffects; +interface CheckoutFormContainerProps extends Omit { + schema: z.ZodObject | z.ZodEffects; } export function CheckoutFormContainer({ - schema, - ...props + schema, + ...props }: CheckoutFormContainerProps) { - const { session, isConfirmingCheckout } = useCheckoutContext(); + const { session, isConfirmingCheckout } = useCheckoutContext(); + console.log(session); - const draftOrderQuery = useDraftOrder(); - const draftOrderLineItemsQuery = useDraftOrderLineItems(); - const skusMap = useDraftOrderProductsMap(); + const draftOrderQuery = useDraftOrder(); + const draftOrderLineItemsQuery = useDraftOrderLineItems(); + const skusMap = useDraftOrderProductsMap(); - const { data: order } = draftOrderQuery; - const { data: lineItems } = draftOrderLineItemsQuery; + console.log(draftOrderQuery.data); - const items = useMemo( - () => mapSkusToItemsDisplay(lineItems, skusMap), - [lineItems, skusMap] - ); + const { data: order } = draftOrderQuery; + const { data: lineItems } = draftOrderLineItemsQuery; - const formValues = useMemo( - () => ({ - ...mapOrderToFormValues({ - order, - defaultValues: props.defaultValues, - defaultCountryCode: session?.shipping?.originAddress?.countryCode, - }), - }), - [order, props.defaultValues, session?.shipping?.originAddress?.countryCode] - ); + const items = useMemo( + () => mapSkusToItemsDisplay(lineItems, skusMap), + [lineItems, skusMap], + ); - if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { - const returnUrl = session?.returnUrl; - if (returnUrl) { - window.location.href = returnUrl; - return null; - } - } + const formValues = useMemo( + () => ({ + ...mapOrderToFormValues({ + order, + defaultValues: props.defaultValues, + defaultCountryCode: session?.shipping?.originAddress?.countryCode, + }), + }), + [order, props.defaultValues, session?.shipping?.originAddress?.countryCode], + ); - if (draftOrderQuery.isLoading) { - return ; - } + // if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { + // const returnUrl = session?.returnUrl; + // if (returnUrl) { + // window.location.href = returnUrl; + // return null; + // } + // } - return ( - - ); + if (draftOrderQuery.isLoading) { + return ; + } + + return ( + + ); } diff --git a/packages/react/src/components/checkout/order/use-draft-order.ts b/packages/react/src/components/checkout/order/use-draft-order.ts index ceb4329f..b7192044 100644 --- a/packages/react/src/components/checkout/order/use-draft-order.ts +++ b/packages/react/src/components/checkout/order/use-draft-order.ts @@ -1,13 +1,13 @@ -import { type UseQueryResult, useQuery } from '@tanstack/react-query'; -import { useCheckoutContext } from '@/components/checkout/checkout'; -import { useGoDaddyContext } from '@/godaddy-provider'; -import { getDraftOrder } from '@/lib/godaddy/godaddy'; +import { type UseQueryResult, useQuery } from "@tanstack/react-query"; +import { useCheckoutContext } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; +import { getDraftOrder } from "@/lib/godaddy/godaddy"; import type { - DraftOrder, - DraftOrderSession, - ShippingLines, - Totals, -} from '@/types'; + DraftOrder, + DraftOrderSession, + ShippingLines, + Totals, +} from "@/types"; /** * Hook to fetch the entire draft order @@ -16,48 +16,48 @@ import type { * @returns Query result with draft order data */ export function useDraftOrder( - select?: (data: DraftOrderSession) => TData, - key = 'draft-order' + select?: (data: DraftOrderSession) => TData, + key = "draft-order", ): UseQueryResult { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useQuery({ - queryKey: session?.id ? [key, session.id] : [key], - queryFn: () => - jwt - ? getDraftOrder({ accessToken: jwt }, apiHost) - : getDraftOrder(session, apiHost), - enabled: !!jwt, - select: select ?? (data => data.checkoutSession?.draftOrder as TData), - retry: 3, - }); + return useQuery({ + queryKey: session?.id ? [key, session.id] : [key], + queryFn: () => + jwt + ? getDraftOrder({ accessToken: jwt }, apiHost) + : getDraftOrder(session, apiHost), + enabled: !!session?.id, + select: select ?? ((data) => data.checkoutSession?.draftOrder as TData), + retry: 3, + }); } export function useDraftOrderLineItems() { - return useDraftOrder( - data => data.checkoutSession?.draftOrder?.lineItems ?? null, - 'draft-order' - ); + return useDraftOrder( + (data) => data.checkoutSession?.draftOrder?.lineItems ?? null, + "draft-order", + ); } export function useDraftOrderShippingAddress() { - return useDraftOrder['address']>( - data => data.checkoutSession?.draftOrder?.shipping?.address ?? null, - 'draft-order' - ); + return useDraftOrder["address"]>( + (data) => data.checkoutSession?.draftOrder?.shipping?.address ?? null, + "draft-order", + ); } export function useDraftOrderTotals() { - return useDraftOrder( - data => data.checkoutSession?.draftOrder?.totals ?? null, - 'draft-order' - ); + return useDraftOrder( + (data) => data.checkoutSession?.draftOrder?.totals ?? null, + "draft-order", + ); } export function useDraftOrderShipping() { - return useDraftOrder( - data => data.checkoutSession?.draftOrder?.shippingLines?.[0] ?? null, - 'draft-order' - ); + return useDraftOrder( + (data) => data.checkoutSession?.draftOrder?.shippingLines?.[0] ?? null, + "draft-order", + ); } diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index af5784ec..c910f9b3 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -1,173 +1,173 @@ -import { useQuery } from '@tanstack/react-query'; -import { useCallback, useEffect, useRef, useState } from 'react'; -import type { CheckoutProps } from '@/components/checkout/checkout'; -import { useGoDaddyContext } from '@/godaddy-provider'; +import { useQuery } from "@tanstack/react-query"; +import { useCallback, useEffect, useRef, useState } from "react"; +import type { CheckoutProps } from "@/components/checkout/checkout"; +import { useGoDaddyContext } from "@/godaddy-provider"; import { - exchangeCheckoutToken, - getCheckoutSession, - refreshCheckoutToken, -} from '@/lib/godaddy/godaddy'; -import { getSessionIdFromPath, getUrlHash } from '@/lib/utils'; -import { useSessionStorage } from './use-session-storage'; + exchangeCheckoutToken, + getCheckoutSession, + refreshCheckoutToken, +} from "@/lib/godaddy/godaddy"; +import { getSessionIdFromPath, getUrlHash } from "@/lib/utils"; +import { useSessionStorage } from "./use-session-storage"; function decodeJwt(token: string): { exp: number } | null { - try { - const base64Url = token.split('.')[1]; - const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/'); - const jsonPayload = decodeURIComponent( - atob(base64) - .split('') - .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)) - .join('') - ); - return JSON.parse(jsonPayload); - } catch { - return null; - } + try { + const base64Url = token.split(".")[1]; + const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/"); + const jsonPayload = decodeURIComponent( + atob(base64) + .split("") + .map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)) + .join(""), + ); + return JSON.parse(jsonPayload); + } catch { + return null; + } } export function useCheckoutSession(props?: CheckoutProps) { - const { apiHost } = useGoDaddyContext(); - const [jwt, setJwt, removeJwt] = useSessionStorage( - 'godaddy-checkout-jwt', - '' - ); - const [storedSessionId, setStoredSessionId, removeStoredSessionId] = - useSessionStorage('godaddy-checkout-session-id', ''); - const [exchangeFailed, setExchangeFailed] = useState(false); - const refreshTimerRef = useRef(null); - - let sessionId: string; - let sessionToken: string | null; - - if (props?.session) { - sessionId = props?.session.id; - sessionToken = props?.session.token; - } else { - sessionId = - typeof window !== 'undefined' - ? getSessionIdFromPath(window.location) - : ''; - sessionToken = - typeof window !== 'undefined' ? getUrlHash(window.location) : ''; - } - - const scheduleRefresh = useCallback( - (currentJwt: string) => { - if (refreshTimerRef.current) { - clearTimeout(refreshTimerRef.current); - } - - const decoded = decodeJwt(currentJwt); - if (!decoded?.exp) return; - - const expiresAt = decoded.exp * 1000; - const now = Date.now(); - const refreshIn = Math.max(0, expiresAt - now - 60000); - - refreshTimerRef.current = window.setTimeout(async () => { - try { - const result = await refreshCheckoutToken(currentJwt, apiHost); - if (result?.jwt) { - setJwt(result.jwt); - scheduleRefresh(result.jwt); - } - } catch (_error) { - removeJwt(); - removeStoredSessionId(); - } - }, refreshIn); - }, - [setJwt, removeJwt, removeStoredSessionId, apiHost] - ); - - useEffect(() => { - if (!sessionId || !sessionToken) return; - - let cancelled = false; - - // If we have a JWT for a different session, clear it - if (jwt && storedSessionId && storedSessionId !== sessionId) { - removeJwt(); - if (refreshTimerRef.current) clearTimeout(refreshTimerRef.current); - return; - } - - // If we already have a JWT for this session, nothing to do - if (jwt && storedSessionId === sessionId) return; - - (async () => { - try { - const result = await exchangeCheckoutToken( - { - sessionId, - token: sessionToken, - }, - apiHost - ); - if (!result?.jwt) { - if (!cancelled) setExchangeFailed(true); - return; - } - if (cancelled) return; - - setJwt(result.jwt); - setStoredSessionId(sessionId); - setExchangeFailed(false); - if (typeof window !== 'undefined') { - window.history.replaceState( - null, - '', - window.location.pathname + window.location.search - ); - } - scheduleRefresh(result.jwt); - } catch (_error) { - removeJwt(); - removeStoredSessionId(); - if (!cancelled) setExchangeFailed(true); - } - })(); - - return () => { - cancelled = true; - if (refreshTimerRef.current) { - clearTimeout(refreshTimerRef.current); - } - }; - }, [ - sessionId, - sessionToken, - jwt, - storedSessionId, - setJwt, - removeJwt, - setStoredSessionId, - removeStoredSessionId, - scheduleRefresh, - apiHost, - ]); - - useEffect(() => { - if (!jwt || storedSessionId !== sessionId) return; - scheduleRefresh(jwt); - return () => { - if (refreshTimerRef.current) { - clearTimeout(refreshTimerRef.current); - } - }; - }, [jwt, sessionId, storedSessionId, scheduleRefresh]); - - const checkoutSessionQuery = useQuery({ - queryKey: ['checkout-session', sessionId], - queryFn: () => getCheckoutSession({ accessToken: jwt }, apiHost), - enabled: !!jwt && storedSessionId === sessionId, - }); - - // If exchange failed and we have a session prop, use legacy flow - if (exchangeFailed && props?.session) { - return { session: props.session, jwt: undefined }; - } - - return { session: checkoutSessionQuery.data, jwt: jwt || undefined }; + const { apiHost } = useGoDaddyContext(); + const [jwt, setJwt, removeJwt] = useSessionStorage( + "godaddy-checkout-jwt", + "", + ); + const [storedSessionId, setStoredSessionId, removeStoredSessionId] = + useSessionStorage("godaddy-checkout-session-id", ""); + const [exchangeFailed, setExchangeFailed] = useState(false); + const refreshTimerRef = useRef(null); + + let sessionId: string; + let sessionToken: string | null; + + if (props?.session) { + sessionId = props?.session.id; + sessionToken = props?.session.token; + } else { + sessionId = + typeof window !== "undefined" + ? getSessionIdFromPath(window.location) + : ""; + sessionToken = + typeof window !== "undefined" ? getUrlHash(window.location) : ""; + } + + const scheduleRefresh = useCallback( + (currentJwt: string) => { + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + + const decoded = decodeJwt(currentJwt); + if (!decoded?.exp) return; + + const expiresAt = decoded.exp * 1000; + const now = Date.now(); + const refreshIn = Math.max(0, expiresAt - now - 60000); + + refreshTimerRef.current = window.setTimeout(async () => { + try { + const result = await refreshCheckoutToken(currentJwt, apiHost); + if (result?.jwt) { + setJwt(result.jwt); + scheduleRefresh(result.jwt); + } + } catch (_error) { + removeJwt(); + removeStoredSessionId(); + } + }, refreshIn); + }, + [setJwt, removeJwt, removeStoredSessionId, apiHost], + ); + + useEffect(() => { + if (!sessionId || !sessionToken) return; + + let cancelled = false; + + // If we have a JWT for a different session, clear it + if (jwt && storedSessionId && storedSessionId !== sessionId) { + removeJwt(); + if (refreshTimerRef.current) clearTimeout(refreshTimerRef.current); + return; + } + + // If we already have a JWT for this session, nothing to do + if (jwt && storedSessionId === sessionId) return; + + (async () => { + try { + const result = await exchangeCheckoutToken( + { + sessionId, + token: sessionToken, + }, + apiHost, + ); + if (!result?.jwt) { + if (!cancelled) setExchangeFailed(true); + return; + } + if (cancelled) return; + + setJwt(result.jwt); + setStoredSessionId(sessionId); + setExchangeFailed(false); + if (typeof window !== "undefined") { + window.history.replaceState( + null, + "", + window.location.pathname + window.location.search, + ); + } + scheduleRefresh(result.jwt); + } catch (_error) { + removeJwt(); + removeStoredSessionId(); + if (!cancelled) setExchangeFailed(true); + } + })(); + + return () => { + cancelled = true; + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + }; + }, [ + sessionId, + sessionToken, + jwt, + storedSessionId, + setJwt, + removeJwt, + setStoredSessionId, + removeStoredSessionId, + scheduleRefresh, + apiHost, + ]); + + useEffect(() => { + if (!jwt || storedSessionId !== sessionId) return; + scheduleRefresh(jwt); + return () => { + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + }; + }, [jwt, sessionId, storedSessionId, scheduleRefresh]); + + const checkoutSessionQuery = useQuery({ + queryKey: ["checkout-session", sessionId], + queryFn: () => getCheckoutSession({ accessToken: jwt }, apiHost), + enabled: !!jwt && storedSessionId === sessionId, + }); + + // If exchange failed and we have a session prop, use legacy flow + if (exchangeFailed && props?.session) { + return { session: props.session, jwt: undefined }; + } + + return { session: checkoutSessionQuery.data, jwt: jwt || undefined }; } From 5888cae2abe0ebcefdc1243d7b1a8d778d55f693 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Wed, 5 Nov 2025 11:24:22 -0500 Subject: [PATCH 09/23] Format --- .../src/components/checkout/checkout.tsx | 652 +++++++++--------- .../checkout/form/checkout-form-container.tsx | 117 ++-- .../checkout/order/use-draft-order.ts | 78 +-- .../react/src/hooks/use-checkout-session.tsx | 332 ++++----- 4 files changed, 588 insertions(+), 591 deletions(-) diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 40007b20..8632ebc5 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -1,375 +1,375 @@ -"use client"; - -import React, { type ReactNode } from "react"; -import { z } from "zod"; -import { hasRegionData } from "@/components/checkout/address"; -import { checkIsValidPhone } from "@/components/checkout/address/utils/check-is-valid-phone"; -import { DeliveryMethods } from "@/components/checkout/delivery/delivery-method"; -import { getRequiredFieldsFromSchema } from "@/components/checkout/form/utils/get-required-fields-from-schema"; -import { type GoDaddyVariables, useGoDaddyContext } from "@/godaddy-provider"; -import { useCheckoutSession } from "@/hooks/use-checkout-session"; -import { type Theme, useTheme } from "@/hooks/use-theme"; -import { useVariables } from "@/hooks/use-variables"; -import type { TrackingProperties } from "@/tracking/event-properties"; -import { TrackingProvider } from "@/tracking/tracking-provider"; -import type { CheckoutSession } from "@/types"; -import { CheckoutFormContainer } from "./form/checkout-form-container"; -import type { Target } from "./target/target"; +'use client'; + +import React, { type ReactNode } from 'react'; +import { z } from 'zod'; +import { hasRegionData } from '@/components/checkout/address'; +import { checkIsValidPhone } from '@/components/checkout/address/utils/check-is-valid-phone'; +import { DeliveryMethods } from '@/components/checkout/delivery/delivery-method'; +import { getRequiredFieldsFromSchema } from '@/components/checkout/form/utils/get-required-fields-from-schema'; +import { type GoDaddyVariables, useGoDaddyContext } from '@/godaddy-provider'; +import { useCheckoutSession } from '@/hooks/use-checkout-session'; +import { type Theme, useTheme } from '@/hooks/use-theme'; +import { useVariables } from '@/hooks/use-variables'; +import type { TrackingProperties } from '@/tracking/event-properties'; +import { TrackingProvider } from '@/tracking/tracking-provider'; +import type { CheckoutSession } from '@/types'; +import { CheckoutFormContainer } from './form/checkout-form-container'; +import type { Target } from './target/target'; // Utility function for redirecting to success URL after checkout export function redirectToSuccessUrl(successUrl?: string): void { - if (successUrl && typeof window !== "undefined") { - setTimeout(() => { - window.location.href = successUrl; - }, 1000); - } + if (successUrl && typeof window !== 'undefined') { + setTimeout(() => { + window.location.href = successUrl; + }, 1000); + } } export interface CheckoutElements { - input?: string; - select?: string; - button?: string; - card?: string; - checkbox?: string; - radio?: string; + input?: string; + select?: string; + button?: string; + card?: string; + checkbox?: string; + radio?: string; } interface Appearance { - theme?: Theme; - elements?: CheckoutElements; - variables?: Omit; + theme?: Theme; + elements?: CheckoutElements; + variables?: Omit; } export type LayoutSection = - | "express-checkout" - | "contact" - | "shipping" - | "payment" - | "pickup" - | "tips" - | "delivery"; + | 'express-checkout' + | 'contact' + | 'shipping' + | 'payment' + | 'pickup' + | 'tips' + | 'delivery'; export const LayoutSections = { - EXPRESS_CHECKOUT: "express-checkout", - CONTACT: "contact", - SHIPPING: "shipping", - PAYMENT: "payment", - PICKUP: "pickup", - DELIVERY: "delivery", - TIPS: "tips", + EXPRESS_CHECKOUT: 'express-checkout', + CONTACT: 'contact', + SHIPPING: 'shipping', + PAYMENT: 'payment', + PICKUP: 'pickup', + DELIVERY: 'delivery', + TIPS: 'tips', } as const; export type StripeConfig = { - publishableKey: string; - testMode?: boolean; + publishableKey: string; + testMode?: boolean; }; export type GodaddyPaymentsConfig = { - businessId: string; - appId: string; + businessId: string; + appId: string; }; export type SquareConfig = { - locationId: string; - appId: string; + locationId: string; + appId: string; }; export type PayPalConfig = { - clientId: string; - disableFunding?: Array<"credit" | "card" | "paylater" | "venmo">; + clientId: string; + disableFunding?: Array<'credit' | 'card' | 'paylater' | 'venmo'>; }; interface CheckoutContextValue { - elements?: CheckoutElements; - targets?: Partial< - Record ReactNode> - >; - session?: CheckoutSession | null; - jwt?: string; - isCheckoutDisabled?: boolean; - stripeConfig?: StripeConfig; - godaddyPaymentsConfig?: GodaddyPaymentsConfig; - squareConfig?: SquareConfig; - paypalConfig?: PayPalConfig; - isConfirmingCheckout: boolean; - setIsConfirmingCheckout: (isConfirming: boolean) => void; - checkoutErrors?: string[] | undefined; - setCheckoutErrors: (error?: string[] | undefined) => void; - requiredFields?: { [key: string]: boolean }; + elements?: CheckoutElements; + targets?: Partial< + Record ReactNode> + >; + session?: CheckoutSession | null; + jwt?: string; + isCheckoutDisabled?: boolean; + stripeConfig?: StripeConfig; + godaddyPaymentsConfig?: GodaddyPaymentsConfig; + squareConfig?: SquareConfig; + paypalConfig?: PayPalConfig; + isConfirmingCheckout: boolean; + setIsConfirmingCheckout: (isConfirming: boolean) => void; + checkoutErrors?: string[] | undefined; + setCheckoutErrors: (error?: string[] | undefined) => void; + requiredFields?: { [key: string]: boolean }; } export const checkoutContext = React.createContext({ - isConfirmingCheckout: false, - setIsConfirmingCheckout: () => { - // no op - }, - checkoutErrors: undefined, - setCheckoutErrors: () => { - // no op - }, + isConfirmingCheckout: false, + setIsConfirmingCheckout: () => { + // no op + }, + checkoutErrors: undefined, + setCheckoutErrors: () => { + // no op + }, }); export const useCheckoutContext = () => React.useContext(checkoutContext); export const baseCheckoutSchema = z.object({ - contactEmail: z - .string() - .min(1, "Enter an email") - .email("Enter a valid email"), - deliveryMethod: z.nativeEnum(DeliveryMethods).describe("fulfillmentModes"), - paymentUseShippingAddress: z.boolean().default(true), - shippingFirstName: z.string().max(60), - shippingLastName: z.string().max(60), - shippingPhone: z.string().max(15, "Phone number too long").optional(), - shippingAddressLine1: z.string().max(300), - shippingAddressLine2: z.string().max(300).optional(), - shippingAddressLine3: z.string().max(300).optional(), - shippingAdminArea4: z - .string() - .max(100) - .describe("The neighborhood") - .optional(), - shippingAdminArea3: z - .string() - .max(100) - .describe("City, town, or village") - .optional(), - shippingAdminArea2: z.string().max(100).describe("Sub-locality or suburb"), - shippingAdminArea1: z.string().max(100).describe("State or province"), - shippingPostalCode: z.string().max(60), - shippingCountryCode: z.string().max(2), - shippingMethod: z.string().optional(), - shippingValid: z.literal(true, { - errorMap: () => ({ message: "Invalid shipping address" }), - }), - billingFirstName: z.string().max(60), - billingLastName: z.string().max(60), - billingPhone: z.string().max(15, "Phone number too long").optional(), - billingAddressLine1: z.string().max(300), - billingAddressLine2: z.string().max(300).optional(), - billingAddressLine3: z.string().max(300).optional(), - billingAdminArea4: z - .string() - .max(100) - .describe("The neighborhood") - .optional(), - billingAdminArea3: z - .string() - .max(100) - .describe("City, town, or village") - .optional(), - billingAdminArea2: z.string().max(100).describe("Sub-locality or suburb"), - billingAdminArea1: z.string().max(100).describe("State or province"), - billingPostalCode: z.string().max(60), - billingCountryCode: z.string().max(2), - billingValid: z.literal(true, { - errorMap: () => ({ message: "Invalid billing address" }), - }), - paymentCardNumber: z.string().optional(), - paymentCardNumberDisplay: z.string().optional(), - paymentCardType: z.string().optional(), - paymentExpiryDate: z.string().optional(), - paymentMonth: z.string().nullish(), - paymentYear: z.string().nullish(), - paymentSecurityCode: z.string().optional(), - paymentNameOnCard: z.string().optional(), - notes: z.string().optional(), - pickupDate: z.union([z.string(), z.date()]).nullish(), - pickupTime: z.string().nullish(), - pickupLocationId: z.string().nullish(), - pickupLeadTime: z.number().nullish(), - pickupTimezone: z.string().nullish(), - tipAmount: z.number().optional(), - tipPercentage: z.number().optional(), - paymentMethod: z.string().min(1, "Select a payment method"), - stripePaymentIntent: z.string().optional(), - stripePaymentIntentId: z.string().optional(), + contactEmail: z + .string() + .min(1, 'Enter an email') + .email('Enter a valid email'), + deliveryMethod: z.nativeEnum(DeliveryMethods).describe('fulfillmentModes'), + paymentUseShippingAddress: z.boolean().default(true), + shippingFirstName: z.string().max(60), + shippingLastName: z.string().max(60), + shippingPhone: z.string().max(15, 'Phone number too long').optional(), + shippingAddressLine1: z.string().max(300), + shippingAddressLine2: z.string().max(300).optional(), + shippingAddressLine3: z.string().max(300).optional(), + shippingAdminArea4: z + .string() + .max(100) + .describe('The neighborhood') + .optional(), + shippingAdminArea3: z + .string() + .max(100) + .describe('City, town, or village') + .optional(), + shippingAdminArea2: z.string().max(100).describe('Sub-locality or suburb'), + shippingAdminArea1: z.string().max(100).describe('State or province'), + shippingPostalCode: z.string().max(60), + shippingCountryCode: z.string().max(2), + shippingMethod: z.string().optional(), + shippingValid: z.literal(true, { + errorMap: () => ({ message: 'Invalid shipping address' }), + }), + billingFirstName: z.string().max(60), + billingLastName: z.string().max(60), + billingPhone: z.string().max(15, 'Phone number too long').optional(), + billingAddressLine1: z.string().max(300), + billingAddressLine2: z.string().max(300).optional(), + billingAddressLine3: z.string().max(300).optional(), + billingAdminArea4: z + .string() + .max(100) + .describe('The neighborhood') + .optional(), + billingAdminArea3: z + .string() + .max(100) + .describe('City, town, or village') + .optional(), + billingAdminArea2: z.string().max(100).describe('Sub-locality or suburb'), + billingAdminArea1: z.string().max(100).describe('State or province'), + billingPostalCode: z.string().max(60), + billingCountryCode: z.string().max(2), + billingValid: z.literal(true, { + errorMap: () => ({ message: 'Invalid billing address' }), + }), + paymentCardNumber: z.string().optional(), + paymentCardNumberDisplay: z.string().optional(), + paymentCardType: z.string().optional(), + paymentExpiryDate: z.string().optional(), + paymentMonth: z.string().nullish(), + paymentYear: z.string().nullish(), + paymentSecurityCode: z.string().optional(), + paymentNameOnCard: z.string().optional(), + notes: z.string().optional(), + pickupDate: z.union([z.string(), z.date()]).nullish(), + pickupTime: z.string().nullish(), + pickupLocationId: z.string().nullish(), + pickupLeadTime: z.number().nullish(), + pickupTimezone: z.string().nullish(), + tipAmount: z.number().optional(), + tipPercentage: z.number().optional(), + paymentMethod: z.string().min(1, 'Select a payment method'), + stripePaymentIntent: z.string().optional(), + stripePaymentIntentId: z.string().optional(), }); // We cannot use refine here, as it would not allow extending the schema with session overrides. export type CheckoutFormSchema = Partial<{ - [K in keyof z.infer]: z.ZodTypeAny; + [K in keyof z.infer]: z.ZodTypeAny; }> & - z.ZodRawShape; + z.ZodRawShape; export type CheckoutFormData = z.infer; export interface CheckoutProps { - session?: CheckoutSession | undefined; - appearance?: Appearance; - isCheckoutDisabled?: boolean; - stripeConfig?: StripeConfig; - godaddyPaymentsConfig?: GodaddyPaymentsConfig; - squareConfig?: SquareConfig; - paypalConfig?: PayPalConfig; - layout?: LayoutSection[]; - direction?: "ltr" | "rtl"; - showStoreHours?: boolean; - enableTracking?: boolean; - trackingProperties?: TrackingProperties; - targets?: Partial ReactNode>>; - checkoutFormSchema?: CheckoutFormSchema; - defaultValues?: Pick; + session?: CheckoutSession | undefined; + appearance?: Appearance; + isCheckoutDisabled?: boolean; + stripeConfig?: StripeConfig; + godaddyPaymentsConfig?: GodaddyPaymentsConfig; + squareConfig?: SquareConfig; + paypalConfig?: PayPalConfig; + layout?: LayoutSection[]; + direction?: 'ltr' | 'rtl'; + showStoreHours?: boolean; + enableTracking?: boolean; + trackingProperties?: TrackingProperties; + targets?: Partial ReactNode>>; + checkoutFormSchema?: CheckoutFormSchema; + defaultValues?: Pick; } export function Checkout(props: CheckoutProps) { - const { - checkoutFormSchema, - enableTracking = false, - trackingProperties, - stripeConfig, - godaddyPaymentsConfig, - squareConfig, - paypalConfig, - isCheckoutDisabled, - } = props; - - const [isConfirmingCheckout, setIsConfirmingCheckout] = React.useState(false); - const [checkoutErrors, setCheckoutErrors] = React.useState< - string[] | undefined - >(undefined); - const { t } = useGoDaddyContext(); - - useTheme(); - useVariables(props?.appearance?.variables); - - const { session, jwt } = useCheckoutSession(props); - - const formSchema = React.useMemo(() => { - const extendedSchema = checkoutFormSchema - ? baseCheckoutSchema.extend(checkoutFormSchema) - : baseCheckoutSchema; - - return extendedSchema.superRefine((data, ctx) => { - if (data.billingPhone) { - if (!checkIsValidPhone(String(data?.billingPhone))) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Enter a valid billing phone number", - path: ["billingPhone"], - }); - } - } - - if (data.shippingPhone) { - if (!checkIsValidPhone(String(data?.shippingPhone))) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message: "Enter a valid shipping phone number", - path: ["shippingPhone"], - }); - } - } - - // Billing address validation - only required if not using shipping address OR pickup - const requireBillingAddress = - !data.paymentUseShippingAddress || - data.deliveryMethod === DeliveryMethods.PICKUP; - - if (requireBillingAddress) { - // Basic billing fields required for all countries - const billingFields = [ - { key: "billingFirstName", message: t.validation.enterFirstName }, - { key: "billingLastName", message: t.validation.enterLastName }, - { key: "billingAddressLine1", message: t.validation.enterAddress }, - { key: "billingAdminArea2", message: t.validation.enterCity }, - { - key: "billingPostalCode", - message: t.validation.enterZipPostalCode, - }, - { key: "billingCountryCode", message: t.validation.enterCountry }, - ]; - - if (hasRegionData(String(data.billingCountryCode))) { - billingFields.push({ - key: "billingAdminArea1", - message: t.validation.selectState, - }); - } - - for (const { key, message } of billingFields) { - if (!data[key as keyof typeof data]) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message, - path: [key], - }); - } - } - } - - // Shipping address validation - only required if delivery method is SHIP - const requireShippingAddress = - data.deliveryMethod === DeliveryMethods.SHIP; - - if (requireShippingAddress) { - // Basic shipping fields required for all countries - const shippingFields = [ - { key: "shippingFirstName", message: t.validation.enterFirstName }, - { key: "shippingLastName", message: t.validation.enterLastName }, - { key: "shippingAddressLine1", message: t.validation.enterAddress }, - { key: "shippingAdminArea2", message: t.validation.enterCity }, - { - key: "shippingPostalCode", - message: t.validation.enterZipPostalCode, - }, - { key: "shippingCountryCode", message: t.validation.enterCountry }, - ]; - - if (hasRegionData(String(data.shippingCountryCode))) { - shippingFields.push({ - key: "shippingAdminArea1", - message: t.validation.selectState, - }); - } - - for (const { key, message } of shippingFields) { - if (!data[key as keyof typeof data]) { - ctx.addIssue({ - code: z.ZodIssueCode.custom, - message, - path: [key], - }); - } - } - } - }); - }, [checkoutFormSchema, t]); - // }, [checkoutFormSchema, session?.paymentMethods]); - - const requiredFields = React.useMemo(() => { - return getRequiredFieldsFromSchema(formSchema); - }, [formSchema]); - - return ( - - - - - - ); + const { + checkoutFormSchema, + enableTracking = false, + trackingProperties, + stripeConfig, + godaddyPaymentsConfig, + squareConfig, + paypalConfig, + isCheckoutDisabled, + } = props; + + const [isConfirmingCheckout, setIsConfirmingCheckout] = React.useState(false); + const [checkoutErrors, setCheckoutErrors] = React.useState< + string[] | undefined + >(undefined); + const { t } = useGoDaddyContext(); + + useTheme(); + useVariables(props?.appearance?.variables); + + const { session, jwt } = useCheckoutSession(props); + + const formSchema = React.useMemo(() => { + const extendedSchema = checkoutFormSchema + ? baseCheckoutSchema.extend(checkoutFormSchema) + : baseCheckoutSchema; + + return extendedSchema.superRefine((data, ctx) => { + if (data.billingPhone) { + if (!checkIsValidPhone(String(data?.billingPhone))) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: 'Enter a valid billing phone number', + path: ['billingPhone'], + }); + } + } + + if (data.shippingPhone) { + if (!checkIsValidPhone(String(data?.shippingPhone))) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message: 'Enter a valid shipping phone number', + path: ['shippingPhone'], + }); + } + } + + // Billing address validation - only required if not using shipping address OR pickup + const requireBillingAddress = + !data.paymentUseShippingAddress || + data.deliveryMethod === DeliveryMethods.PICKUP; + + if (requireBillingAddress) { + // Basic billing fields required for all countries + const billingFields = [ + { key: 'billingFirstName', message: t.validation.enterFirstName }, + { key: 'billingLastName', message: t.validation.enterLastName }, + { key: 'billingAddressLine1', message: t.validation.enterAddress }, + { key: 'billingAdminArea2', message: t.validation.enterCity }, + { + key: 'billingPostalCode', + message: t.validation.enterZipPostalCode, + }, + { key: 'billingCountryCode', message: t.validation.enterCountry }, + ]; + + if (hasRegionData(String(data.billingCountryCode))) { + billingFields.push({ + key: 'billingAdminArea1', + message: t.validation.selectState, + }); + } + + for (const { key, message } of billingFields) { + if (!data[key as keyof typeof data]) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message, + path: [key], + }); + } + } + } + + // Shipping address validation - only required if delivery method is SHIP + const requireShippingAddress = + data.deliveryMethod === DeliveryMethods.SHIP; + + if (requireShippingAddress) { + // Basic shipping fields required for all countries + const shippingFields = [ + { key: 'shippingFirstName', message: t.validation.enterFirstName }, + { key: 'shippingLastName', message: t.validation.enterLastName }, + { key: 'shippingAddressLine1', message: t.validation.enterAddress }, + { key: 'shippingAdminArea2', message: t.validation.enterCity }, + { + key: 'shippingPostalCode', + message: t.validation.enterZipPostalCode, + }, + { key: 'shippingCountryCode', message: t.validation.enterCountry }, + ]; + + if (hasRegionData(String(data.shippingCountryCode))) { + shippingFields.push({ + key: 'shippingAdminArea1', + message: t.validation.selectState, + }); + } + + for (const { key, message } of shippingFields) { + if (!data[key as keyof typeof data]) { + ctx.addIssue({ + code: z.ZodIssueCode.custom, + message, + path: [key], + }); + } + } + } + }); + }, [checkoutFormSchema, t]); + // }, [checkoutFormSchema, session?.paymentMethods]); + + const requiredFields = React.useMemo(() => { + return getRequiredFieldsFromSchema(formSchema); + }, [formSchema]); + + return ( + + + + + + ); } diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index 19a5d3d4..c2a78814 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -1,76 +1,73 @@ -import { useMemo } from "react"; -import type { z } from "zod"; +import { useMemo } from 'react'; +import type { z } from 'zod'; import { - type CheckoutProps, - useCheckoutContext, -} from "@/components/checkout/checkout"; -import { CheckoutSkeleton } from "@/components/checkout/checkout-skeleton"; -import { CheckoutForm } from "@/components/checkout/form/checkout-form"; + type CheckoutProps, + useCheckoutContext, +} from '@/components/checkout/checkout'; +import { CheckoutSkeleton } from '@/components/checkout/checkout-skeleton'; +import { CheckoutForm } from '@/components/checkout/form/checkout-form'; import { - useDraftOrder, - useDraftOrderLineItems, -} from "@/components/checkout/order/use-draft-order"; -import { useDraftOrderProductsMap } from "@/components/checkout/order/use-draft-order-products"; + useDraftOrder, + useDraftOrderLineItems, +} from '@/components/checkout/order/use-draft-order'; +import { useDraftOrderProductsMap } from '@/components/checkout/order/use-draft-order-products'; import { - mapOrderToFormValues, - mapSkusToItemsDisplay, -} from "@/components/checkout/utils/checkout-transformers"; + mapOrderToFormValues, + mapSkusToItemsDisplay, +} from '@/components/checkout/utils/checkout-transformers'; -interface CheckoutFormContainerProps extends Omit { - schema: z.ZodObject | z.ZodEffects; +interface CheckoutFormContainerProps extends Omit { + schema: z.ZodObject | z.ZodEffects; } export function CheckoutFormContainer({ - schema, - ...props + schema, + ...props }: CheckoutFormContainerProps) { - const { session, isConfirmingCheckout } = useCheckoutContext(); - console.log(session); + const { session, isConfirmingCheckout } = useCheckoutContext(); - const draftOrderQuery = useDraftOrder(); - const draftOrderLineItemsQuery = useDraftOrderLineItems(); - const skusMap = useDraftOrderProductsMap(); + const draftOrderQuery = useDraftOrder(); + const draftOrderLineItemsQuery = useDraftOrderLineItems(); + const skusMap = useDraftOrderProductsMap(); - console.log(draftOrderQuery.data); + const { data: order } = draftOrderQuery; + const { data: lineItems } = draftOrderLineItemsQuery; - const { data: order } = draftOrderQuery; - const { data: lineItems } = draftOrderLineItemsQuery; + const items = useMemo( + () => mapSkusToItemsDisplay(lineItems, skusMap), + [lineItems, skusMap] + ); - const items = useMemo( - () => mapSkusToItemsDisplay(lineItems, skusMap), - [lineItems, skusMap], - ); + const formValues = useMemo( + () => ({ + ...mapOrderToFormValues({ + order, + defaultValues: props.defaultValues, + defaultCountryCode: session?.shipping?.originAddress?.countryCode, + }), + }), + [order, props.defaultValues, session?.shipping?.originAddress?.countryCode] + ); - const formValues = useMemo( - () => ({ - ...mapOrderToFormValues({ - order, - defaultValues: props.defaultValues, - defaultCountryCode: session?.shipping?.originAddress?.countryCode, - }), - }), - [order, props.defaultValues, session?.shipping?.originAddress?.countryCode], - ); + // if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { + // const returnUrl = session?.returnUrl; + // if (returnUrl) { + // window.location.href = returnUrl; + // return null; + // } + // } - // if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { - // const returnUrl = session?.returnUrl; - // if (returnUrl) { - // window.location.href = returnUrl; - // return null; - // } - // } + if (draftOrderQuery.isLoading) { + return ; + } - if (draftOrderQuery.isLoading) { - return ; - } - - return ( - - ); + return ( + + ); } diff --git a/packages/react/src/components/checkout/order/use-draft-order.ts b/packages/react/src/components/checkout/order/use-draft-order.ts index b7192044..107f484d 100644 --- a/packages/react/src/components/checkout/order/use-draft-order.ts +++ b/packages/react/src/components/checkout/order/use-draft-order.ts @@ -1,13 +1,13 @@ -import { type UseQueryResult, useQuery } from "@tanstack/react-query"; -import { useCheckoutContext } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; -import { getDraftOrder } from "@/lib/godaddy/godaddy"; +import { type UseQueryResult, useQuery } from '@tanstack/react-query'; +import { useCheckoutContext } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; +import { getDraftOrder } from '@/lib/godaddy/godaddy'; import type { - DraftOrder, - DraftOrderSession, - ShippingLines, - Totals, -} from "@/types"; + DraftOrder, + DraftOrderSession, + ShippingLines, + Totals, +} from '@/types'; /** * Hook to fetch the entire draft order @@ -16,48 +16,48 @@ import type { * @returns Query result with draft order data */ export function useDraftOrder( - select?: (data: DraftOrderSession) => TData, - key = "draft-order", + select?: (data: DraftOrderSession) => TData, + key = 'draft-order' ): UseQueryResult { - const { session, jwt } = useCheckoutContext(); - const { apiHost } = useGoDaddyContext(); + const { session, jwt } = useCheckoutContext(); + const { apiHost } = useGoDaddyContext(); - return useQuery({ - queryKey: session?.id ? [key, session.id] : [key], - queryFn: () => - jwt - ? getDraftOrder({ accessToken: jwt }, apiHost) - : getDraftOrder(session, apiHost), - enabled: !!session?.id, - select: select ?? ((data) => data.checkoutSession?.draftOrder as TData), - retry: 3, - }); + return useQuery({ + queryKey: session?.id ? [key, session.id] : [key], + queryFn: () => + jwt + ? getDraftOrder({ accessToken: jwt }, apiHost) + : getDraftOrder(session, apiHost), + enabled: !!session?.id, + select: select ?? (data => data.checkoutSession?.draftOrder as TData), + retry: 3, + }); } export function useDraftOrderLineItems() { - return useDraftOrder( - (data) => data.checkoutSession?.draftOrder?.lineItems ?? null, - "draft-order", - ); + return useDraftOrder( + data => data.checkoutSession?.draftOrder?.lineItems ?? null, + 'draft-order' + ); } export function useDraftOrderShippingAddress() { - return useDraftOrder["address"]>( - (data) => data.checkoutSession?.draftOrder?.shipping?.address ?? null, - "draft-order", - ); + return useDraftOrder['address']>( + data => data.checkoutSession?.draftOrder?.shipping?.address ?? null, + 'draft-order' + ); } export function useDraftOrderTotals() { - return useDraftOrder( - (data) => data.checkoutSession?.draftOrder?.totals ?? null, - "draft-order", - ); + return useDraftOrder( + data => data.checkoutSession?.draftOrder?.totals ?? null, + 'draft-order' + ); } export function useDraftOrderShipping() { - return useDraftOrder( - (data) => data.checkoutSession?.draftOrder?.shippingLines?.[0] ?? null, - "draft-order", - ); + return useDraftOrder( + data => data.checkoutSession?.draftOrder?.shippingLines?.[0] ?? null, + 'draft-order' + ); } diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index c910f9b3..af5784ec 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -1,173 +1,173 @@ -import { useQuery } from "@tanstack/react-query"; -import { useCallback, useEffect, useRef, useState } from "react"; -import type { CheckoutProps } from "@/components/checkout/checkout"; -import { useGoDaddyContext } from "@/godaddy-provider"; +import { useQuery } from '@tanstack/react-query'; +import { useCallback, useEffect, useRef, useState } from 'react'; +import type { CheckoutProps } from '@/components/checkout/checkout'; +import { useGoDaddyContext } from '@/godaddy-provider'; import { - exchangeCheckoutToken, - getCheckoutSession, - refreshCheckoutToken, -} from "@/lib/godaddy/godaddy"; -import { getSessionIdFromPath, getUrlHash } from "@/lib/utils"; -import { useSessionStorage } from "./use-session-storage"; + exchangeCheckoutToken, + getCheckoutSession, + refreshCheckoutToken, +} from '@/lib/godaddy/godaddy'; +import { getSessionIdFromPath, getUrlHash } from '@/lib/utils'; +import { useSessionStorage } from './use-session-storage'; function decodeJwt(token: string): { exp: number } | null { - try { - const base64Url = token.split(".")[1]; - const base64 = base64Url.replace(/-/g, "+").replace(/_/g, "/"); - const jsonPayload = decodeURIComponent( - atob(base64) - .split("") - .map((c) => "%" + ("00" + c.charCodeAt(0).toString(16)).slice(-2)) - .join(""), - ); - return JSON.parse(jsonPayload); - } catch { - return null; - } + try { + const base64Url = token.split('.')[1]; + const base64 = base64Url.replace(/-/g, '+').replace(/_/g, '/'); + const jsonPayload = decodeURIComponent( + atob(base64) + .split('') + .map(c => '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2)) + .join('') + ); + return JSON.parse(jsonPayload); + } catch { + return null; + } } export function useCheckoutSession(props?: CheckoutProps) { - const { apiHost } = useGoDaddyContext(); - const [jwt, setJwt, removeJwt] = useSessionStorage( - "godaddy-checkout-jwt", - "", - ); - const [storedSessionId, setStoredSessionId, removeStoredSessionId] = - useSessionStorage("godaddy-checkout-session-id", ""); - const [exchangeFailed, setExchangeFailed] = useState(false); - const refreshTimerRef = useRef(null); - - let sessionId: string; - let sessionToken: string | null; - - if (props?.session) { - sessionId = props?.session.id; - sessionToken = props?.session.token; - } else { - sessionId = - typeof window !== "undefined" - ? getSessionIdFromPath(window.location) - : ""; - sessionToken = - typeof window !== "undefined" ? getUrlHash(window.location) : ""; - } - - const scheduleRefresh = useCallback( - (currentJwt: string) => { - if (refreshTimerRef.current) { - clearTimeout(refreshTimerRef.current); - } - - const decoded = decodeJwt(currentJwt); - if (!decoded?.exp) return; - - const expiresAt = decoded.exp * 1000; - const now = Date.now(); - const refreshIn = Math.max(0, expiresAt - now - 60000); - - refreshTimerRef.current = window.setTimeout(async () => { - try { - const result = await refreshCheckoutToken(currentJwt, apiHost); - if (result?.jwt) { - setJwt(result.jwt); - scheduleRefresh(result.jwt); - } - } catch (_error) { - removeJwt(); - removeStoredSessionId(); - } - }, refreshIn); - }, - [setJwt, removeJwt, removeStoredSessionId, apiHost], - ); - - useEffect(() => { - if (!sessionId || !sessionToken) return; - - let cancelled = false; - - // If we have a JWT for a different session, clear it - if (jwt && storedSessionId && storedSessionId !== sessionId) { - removeJwt(); - if (refreshTimerRef.current) clearTimeout(refreshTimerRef.current); - return; - } - - // If we already have a JWT for this session, nothing to do - if (jwt && storedSessionId === sessionId) return; - - (async () => { - try { - const result = await exchangeCheckoutToken( - { - sessionId, - token: sessionToken, - }, - apiHost, - ); - if (!result?.jwt) { - if (!cancelled) setExchangeFailed(true); - return; - } - if (cancelled) return; - - setJwt(result.jwt); - setStoredSessionId(sessionId); - setExchangeFailed(false); - if (typeof window !== "undefined") { - window.history.replaceState( - null, - "", - window.location.pathname + window.location.search, - ); - } - scheduleRefresh(result.jwt); - } catch (_error) { - removeJwt(); - removeStoredSessionId(); - if (!cancelled) setExchangeFailed(true); - } - })(); - - return () => { - cancelled = true; - if (refreshTimerRef.current) { - clearTimeout(refreshTimerRef.current); - } - }; - }, [ - sessionId, - sessionToken, - jwt, - storedSessionId, - setJwt, - removeJwt, - setStoredSessionId, - removeStoredSessionId, - scheduleRefresh, - apiHost, - ]); - - useEffect(() => { - if (!jwt || storedSessionId !== sessionId) return; - scheduleRefresh(jwt); - return () => { - if (refreshTimerRef.current) { - clearTimeout(refreshTimerRef.current); - } - }; - }, [jwt, sessionId, storedSessionId, scheduleRefresh]); - - const checkoutSessionQuery = useQuery({ - queryKey: ["checkout-session", sessionId], - queryFn: () => getCheckoutSession({ accessToken: jwt }, apiHost), - enabled: !!jwt && storedSessionId === sessionId, - }); - - // If exchange failed and we have a session prop, use legacy flow - if (exchangeFailed && props?.session) { - return { session: props.session, jwt: undefined }; - } - - return { session: checkoutSessionQuery.data, jwt: jwt || undefined }; + const { apiHost } = useGoDaddyContext(); + const [jwt, setJwt, removeJwt] = useSessionStorage( + 'godaddy-checkout-jwt', + '' + ); + const [storedSessionId, setStoredSessionId, removeStoredSessionId] = + useSessionStorage('godaddy-checkout-session-id', ''); + const [exchangeFailed, setExchangeFailed] = useState(false); + const refreshTimerRef = useRef(null); + + let sessionId: string; + let sessionToken: string | null; + + if (props?.session) { + sessionId = props?.session.id; + sessionToken = props?.session.token; + } else { + sessionId = + typeof window !== 'undefined' + ? getSessionIdFromPath(window.location) + : ''; + sessionToken = + typeof window !== 'undefined' ? getUrlHash(window.location) : ''; + } + + const scheduleRefresh = useCallback( + (currentJwt: string) => { + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + + const decoded = decodeJwt(currentJwt); + if (!decoded?.exp) return; + + const expiresAt = decoded.exp * 1000; + const now = Date.now(); + const refreshIn = Math.max(0, expiresAt - now - 60000); + + refreshTimerRef.current = window.setTimeout(async () => { + try { + const result = await refreshCheckoutToken(currentJwt, apiHost); + if (result?.jwt) { + setJwt(result.jwt); + scheduleRefresh(result.jwt); + } + } catch (_error) { + removeJwt(); + removeStoredSessionId(); + } + }, refreshIn); + }, + [setJwt, removeJwt, removeStoredSessionId, apiHost] + ); + + useEffect(() => { + if (!sessionId || !sessionToken) return; + + let cancelled = false; + + // If we have a JWT for a different session, clear it + if (jwt && storedSessionId && storedSessionId !== sessionId) { + removeJwt(); + if (refreshTimerRef.current) clearTimeout(refreshTimerRef.current); + return; + } + + // If we already have a JWT for this session, nothing to do + if (jwt && storedSessionId === sessionId) return; + + (async () => { + try { + const result = await exchangeCheckoutToken( + { + sessionId, + token: sessionToken, + }, + apiHost + ); + if (!result?.jwt) { + if (!cancelled) setExchangeFailed(true); + return; + } + if (cancelled) return; + + setJwt(result.jwt); + setStoredSessionId(sessionId); + setExchangeFailed(false); + if (typeof window !== 'undefined') { + window.history.replaceState( + null, + '', + window.location.pathname + window.location.search + ); + } + scheduleRefresh(result.jwt); + } catch (_error) { + removeJwt(); + removeStoredSessionId(); + if (!cancelled) setExchangeFailed(true); + } + })(); + + return () => { + cancelled = true; + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + }; + }, [ + sessionId, + sessionToken, + jwt, + storedSessionId, + setJwt, + removeJwt, + setStoredSessionId, + removeStoredSessionId, + scheduleRefresh, + apiHost, + ]); + + useEffect(() => { + if (!jwt || storedSessionId !== sessionId) return; + scheduleRefresh(jwt); + return () => { + if (refreshTimerRef.current) { + clearTimeout(refreshTimerRef.current); + } + }; + }, [jwt, sessionId, storedSessionId, scheduleRefresh]); + + const checkoutSessionQuery = useQuery({ + queryKey: ['checkout-session', sessionId], + queryFn: () => getCheckoutSession({ accessToken: jwt }, apiHost), + enabled: !!jwt && storedSessionId === sessionId, + }); + + // If exchange failed and we have a session prop, use legacy flow + if (exchangeFailed && props?.session) { + return { session: props.session, jwt: undefined }; + } + + return { session: checkoutSessionQuery.data, jwt: jwt || undefined }; } From e9210ceb8eb940c42c3b9e9d902dac3688d38d5f Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Wed, 5 Nov 2025 11:53:29 -0500 Subject: [PATCH 10/23] Format changes --- examples/nextjs/biome.json | 36 +++--- examples/nextjs/package.json | 60 ++++----- packages/react/package.json | 238 +++++++++++++++++------------------ 3 files changed, 167 insertions(+), 167 deletions(-) diff --git a/examples/nextjs/biome.json b/examples/nextjs/biome.json index 87e71657..808d736f 100644 --- a/examples/nextjs/biome.json +++ b/examples/nextjs/biome.json @@ -1,20 +1,20 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.2/schema.json", - "extends": ["biome-config-godaddy/biome.json"], - "css": { - "parser": { - "cssModules": true, - "tailwindDirectives": true - } - }, - "files": { - "includes": ["**/*", "!!**/src/globals.css"] - }, - "linter": { - "rules": { - "correctness": { - "useUniqueElementIds": "off" - } - } - } + "$schema": "https://biomejs.dev/schemas/2.3.3/schema.json", + "extends": ["biome-config-godaddy/biome.json"], + "css": { + "parser": { + "cssModules": true, + "tailwindDirectives": true + } + }, + "files": { + "includes": ["**/*", "!!**/src/globals.css"] + }, + "linter": { + "rules": { + "correctness": { + "useUniqueElementIds": "off" + } + } + } } diff --git a/examples/nextjs/package.json b/examples/nextjs/package.json index b9e3affd..bcfe745d 100644 --- a/examples/nextjs/package.json +++ b/examples/nextjs/package.json @@ -1,32 +1,32 @@ { - "name": "nextjs", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "biome check .", - "lint:fix": "biome check --write --unsafe ." - }, - "dependencies": { - "@godaddy/localizations": "workspace:*", - "@godaddy/react": "workspace:*", - "@tanstack/react-query": "^5.66.0", - "@tanstack/react-query-devtools": "^5.76.1", - "next": "16.0.1", - "react": "19.2.0", - "react-dom": "19.2.0", - "zod": "^3.24.1" - }, - "devDependencies": { - "@biomejs/biome": "^2", - "@tailwindcss/postcss": "^4", - "@types/node": "^20", - "@types/react": "^19", - "@types/react-dom": "^19", - "biome-config-godaddy": "workspace:*", - "tailwindcss": "^4", - "typescript": "^5" - } + "name": "nextjs", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "biome check .", + "lint:fix": "biome check --write --unsafe ." + }, + "dependencies": { + "@godaddy/localizations": "workspace:*", + "@godaddy/react": "workspace:*", + "@tanstack/react-query": "^5.66.0", + "@tanstack/react-query-devtools": "^5.76.1", + "next": "16.0.1", + "react": "19.2.0", + "react-dom": "19.2.0", + "zod": "^3.24.1" + }, + "devDependencies": { + "@biomejs/biome": "^2", + "@tailwindcss/postcss": "^4", + "@types/node": "^20", + "@types/react": "^19", + "@types/react-dom": "^19", + "biome-config-godaddy": "workspace:*", + "tailwindcss": "^4", + "typescript": "^5" + } } diff --git a/packages/react/package.json b/packages/react/package.json index fd3b6f53..381975b8 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,121 +1,121 @@ { - "name": "@godaddy/react", - "private": false, - "version": "1.0.2", - "type": "module", - "types": "./dist/index.d.ts", - "files": [ - "dist" - ], - "exports": { - "./package.json": "./package.json", - "./styles.css": "./dist/index.css", - "./server": { - "types": "./dist/server.d.ts", - "import": "./dist/server.js", - "default": "./dist/server.js" - }, - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "default": "./dist/index.js" - } - }, - "typesVersions": { - "*": { - "server": [ - "./dist/server.d.ts" - ], - "*": [ - "./dist/index.d.ts" - ] - } - }, - "scripts": { - "dev": "tsdown --watch", - "dev:https": "tsdown --watch", - "build": "tsdown && pnpm dlx @tailwindcss/cli -i ./src/globals.css -o ./dist/index.css --minify", - "preview": "vite preview", - "typecheck": "tsc --noEmit", - "test": "vitest run", - "lint": "biome check .", - "lint:fix": "biome check --write --unsafe ./src", - "prepublishOnly": "pnpm run build" - }, - "peerDependencies": { - "@tanstack/react-query": ">=5", - "react": "18.x || 19.x", - "react-dom": "18.x || 19.x", - "react-hook-form": ">=7" - }, - "dependencies": { - "@floating-ui/react": "^0.27.8", - "@godaddy/localizations": "workspace:*", - "@hookform/resolvers": "^4.0.0", - "@paypal/react-paypal-js": "^8.8.3", - "@radix-ui/react-accordion": "^1.2.3", - "@radix-ui/react-alert-dialog": "^1.1.6", - "@radix-ui/react-aspect-ratio": "^1.1.2", - "@radix-ui/react-avatar": "^1.1.3", - "@radix-ui/react-checkbox": "^1.1.4", - "@radix-ui/react-collapsible": "^1.1.3", - "@radix-ui/react-dialog": "^1.1.6", - "@radix-ui/react-label": "^2.1.2", - "@radix-ui/react-popover": "^1.1.6", - "@radix-ui/react-radio-group": "^1.2.3", - "@radix-ui/react-scroll-area": "^1.2.3", - "@radix-ui/react-select": "^2.1.6", - "@radix-ui/react-separator": "^1.1.2", - "@radix-ui/react-slot": "^1.1.2", - "@radix-ui/react-switch": "^1.1.3", - "@radix-ui/react-toast": "^1.2.6", - "@radix-ui/react-toggle": "^1.1.2", - "@radix-ui/react-toggle-group": "^1.1.2", - "@radix-ui/react-tooltip": "^1.1.8", - "@stripe/react-stripe-js": "^3.7.0", - "@stripe/stripe-js": "^7.3.1", - "@tailwindcss/cli": "^4.1.10", - "@tailwindcss/vite": "^4.1.4", - "@tanstack/react-pacer": "^0.2.0", - "@tanstack/react-query": "^5.66.0", - "class-variance-authority": "^0.7.1", - "clsx": "^2.1.1", - "cmdk": "1.0.0", - "date-fns": "^4.1.0", - "date-fns-tz": "^3.2.0", - "embla-carousel-react": "^8.5.2", - "fast-deep-equal": "^3.1.3", - "gql.tada": "^1.8.10", - "graphql": "^16.10.0", - "graphql-request": "^5.2.0", - "lucide-react": "^0.475.0", - "react-day-picker": "8.10.1", - "react-phone-number-input": "^3.4.12", - "react-resizable-panels": "^2.1.7", - "tailwind-merge": "^3.0.1", - "tailwindcss": "^4.1.4", - "ulid": "^3.0.0", - "vaul": "^1.1.2", - "zod": "^3.24.1" - }, - "devDependencies": { - "@biomejs/biome": "^2.3.2", - "@types/node": "^22.13.1", - "@types/react": "^19.0.8", - "@types/react-dom": "^19.0.3", - "@vitejs/plugin-react": "^4.2.1", - "biome-config-godaddy": "workspace:*", - "globals": "^15.14.0", - "jsdom": "^26.0.0", - "react": "^19", - "react-dom": "^19", - "react-hook-form": "^7.54.2", - "tsdown": "^0.15.6", - "typescript": "~5.7.3", - "vite": "^5.1.6", - "vitest": "^3.0.6" - }, - "publishConfig": { - "registry": "https://registry.npmjs.org/" - } + "name": "@godaddy/react", + "private": false, + "version": "1.0.2", + "type": "module", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], + "exports": { + "./package.json": "./package.json", + "./styles.css": "./dist/index.css", + "./server": { + "types": "./dist/server.d.ts", + "import": "./dist/server.js", + "default": "./dist/server.js" + }, + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "default": "./dist/index.js" + } + }, + "typesVersions": { + "*": { + "server": [ + "./dist/server.d.ts" + ], + "*": [ + "./dist/index.d.ts" + ] + } + }, + "scripts": { + "dev": "tsdown --watch", + "dev:https": "tsdown --watch", + "build": "tsdown && pnpm dlx @tailwindcss/cli -i ./src/globals.css -o ./dist/index.css --minify", + "preview": "vite preview", + "typecheck": "tsc --noEmit", + "test": "vitest run", + "lint": "biome check .", + "lint:fix": "biome check --write --unsafe ./src", + "prepublishOnly": "pnpm run build" + }, + "peerDependencies": { + "@tanstack/react-query": ">=5", + "react": "18.x || 19.x", + "react-dom": "18.x || 19.x", + "react-hook-form": ">=7" + }, + "dependencies": { + "@floating-ui/react": "^0.27.8", + "@godaddy/localizations": "workspace:*", + "@hookform/resolvers": "^4.0.0", + "@paypal/react-paypal-js": "^8.8.3", + "@radix-ui/react-accordion": "^1.2.3", + "@radix-ui/react-alert-dialog": "^1.1.6", + "@radix-ui/react-aspect-ratio": "^1.1.2", + "@radix-ui/react-avatar": "^1.1.3", + "@radix-ui/react-checkbox": "^1.1.4", + "@radix-ui/react-collapsible": "^1.1.3", + "@radix-ui/react-dialog": "^1.1.6", + "@radix-ui/react-label": "^2.1.2", + "@radix-ui/react-popover": "^1.1.6", + "@radix-ui/react-radio-group": "^1.2.3", + "@radix-ui/react-scroll-area": "^1.2.3", + "@radix-ui/react-select": "^2.1.6", + "@radix-ui/react-separator": "^1.1.2", + "@radix-ui/react-slot": "^1.1.2", + "@radix-ui/react-switch": "^1.1.3", + "@radix-ui/react-toast": "^1.2.6", + "@radix-ui/react-toggle": "^1.1.2", + "@radix-ui/react-toggle-group": "^1.1.2", + "@radix-ui/react-tooltip": "^1.1.8", + "@stripe/react-stripe-js": "^3.7.0", + "@stripe/stripe-js": "^7.3.1", + "@tailwindcss/cli": "^4.1.10", + "@tailwindcss/vite": "^4.1.4", + "@tanstack/react-pacer": "^0.2.0", + "@tanstack/react-query": "^5.66.0", + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "cmdk": "1.0.0", + "date-fns": "^4.1.0", + "date-fns-tz": "^3.2.0", + "embla-carousel-react": "^8.5.2", + "fast-deep-equal": "^3.1.3", + "gql.tada": "^1.8.10", + "graphql": "^16.10.0", + "graphql-request": "^5.2.0", + "lucide-react": "^0.475.0", + "react-day-picker": "8.10.1", + "react-phone-number-input": "^3.4.12", + "react-resizable-panels": "^2.1.7", + "tailwind-merge": "^3.0.1", + "tailwindcss": "^4.1.4", + "ulid": "^3.0.0", + "vaul": "^1.1.2", + "zod": "^3.24.1" + }, + "devDependencies": { + "@biomejs/biome": "^2.3.2", + "@types/node": "^22.13.1", + "@types/react": "^19.0.8", + "@types/react-dom": "^19.0.3", + "@vitejs/plugin-react": "^4.2.1", + "biome-config-godaddy": "workspace:*", + "globals": "^15.14.0", + "jsdom": "^26.0.0", + "react": "^19", + "react-dom": "^19", + "react-hook-form": "^7.54.2", + "tsdown": "^0.15.6", + "typescript": "~5.7.3", + "vite": "^5.1.6", + "vitest": "^3.0.6" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org/" + } } From 76a9ce1ac59ae2e05b88c143fd09f58f73d3329f Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Wed, 5 Nov 2025 15:56:35 -0500 Subject: [PATCH 11/23] update types --- .../checkout/form/checkout-form.tsx | 4 +- packages/react/src/lib/godaddy/graphql-env.ts | 15807 ++++++++-------- 2 files changed, 7917 insertions(+), 7894 deletions(-) diff --git a/packages/react/src/components/checkout/form/checkout-form.tsx b/packages/react/src/components/checkout/form/checkout-form.tsx index d0db5fae..f33094ce 100644 --- a/packages/react/src/components/checkout/form/checkout-form.tsx +++ b/packages/react/src/components/checkout/form/checkout-form.tsx @@ -460,7 +460,7 @@ export function CheckoutForm({ total={orderTotal} enableDiscounts={session?.enablePromotionCodes} enableTaxes={session?.enableTaxCollection} - enableShipping={isShipping} + enableShipping={isShipping && session?.enableShipping} />
@@ -489,7 +489,7 @@ export function CheckoutForm({ total={orderTotal} enableDiscounts={session?.enablePromotionCodes} enableTaxes={session?.enableTaxCollection} - enableShipping={isShipping} + enableShipping={isShipping && session?.enableShipping} /> diff --git a/packages/react/src/lib/godaddy/graphql-env.ts b/packages/react/src/lib/godaddy/graphql-env.ts index e51c5b1f..5b20f176 100644 --- a/packages/react/src/lib/godaddy/graphql-env.ts +++ b/packages/react/src/lib/godaddy/graphql-env.ts @@ -23,9812 +23,9835 @@ * ``` */ const introspection = { - __schema: { - queryType: { - name: 'Query', + "__schema": { + "queryType": { + "name": "Query" }, - mutationType: { - name: 'Mutation', + "mutationType": { + "name": "Mutation" }, - subscriptionType: null, - types: [ + "subscriptionType": null, + "types": [ { - kind: 'OBJECT', - name: 'Address', - fields: [ + "kind": "OBJECT", + "name": "Address", + "fields": [ { - name: 'addressDetails', - type: { - kind: 'OBJECT', - name: 'AddressDetails', + "name": "addressDetails", + "type": { + "kind": "OBJECT", + "name": "AddressDetails" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'AddressDetails', - fields: [ + "kind": "OBJECT", + "name": "AddressDetails", + "fields": [ { - name: 'addressType', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressType", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'buildingName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "buildingName", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'deliveryService', - type: { - kind: 'SCALAR', - name: 'String', + "name": "deliveryService", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'geoCoordinates', - type: { - kind: 'OBJECT', - name: 'GeoCoordinates', + "name": "geoCoordinates", + "type": { + "kind": "OBJECT", + "name": "GeoCoordinates" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'streetName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "streetName", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'streetNumber', - type: { - kind: 'SCALAR', - name: 'String', + "name": "streetNumber", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'streetType', - type: { - kind: 'SCALAR', - name: 'String', + "name": "streetType", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'subBuilding', - type: { - kind: 'SCALAR', - name: 'String', + "name": "subBuilding", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'AddressInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "inputFields": [ { - name: 'addressLine1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "addressLine1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'adminArea2', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea2", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'AdjustmentAmount', - fields: [ + "kind": "OBJECT", + "name": "AdjustmentAmount", + "fields": [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'AdjustmentPercentage', - fields: [ + "kind": "OBJECT", + "name": "AdjustmentPercentage", + "fields": [ { - name: 'maximumAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "maximumAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'percentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "percentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'UNION', - name: 'AdjustmentValue', - possibleTypes: [ + "kind": "UNION", + "name": "AdjustmentValue", + "possibleTypes": [ { - kind: 'OBJECT', - name: 'AdjustmentAmount', + "kind": "OBJECT", + "name": "AdjustmentAmount" }, { - kind: 'OBJECT', - name: 'AdjustmentPercentage', - }, - ], + "kind": "OBJECT", + "name": "AdjustmentPercentage" + } + ] }, { - kind: 'INPUT_OBJECT', - name: 'ApplyShippingMethodInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "ApplyShippingMethodInput", + "inputFields": [ { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'subTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "subTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } }, { - name: 'taxTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "taxTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'SCALAR', - name: 'Boolean', + "kind": "SCALAR", + "name": "Boolean" }, { - kind: 'UNION', - name: 'CalculatedAdjustment', - possibleTypes: [ + "kind": "UNION", + "name": "CalculatedAdjustment", + "possibleTypes": [ { - kind: 'OBJECT', - name: 'CalculatedDiscount', + "kind": "OBJECT", + "name": "CalculatedDiscount" }, { - kind: 'OBJECT', - name: 'CalculatedFee', - }, - ], + "kind": "OBJECT", + "name": "CalculatedFee" + } + ] }, { - kind: 'OBJECT', - name: 'CalculatedAdjustmentOutput', - fields: [ + "kind": "OBJECT", + "name": "CalculatedAdjustmentOutput", + "fields": [ { - name: 'adjustment', - type: { - kind: 'UNION', - name: 'CalculatedAdjustment', + "name": "adjustment", + "type": { + "kind": "UNION", + "name": "CalculatedAdjustment" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "totalAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CalculatedDiscount', - fields: [ + "kind": "OBJECT", + "name": "CalculatedDiscount", + "fields": [ { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "ID" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'UNION', - name: 'AdjustmentValue', + "name": "value", + "type": { + "kind": "UNION", + "name": "AdjustmentValue" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CalculatedFee', - fields: [ + "kind": "OBJECT", + "name": "CalculatedFee", + "fields": [ { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "ID" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'UNION', - name: 'AdjustmentValue', + "name": "value", + "type": { + "kind": "UNION", + "name": "AdjustmentValue" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CalculatedLineOutput', - fields: [ + "kind": "OBJECT", + "name": "CalculatedLineOutput", + "fields": [ { - name: 'adjustments', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CalculatedAdjustmentOutput', - }, - }, + "name": "adjustments", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CalculatedAdjustmentOutput" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'calculationLine', - type: { - kind: 'OBJECT', - name: 'CalculationLineOutput', + "name": "calculationLine", + "type": { + "kind": "OBJECT", + "name": "CalculationLineOutput" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalDiscountAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "totalDiscountAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalFeeAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "totalFeeAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CalculationLineOutput', - fields: [ + "kind": "OBJECT", + "name": "CalculationLineOutput", + "fields": [ { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', + "name": "type", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutAuthToken', - fields: [ + "kind": "OBJECT", + "name": "CheckoutAuthToken", + "fields": [ { - name: 'expiresAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "expiresAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'expiresIn', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "expiresIn", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'jwt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "jwt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSession', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSession", + "fields": [ { - name: 'addresses', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'Address', - }, - }, + "name": "addresses", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Address" + } + } }, - args: [ + "args": [ { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressesInput', - }, - }, - }, + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressesInput" + } + } + } ], - isDeprecated: false, + "isDeprecated": false }, { - name: 'channelId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "channelId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'createdAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "createdAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'defaultOperatingHours', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', + "name": "defaultOperatingHours", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'draftOrder', - type: { - kind: 'OBJECT', - name: 'DraftOrder', + "name": "draftOrder", + "type": { + "kind": "OBJECT", + "name": "DraftOrder" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableAddressAutocomplete', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableAddressAutocomplete", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableBillingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableBillingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableLocalPickup', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableLocalPickup", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableNotesCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableNotesCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enablePaymentMethodCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enablePaymentMethodCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enablePhoneCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enablePhoneCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enablePromotionCodes', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enablePromotionCodes", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableShippingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableSurcharge', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableShippingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableTaxCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableSurcharge", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableTips', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableTaxCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enabledLocales', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "enableTips", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enabledPaymentProviders', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "enabledLocales", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'environment', - type: { - kind: 'ENUM', - name: 'CheckoutSessionEnvironment', + "name": "enabledPaymentProviders", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'experimental_rules', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionExperimentalRules', + "name": "environment", + "type": { + "kind": "ENUM", + "name": "CheckoutSessionEnvironment" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'expiresAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "experimental_rules", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionExperimentalRules" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "expiresAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'lineItems', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'DraftOrderLineItem', - }, - }, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'locations', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionLocation', - }, - }, + "name": "lineItems", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DraftOrderLineItem" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'paymentMethods', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethods', + "name": "locations", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionLocation" + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "paymentMethods", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethods" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'returnUrl', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "returnUrl", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionShippingOptions', + "name": "shipping", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionShippingOptions" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'skus', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionSkusConnection', - }, + "name": "skus", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionSkusConnection" + } }, - args: [ + "args": [ { - name: 'after', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'before', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'first', - type: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } }, { - name: 'last', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } ], - isDeprecated: false, + "isDeprecated": false }, { - name: 'sourceApp', - type: { - kind: 'SCALAR', - name: 'String', + "name": "sourceApp", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'status', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'ENUM', - name: 'CheckoutSessionStatus', - }, + "name": "status", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "CheckoutSessionStatus" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'storeId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "storeId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'storeName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "storeName", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'successUrl', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "successUrl", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionTaxesOptions', + "name": "taxes", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionTaxesOptions" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'token', - type: { - kind: 'SCALAR', - name: 'String', + "name": "token", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'updatedAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "updatedAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'url', - type: { - kind: 'SCALAR', - name: 'String', + "name": "url", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionAddress', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionAddress", + "fields": [ { - name: 'addressDetails', - type: { - kind: 'OBJECT', - name: 'AddressDetails', + "name": "addressDetails", + "type": { + "kind": "OBJECT", + "name": "AddressDetails" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressDetailsInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressDetailsInput", + "inputFields": [ { - name: 'addressType', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressType", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'buildingName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "buildingName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'deliveryService', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "deliveryService", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'geoCoordinates', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionGeoCoordinatesInput', - }, + "name": "geoCoordinates", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionGeoCoordinatesInput" + } }, { - name: 'streetName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "streetName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'streetNumber', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "streetNumber", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'streetType', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "streetType", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'subBuilding', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "subBuilding", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressInput", + "inputFields": [ { - name: 'addressDetails', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressDetailsInput', - }, + "name": "addressDetails", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressDetailsInput" + } }, { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressesInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressesInput", + "inputFields": [ { - name: 'query', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, + "name": "query", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculateTaxesInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculateTaxesInput", + "inputFields": [ { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - }, + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput" + } }, { - name: 'lines', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLineInput', - }, - }, - }, - }, + "name": "lines", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLineInput" + } + } + } + } }, { - name: 'origin', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - }, - }, + "name": "origin", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedLine', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedLine", + "fields": [ { - name: 'calculationLine', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationLine', + "name": "calculationLine", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculationLine" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxAmounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionTaxAmount', - }, - }, + "name": "taxAmounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionTaxAmount" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalTaxAmount', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionTotalTaxAmount', + "name": "totalTaxAmount", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionTotalTaxAmount" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedRate', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedRate", + "fields": [ { - name: 'calculationMethod', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculationMethod", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedRateValue', + "name": "value", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedRateValue" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedRateValue', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedRateValue", + "fields": [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'appliedAmount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "appliedAmount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'appliedPercentage', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "appliedPercentage", + "type": { + "kind": "SCALAR", + "name": "Float" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'percentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "percentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationAddressInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationAddressInput", + "inputFields": [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationLine', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculationLine", + "fields": [ { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLineInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLineInput", + "inputFields": [ { - name: 'classification', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "classification", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - }, + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput" + } }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'origin', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - }, + "name": "origin", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput" + } }, { - name: 'quantity', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, - }, + "name": "quantity", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + } }, { - name: 'subtotalPrice', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "subtotalPrice", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'type', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "type", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'unitPrice', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "unitPrice", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput", + "inputFields": [ { - name: 'address', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationAddressInput', - }, - }, - }, + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationAddressInput" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationResult', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculationResult", + "fields": [ { - name: 'lines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedLine', - }, - }, + "name": "lines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedLine" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxAmounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionTaxAmount', - }, - }, + "name": "taxAmounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionTaxAmount" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalTaxAmount', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionTotalTaxAmount', + "name": "totalTaxAmount", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionTotalTaxAmount" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionDayHours", + "fields": [ { - name: 'closeTime', - type: { - kind: 'SCALAR', - name: 'String', + "name": "closeTime", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'openTime', - type: { - kind: 'SCALAR', - name: 'String', + "name": "openTime", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput", + "inputFields": [ { - name: 'closeTime', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "closeTime", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + } }, { - name: 'openTime', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "openTime", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'ENUM', - name: 'CheckoutSessionEnvironment', - enumValues: [ + "kind": "ENUM", + "name": "CheckoutSessionEnvironment", + "enumValues": [ { - name: 'dev', - isDeprecated: false, + "name": "dev", + "isDeprecated": false }, { - name: 'ote', - isDeprecated: false, + "name": "ote", + "isDeprecated": false }, { - name: 'prod', - isDeprecated: false, + "name": "prod", + "isDeprecated": false }, { - name: 'test', - isDeprecated: false, - }, - ], + "name": "test", + "isDeprecated": false + } + ] }, { - kind: 'OBJECT', - name: 'CheckoutSessionExperimentalRules', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionExperimentalRules", + "fields": [ { - name: 'freeShipping', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionFreeShippingRule', + "name": "freeShipping", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionFreeShippingRule" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'localDelivery', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionLocalDeliveryRule', + "name": "localDelivery", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionLocalDeliveryRule" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionExperimentalRulesInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionExperimentalRulesInput", + "inputFields": [ { - name: 'freeShipping', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionFreeShippingRuleInput', - }, - }, + "name": "freeShipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionFreeShippingRuleInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionFreeShippingRule', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionFreeShippingRule", + "fields": [ { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'minimumOrderTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "minimumOrderTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionFreeShippingRuleInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionFreeShippingRuleInput", + "inputFields": [ { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + } }, { - name: 'minimumOrderTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, - }, - }, + "name": "minimumOrderTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionGeoCoordinatesInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionGeoCoordinatesInput", + "inputFields": [ { - name: 'latitude', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, - }, + "name": "latitude", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + } }, { - name: 'longitude', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, - }, + "name": "longitude", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLineItemInput", + "inputFields": [ + { + "name": "quantity", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } }, + { + "name": "skuId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLineItemInput', - inputFields: [ + "kind": "OBJECT", + "name": "CheckoutSessionLocalDeliveryRule", + "fields": [ + { + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "minimumOrderTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionLocation", + "fields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionAddress" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, { - name: 'quantity', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "isDefault", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } }, + "args": [], + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "operatingHours", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLocationInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressInput" + } + } + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "isDefault", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionOperatingHoursMap", + "fields": [ + { + "name": "default", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "locations", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours" + } + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionOperatingHoursMapInput", + "inputFields": [ + { + "name": "default", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionStoreHoursInput" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig", + "fields": [ + { + "name": "checkoutTypes", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "processor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput", + "inputFields": [ + { + "name": "checkoutTypes", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + } }, + { + "name": "processor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionLocalDeliveryRule', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethods", + "fields": [ { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "applePay", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'minimumOrderTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "card", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionLocation', - fields: [ { - name: 'address', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionAddress', - }, + "name": "express", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "googlePay", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'isDefault', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "offline", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'operatingHours', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', + "name": "paypal", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, + { + "name": "paze", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" + }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLocationInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodsInput", + "inputFields": [ { - name: 'address', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressInput', - }, - }, + "name": "applePay", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "card", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } }, { - name: 'isDefault', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, + "name": "express", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } + }, + { + "name": "googlePay", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } + }, + { + "name": "offline", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } + }, + { + "name": "paypal", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } }, + { + "name": "paze", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionOperatingHoursMap', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionShippingOptions", + "fields": [ { - name: 'default', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', + "name": "fulfillmentLocationId", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'locations', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', - }, - }, + "name": "originAddress", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionAddress" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionOperatingHoursMapInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionShippingOptionsInput", + "inputFields": [ { - name: 'default', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionStoreHoursInput', - }, - }, + "name": "fulfillmentLocationId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "originAddress", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionSkusConnection", + "fields": [ { - name: 'checkoutTypes', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, + "name": "edges", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionSkusConnectionEdge" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'processor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - inputFields: [ + "kind": "OBJECT", + "name": "CheckoutSessionSkusConnectionEdge", + "fields": [ { - name: 'checkoutTypes', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'processor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "node", + "type": { + "kind": "OBJECT", + "name": "SKU" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethods', - fields: [ + "kind": "ENUM", + "name": "CheckoutSessionStatus", + "enumValues": [ { - name: 'applePay', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - }, - args: [], - isDeprecated: false, + "name": "ACTIVE", + "isDeprecated": false }, { - name: 'card', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - }, - args: [], - isDeprecated: false, + "name": "CANCELLED", + "isDeprecated": false }, { - name: 'express', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - }, - args: [], - isDeprecated: false, + "name": "COMPLETED", + "isDeprecated": false }, { - name: 'googlePay', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - }, - args: [], - isDeprecated: false, + "name": "CREATED", + "isDeprecated": false }, { - name: 'offline', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', + "name": "EXPIRED", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours", + "fields": [ + { + "name": "hours", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionWeekHours" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'paypal', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', + "name": "leadTime", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'paze', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', + "name": "pickupWindowInDays", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, + { + "name": "timeZone", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodsInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionStoreHoursInput", + "inputFields": [ { - name: 'applePay', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - }, + "name": "hours", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionWeekHoursInput" + } + } }, { - name: 'card', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - }, + "name": "leadTime", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } }, { - name: 'express', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - }, + "name": "pickupWindowInDays", + "type": { + "kind": "SCALAR", + "name": "Int" + } }, { - name: 'googlePay', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - }, - }, + "name": "timeZone", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionTaxAmount", + "fields": [ { - name: 'offline', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', + "name": "rate", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedRate" }, + "args": [], + "isDeprecated": false }, { - name: 'paypal', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', + "name": "totalTaxAmount", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionTotalTaxAmount" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionTaxesOptions", + "fields": [ { - name: 'paze', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', + "name": "originAddress", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionAddress" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionTaxesOptionsInput", + "inputFields": [ + { + "name": "originAddress", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionShippingOptions', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionTotalTaxAmount", + "fields": [ { - name: 'fulfillmentLocationId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'originAddress', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionAddress', + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Float" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionShippingOptionsInput', - inputFields: [ + "kind": "OBJECT", + "name": "CheckoutSessionWeekHours", + "fields": [ { - name: 'fulfillmentLocationId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "friday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, + "args": [], + "isDeprecated": false }, { - name: 'originAddress', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressInput', + "name": "monday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionSkusConnection', - fields: [ { - name: 'edges', - type: { - kind: 'LIST', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionSkusConnectionEdge', - }, + "name": "saturday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'pageInfo', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - }, + "name": "sunday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionSkusConnectionEdge', - fields: [ { - name: 'cursor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "thursday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'node', - type: { - kind: 'OBJECT', - name: 'SKU', + "name": "tuesday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, + { + "name": "wednesday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" + }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'ENUM', - name: 'CheckoutSessionStatus', - enumValues: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionWeekHoursInput", + "inputFields": [ + { + "name": "friday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } + }, { - name: 'ACTIVE', - isDeprecated: false, + "name": "monday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, { - name: 'CANCELLED', - isDeprecated: false, + "name": "saturday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, { - name: 'COMPLETED', - isDeprecated: false, + "name": "sunday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, { - name: 'CREATED', - isDeprecated: false, + "name": "thursday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, { - name: 'EXPIRED', - isDeprecated: false, + "name": "tuesday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, + { + "name": "wednesday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } + } ], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', - fields: [ - { - name: 'hours', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionWeekHours', - }, - }, - args: [], - isDeprecated: false, - }, + "kind": "OBJECT", + "name": "CheckoutTokenValidation", + "fields": [ { - name: 'leadTime', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "expiresAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'pickupWindowInDays', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "sessionId", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'timeZone', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "valid", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionStoreHoursInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutBillingInfoInput", + "inputFields": [ { - name: 'hours', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionWeekHoursInput', - }, - }, + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutDestinationAddressInput" + } }, { - name: 'leadTime', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, - }, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'pickupWindowInDays', - type: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'timeZone', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionTaxAmount', - fields: [ { - name: 'rate', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedRate', - }, - args: [], - isDeprecated: false, + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'totalTaxAmount', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionTotalTaxAmount', - }, - args: [], - isDeprecated: false, - }, + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionTaxesOptions', - fields: [ + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutDestinationAddressInput", + "inputFields": [ { - name: 'originAddress', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionAddress', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionTaxesOptionsInput', - inputFields: [ - { - name: 'originAddress', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressInput', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionTotalTaxAmount', - fields: [ - { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionWeekHours', - fields: [ { - name: 'friday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'monday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'saturday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'sunday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'thursday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'tuesday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'wednesday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, - }, + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionWeekHoursInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingInfoInput", + "inputFields": [ { - name: 'friday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutDestinationAddressInput" + } }, { - name: 'monday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'saturday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - { - name: 'sunday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + { + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'thursday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingLineInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'tuesday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutTaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingLineTotalsInput" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingLineTotalsInput", + "inputFields": [ + { + "name": "subTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + }, + { + "name": "taxTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutTaxInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + }, + { + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ContactInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DraftOrderAddressInput" + } + } + }, + { + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "firstName", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "lastName", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "CreateDraftLineItemInput", + "inputFields": [ + { + "name": "details", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputDetailsInfo" + } + }, + { + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DiscountInput" + } + } + } + }, + { + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "FeeInput" + } + } + } + }, + { + "name": "fulfillmentChannelId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fulfillmentMode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "LineItemModeInput" + } + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + }, + "defaultValue": "[]" + }, + { + "name": "productId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "quantity", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + } + }, + { + "name": "serviceEndsAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "serviceStartAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputShippingInfo" + } + }, + { + "name": "skuId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "LineItemTotalsInput" + } + } }, { - name: 'wednesday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', + "name": "type", + "type": { + "kind": "ENUM", + "name": "LineItemTypesInput" }, + "defaultValue": "PHYSICAL" }, + { + "name": "unitAmount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } ], - isOneOf: false, + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "DateTime" }, { - kind: 'OBJECT', - name: 'CheckoutTokenValidation', - fields: [ + "kind": "INPUT_OBJECT", + "name": "DestinationAddressInput", + "inputFields": [ { - name: 'expiresAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - args: [], - isDeprecated: false, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'sessionId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'valid', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - args: [], - isDeprecated: false, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutBillingInfoInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "DiscountInput", + "inputFields": [ { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutDestinationAddressInput', - }, + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "code", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "DraftOrder", + "fields": [ + { + "name": "billing", + "type": { + "kind": "OBJECT", + "name": "DraftOrderContact" }, + "args": [], + "isDeprecated": false }, { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculatedAdjustments", + "type": { + "kind": "OBJECT", + "name": "PriceAdjustmentsCalculationResult" }, + "args": [ + { + "name": "discountCodes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "shippingLines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PriceAdjustmentShippingLineInput" + } + } + } + } + ], + "isDeprecated": false }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculatedShippingRates", + "type": { + "kind": "OBJECT", + "name": "ShippingRateCalculationResult" }, + "args": [ + { + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "DestinationAddressInput" + } + } + ], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutDestinationAddressInput', - inputFields: [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculatedTaxes", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculationResult" }, + "args": [ + { + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput" + } + }, + { + "name": "lines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxLineInput" + } + } + } + } + ], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "cartId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "context", + "type": { + "kind": "OBJECT", + "name": "DraftOrderContext" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "createdAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemDiscount" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemFee" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "fulfillmentModes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingInfoInput', - inputFields: [ { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutDestinationAddressInput', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "ID" }, + "args": [], + "isDeprecated": false }, { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "lineItems", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DraftOrderLineItem" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, + "args": [], + "isDeprecated": false + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemNote" + } + } + }, + "args": [], + "isDeprecated": false }, { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "number", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "numberDisplay", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', + "name": "shipping", + "type": { + "kind": "OBJECT", + "name": "DraftOrderContact" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingLineInput', - inputFields: [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "shippingLines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ShippingLine" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "statuses", + "type": { + "kind": "OBJECT", + "name": "DraftOrderStatuses" }, + "args": [], + "isDeprecated": false }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', + "name": "taxExempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutTaxInput', - }, - }, + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemTax" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingLineTotalsInput', - }, + "name": "totals", + "type": { + "kind": "OBJECT", + "name": "DraftOrderTotals" }, + "args": [], + "isDeprecated": false }, + { + "name": "updatedAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingLineTotalsInput', - inputFields: [ + "kind": "OBJECT", + "name": "DraftOrderAddress", + "fields": [ { - name: 'subTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'taxTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutTaxInput', - inputFields: [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, + { + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'ContactInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "DraftOrderAddressInput", + "inputFields": [ { - name: 'address', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'DraftOrderAddressInput', - }, - }, + "name": "addressLine1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'firstName', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'lastName', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + { + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CreateDraftLineItemInput', - inputFields: [ + "kind": "OBJECT", + "name": "DraftOrderContact", + "fields": [ { - name: 'details', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputDetailsInfo', + "name": "address", + "type": { + "kind": "OBJECT", + "name": "DraftOrderAddress" }, + "args": [], + "isDeprecated": false }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'DiscountInput', - }, - }, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'FeeInput', - }, - }, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentChannelId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentMode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'ENUM', - name: 'LineItemModeInput', - }, + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DraftOrderContext", + "fields": [ { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "channelId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, + "name": "owner", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "storeId", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DraftOrderLineItem", + "fields": [ { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, + "name": "createdAt", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: '[]', + "args": [], + "isDeprecated": false }, { - name: 'productId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "details", + "type": { + "kind": "OBJECT", + "name": "LineItemDetails" }, + "args": [], + "isDeprecated": false }, { - name: 'quantity', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemDiscount" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'serviceEndsAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'serviceStartAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemFee" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputShippingInfo', + "name": "fulfilledAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "fulfillmentChannelId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": true }, { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "fulfillmentMode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxInput', - }, - }, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'LineItemTotalsInput', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'ENUM', - name: 'LineItemTypesInput', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: 'PHYSICAL', + "args": [], + "isDeprecated": false }, { - name: 'unitAmount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemNote" + } + } }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'SCALAR', - name: 'DateTime', - }, - { - kind: 'INPUT_OBJECT', - name: 'DestinationAddressInput', - inputFields: [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "orderVersion", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "productId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "quantity", + "type": { + "kind": "SCALAR", + "name": "Float" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "returnQuantity", + "type": { + "kind": "SCALAR", + "name": "Float" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "returnTotals", + "type": { + "kind": "OBJECT", + "name": "LineItemReturnTotals" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "returnedAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "serviceEndsAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "serviceStartAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "shipping", + "type": { + "kind": "OBJECT", + "name": "DraftOrderContact" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'DiscountInput', - inputFields: [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "skuId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: 'false', + "args": [], + "isDeprecated": false }, { - name: 'code', - type: { - kind: 'SCALAR', - name: 'String', + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemTax" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, + "name": "totals", + "type": { + "kind": "OBJECT", + "name": "LineItemTotals" }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "type", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "unitAmount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "updatedAt", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'DraftOrder', - fields: [ + "kind": "INPUT_OBJECT", + "name": "DraftOrderLineItemInput", + "inputFields": [ { - name: 'billing', - type: { - kind: 'OBJECT', - name: 'DraftOrderContact', - }, - args: [], - isDeprecated: false, + "name": "details", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputDetailsInfo" + } }, { - name: 'calculatedAdjustments', - type: { - kind: 'OBJECT', - name: 'PriceAdjustmentsCalculationResult', - }, - args: [ - { - name: 'discountCodes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'shippingLines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'PriceAdjustmentShippingLineInput', - }, - }, - }, - }, - ], - isDeprecated: false, + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DiscountInput" + } + } + } }, { - name: 'calculatedShippingRates', - type: { - kind: 'OBJECT', - name: 'ShippingRateCalculationResult', - }, - args: [ - { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'DestinationAddressInput', - }, - }, - ], - isDeprecated: false, + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'calculatedTaxes', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationResult', - }, - args: [ - { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', - }, - }, - { - name: 'lines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxLineInput', - }, - }, - }, - }, - ], - isDeprecated: false, + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "FeeInput" + } + } + } }, { - name: 'cartId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "fulfillmentMode", + "type": { + "kind": "ENUM", + "name": "LineItemModeInput" + } }, { - name: 'context', - type: { - kind: 'OBJECT', - name: 'DraftOrderContext', - }, - args: [], - isDeprecated: false, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + }, + "defaultValue": "[]" + }, + { + "name": "productId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "quantity", + "type": { + "kind": "SCALAR", + "name": "Float" + } + }, + { + "name": "serviceEndsAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "serviceStartAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } }, { - name: 'createdAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - args: [], - isDeprecated: false, + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputShippingInfo" + } }, { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "skuId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemDiscount', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxInput" + } + } + } }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemFee', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemTotalsInput" + } }, { - name: 'fulfillmentModes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "type", + "type": { + "kind": "ENUM", + "name": "LineItemTypesInput" }, - args: [], - isDeprecated: false, + "defaultValue": "PHYSICAL" }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', + "name": "unitAmount", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "DraftOrderStatuses", + "fields": [ + { + "name": "fulfillmentStatus", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'lineItems', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'DraftOrderLineItem', - }, - }, + "name": "paymentStatus", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DraftOrderTotals", + "fields": [ { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemNote', - }, - }, + "name": "discountTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'number', - type: { - kind: 'SCALAR', - name: 'String', + "name": "feeTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'numberDisplay', - type: { - kind: 'SCALAR', - name: 'String', + "name": "shippingTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'OBJECT', - name: 'DraftOrderContact', + "name": "subTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'shippingLines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'ShippingLine', - }, - }, + "name": "taxTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'statuses', - type: { - kind: 'OBJECT', - name: 'DraftOrderStatuses', + "name": "total", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "ExchangeCheckoutTokenInput", + "inputFields": [ + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput", + "inputFields": [ + { + "name": "type", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'taxExempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "FeeInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemTax', - }, - }, + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "defaultValue": "false" }, { - name: 'totals', - type: { - kind: 'OBJECT', - name: 'DraftOrderTotals', - }, - args: [], - isDeprecated: false, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'updatedAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - args: [], - isDeprecated: false, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - interfaces: [], + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "Float" }, { - kind: 'OBJECT', - name: 'DraftOrderAddress', - fields: [ + "kind": "ENUM", + "name": "FulfillmentModeInput", + "enumValues": [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "CURBSIDE", + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DELIVERY", + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DIGITAL", + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DRIVE_THRU", + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "FOR_HERE", + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "GENERAL_CONTAINER", + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "GIFT_CARD", + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "NONE", + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "NON_LODGING_NRR", + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'DraftOrderAddressInput', - inputFields: [ { - name: 'addressLine1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "NON_LODGING_SALE", + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "PICKUP", + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "PURCHASE", + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "QUICK_STAY", + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "REGULAR_STAY", + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "SHIP", + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "TO_GO", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "GeoCoordinates", + "fields": [ { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "latitude", + "type": { + "kind": "SCALAR", + "name": "Float" }, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "longitude", + "type": { + "kind": "SCALAR", + "name": "Float" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'DraftOrderContact', - fields: [ - { - name: 'address', - type: { - kind: 'OBJECT', - name: 'DraftOrderAddress', - }, - args: [], - isDeprecated: false, - }, + "kind": "SCALAR", + "name": "ID" + }, + { + "kind": "SCALAR", + "name": "Int" + }, + { + "kind": "OBJECT", + "name": "LineItemDetails", + "fields": [ { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "productAssetUrl", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', + "name": "selectedAddons", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SelectedAddon" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "selectedOptions", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SelectedOption" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "sku", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', + "name": "unitOfMeasure", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'DraftOrderContext', - fields: [ + "kind": "OBJECT", + "name": "LineItemDiscount", + "fields": [ { - name: 'channelId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'owner', - type: { - kind: 'SCALAR', - name: 'String', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'storeId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "code", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'DraftOrderLineItem', - fields: [ { - name: 'createdAt', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'details', - type: { - kind: 'OBJECT', - name: 'LineItemDetails', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemDiscount', - }, - }, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "LineItemFee", + "fields": [ { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemFee', - }, - }, + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'fulfilledAt', - type: { - kind: 'SCALAR', - name: 'String', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentChannelId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: true, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentMode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "LineItemInputDetailsInfo", + "inputFields": [ + { + "name": "productAssetUrl", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "selectedAddons", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SelectedAddonInput" + } + } + } }, { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemNote', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "selectedOptions", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SelectedOptionInput" + } + } + } }, { - name: 'orderVersion', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "sku", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'productId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, + "name": "unitOfMeasure", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "LineItemInputShippingInfo", + "inputFields": [ { - name: 'quantity', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderAddressInput" + } }, { - name: 'returnQuantity', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'returnTotals', - type: { - kind: 'OBJECT', - name: 'LineItemReturnTotals', - }, - args: [], - isDeprecated: false, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'returnedAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'serviceEndsAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'serviceStartAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "ENUM", + "name": "LineItemModeInput", + "enumValues": [ { - name: 'shipping', - type: { - kind: 'OBJECT', - name: 'DraftOrderContact', - }, - args: [], - isDeprecated: false, + "name": "CURBSIDE", + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DELIVERY", + "isDeprecated": false }, { - name: 'status', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DIGITAL", + "isDeprecated": false }, { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "DRIVE_THRU", + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemTax', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "FOR_HERE", + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'OBJECT', - name: 'LineItemTotals', - }, - args: [], - isDeprecated: false, + "name": "GENERAL_CONTAINER", + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "GIFT_CARD", + "isDeprecated": false }, { - name: 'unitAmount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "NONE", + "isDeprecated": false }, { - name: 'updatedAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "NON_LODGING_NRR", + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'DraftOrderLineItemInput', - inputFields: [ { - name: 'details', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputDetailsInfo', - }, + "name": "NON_LODGING_SALE", + "isDeprecated": false }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'DiscountInput', - }, - }, - }, + "name": "PICKUP", + "isDeprecated": false }, { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "PURCHASE", + "isDeprecated": false }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'FeeInput', - }, - }, - }, + "name": "QUICK_STAY", + "isDeprecated": false }, { - name: 'fulfillmentMode', - type: { - kind: 'ENUM', - name: 'LineItemModeInput', - }, + "name": "REGULAR_STAY", + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "SHIP", + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, - }, + "name": "TO_GO", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "LineItemNote", + "fields": [ { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "author", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, + "name": "authorType", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: '[]', + "args": [], + "isDeprecated": false }, { - name: 'productId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "content", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'quantity', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "createdAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'serviceEndsAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "deletedAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'serviceStartAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputShippingInfo', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "shouldNotifyCustomer", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "LineItemReturnTotals", + "fields": [ { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "discountTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxInput', - }, - }, + "name": "feeTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemTotalsInput', + "name": "subTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'ENUM', - name: 'LineItemTypesInput', + "name": "taxTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - defaultValue: 'PHYSICAL', + "args": [], + "isDeprecated": false }, { - name: 'unitAmount', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', + "name": "total", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'DraftOrderStatuses', - fields: [ - { - name: 'fulfillmentStatus', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, + "kind": "OBJECT", + "name": "LineItemTax", + "fields": [ { - name: 'paymentStatus', - type: { - kind: 'SCALAR', - name: 'String', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'status', - type: { - kind: 'SCALAR', - name: 'String', + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'DraftOrderTotals', - fields: [ - { - name: 'discountTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'feeTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'shippingTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'subTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'total', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'ExchangeCheckoutTokenInput', - inputFields: [ + "kind": "OBJECT", + "name": "LineItemTotals", + "fields": [ { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "discountTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'token', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "feeTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - inputFields: [ { - name: 'type', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "subTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "taxTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'FeeInput', - inputFields: [ - { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', - }, + "kind": "INPUT_OBJECT", + "name": "LineItemTotalsInput", + "inputFields": [ { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "discountTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "feeTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "subTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "taxTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } ], - isOneOf: false, - }, - { - kind: 'SCALAR', - name: 'Float', + "isOneOf": false }, { - kind: 'ENUM', - name: 'FulfillmentModeInput', - enumValues: [ - { - name: 'CURBSIDE', - isDeprecated: false, - }, - { - name: 'DELIVERY', - isDeprecated: false, - }, - { - name: 'DIGITAL', - isDeprecated: false, - }, - { - name: 'DRIVE_THRU', - isDeprecated: false, - }, - { - name: 'FOR_HERE', - isDeprecated: false, - }, - { - name: 'GENERAL_CONTAINER', - isDeprecated: false, - }, - { - name: 'GIFT_CARD', - isDeprecated: false, - }, + "kind": "ENUM", + "name": "LineItemTypesInput", + "enumValues": [ { - name: 'NONE', - isDeprecated: false, + "name": "ALL", + "isDeprecated": false }, { - name: 'NON_LODGING_NRR', - isDeprecated: false, + "name": "DIGITAL", + "isDeprecated": false }, { - name: 'NON_LODGING_SALE', - isDeprecated: false, + "name": "PAY_LINK", + "isDeprecated": false }, { - name: 'PICKUP', - isDeprecated: false, + "name": "PHYSICAL", + "isDeprecated": false }, { - name: 'PURCHASE', - isDeprecated: false, + "name": "SERVICE", + "isDeprecated": false }, { - name: 'QUICK_STAY', - isDeprecated: false, - }, + "name": "STAY", + "isDeprecated": false + } + ] + }, + { + "kind": "ENUM", + "name": "MetafieldTypeInput", + "enumValues": [ { - name: 'REGULAR_STAY', - isDeprecated: false, - }, + "name": "JSON", + "isDeprecated": false + } + ] + }, + { + "kind": "INPUT_OBJECT", + "name": "MoneyInput", + "inputFields": [ { - name: 'SHIP', - isDeprecated: false, + "name": "currencyCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'TO_GO', - isDeprecated: false, - }, + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } + } ], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'GeoCoordinates', - fields: [ + "kind": "OBJECT", + "name": "MoneyValue", + "fields": [ { - name: 'latitude', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'longitude', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Int" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], - }, - { - kind: 'SCALAR', - name: 'ID', - }, - { - kind: 'SCALAR', - name: 'Int', + "interfaces": [] }, { - kind: 'OBJECT', - name: 'LineItemDetails', - fields: [ + "kind": "OBJECT", + "name": "Mutation", + "fields": [ { - name: 'productAssetUrl', - type: { - kind: 'SCALAR', - name: 'String', + "name": "applyCheckoutSessionDeliveryMethod", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionDeliveryMethodInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'selectedAddons', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SelectedAddon', - }, - }, + "name": "applyCheckoutSessionDiscount", + "type": { + "kind": "OBJECT", + "name": "DraftOrder" }, - args: [], - isDeprecated: false, - }, - { - name: 'selectedOptions', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SelectedOption', - }, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionDiscountInput" + } + } }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'sku', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'unitOfMeasure', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'LineItemDiscount', - fields: [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "applyCheckoutSessionFulfillmentLocation", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionFulfillmentLocationInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "applyCheckoutSessionShippingMethod", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ApplyShippingMethodInput" + } + } + } + } + } + ], + "isDeprecated": false }, { - name: 'code', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculateCheckoutSessionTaxes", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculationResult" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput" + } + }, + { + "name": "lines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxLineInput" + } + } + } + } + ], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "confirmCheckoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, - }, - { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationConfirmCheckoutSessionInput" + } + } }, - }, - args: [], - isDeprecated: false, + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "createCheckoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationCreateCheckoutSessionInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "exchangeCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutAuthToken" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationExchangeCheckoutTokenInput" + } + } + } + ], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'LineItemFee', - fields: [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "expireCheckoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "refreshCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutAuthToken" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "removeAppliedCheckoutSessionShippingMethod", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "RemoveShippingMethodInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, + "name": "updateCheckoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationUpdateCheckoutSessionInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "updateCheckoutSessionDraftOrder", + "type": { + "kind": "OBJECT", + "name": "DraftOrder" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationUpdateCheckoutSessionDraftOrderInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "verifyAddress", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Address" + } + } }, - args: [], - isDeprecated: false, - }, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationVerifyAddressInput" + } + } + } + ], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'LineItemInputDetailsInfo', - inputFields: [ - { - name: 'productAssetUrl', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'selectedAddons', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'SelectedAddonInput', - }, - }, - }, - }, - { - name: 'selectedOptions', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'SelectedOptionInput', - }, - }, - }, - }, - { - name: 'sku', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionDeliveryMethodInput", + "inputFields": [ { - name: 'unitOfMeasure', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "mode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "FulfillmentModeInput" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'LineItemInputShippingInfo', - inputFields: [ - { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderAddressInput', - }, + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionDiscountInput", + "inputFields": [ + { + "name": "discountCodes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionFulfillmentLocationInput", + "inputFields": [ + { + "name": "fulfillmentLocationId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationConfirmCheckoutSessionInput", + "inputFields": [ + { + "name": "billing", + "type": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutBillingInfoInput" + } }, { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "fulfillmentEndAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "fulfillmentLocationId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fulfillmentStartAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "paymentProcessor", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "paymentProvider", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "paymentToken", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "paymentType", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingInfoInput" + } }, { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "shippingLines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingLineInput" + } + } + } }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "shippingTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } }, + { + "name": "taxTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'ENUM', - name: 'LineItemModeInput', - enumValues: [ + "kind": "INPUT_OBJECT", + "name": "MutationCreateCheckoutSessionInput", + "inputFields": [ { - name: 'CURBSIDE', - isDeprecated: false, + "name": "channelId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'DELIVERY', - isDeprecated: false, + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'DIGITAL', - isDeprecated: false, + "name": "draftOrderId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'DRIVE_THRU', - isDeprecated: false, + "name": "enableAddressAutocomplete", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableBillingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'FOR_HERE', - isDeprecated: false, + "name": "enableLocalPickup", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'GENERAL_CONTAINER', - isDeprecated: false, + "name": "enableNotesCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'GIFT_CARD', - isDeprecated: false, + "name": "enablePaymentMethodCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'NONE', - isDeprecated: false, + "name": "enablePhoneCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enablePromotionCodes", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'NON_LODGING_NRR', - isDeprecated: false, + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableShippingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableSurcharge", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'NON_LODGING_SALE', - isDeprecated: false, + "name": "enableTaxCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableTips", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'PICKUP', - isDeprecated: false, + "name": "enabledLocales", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, { - name: 'PURCHASE', - isDeprecated: false, + "name": "enabledPaymentProviders", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "environment", + "type": { + "kind": "ENUM", + "name": "CheckoutSessionEnvironment" + } + }, + { + "name": "experimental_rules", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionExperimentalRulesInput" + } + }, + { + "name": "expiresAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "lineItems", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLineItemInput" + } + } + } + }, + { + "name": "locations", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLocationInput" + } + } + } + }, + { + "name": "operatingHours", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionOperatingHoursMapInput" + } + }, + { + "name": "paymentMethods", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodsInput" + } + }, + { + "name": "returnUrl", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionShippingOptionsInput" + } + }, + { + "name": "sourceApp", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "storeId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "storeName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "successUrl", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "taxes", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionTaxesOptionsInput" + } + }, + { + "name": "url", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationExchangeCheckoutTokenInput", + "inputFields": [ + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationUpdateCheckoutSessionDraftOrderInput", + "inputFields": [ + { + "name": "billing", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderBillingInfoInput" + } + }, + { + "name": "cartId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "context", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderContextInputUpdate" + } + } + }, + { + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateDiscountInput" + } + } + } + }, + { + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateFeeInput" + } + } + } + }, + { + "name": "lineItems", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftOrderLineItemsInput" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + } + }, + { + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderShippingInfoInput" + } + }, + { + "name": "shippingLines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftShippingLineInput" + } + } + } + }, + { + "name": "staffUserIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "taxExempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateOrderTaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderTotalsInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationUpdateCheckoutSessionInput", + "inputFields": [ + { + "name": "channelId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "enableAddressAutocomplete", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableBillingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableLocalPickup", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableNotesCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enablePaymentMethodCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'QUICK_STAY', - isDeprecated: false, + "name": "enablePhoneCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enablePromotionCodes", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'REGULAR_STAY', - isDeprecated: false, + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'SHIP', - isDeprecated: false, + "name": "enableShippingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'TO_GO', - isDeprecated: false, + "name": "enableSurcharge", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, - ], - }, - { - kind: 'OBJECT', - name: 'LineItemNote', - fields: [ { - name: 'author', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "enableTaxCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'authorType', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "enableTips", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'content', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "enabledLocales", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, { - name: 'createdAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "enabledPaymentProviders", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, { - name: 'deletedAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "environment", + "type": { + "kind": "ENUM", + "name": "CheckoutSessionEnvironment" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "experimental_rules", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionExperimentalRulesInput" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "expiresAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } }, { - name: 'shouldNotifyCustomer', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, + "name": "locations", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLocationInput" + } + } + } }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'LineItemReturnTotals', - fields: [ { - name: 'discountTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "operatingHours", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionOperatingHoursMapInput" + } }, { - name: 'feeTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "paymentMethods", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodsInput" + } }, { - name: 'subTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "returnUrl", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'taxTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "sourceApp", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'total', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "storeId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "storeName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "successUrl", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "url", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'LineItemTax', - fields: [ + "kind": "INPUT_OBJECT", + "name": "MutationVerifyAddressInput", + "inputFields": [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "addressLine1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + { + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'LineItemTotals', - fields: [ - { - name: 'discountTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, - }, + "kind": "ENUM", + "name": "NoteAuthorTypeInput", + "enumValues": [ { - name: 'feeTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "CUSTOMER", + "isDeprecated": false }, { - name: 'subTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "MERCHANT", + "isDeprecated": false }, { - name: 'taxTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], + "name": "NONE", + "isDeprecated": false + } + ] }, { - kind: 'INPUT_OBJECT', - name: 'LineItemTotalsInput', - inputFields: [ - { - name: 'discountTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, + "kind": "INPUT_OBJECT", + "name": "NoteInput", + "inputFields": [ { - name: 'feeTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "author", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'subTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "authorType", + "type": { + "kind": "ENUM", + "name": "NoteAuthorTypeInput" + } }, { - name: 'taxTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "content", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, - ], - isOneOf: false, - }, - { - kind: 'ENUM', - name: 'LineItemTypesInput', - enumValues: [ { - name: 'ALL', - isDeprecated: false, + "name": "createdAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } }, { - name: 'DIGITAL', - isDeprecated: false, + "name": "deletedAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } }, { - name: 'PAY_LINK', - isDeprecated: false, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'PHYSICAL', - isDeprecated: false, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } }, { - name: 'SERVICE', - isDeprecated: false, + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'STAY', - isDeprecated: false, - }, + "name": "shouldNotifyCustomer", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + } ], + "isOneOf": false }, { - kind: 'ENUM', - name: 'MetafieldTypeInput', - enumValues: [ - { - name: 'JSON', - isDeprecated: false, - }, - ], + "kind": "SCALAR", + "name": "Null" }, { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "OrderAddressInput", + "inputFields": [ { - name: 'currencyCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'MoneyValue', - fields: [ - { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Int', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'Mutation', - fields: [ - { - name: 'applyCheckoutSessionDeliveryMethod', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionDeliveryMethodInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'applyCheckoutSessionDiscount', - type: { - kind: 'OBJECT', - name: 'DraftOrder', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionDiscountInput', - }, - }, - }, - { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'applyCheckoutSessionFulfillmentLocation', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionFulfillmentLocationInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'applyCheckoutSessionShippingMethod', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ApplyShippingMethodInput', - }, - }, - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'calculateCheckoutSessionTaxes', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationResult', - }, - args: [ - { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', - }, - }, - { - name: 'lines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxLineInput', - }, - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'confirmCheckoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationConfirmCheckoutSessionInput', - }, - }, - }, - { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'createCheckoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationCreateCheckoutSessionInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'exchangeCheckoutToken', - type: { - kind: 'OBJECT', - name: 'CheckoutAuthToken', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationExchangeCheckoutTokenInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'expireCheckoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'refreshCheckoutToken', - type: { - kind: 'OBJECT', - name: 'CheckoutAuthToken', - }, - args: [], - isDeprecated: false, - }, - { - name: 'removeAppliedCheckoutSessionShippingMethod', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'RemoveShippingMethodInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'updateCheckoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationUpdateCheckoutSessionInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'updateCheckoutSessionDraftOrder', - type: { - kind: 'OBJECT', - name: 'DraftOrder', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationUpdateCheckoutSessionDraftOrderInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'verifyAddress', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'Address', - }, - }, - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationVerifyAddressInput', - }, - }, - }, - ], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionDeliveryMethodInput', - inputFields: [ - { - name: 'mode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'ENUM', - name: 'FulfillmentModeInput', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionDiscountInput', - inputFields: [ - { - name: 'discountCodes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionFulfillmentLocationInput', - inputFields: [ - { - name: 'fulfillmentLocationId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationConfirmCheckoutSessionInput', - inputFields: [ - { - name: 'billing', - type: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutBillingInfoInput', - }, - }, - { - name: 'fulfillmentEndAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'fulfillmentLocationId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'fulfillmentStartAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'paymentProcessor', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'paymentProvider', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'paymentToken', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'paymentType', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingInfoInput', - }, - }, - { - name: 'shippingLines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingLineInput', - }, - }, - }, - }, - { - name: 'shippingTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - { - name: 'taxTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationCreateCheckoutSessionInput', - inputFields: [ - { - name: 'channelId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'draftOrderId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'enableAddressAutocomplete', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableBillingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableLocalPickup', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableNotesCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePaymentMethodCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePhoneCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePromotionCodes', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableShippingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableSurcharge', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableTaxCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableTips', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enabledLocales', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'enabledPaymentProviders', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'environment', - type: { - kind: 'ENUM', - name: 'CheckoutSessionEnvironment', - }, - }, - { - name: 'experimental_rules', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionExperimentalRulesInput', - }, - }, - { - name: 'expiresAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'lineItems', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLineItemInput', - }, - }, - }, - }, - { - name: 'locations', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLocationInput', - }, - }, - }, - }, - { - name: 'operatingHours', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionOperatingHoursMapInput', - }, - }, - { - name: 'paymentMethods', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodsInput', - }, - }, - { - name: 'returnUrl', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionShippingOptionsInput', - }, - }, - { - name: 'sourceApp', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'storeId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'storeName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'successUrl', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'taxes', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionTaxesOptionsInput', - }, - }, - { - name: 'url', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationExchangeCheckoutTokenInput', - inputFields: [ - { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'token', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationUpdateCheckoutSessionDraftOrderInput', - inputFields: [ - { - name: 'billing', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderBillingInfoInput', - }, - }, - { - name: 'cartId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'context', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderContextInputUpdate', - }, - }, - }, - { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateDiscountInput', - }, - }, - }, - }, - { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateFeeInput', - }, - }, - }, - }, - { - name: 'lineItems', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftOrderLineItemsInput', - }, - }, - { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, - }, - { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, - }, - }, - { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderShippingInfoInput', - }, - }, - { - name: 'shippingLines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftShippingLineInput', - }, - }, - }, - }, - { - name: 'staffUserIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'taxExempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateOrderTaxInput', - }, - }, - }, - }, - { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderTotalsInput', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationUpdateCheckoutSessionInput', - inputFields: [ - { - name: 'channelId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'enableAddressAutocomplete', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableBillingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableLocalPickup', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableNotesCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePaymentMethodCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePhoneCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePromotionCodes', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableShippingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableSurcharge', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableTaxCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableTips', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enabledLocales', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'enabledPaymentProviders', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'environment', - type: { - kind: 'ENUM', - name: 'CheckoutSessionEnvironment', - }, - }, - { - name: 'experimental_rules', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionExperimentalRulesInput', - }, - }, - { - name: 'expiresAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'locations', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLocationInput', - }, - }, - }, - }, - { - name: 'operatingHours', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionOperatingHoursMapInput', - }, - }, - { - name: 'paymentMethods', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodsInput', - }, - }, - { - name: 'returnUrl', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'sourceApp', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'storeId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'storeName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'successUrl', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'url', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationVerifyAddressInput', - inputFields: [ - { - name: 'addressLine1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'ENUM', - name: 'NoteAuthorTypeInput', - enumValues: [ - { - name: 'CUSTOMER', - isDeprecated: false, - }, - { - name: 'MERCHANT', - isDeprecated: false, - }, - { - name: 'NONE', - isDeprecated: false, - }, - ], - }, - { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - inputFields: [ - { - name: 'author', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'authorType', - type: { - kind: 'ENUM', - name: 'NoteAuthorTypeInput', - }, - }, - { - name: 'content', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'createdAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'deletedAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, - }, - { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, - }, - { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'shouldNotifyCustomer', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'SCALAR', - name: 'Null', - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderAddressInput', - inputFields: [ - { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderBillingInfoInput', - inputFields: [ - { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderAddressInput', - }, - }, - { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderContextInputUpdate', - inputFields: [ - { - name: 'channelId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'storeId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'OrderMetafield', - fields: [ - { - name: 'key', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - inputFields: [ - { - name: 'key', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'type', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'ENUM', - name: 'MetafieldTypeInput', - }, - }, - defaultValue: 'JSON', - }, - { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderShippingInfoInput', - inputFields: [ - { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderAddressInput', - }, - }, - { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderTotalsInput', - inputFields: [ - { - name: 'discountTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'feeTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'shippingTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'subTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'taxTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'total', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'PageInfo', - fields: [ - { - name: 'endCursor', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'hasNextPage', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'hasPreviousPage', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'startCursor', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'PriceAdjustmentShippingLineInput', - inputFields: [ - { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'subTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'PriceAdjustmentsCalculationResult', - fields: [ - { - name: 'adjustments', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CalculatedAdjustmentOutput', - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'lines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CalculatedLineOutput', - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'totalDiscountAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', - }, - args: [], - isDeprecated: false, - }, - { - name: 'totalFeeAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'Query', - fields: [ - { - name: 'checkoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [], - isDeprecated: false, - }, - { - name: 'validateCheckoutToken', - type: { - kind: 'OBJECT', - name: 'CheckoutTokenValidation', - }, - args: [ - { - name: 'token', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'RemoveShippingMethodInput', - inputFields: [ - { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'serviceCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'SKU', - fields: [ - { - name: 'attributeValues', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUAttributeValue', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'attributes', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUAttribute', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'code', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'createdAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'disableShipping', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, - }, - { - name: 'htmlDescription', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'mediaUrls', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'metafields', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUMetafieldsConnection', - }, - }, - args: [ - { - name: 'after', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'before', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'first', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, - { - name: 'last', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, - ], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'prices', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUPrice', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'status', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'unitOfWeight', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'updatedAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'weight', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUAttribute', - fields: [ - { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'htmlDescription', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'values', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUAttributeValue', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUAttributeValue', - fields: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUMetafield', - fields: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'key', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'namespace', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUMetafieldsConnection', - fields: [ - { - name: 'edges', - type: { - kind: 'LIST', - ofType: { - kind: 'OBJECT', - name: 'SKUMetafieldsConnectionEdge', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'pageInfo', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUMetafieldsConnectionEdge', - fields: [ - { - name: 'cursor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'node', - type: { - kind: 'OBJECT', - name: 'SKUMetafield', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUPrice', - fields: [ - { - name: 'currencyCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SelectedAddon', - fields: [ - { - name: 'attribute', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'sku', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'values', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SelectedAddonValue', - }, - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'SelectedAddonInput', - inputFields: [ - { - name: 'attribute', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'sku', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'values', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'SelectedAddonValueInput', - }, - }, - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'SelectedAddonValue', - fields: [ - { - name: 'costAdjustment', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'SelectedAddonValueInput', - inputFields: [ - { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - { - name: 'amountIncreased', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'costAdjustment', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'SelectedOption', - fields: [ { - name: 'attribute', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'values', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'SelectedOptionInput', - inputFields: [ { - name: 'attribute', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'values', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'ShippingLine', - fields: [ + "kind": "INPUT_OBJECT", + "name": "OrderBillingInfoInput", + "inputFields": [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderAddressInput" + } }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemDiscount', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderContextInputUpdate", + "inputFields": [ + { + "name": "channelId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', + "name": "storeId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "OrderMetafield", + "fields": [ + { + "name": "key", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemTax', - }, - }, + "name": "type", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'OBJECT', - name: 'ShippingLineTotals', + "name": "value", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'ShippingLineTotals', - fields: [ + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput", + "inputFields": [ { - name: 'subTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "key", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'taxTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "type", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "MetafieldTypeInput" + } }, - args: [], - isDeprecated: false, + "defaultValue": "JSON" }, + { + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'ENUM', - name: 'ShippingLineType', - enumValues: [ + "kind": "INPUT_OBJECT", + "name": "OrderShippingInfoInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderAddressInput" + } + }, { - name: 'FEE', - isDeprecated: false, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'SHIPPING', - isDeprecated: false, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'SKU', - isDeprecated: false, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'ShippingRate', - fields: [ + "kind": "INPUT_OBJECT", + "name": "OrderTotalsInput", + "inputFields": [ { - name: 'carrierCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "discountTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, - { - name: 'cost', - type: { - kind: 'OBJECT', - name: 'ShippingRateMoneyValue', - }, - args: [], - isDeprecated: false, + { + "name": "feeTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "shippingTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'displayName', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "subTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'features', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "taxTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'maxDeliveryDate', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "total", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "PageInfo", + "fields": [ + { + "name": "endCursor", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hasNextPage", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hasPreviousPage", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false }, { - name: 'minDeliveryDate', - type: { - kind: 'SCALAR', - name: 'String', + "name": "startCursor", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "PriceAdjustmentShippingLineInput", + "inputFields": [ + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'serviceCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "subTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'ShippingRateCalculationResult', - fields: [ + "kind": "OBJECT", + "name": "PriceAdjustmentsCalculationResult", + "fields": [ { - name: 'rates', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'ShippingRate', - }, - }, + "name": "adjustments", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CalculatedAdjustmentOutput" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'ShippingRateMoneyValue', - fields: [ { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "lines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CalculatedLineOutput" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "totalDiscountAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, + { + "name": "totalFeeAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" + }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'SimpleMoney', - fields: [ + "kind": "OBJECT", + "name": "Query", + "fields": [ { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "checkoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "validateCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutTokenValidation" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "RemoveShippingMethodInput", + "inputFields": [ + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + { + "name": "serviceCode", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - interfaces: [], - }, - { - kind: 'SCALAR', - name: 'String', + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', - inputFields: [ + "kind": "OBJECT", + "name": "SKU", + "fields": [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "attributeValues", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUAttributeValue" + } + } + } }, + "args": [], + "isDeprecated": false + }, + { + "name": "attributes", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUAttribute" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "code", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "createdAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "disableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "htmlDescription", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "mediaUrls", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "metafields", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUMetafieldsConnection" + } }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "prices", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUPrice" + } + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "unitOfWeight", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "updatedAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "weight", + "type": { + "kind": "SCALAR", + "name": "Float" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'TaxInput', - inputFields: [ + "kind": "OBJECT", + "name": "SKUAttribute", + "fields": [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "htmlDescription", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: 'false', + "args": [], + "isDeprecated": false }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } }, + "args": [], + "isDeprecated": false }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "values", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUAttributeValue" + } + } + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "SKUAttributeValue", + "fields": [ { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } }, + "args": [], + "isDeprecated": false }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'TaxLineInput', - inputFields: [ + "kind": "OBJECT", + "name": "SKUMetafield", + "fields": [ { - name: 'classification', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } }, + "args": [], + "isDeprecated": false }, { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', + "name": "key", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "namespace", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'origin', - type: { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "SKUMetafieldsConnection", + "fields": [ { - name: 'quantity', - type: { - kind: 'SCALAR', - name: 'Int', + "name": "edges", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "SKUMetafieldsConnectionEdge" + } }, + "args": [], + "isDeprecated": false }, { - name: 'subtotalPrice', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "SKUMetafieldsConnectionEdge", + "fields": [ { - name: 'type', - type: { - kind: 'ENUM', - name: 'ShippingLineType', + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'unitPrice', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', + "name": "node", + "type": { + "kind": "OBJECT", + "name": "SKUMetafield" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDiscountInput', - inputFields: [ + "kind": "OBJECT", + "name": "SKUPrice", + "fields": [ { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', + "name": "currencyCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } }, - defaultValue: 'false', - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "SelectedAddon", + "fields": [ { - name: 'code', - type: { - kind: 'SCALAR', - name: 'String', + "name": "attribute", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, + "name": "sku", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "values", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SelectedAddonValue" + } + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "SelectedAddonInput", + "inputFields": [ { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "attribute", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "sku", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "values", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SelectedAddonValueInput" + } + } + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "SelectedAddonValue", + "fields": [ + { + "name": "costAdjustment", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "SelectedAddonValueInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + }, + { + "name": "amountIncreased", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "costAdjustment", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "SelectedOption", + "fields": [ + { + "name": "attribute", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "values", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftLineItemInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "SelectedOptionInput", + "inputFields": [ { - name: 'details', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputDetailsInfo', - }, + "name": "attribute", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'DiscountInput', - }, - }, - }, - }, + "name": "values", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "ShippingLine", + "fields": [ { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'FeeInput', - }, - }, + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemDiscount" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentChannelId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentMode', - type: { - kind: 'ENUM', - name: 'LineItemModeInput', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemTax" + } + } }, - defaultValue: '[]', + "args": [], + "isDeprecated": false }, { - name: 'productId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "totals", + "type": { + "kind": "OBJECT", + "name": "ShippingLineTotals" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ShippingLineTotals", + "fields": [ { - name: 'quantity', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "subTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'serviceEndsAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "taxTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "ENUM", + "name": "ShippingLineType", + "enumValues": [ { - name: 'serviceStartAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "FEE", + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputShippingInfo', - }, + "name": "SHIPPING", + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "SKU", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "ShippingRate", + "fields": [ { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "carrierCode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxInput', - }, - }, + "name": "cost", + "type": { + "kind": "OBJECT", + "name": "ShippingRateMoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemTotalsInput', + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'ENUM', - name: 'LineItemTypesInput', + "name": "displayName", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'unitAmount', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', + "name": "features", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftOrderInput', - inputFields: [ { - name: 'lineItems', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftOrderLineItemsInput', + "name": "maxDeliveryDate", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, + "name": "minDeliveryDate", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'taxExempted', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "serviceCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftOrderLineItemsInput', - inputFields: [ + "kind": "OBJECT", + "name": "ShippingRateCalculationResult", + "fields": [ { - name: 'add', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CreateDraftLineItemInput', - }, - }, + "name": "rates", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ShippingRate" + } + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ShippingRateMoneyValue", + "fields": [ { - name: 'remove', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'update', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftLineItemInput', - }, - }, + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Float" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftShippingLineInput', - inputFields: [ + "kind": "OBJECT", + "name": "SimpleMoney", + "fields": [ { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateDiscountInput', - }, - }, + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Float" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "String" + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput", + "inputFields": [ { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateFeeInput', - }, - }, - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateTaxInput', - }, - }, - }, + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftShippingLineTotalsInput', - }, - }, + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftShippingLineTotalsInput', - inputFields: [ - { - name: 'subTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, - }, + "kind": "INPUT_OBJECT", + "name": "TaxInput", + "inputFields": [ { - name: 'taxTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'UpdateFeeInput', - inputFields: [ { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "TaxLineInput", + "inputFields": [ { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "classification", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput" + } }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'UpdateNoteInput', - inputFields: [ { - name: 'author', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, { - name: 'authorType', - type: { - kind: 'ENUM', - name: 'NoteAuthorTypeInput', - }, + "name": "origin", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput" + } }, { - name: 'content', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "quantity", + "type": { + "kind": "SCALAR", + "name": "Int" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "subtotalPrice", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "type", + "type": { + "kind": "ENUM", + "name": "ShippingLineType" + } }, { - name: 'shouldNotifyCustomer', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', - }, + "name": "unitPrice", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateOrderTaxInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "UpdateDiscountInput", + "inputFields": [ { - name: 'additional', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } }, { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', + "name": "code", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftLineItemInput", + "inputFields": [ + { + "name": "details", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputDetailsInfo" + } + }, + { + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DiscountInput" + } + } + } + }, + { + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "FeeInput" + } + } + } + }, + { + "name": "fulfillmentChannelId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fulfillmentMode", + "type": { + "kind": "ENUM", + "name": "LineItemModeInput" + } + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + }, + "defaultValue": "[]" + }, + { + "name": "productId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "quantity", + "type": { + "kind": "SCALAR", + "name": "Float" + } + }, + { + "name": "serviceEndsAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "serviceStartAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputShippingInfo" + } + }, + { + "name": "skuId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemTotalsInput" + } + }, + { + "name": "type", + "type": { + "kind": "ENUM", + "name": "LineItemTypesInput" + } + }, + { + "name": "unitAmount", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftOrderInput", + "inputFields": [ + { + "name": "lineItems", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftOrderLineItemsInput" + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + } + }, + { + "name": "taxExempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftOrderLineItemsInput", + "inputFields": [ + { + "name": "add", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CreateDraftLineItemInput" + } + } + } + }, + { + "name": "remove", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "update", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftLineItemInput" + } + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftShippingLineInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + }, + { + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateDiscountInput" + } + } + } + }, + { + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } + }, + { + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateFeeInput" + } + } + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateTaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftShippingLineTotalsInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftShippingLineTotalsInput", + "inputFields": [ + { + "name": "subTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + }, + { + "name": "taxTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateFeeInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput", + "inputFields": [ + { + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateShippingLineInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "UpdateNoteInput", + "inputFields": [ { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, + "name": "author", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "authorType", + "type": { + "kind": "ENUM", + "name": "NoteAuthorTypeInput" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "content", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', + "name": "shouldNotifyCustomer", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - }, + "defaultValue": "false" + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateOrderTaxInput", + "inputFields": [ { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', + "name": "additional", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateTaxInput', - }, - }, - }, + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } }, { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateShippingLineTotalsInput', + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'UpdateShippingLineTotalsInput', - inputFields: [ { - name: 'subTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'taxTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateTaxInput', - inputFields: [ - { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, - }, + "kind": "INPUT_OBJECT", + "name": "UpdateShippingLineInput", + "inputFields": [ { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateTaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateShippingLineTotalsInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateShippingLineTotalsInput", + "inputFields": [ + { + "name": "subTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + }, + { + "name": "taxTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateTaxInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + }, + { + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "defaultValue": "false" + }, + { + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, - }, + "isOneOf": false + } ], - directives: [], - }, + "directives": [] + } } as const; -export { introspection }; +export { introspection }; \ No newline at end of file From d7bdbe2f58bef36baabdd549bd8c66d0024529a5 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Thu, 6 Nov 2025 09:11:50 -0600 Subject: [PATCH 12/23] use GODADDY_API_HOST to derive all env states --- .../src/components/checkout/checkout.tsx | 3 +- .../checkout/form/checkout-form-container.tsx | 6 +- .../checkout/payment/utils/use-load-square.ts | 4 +- .../payment/utils/use-poynt-collect-cdn.ts | 6 +- .../utils/use-get-env-from-context.ts | 15 + .../react/src/hooks/use-checkout-session.tsx | 22 +- packages/react/src/lib/godaddy/godaddy.ts | 6 +- packages/react/src/lib/godaddy/graphql-env.ts | 766 ++++++++++++------ packages/react/src/server.ts | 3 +- 9 files changed, 555 insertions(+), 276 deletions(-) create mode 100644 packages/react/src/components/checkout/utils/use-get-env-from-context.ts diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 8632ebc5..9c4f905e 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -232,7 +232,7 @@ export function Checkout(props: CheckoutProps) { useTheme(); useVariables(props?.appearance?.variables); - const { session, jwt } = useCheckoutSession(props); + const { session, jwt, isLoading: isLoadingJWT } = useCheckoutSession(props); const formSchema = React.useMemo(() => { const extendedSchema = checkoutFormSchema @@ -366,6 +366,7 @@ export function Checkout(props: CheckoutProps) { > diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index c2a78814..92fa9aed 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -18,13 +18,15 @@ import { interface CheckoutFormContainerProps extends Omit { schema: z.ZodObject | z.ZodEffects; + isLoadingJWT?: boolean; } export function CheckoutFormContainer({ schema, + isLoadingJWT, ...props }: CheckoutFormContainerProps) { - const { session, isConfirmingCheckout } = useCheckoutContext(); + const { session } = useCheckoutContext(); const draftOrderQuery = useDraftOrder(); const draftOrderLineItemsQuery = useDraftOrderLineItems(); @@ -57,7 +59,7 @@ export function CheckoutFormContainer({ // } // } - if (draftOrderQuery.isLoading) { + if (draftOrderQuery.isLoading || isLoadingJWT) { return ; } diff --git a/packages/react/src/components/checkout/payment/utils/use-load-square.ts b/packages/react/src/components/checkout/payment/utils/use-load-square.ts index 3e60db38..746796f5 100644 --- a/packages/react/src/components/checkout/payment/utils/use-load-square.ts +++ b/packages/react/src/components/checkout/payment/utils/use-load-square.ts @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import { useCheckoutContext } from '@/components/checkout/checkout'; -import { getEnvVar } from '@/lib/utils'; +import { useGetEnvFromContext } from '@/components/checkout/utils/use-get-env-from-context.ts'; let isSquareLoaded = false; let isSquareCDNLoaded = false; @@ -9,7 +9,7 @@ const listeners = new Set<(loaded: boolean) => void>(); export function useLoadSquare() { const { squareConfig } = useCheckoutContext(); const [loaded, setLoaded] = useState(isSquareLoaded); - const environment = getEnvVar('GODADDY_ENV') || 'prod'; + const environment = useGetEnvFromContext(); const squareCDN = environment === 'prod' diff --git a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts index 7c0f668e..9c0781a7 100644 --- a/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts +++ b/packages/react/src/components/checkout/payment/utils/use-poynt-collect-cdn.ts @@ -1,8 +1,8 @@ import { useMemo } from 'react'; -import { getEnvVar } from '@/lib/utils'; +import { useGetEnvFromContext } from '@/components/checkout/utils/use-get-env-from-context.ts'; export const useGetPoyntCollectCdn = () => { - const environment = getEnvVar('GODADDY_ENV') || 'prod'; + const environment = useGetEnvFromContext(); return useMemo(() => { switch (environment) { @@ -13,7 +13,7 @@ export const useGetPoyntCollectCdn = () => { case 'dev': return 'https://cdn.poynt.net/ci/collect-ci.js'; default: - return 'https://cdn.poynt.net/ci/collect-ci.js'; + return 'https://cdn.poynt.net/collect.js'; } }, [environment]); }; diff --git a/packages/react/src/components/checkout/utils/use-get-env-from-context.ts b/packages/react/src/components/checkout/utils/use-get-env-from-context.ts new file mode 100644 index 00000000..02ad3a5c --- /dev/null +++ b/packages/react/src/components/checkout/utils/use-get-env-from-context.ts @@ -0,0 +1,15 @@ +import { useGoDaddyContext } from '@/godaddy-provider.tsx'; + +export type Environment = 'prod' | 'test' | 'dev'; + +export const useGetEnvFromContext = (): Environment => { + const { apiHost } = useGoDaddyContext(); + + if (apiHost?.includes('.test-')) { + return 'test'; + } + if (apiHost?.includes('.dev-')) { + return 'dev'; + } + return 'prod'; +}; diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index af5784ec..4ac9ee49 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -35,6 +35,7 @@ export function useCheckoutSession(props?: CheckoutProps) { const [storedSessionId, setStoredSessionId, removeStoredSessionId] = useSessionStorage('godaddy-checkout-session-id', ''); const [exchangeFailed, setExchangeFailed] = useState(false); + const [isLoading, setIsLoading] = useState(true); const refreshTimerRef = useRef(null); let sessionId: string; @@ -96,6 +97,8 @@ export function useCheckoutSession(props?: CheckoutProps) { // If we already have a JWT for this session, nothing to do if (jwt && storedSessionId === sessionId) return; + setIsLoading(true); + (async () => { try { const result = await exchangeCheckoutToken( @@ -106,7 +109,10 @@ export function useCheckoutSession(props?: CheckoutProps) { apiHost ); if (!result?.jwt) { - if (!cancelled) setExchangeFailed(true); + if (!cancelled) { + setExchangeFailed(true); + setIsLoading(false); + } return; } if (cancelled) return; @@ -114,6 +120,7 @@ export function useCheckoutSession(props?: CheckoutProps) { setJwt(result.jwt); setStoredSessionId(sessionId); setExchangeFailed(false); + setIsLoading(false); if (typeof window !== 'undefined') { window.history.replaceState( null, @@ -125,7 +132,10 @@ export function useCheckoutSession(props?: CheckoutProps) { } catch (_error) { removeJwt(); removeStoredSessionId(); - if (!cancelled) setExchangeFailed(true); + if (!cancelled) { + setExchangeFailed(true); + setIsLoading(false); + } } })(); @@ -166,8 +176,12 @@ export function useCheckoutSession(props?: CheckoutProps) { // If exchange failed and we have a session prop, use legacy flow if (exchangeFailed && props?.session) { - return { session: props.session, jwt: undefined }; + return { session: props.session, jwt: undefined, isLoading }; } - return { session: checkoutSessionQuery.data, jwt: jwt || undefined }; + return { + session: checkoutSessionQuery.data, + jwt: jwt || undefined, + isLoading, + }; } diff --git a/packages/react/src/lib/godaddy/godaddy.ts b/packages/react/src/lib/godaddy/godaddy.ts index 73b92a0e..9f8c145e 100644 --- a/packages/react/src/lib/godaddy/godaddy.ts +++ b/packages/react/src/lib/godaddy/godaddy.ts @@ -41,12 +41,12 @@ import { function getHostByEnvironment(apiHost?: string): string { // Use provided apiHost, otherwise default to production - return apiHost || 'https://checkout.commerce.api.godaddy.com'; + return `https://checkout.commerce.${apiHost || 'api.godaddy.com'}`; } export async function createCheckoutSession( input: CheckoutSessionInput['input'], - { accessToken }: { accessToken: string } + { accessToken, apiHost }: { accessToken: string; apiHost?: string } ): Promise< ResultOf['createCheckoutSession'] > { @@ -54,7 +54,7 @@ export async function createCheckoutSession( throw new Error('No public access token provided'); } - const GODADDY_HOST = getHostByEnvironment(getEnvVar('GODADDY_API_HOST')); + const GODADDY_HOST = getHostByEnvironment(apiHost); const response = await graphqlRequestWithErrors< ResultOf >( diff --git a/packages/react/src/lib/godaddy/graphql-env.ts b/packages/react/src/lib/godaddy/graphql-env.ts index 5b20f176..839b759c 100644 --- a/packages/react/src/lib/godaddy/graphql-env.ts +++ b/packages/react/src/lib/godaddy/graphql-env.ts @@ -383,6 +383,420 @@ const introspection = { "kind": "SCALAR", "name": "Boolean" }, + { + "kind": "OBJECT", + "name": "CSSVariables", + "fields": [ + { + "name": "accent", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "accentForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "background", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "border", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "card", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "cardForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "defaultFontFamily", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destructive", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destructiveForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fontMono", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fontSans", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fontSerif", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "foreground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "input", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "muted", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "mutedForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "popover", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "popoverForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "primary", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "primaryForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "radius", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "ring", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "secondary", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "secondaryBackground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "secondaryForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CSSVariablesInput", + "inputFields": [ + { + "name": "accent", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "accentForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "background", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "border", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "card", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "cardForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "defaultFontFamily", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "destructive", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "destructiveForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fontMono", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fontSans", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fontSerif", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "foreground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "input", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "muted", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "mutedForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "popover", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "popoverForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "primary", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "primaryForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "radius", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "ring", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "secondary", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "secondaryBackground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "secondaryForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, { "kind": "UNION", "name": "CalculatedAdjustment", @@ -600,61 +1014,6 @@ const introspection = { ], "interfaces": [] }, - { - "kind": "OBJECT", - "name": "CheckoutAuthToken", - "fields": [ - { - "name": "expiresAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "expiresIn", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "jwt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, { "kind": "OBJECT", "name": "CheckoutSession", @@ -685,6 +1044,15 @@ const introspection = { ], "isDeprecated": false }, + { + "name": "appearance", + "type": { + "kind": "OBJECT", + "name": "GoDaddyAppearance" + }, + "args": [], + "isDeprecated": false + }, { "name": "channelId", "type": { @@ -799,15 +1167,6 @@ const introspection = { "args": [], "isDeprecated": false }, - { - "name": "enableShipping", - "type": { - "kind": "SCALAR", - "name": "Boolean" - }, - "args": [], - "isDeprecated": false - }, { "name": "enableShippingAddressCollection", "type": { @@ -1980,33 +2339,6 @@ const introspection = { ], "isOneOf": false }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLineItemInput", - "inputFields": [ - { - "name": "quantity", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - } - }, - { - "name": "skuId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, { "kind": "OBJECT", "name": "CheckoutSessionLocalDeliveryRule", @@ -2807,43 +3139,6 @@ const introspection = { ], "isOneOf": false }, - { - "kind": "OBJECT", - "name": "CheckoutTokenValidation", - "fields": [ - { - "name": "expiresAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "sessionId", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "valid", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, { "kind": "INPUT_OBJECT", "name": "ConfirmCheckoutBillingInfoInput", @@ -4790,33 +5085,6 @@ const introspection = { ], "interfaces": [] }, - { - "kind": "INPUT_OBJECT", - "name": "ExchangeCheckoutTokenInput", - "inputFields": [ - { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "token", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, { "kind": "INPUT_OBJECT", "name": "ExternalIdsInput", @@ -5005,6 +5273,70 @@ const introspection = { ], "interfaces": [] }, + { + "kind": "OBJECT", + "name": "GoDaddyAppearance", + "fields": [ + { + "name": "theme", + "type": { + "kind": "ENUM", + "name": "GoDaddyTheme" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "variables", + "type": { + "kind": "OBJECT", + "name": "CSSVariables" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "GoDaddyAppearanceInput", + "inputFields": [ + { + "name": "theme", + "type": { + "kind": "ENUM", + "name": "GoDaddyTheme" + } + }, + { + "name": "variables", + "type": { + "kind": "INPUT_OBJECT", + "name": "CSSVariablesInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "ENUM", + "name": "GoDaddyTheme", + "enumValues": [ + { + "name": "base", + "isDeprecated": false + }, + { + "name": "orange", + "isDeprecated": false + }, + { + "name": "purple", + "isDeprecated": false + } + ] + }, { "kind": "SCALAR", "name": "ID" @@ -5968,26 +6300,6 @@ const introspection = { ], "isDeprecated": false }, - { - "name": "exchangeCheckoutToken", - "type": { - "kind": "OBJECT", - "name": "CheckoutAuthToken" - }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationExchangeCheckoutTokenInput" - } - } - } - ], - "isDeprecated": false - }, { "name": "expireCheckoutSession", "type": { @@ -6008,15 +6320,6 @@ const introspection = { ], "isDeprecated": false }, - { - "name": "refreshCheckoutToken", - "type": { - "kind": "OBJECT", - "name": "CheckoutAuthToken" - }, - "args": [], - "isDeprecated": false - }, { "name": "removeAppliedCheckoutSessionShippingMethod", "type": { @@ -6280,6 +6583,13 @@ const introspection = { "kind": "INPUT_OBJECT", "name": "MutationCreateCheckoutSessionInput", "inputFields": [ + { + "name": "appearance", + "type": { + "kind": "INPUT_OBJECT", + "name": "GoDaddyAppearanceInput" + } + }, { "name": "channelId", "type": { @@ -6300,8 +6610,11 @@ const introspection = { { "name": "draftOrderId", "type": { - "kind": "SCALAR", - "name": "String" + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } } }, { @@ -6353,13 +6666,6 @@ const introspection = { "name": "Boolean" } }, - { - "name": "enableShipping", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, { "name": "enableShippingAddressCollection", "type": { @@ -6435,19 +6741,6 @@ const introspection = { "name": "DateTime" } }, - { - "name": "lineItems", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLineItemInput" - } - } - } - }, { "name": "locations", "type": { @@ -6543,33 +6836,6 @@ const introspection = { ], "isOneOf": false }, - { - "kind": "INPUT_OBJECT", - "name": "MutationExchangeCheckoutTokenInput", - "inputFields": [ - { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "token", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, { "kind": "INPUT_OBJECT", "name": "MutationUpdateCheckoutSessionDraftOrderInput", @@ -6751,6 +7017,13 @@ const introspection = { "kind": "INPUT_OBJECT", "name": "MutationUpdateCheckoutSessionInput", "inputFields": [ + { + "name": "appearance", + "type": { + "kind": "INPUT_OBJECT", + "name": "GoDaddyAppearanceInput" + } + }, { "name": "channelId", "type": { @@ -6814,13 +7087,6 @@ const introspection = { "name": "Boolean" } }, - { - "name": "enableShipping", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, { "name": "enableShippingAddressCollection", "type": { @@ -7635,26 +7901,6 @@ const introspection = { }, "args": [], "isDeprecated": false - }, - { - "name": "validateCheckoutToken", - "type": { - "kind": "OBJECT", - "name": "CheckoutTokenValidation" - }, - "args": [ - { - "name": "token", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isDeprecated": false } ], "interfaces": [] diff --git a/packages/react/src/server.ts b/packages/react/src/server.ts index 5f4def8f..acd1d8fa 100644 --- a/packages/react/src/server.ts +++ b/packages/react/src/server.ts @@ -36,11 +36,12 @@ export async function createCheckoutSession( return await GoDaddy.createCheckoutSession(input, { accessToken, + apiHost: getEnvVar('GODADDY_API_HOST'), }); } function getHostByEnvironment(): string { - return `https://${getEnvVar('GODADDY_HOST') || 'api.godaddy.com'}`; + return `https://${getEnvVar('GODADDY_API_HOST') || 'api.godaddy.com'}`; } async function getAccessToken({ From 49b0b72dcbe1bef37952eee3bc7bee5c358f2283 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Thu, 6 Nov 2025 09:43:21 -0600 Subject: [PATCH 13/23] remove unused getEnvVar import --- packages/react/src/lib/godaddy/godaddy.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/react/src/lib/godaddy/godaddy.ts b/packages/react/src/lib/godaddy/godaddy.ts index 9f8c145e..b00b6861 100644 --- a/packages/react/src/lib/godaddy/godaddy.ts +++ b/packages/react/src/lib/godaddy/godaddy.ts @@ -14,7 +14,6 @@ import type { RemoveAppliedCheckoutSessionShippingMethodInput, UpdateDraftOrderInput, } from '@/types'; -import { getEnvVar } from '../utils'; import { ApplyCheckoutSessionDeliveryMethodMutation, ApplyCheckoutSessionDiscountMutation, From 7540a5af6793d6a8b11e59ae263be92f636faf8e Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Thu, 6 Nov 2025 12:13:49 -0500 Subject: [PATCH 14/23] fix: set isLoading to false when JWT already exists for session Amp-Thread-ID: https://ampcode.com/threads/T-36b2320b-3465-4c05-9b20-dc79416c2e8a Co-authored-by: Amp --- packages/react/src/hooks/use-checkout-session.tsx | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index 4ac9ee49..9187e63a 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -83,8 +83,6 @@ export function useCheckoutSession(props?: CheckoutProps) { ); useEffect(() => { - if (!sessionId || !sessionToken) return; - let cancelled = false; // If we have a JWT for a different session, clear it @@ -95,7 +93,12 @@ export function useCheckoutSession(props?: CheckoutProps) { } // If we already have a JWT for this session, nothing to do - if (jwt && storedSessionId === sessionId) return; + if (jwt && storedSessionId === sessionId) { + setIsLoading(false); + return; + } + + if (!sessionId || !sessionToken) return; setIsLoading(true); @@ -178,10 +181,12 @@ export function useCheckoutSession(props?: CheckoutProps) { if (exchangeFailed && props?.session) { return { session: props.session, jwt: undefined, isLoading }; } + console.log('checkoutSessionLoading', checkoutSessionQuery.isLoading) + console.log('isLoading', isLoading) return { session: checkoutSessionQuery.data, jwt: jwt || undefined, - isLoading, + isLoading: isLoading || checkoutSessionQuery.isLoading, }; } From 06eba3fb4f7d713c41054b2bf7b8274c874837a2 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Thu, 6 Nov 2025 11:58:26 -0600 Subject: [PATCH 15/23] update fulfillment logic for delivery method --- .../src/components/checkout/checkout.tsx | 4 +- .../checkout/utils/checkout-transformers.ts | 15 +- packages/react/src/lib/godaddy/graphql-env.ts | 267 +++++++++++++++++- 3 files changed, 277 insertions(+), 9 deletions(-) diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 9c4f905e..e6b12124 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -244,7 +244,7 @@ export function Checkout(props: CheckoutProps) { if (!checkIsValidPhone(String(data?.billingPhone))) { ctx.addIssue({ code: z.ZodIssueCode.custom, - message: 'Enter a valid billing phone number', + message: t.validation.enterValidBillingPhone, path: ['billingPhone'], }); } @@ -254,7 +254,7 @@ export function Checkout(props: CheckoutProps) { if (!checkIsValidPhone(String(data?.shippingPhone))) { ctx.addIssue({ code: z.ZodIssueCode.custom, - message: 'Enter a valid shipping phone number', + message: t.validation.enterValidShippingPhone, path: ['shippingPhone'], }); } diff --git a/packages/react/src/components/checkout/utils/checkout-transformers.ts b/packages/react/src/components/checkout/utils/checkout-transformers.ts index cb107ad0..a296fac2 100644 --- a/packages/react/src/components/checkout/utils/checkout-transformers.ts +++ b/packages/react/src/components/checkout/utils/checkout-transformers.ts @@ -57,6 +57,19 @@ export function mapOrderToFormValues({ lineItem => lineItem.fulfillmentMode === DeliveryMethods.PICKUP ); + const isShipping = order?.lineItems?.some( + lineItem => lineItem.fulfillmentMode === DeliveryMethods.SHIP + ); + + const isMixedFulfillment = isPickup && isShipping; + + let deliveryMethod = DeliveryMethods.PURCHASE; + if (!isMixedFulfillment && isPickup) { + deliveryMethod = DeliveryMethods.PICKUP; + } else if (!isMixedFulfillment && isShipping) { + deliveryMethod = DeliveryMethods.SHIP; + } + return { // Shipping address shippingFirstName: order?.shipping?.firstName ?? '', @@ -100,7 +113,7 @@ export function mapOrderToFormValues({ contactEmail: order?.shipping?.email || defaultValues?.contactEmail || '', // Delivery Methods - deliveryMethod: isPickup ? DeliveryMethods.PICKUP : DeliveryMethods.SHIP, + deliveryMethod: deliveryMethod, // Payment information paymentUseShippingAddress: orderShippingAddress?.addressLine1 diff --git a/packages/react/src/lib/godaddy/graphql-env.ts b/packages/react/src/lib/godaddy/graphql-env.ts index 839b759c..1927698c 100644 --- a/packages/react/src/lib/godaddy/graphql-env.ts +++ b/packages/react/src/lib/godaddy/graphql-env.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -/* prettier-ignore */ +/* prettier-ignore */ /** An IntrospectionQuery representation of your schema. * @@ -1014,6 +1014,61 @@ const introspection = { ], "interfaces": [] }, + { + "kind": "OBJECT", + "name": "CheckoutAuthToken", + "fields": [ + { + "name": "expiresAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "expiresIn", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "jwt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, { "kind": "OBJECT", "name": "CheckoutSession", @@ -1167,6 +1222,15 @@ const introspection = { "args": [], "isDeprecated": false }, + { + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, { "name": "enableShippingAddressCollection", "type": { @@ -2339,6 +2403,33 @@ const introspection = { ], "isOneOf": false }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLineItemInput", + "inputFields": [ + { + "name": "quantity", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } + }, + { + "name": "skuId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, { "kind": "OBJECT", "name": "CheckoutSessionLocalDeliveryRule", @@ -3139,6 +3230,43 @@ const introspection = { ], "isOneOf": false }, + { + "kind": "OBJECT", + "name": "CheckoutTokenValidation", + "fields": [ + { + "name": "expiresAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "sessionId", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "valid", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, { "kind": "INPUT_OBJECT", "name": "ConfirmCheckoutBillingInfoInput", @@ -5085,6 +5213,33 @@ const introspection = { ], "interfaces": [] }, + { + "kind": "INPUT_OBJECT", + "name": "ExchangeCheckoutTokenInput", + "inputFields": [ + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, { "kind": "INPUT_OBJECT", "name": "ExternalIdsInput", @@ -6300,6 +6455,26 @@ const introspection = { ], "isDeprecated": false }, + { + "name": "exchangeCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutAuthToken" + }, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationExchangeCheckoutTokenInput" + } + } + } + ], + "isDeprecated": false + }, { "name": "expireCheckoutSession", "type": { @@ -6320,6 +6495,15 @@ const introspection = { ], "isDeprecated": false }, + { + "name": "refreshCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutAuthToken" + }, + "args": [], + "isDeprecated": false + }, { "name": "removeAppliedCheckoutSessionShippingMethod", "type": { @@ -6610,11 +6794,8 @@ const introspection = { { "name": "draftOrderId", "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + "kind": "SCALAR", + "name": "String" } }, { @@ -6666,6 +6847,13 @@ const introspection = { "name": "Boolean" } }, + { + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, { "name": "enableShippingAddressCollection", "type": { @@ -6741,6 +6929,19 @@ const introspection = { "name": "DateTime" } }, + { + "name": "lineItems", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLineItemInput" + } + } + } + }, { "name": "locations", "type": { @@ -6836,6 +7037,33 @@ const introspection = { ], "isOneOf": false }, + { + "kind": "INPUT_OBJECT", + "name": "MutationExchangeCheckoutTokenInput", + "inputFields": [ + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, { "kind": "INPUT_OBJECT", "name": "MutationUpdateCheckoutSessionDraftOrderInput", @@ -7087,6 +7315,13 @@ const introspection = { "name": "Boolean" } }, + { + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, { "name": "enableShippingAddressCollection", "type": { @@ -7901,6 +8136,26 @@ const introspection = { }, "args": [], "isDeprecated": false + }, + { + "name": "validateCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutTokenValidation" + }, + "args": [ + { + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false } ], "interfaces": [] From 9ef43a4d9eb861f3f31f64270d45252623fcc280 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Thu, 6 Nov 2025 13:23:49 -0500 Subject: [PATCH 16/23] Add sessionId to confirmCheckout auth overload Amp-Thread-ID: https://ampcode.com/threads/T-d1b8d98c-ded2-42d5-b59b-25e20b4d1f02 Co-authored-by: Amp --- .../checkout/payment/utils/use-confirm-checkout.ts | 2 +- packages/react/src/lib/godaddy/godaddy.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts b/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts index ebed921a..93af44ba 100644 --- a/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts +++ b/packages/react/src/components/checkout/payment/utils/use-confirm-checkout.ts @@ -129,7 +129,7 @@ export function useConfirmCheckout() { ...confirmCheckoutInput, ...(isPickup ? pickUpData : {}), }, - { accessToken: jwt }, + { accessToken: jwt, sessionId: session?.id || '' }, apiHost ) : await confirmCheckout( diff --git a/packages/react/src/lib/godaddy/godaddy.ts b/packages/react/src/lib/godaddy/godaddy.ts index b00b6861..04310696 100644 --- a/packages/react/src/lib/godaddy/godaddy.ts +++ b/packages/react/src/lib/godaddy/godaddy.ts @@ -743,7 +743,7 @@ export function confirmCheckout( ): Promise>; export function confirmCheckout( input: ConfirmCheckoutMutationInput['input'], - auth: { accessToken: string | undefined }, + auth: { accessToken: string | undefined; sessionId: string }, apiHost?: string ): Promise>; export function confirmCheckout( @@ -752,7 +752,7 @@ export function confirmCheckout( | CheckoutSession | undefined | null - | { accessToken: string | undefined }, + | { accessToken: string | undefined; sessionId: string }, apiHost?: string ) { const GODADDY_HOST = getHostByEnvironment(apiHost); @@ -766,7 +766,7 @@ export function confirmCheckout( >( GODADDY_HOST, ConfirmCheckoutSessionMutation, - { input }, + { input, sessionId: sessionOrAuth.sessionId }, { Authorization: `Bearer ${sessionOrAuth.accessToken}`, } From 93efe445e16b7fcdb5243f9dfe1c806f5b0d1ec2 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Thu, 6 Nov 2025 14:20:40 -0500 Subject: [PATCH 17/23] add back redirect if order not found --- .../checkout/form/checkout-form-container.tsx | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index 92fa9aed..8e1958ad 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -26,7 +26,7 @@ export function CheckoutFormContainer({ isLoadingJWT, ...props }: CheckoutFormContainerProps) { - const { session } = useCheckoutContext(); + const { session, isConfirmingCheckout } = useCheckoutContext(); const draftOrderQuery = useDraftOrder(); const draftOrderLineItemsQuery = useDraftOrderLineItems(); @@ -51,13 +51,13 @@ export function CheckoutFormContainer({ [order, props.defaultValues, session?.shipping?.originAddress?.countryCode] ); - // if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { - // const returnUrl = session?.returnUrl; - // if (returnUrl) { - // window.location.href = returnUrl; - // return null; - // } - // } + if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { + const returnUrl = session?.returnUrl; + if (returnUrl) { + window.location.href = returnUrl; + return null; + } + } if (draftOrderQuery.isLoading || isLoadingJWT) { return ; From 2c600cffe90ad8036a83f773ba030b78f3729366 Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Thu, 6 Nov 2025 14:23:23 -0500 Subject: [PATCH 18/23] Format files --- .../checkout/form/checkout-form-container.tsx | 12 +- .../react/src/hooks/use-checkout-session.tsx | 2 - packages/react/src/lib/godaddy/graphql-env.ts | 16498 ++++++++-------- 3 files changed, 8255 insertions(+), 8257 deletions(-) diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index 8e1958ad..bc17109d 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -51,13 +51,13 @@ export function CheckoutFormContainer({ [order, props.defaultValues, session?.shipping?.originAddress?.countryCode] ); - if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { - const returnUrl = session?.returnUrl; - if (returnUrl) { - window.location.href = returnUrl; - return null; - } + if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { + const returnUrl = session?.returnUrl; + if (returnUrl) { + window.location.href = returnUrl; + return null; } + } if (draftOrderQuery.isLoading || isLoadingJWT) { return ; diff --git a/packages/react/src/hooks/use-checkout-session.tsx b/packages/react/src/hooks/use-checkout-session.tsx index 9187e63a..8f736fa2 100644 --- a/packages/react/src/hooks/use-checkout-session.tsx +++ b/packages/react/src/hooks/use-checkout-session.tsx @@ -181,8 +181,6 @@ export function useCheckoutSession(props?: CheckoutProps) { if (exchangeFailed && props?.session) { return { session: props.session, jwt: undefined, isLoading }; } - console.log('checkoutSessionLoading', checkoutSessionQuery.isLoading) - console.log('isLoading', isLoading) return { session: checkoutSessionQuery.data, diff --git a/packages/react/src/lib/godaddy/graphql-env.ts b/packages/react/src/lib/godaddy/graphql-env.ts index 1927698c..29e57ae1 100644 --- a/packages/react/src/lib/godaddy/graphql-env.ts +++ b/packages/react/src/lib/godaddy/graphql-env.ts @@ -1,5 +1,5 @@ /* eslint-disable */ -/* prettier-ignore */ +/* prettier-ignore */ /** An IntrospectionQuery representation of your schema. * @@ -23,10336 +23,10336 @@ * ``` */ const introspection = { - "__schema": { - "queryType": { - "name": "Query" + __schema: { + queryType: { + name: 'Query', }, - "mutationType": { - "name": "Mutation" + mutationType: { + name: 'Mutation', }, - "subscriptionType": null, - "types": [ + subscriptionType: null, + types: [ { - "kind": "OBJECT", - "name": "Address", - "fields": [ + kind: 'OBJECT', + name: 'Address', + fields: [ { - "name": "addressDetails", - "type": { - "kind": "OBJECT", - "name": "AddressDetails" + name: 'addressDetails', + type: { + kind: 'OBJECT', + name: 'AddressDetails', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "AddressDetails", - "fields": [ + kind: 'OBJECT', + name: 'AddressDetails', + fields: [ { - "name": "addressType", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressType', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "buildingName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'buildingName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "deliveryService", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'deliveryService', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "geoCoordinates", - "type": { - "kind": "OBJECT", - "name": "GeoCoordinates" + name: 'geoCoordinates', + type: { + kind: 'OBJECT', + name: 'GeoCoordinates', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "streetName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'streetName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "streetNumber", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'streetNumber', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "streetType", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'streetType', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "subBuilding", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'subBuilding', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "AddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'AddressInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'addressLine1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'adminArea1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "adminArea2", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'adminArea2', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "AdjustmentAmount", - "fields": [ + kind: 'OBJECT', + name: 'AdjustmentAmount', + fields: [ { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'amount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "AdjustmentPercentage", - "fields": [ + kind: 'OBJECT', + name: 'AdjustmentPercentage', + fields: [ { - "name": "maximumAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'maximumAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "percentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'percentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "UNION", - "name": "AdjustmentValue", - "possibleTypes": [ + kind: 'UNION', + name: 'AdjustmentValue', + possibleTypes: [ { - "kind": "OBJECT", - "name": "AdjustmentAmount" + kind: 'OBJECT', + name: 'AdjustmentAmount', }, { - "kind": "OBJECT", - "name": "AdjustmentPercentage" - } - ] + kind: 'OBJECT', + name: 'AdjustmentPercentage', + }, + ], }, { - "kind": "INPUT_OBJECT", - "name": "ApplyShippingMethodInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'ApplyShippingMethodInput', + inputFields: [ { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "subTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } + name: 'subTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, { - "name": "taxTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'taxTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "SCALAR", - "name": "Boolean" + kind: 'SCALAR', + name: 'Boolean', }, { - "kind": "OBJECT", - "name": "CSSVariables", - "fields": [ + kind: 'OBJECT', + name: 'CSSVariables', + fields: [ { - "name": "accent", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'accent', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "accentForeground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'accentForeground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "background", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'background', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "border", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'border', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "card", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'card', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "cardForeground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'cardForeground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "defaultFontFamily", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'defaultFontFamily', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "destructive", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'destructive', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "destructiveForeground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'destructiveForeground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "fontMono", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fontMono', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "fontSans", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fontSans', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "fontSerif", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fontSerif', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "foreground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'foreground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "input", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'input', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "muted", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'muted', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "mutedForeground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'mutedForeground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "popover", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'popover', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "popoverForeground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'popoverForeground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "primary", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'primary', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "primaryForeground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'primaryForeground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "radius", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'radius', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "ring", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'ring', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "secondary", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'secondary', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "secondaryBackground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'secondaryBackground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "secondaryForeground", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'secondaryForeground', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CSSVariablesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CSSVariablesInput', + inputFields: [ { - "name": "accent", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'accent', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "accentForeground", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'accentForeground', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "background", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'background', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "border", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'border', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "card", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'card', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "cardForeground", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'cardForeground', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "defaultFontFamily", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'defaultFontFamily', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "destructive", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'destructive', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "destructiveForeground", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'destructiveForeground', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "fontMono", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'fontMono', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "fontSans", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'fontSans', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "fontSerif", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'fontSerif', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "foreground", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'foreground', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "input", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'input', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "muted", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'muted', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "mutedForeground", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'mutedForeground', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "popover", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'popover', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "popoverForeground", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'popoverForeground', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "primary", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'primary', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "primaryForeground", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'primaryForeground', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "radius", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'radius', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "ring", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'ring', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "secondary", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'secondary', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "secondaryBackground", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'secondaryBackground', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "secondaryForeground", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'secondaryForeground', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "UNION", - "name": "CalculatedAdjustment", - "possibleTypes": [ + kind: 'UNION', + name: 'CalculatedAdjustment', + possibleTypes: [ { - "kind": "OBJECT", - "name": "CalculatedDiscount" + kind: 'OBJECT', + name: 'CalculatedDiscount', }, { - "kind": "OBJECT", - "name": "CalculatedFee" - } - ] + kind: 'OBJECT', + name: 'CalculatedFee', + }, + ], }, { - "kind": "OBJECT", - "name": "CalculatedAdjustmentOutput", - "fields": [ + kind: 'OBJECT', + name: 'CalculatedAdjustmentOutput', + fields: [ { - "name": "adjustment", - "type": { - "kind": "UNION", - "name": "CalculatedAdjustment" + name: 'adjustment', + type: { + kind: 'UNION', + name: 'CalculatedAdjustment', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'totalAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CalculatedDiscount", - "fields": [ + kind: 'OBJECT', + name: 'CalculatedDiscount', + fields: [ { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "ID" + name: 'id', + type: { + kind: 'SCALAR', + name: 'ID', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "UNION", - "name": "AdjustmentValue" + name: 'value', + type: { + kind: 'UNION', + name: 'AdjustmentValue', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CalculatedFee", - "fields": [ + kind: 'OBJECT', + name: 'CalculatedFee', + fields: [ { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "ID" + name: 'id', + type: { + kind: 'SCALAR', + name: 'ID', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "UNION", - "name": "AdjustmentValue" + name: 'value', + type: { + kind: 'UNION', + name: 'AdjustmentValue', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CalculatedLineOutput", - "fields": [ + kind: 'OBJECT', + name: 'CalculatedLineOutput', + fields: [ { - "name": "adjustments", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CalculatedAdjustmentOutput" - } - } + name: 'adjustments', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CalculatedAdjustmentOutput', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "calculationLine", - "type": { - "kind": "OBJECT", - "name": "CalculationLineOutput" + name: 'calculationLine', + type: { + kind: 'OBJECT', + name: 'CalculationLineOutput', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalDiscountAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'totalDiscountAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalFeeAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'totalFeeAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CalculationLineOutput", - "fields": [ + kind: 'OBJECT', + name: 'CalculationLineOutput', + fields: [ { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "type", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'type', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutAuthToken", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutAuthToken', + fields: [ { - "name": "expiresAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'expiresAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "expiresIn", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } + name: 'expiresIn', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "jwt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'jwt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSession", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSession', + fields: [ { - "name": "addresses", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Address" - } - } + name: 'addresses', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'Address', + }, + }, }, - "args": [ + args: [ { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressesInput" - } - } - } + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressesInput', + }, + }, + }, ], - "isDeprecated": false + isDeprecated: false, }, { - "name": "appearance", - "type": { - "kind": "OBJECT", - "name": "GoDaddyAppearance" + name: 'appearance', + type: { + kind: 'OBJECT', + name: 'GoDaddyAppearance', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "channelId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'channelId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'createdAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "defaultOperatingHours", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours" + name: 'defaultOperatingHours', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "draftOrder", - "type": { - "kind": "OBJECT", - "name": "DraftOrder" + name: 'draftOrder', + type: { + kind: 'OBJECT', + name: 'DraftOrder', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableAddressAutocomplete", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableAddressAutocomplete', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableBillingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableBillingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableLocalPickup", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableLocalPickup', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableNotesCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableNotesCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enablePaymentMethodCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enablePaymentMethodCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enablePhoneCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enablePhoneCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enablePromotionCodes", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enablePromotionCodes', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableShipping", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableShipping', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableShippingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableShippingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableSurcharge", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableSurcharge', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableTaxCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableTaxCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enableTips", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'enableTips', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enabledLocales", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'enabledLocales', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enabledPaymentProviders", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'enabledPaymentProviders', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "environment", - "type": { - "kind": "ENUM", - "name": "CheckoutSessionEnvironment" + name: 'environment', + type: { + kind: 'ENUM', + name: 'CheckoutSessionEnvironment', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "experimental_rules", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionExperimentalRules" + name: 'experimental_rules', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionExperimentalRules', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "expiresAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'expiresAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "lineItems", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "DraftOrderLineItem" - } - } + name: 'lineItems', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'DraftOrderLineItem', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "locations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionLocation" - } - } + name: 'locations', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionLocation', + }, + }, }, - "args": [], - "isDeprecated": false - }, - { - "name": "paymentMethods", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethods" + args: [], + isDeprecated: false, + }, + { + name: 'paymentMethods', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethods', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "returnUrl", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'returnUrl', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "shipping", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionShippingOptions" + name: 'shipping', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionShippingOptions', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "skus", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionSkusConnection" - } + name: 'skus', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionSkusConnection', + }, }, - "args": [ + args: [ { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'after', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'before', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Int" - } + name: 'first', + type: { + kind: 'SCALAR', + name: 'Int', + }, }, { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Int" - } - } + name: 'last', + type: { + kind: 'SCALAR', + name: 'Int', + }, + }, ], - "isDeprecated": false + isDeprecated: false, }, { - "name": "sourceApp", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'sourceApp', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "status", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "ENUM", - "name": "CheckoutSessionStatus" - } + name: 'status', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'ENUM', + name: 'CheckoutSessionStatus', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "storeId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'storeId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "storeName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'storeName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "successUrl", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'successUrl', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxes", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionTaxesOptions" + name: 'taxes', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionTaxesOptions', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "token", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'token', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "updatedAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'updatedAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "url", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'url', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionAddress", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionAddress', + fields: [ { - "name": "addressDetails", - "type": { - "kind": "OBJECT", - "name": "AddressDetails" + name: 'addressDetails', + type: { + kind: 'OBJECT', + name: 'AddressDetails', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressDetailsInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressDetailsInput', + inputFields: [ { - "name": "addressType", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressType', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "buildingName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'buildingName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "deliveryService", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'deliveryService', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "geoCoordinates", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionGeoCoordinatesInput" - } + name: 'geoCoordinates', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionGeoCoordinatesInput', + }, }, { - "name": "streetName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'streetName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "streetNumber", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'streetNumber', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "streetType", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'streetType', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "subBuilding", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'subBuilding', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressInput', + inputFields: [ { - "name": "addressDetails", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressDetailsInput" - } + name: 'addressDetails', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressDetailsInput', + }, }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressesInput', + inputFields: [ { - "name": "query", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'query', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculateTaxesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculateTaxesInput', + inputFields: [ { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput" - } + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + }, }, { - "name": "lines", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLineInput" - } - } - } - } + name: 'lines', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLineInput', + }, + }, + }, + }, }, { - "name": "origin", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput" - } - } + name: 'origin', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedLine", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedLine', + fields: [ { - "name": "calculationLine", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationLine" + name: 'calculationLine', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculationLine', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxAmounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionTaxAmount" - } - } + name: 'taxAmounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionTaxAmount', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalTaxAmount", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionTotalTaxAmount" + name: 'totalTaxAmount', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionTotalTaxAmount', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedRate", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedRate', + fields: [ { - "name": "calculationMethod", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'calculationMethod', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedRateValue" + name: 'value', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedRateValue', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedRateValue", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedRateValue', + fields: [ { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "appliedAmount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'appliedAmount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "appliedPercentage", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'appliedPercentage', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "percentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'percentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationAddressInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationLine", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculationLine', + fields: [ { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLineInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLineInput', + inputFields: [ { - "name": "classification", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'classification', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput" - } + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + }, }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "origin", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput" - } + name: 'origin', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + }, }, { - "name": "quantity", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } - } + name: 'quantity', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, + }, }, { - "name": "subtotalPrice", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'subtotalPrice', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, }, { - "name": "type", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'type', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "unitPrice", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'unitPrice', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationLocationInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationLocationInput', + inputFields: [ { - "name": "address", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionCalculationAddressInput" - } - } - } + name: 'address', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionCalculationAddressInput', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationResult", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionCalculationResult', + fields: [ { - "name": "lines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedLine" - } - } + name: 'lines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedLine', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxAmounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionTaxAmount" - } - } + name: 'taxAmounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionTaxAmount', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalTaxAmount", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionTotalTaxAmount" + name: 'totalTaxAmount', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionTotalTaxAmount', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + fields: [ { - "name": "closeTime", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'closeTime', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "openTime", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'openTime', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + inputFields: [ { - "name": "closeTime", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'closeTime', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, }, { - "name": "openTime", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'openTime', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "ENUM", - "name": "CheckoutSessionEnvironment", - "enumValues": [ + kind: 'ENUM', + name: 'CheckoutSessionEnvironment', + enumValues: [ { - "name": "dev", - "isDeprecated": false + name: 'dev', + isDeprecated: false, }, { - "name": "ote", - "isDeprecated": false + name: 'ote', + isDeprecated: false, }, { - "name": "prod", - "isDeprecated": false + name: 'prod', + isDeprecated: false, }, { - "name": "test", - "isDeprecated": false - } - ] + name: 'test', + isDeprecated: false, + }, + ], }, { - "kind": "OBJECT", - "name": "CheckoutSessionExperimentalRules", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionExperimentalRules', + fields: [ { - "name": "freeShipping", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionFreeShippingRule" + name: 'freeShipping', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionFreeShippingRule', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "localDelivery", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionLocalDeliveryRule" + name: 'localDelivery', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionLocalDeliveryRule', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionExperimentalRulesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionExperimentalRulesInput', + inputFields: [ { - "name": "freeShipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionFreeShippingRuleInput" - } - } + name: 'freeShipping', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionFreeShippingRuleInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionFreeShippingRule", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionFreeShippingRule', + fields: [ { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "minimumOrderTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } + name: 'minimumOrderTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionFreeShippingRuleInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionFreeShippingRuleInput', + inputFields: [ { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, }, { - "name": "minimumOrderTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - } - } + name: 'minimumOrderTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionGeoCoordinatesInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionGeoCoordinatesInput', + inputFields: [ { - "name": "latitude", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } - } + name: 'latitude', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, + }, }, { - "name": "longitude", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLineItemInput", - "inputFields": [ - { - "name": "quantity", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - } + name: 'longitude', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, + }, }, - { - "name": "skuId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionLocalDeliveryRule", - "fields": [ - { - "name": "enabled", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "minimumOrderTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionLocation", - "fields": [ - { - "name": "address", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionAddress" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - }, - "args": [], - "isDeprecated": false - }, + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLineItemInput', + inputFields: [ { - "name": "isDefault", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'quantity', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "operatingHours", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours" - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLocationInput", - "inputFields": [ - { - "name": "address", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressInput" - } - } - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "isDefault", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionOperatingHoursMap", - "fields": [ - { - "name": "default", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "locations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours" - } - } - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionOperatingHoursMapInput", - "inputFields": [ - { - "name": "default", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionStoreHoursInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig", - "fields": [ - { - "name": "checkoutTypes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "processor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'skuId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput", - "inputFields": [ + kind: 'OBJECT', + name: 'CheckoutSessionLocalDeliveryRule', + fields: [ { - "name": "checkoutTypes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - } + name: 'enabled', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "processor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'minimumOrderTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethods", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionLocation', + fields: [ { - "name": "applePay", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'address', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionAddress', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "card", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "express", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'isDefault', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "googlePay", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'operatingHours', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLocationInput', + inputFields: [ { - "name": "offline", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'address', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "paypal", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "paze", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionPaymentMethodConfig" + name: 'isDefault', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodsInput", - "inputFields": [ - { - "name": "applePay", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - }, + kind: 'OBJECT', + name: 'CheckoutSessionOperatingHoursMap', + fields: [ { - "name": "card", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - }, - { - "name": "express", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - }, - { - "name": "googlePay", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - }, - { - "name": "offline", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } + name: 'default', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', + }, + args: [], + isDeprecated: false, }, { - "name": "paypal", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } + name: 'locations', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', + }, + }, + }, + args: [], + isDeprecated: false, }, - { - "name": "paze", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodConfigInput" - } - } ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionShippingOptions", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionOperatingHoursMapInput', + inputFields: [ { - "name": "fulfillmentLocationId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'default', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionStoreHoursInput', + }, }, - "args": [], - "isDeprecated": false }, - { - "name": "originAddress", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionAddress" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionShippingOptionsInput", - "inputFields": [ + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + fields: [ { - "name": "fulfillmentLocationId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'checkoutTypes', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "originAddress", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressInput" - } - } + name: 'processor', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionSkusConnection", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + inputFields: [ { - "name": "edges", - "type": { - "kind": "LIST", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionSkusConnectionEdge" - } + name: 'checkoutTypes', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo" - } + name: 'processor', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionSkusConnectionEdge", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethods', + fields: [ { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'applePay', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "node", - "type": { - "kind": "OBJECT", - "name": "SKU" + name: 'card', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "ENUM", - "name": "CheckoutSessionStatus", - "enumValues": [ + args: [], + isDeprecated: false, + }, { - "name": "ACTIVE", - "isDeprecated": false + name: 'express', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + }, + args: [], + isDeprecated: false, }, { - "name": "CANCELLED", - "isDeprecated": false + name: 'googlePay', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + }, + args: [], + isDeprecated: false, }, { - "name": "COMPLETED", - "isDeprecated": false + name: 'offline', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + }, + args: [], + isDeprecated: false, }, { - "name": "CREATED", - "isDeprecated": false + name: 'paypal', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + }, + args: [], + isDeprecated: false, }, { - "name": "EXPIRED", - "isDeprecated": false - } - ] + name: 'paze', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionPaymentMethodConfig', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionStoreHours", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodsInput', + inputFields: [ { - "name": "hours", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CheckoutSessionWeekHours" - } + name: 'applePay', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', }, - "args": [], - "isDeprecated": false }, { - "name": "leadTime", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } + name: 'card', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', }, - "args": [], - "isDeprecated": false }, { - "name": "pickupWindowInDays", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } + name: 'express', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', }, - "args": [], - "isDeprecated": false }, { - "name": "timeZone", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'googlePay', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionStoreHoursInput", - "inputFields": [ - { - "name": "hours", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionWeekHoursInput" - } - } }, { - "name": "leadTime", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - } + name: 'offline', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + }, }, { - "name": "pickupWindowInDays", - "type": { - "kind": "SCALAR", - "name": "Int" - } + name: 'paypal', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + }, }, { - "name": "timeZone", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'paze', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodConfigInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionTaxAmount", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionShippingOptions', + fields: [ { - "name": "rate", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculatedRate" + name: 'fulfillmentLocationId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalTaxAmount", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionTotalTaxAmount" + name: 'originAddress', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionAddress', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionTaxesOptions", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionShippingOptionsInput', + inputFields: [ { - "name": "originAddress", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionAddress" + name: 'fulfillmentLocationId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionTaxesOptionsInput", - "inputFields": [ + }, { - "name": "originAddress", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionAddressInput" - } - } + name: 'originAddress', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "CheckoutSessionTotalTaxAmount", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionSkusConnection', + fields: [ { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'edges', + type: { + kind: 'LIST', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionSkusConnectionEdge', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'pageInfo', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'PageInfo', + }, }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutSessionWeekHours", - "fields": [ + kind: 'OBJECT', + name: 'CheckoutSessionSkusConnectionEdge', + fields: [ { - "name": "friday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'cursor', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "monday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'node', + type: { + kind: 'OBJECT', + name: 'SKU', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'ENUM', + name: 'CheckoutSessionStatus', + enumValues: [ { - "name": "saturday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" - }, - "args": [], - "isDeprecated": false + name: 'ACTIVE', + isDeprecated: false, }, { - "name": "sunday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" - }, - "args": [], - "isDeprecated": false + name: 'CANCELLED', + isDeprecated: false, }, { - "name": "thursday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'COMPLETED', + isDeprecated: false, + }, + { + name: 'CREATED', + isDeprecated: false, + }, + { + name: 'EXPIRED', + isDeprecated: false, + }, + ], + }, + { + kind: 'OBJECT', + name: 'CheckoutSessionStoreHours', + fields: [ + { + name: 'hours', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CheckoutSessionWeekHours', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'leadTime', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "tuesday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'pickupWindowInDays', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "wednesday", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionDayHours" + name: 'timeZone', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionWeekHoursInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionStoreHoursInput', + inputFields: [ { - "name": "friday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'hours', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionWeekHoursInput', + }, + }, }, { - "name": "monday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'leadTime', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, }, { - "name": "saturday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'pickupWindowInDays', + type: { + kind: 'SCALAR', + name: 'Int', + }, }, { - "name": "sunday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'timeZone', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'CheckoutSessionTaxAmount', + fields: [ { - "name": "thursday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'rate', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculatedRate', + }, + args: [], + isDeprecated: false, }, { - "name": "tuesday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } + name: 'totalTaxAmount', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionTotalTaxAmount', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'CheckoutSessionTaxesOptions', + fields: [ { - "name": "wednesday", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionDayHoursInput" - } - } + name: 'originAddress', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionAddress', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "CheckoutTokenValidation", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionTaxesOptionsInput', + inputFields: [ { - "name": "expiresAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" + name: 'originAddress', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionAddressInput', }, - "args": [], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'CheckoutSessionTotalTaxAmount', + fields: [ { - "name": "sessionId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "valid", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'value', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutBillingInfoInput", - "inputFields": [ + kind: 'OBJECT', + name: 'CheckoutSessionWeekHours', + fields: [ + { + name: 'friday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + }, + args: [], + isDeprecated: false, + }, { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutDestinationAddressInput" - } + name: 'monday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + }, + args: [], + isDeprecated: false, }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'saturday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + }, + args: [], + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'sunday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + }, + args: [], + isDeprecated: false, }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'thursday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + }, + args: [], + isDeprecated: false, }, { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'tuesday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + }, + args: [], + isDeprecated: false, }, { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'wednesday', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionDayHours', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutDestinationAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionWeekHoursInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'friday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + }, + }, + { + name: 'monday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'saturday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'sunday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + }, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'thursday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'tuesday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'wednesday', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionDayHoursInput', + }, }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'CheckoutTokenValidation', + fields: [ { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'expiresAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + args: [], + isDeprecated: false, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'sessionId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'valid', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingInfoInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutBillingInfoInput', + inputFields: [ { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutDestinationAddressInput" - } + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutDestinationAddressInput', + }, }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, }, - { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + { + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, - { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingLineInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutDestinationAddressInput', + inputFields: [ + { + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutTaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingLineTotalsInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingLineTotalsInput", - "inputFields": [ - { - "name": "subTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "taxTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutTaxInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "ContactInput", - "inputFields": [ - { - "name": "address", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DraftOrderAddressInput" - } - } - }, - { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "firstName", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "lastName", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "CreateDraftLineItemInput", - "inputFields": [ - { - "name": "details", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputDetailsInfo" - } - }, - { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DiscountInput" - } - } - } - }, - { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "FeeInput" - } - } - } - }, - { - "name": "fulfillmentChannelId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fulfillmentMode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "ENUM", - "name": "LineItemModeInput" - } - } - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - }, - "defaultValue": "[]" - }, - { - "name": "productId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "quantity", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } - } - }, - { - "name": "serviceEndsAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "serviceStartAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputShippingInfo" - } - }, + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, { - "name": "skuId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxInput" - } - } - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "totals", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "LineItemTotalsInput" - } - } - }, + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, { - "name": "type", - "type": { - "kind": "ENUM", - "name": "LineItemTypesInput" + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "defaultValue": "PHYSICAL" }, { - "name": "unitAmount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, ], - "isOneOf": false - }, - { - "kind": "SCALAR", - "name": "DateTime" + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "DestinationAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingInfoInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutDestinationAddressInput', + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, }, - { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + { + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, - { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + { + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "DiscountInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingLineInput', + inputFields: [ { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "defaultValue": "false" }, { - "name": "code", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutTaxInput', + }, + }, + }, }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "DraftOrder", - "fields": [ - { - "name": "billing", - "type": { - "kind": "OBJECT", - "name": "DraftOrderContact" + name: 'totals', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingLineTotalsInput', + }, }, - "args": [], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingLineTotalsInput', + inputFields: [ { - "name": "calculatedAdjustments", - "type": { - "kind": "OBJECT", - "name": "PriceAdjustmentsCalculationResult" + name: 'subTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [ - { - "name": "discountCodes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + }, + { + name: 'taxTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', }, - { - "name": "shippingLines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "PriceAdjustmentShippingLineInput" - } - } - } - } - ], - "isDeprecated": false + }, }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutTaxInput', + inputFields: [ { - "name": "calculatedShippingRates", - "type": { - "kind": "OBJECT", - "name": "ShippingRateCalculationResult" + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [ - { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "DestinationAddressInput" - } - } - ], - "isDeprecated": false }, { - "name": "calculatedTaxes", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationResult" + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [ - { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput" - } - }, - { - "name": "lines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxLineInput" - } - } - } - } - ], - "isDeprecated": false }, { - "name": "cartId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false }, { - "name": "context", - "type": { - "kind": "OBJECT", - "name": "DraftOrderContext" + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "createdAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'ContactInput', + inputFields: [ { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'address', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'DraftOrderAddressInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemDiscount" - } - } + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemFee" - } - } + name: 'firstName', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "fulfillmentModes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'lastName', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "ID" + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'CreateDraftLineItemInput', + inputFields: [ { - "name": "lineItems", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "DraftOrderLineItem" - } - } + name: 'details', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputDetailsInfo', }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'DiscountInput', + }, + }, }, - "args": [], - "isDeprecated": false - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemNote" - } - } - }, - "args": [], - "isDeprecated": false }, { - "name": "number", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "numberDisplay", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'FeeInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "shipping", - "type": { - "kind": "OBJECT", - "name": "DraftOrderContact" + name: 'fulfillmentChannelId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "shippingLines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "ShippingLine" - } - } + name: 'fulfillmentMode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'ENUM', + name: 'LineItemModeInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "statuses", - "type": { - "kind": "OBJECT", - "name": "DraftOrderStatuses" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "taxExempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemTax" - } - } + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, }, - "args": [], - "isDeprecated": false + defaultValue: '[]', }, { - "name": "totals", - "type": { - "kind": "OBJECT", - "name": "DraftOrderTotals" + name: 'productId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "updatedAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" + name: 'quantity', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "DraftOrderAddress", - "fields": [ + }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'serviceEndsAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'serviceStartAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputShippingInfo', }, - "args": [], - "isDeprecated": false }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'skuId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'totals', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'LineItemTotalsInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'type', + type: { + kind: 'ENUM', + name: 'LineItemTypesInput', }, - "args": [], - "isDeprecated": false + defaultValue: 'PHYSICAL', }, { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'unitAmount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, + }, + { + kind: 'SCALAR', + name: 'DateTime', }, { - "kind": "INPUT_OBJECT", - "name": "DraftOrderAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'DestinationAddressInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "OBJECT", - "name": "DraftOrderContact", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'DiscountInput', + inputFields: [ { - "name": "address", - "type": { - "kind": "OBJECT", - "name": "DraftOrderAddress" + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + defaultValue: 'false', }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'code', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "DraftOrderContext", - "fields": [ - { - "name": "channelId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "owner", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "storeId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "DraftOrderLineItem", - "fields": [ + kind: 'OBJECT', + name: 'DraftOrder', + fields: [ { - "name": "createdAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'billing', + type: { + kind: 'OBJECT', + name: 'DraftOrderContact', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "details", - "type": { - "kind": "OBJECT", - "name": "LineItemDetails" + name: 'calculatedAdjustments', + type: { + kind: 'OBJECT', + name: 'PriceAdjustmentsCalculationResult', }, - "args": [], - "isDeprecated": false + args: [ + { + name: 'discountCodes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'shippingLines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'PriceAdjustmentShippingLineInput', + }, + }, + }, + }, + ], + isDeprecated: false, }, { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemDiscount" - } - } + name: 'calculatedShippingRates', + type: { + kind: 'OBJECT', + name: 'ShippingRateCalculationResult', }, - "args": [], - "isDeprecated": false + args: [ + { + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'DestinationAddressInput', + }, + }, + ], + isDeprecated: false, }, { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'calculatedTaxes', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculationResult', }, - "args": [], - "isDeprecated": false + args: [ + { + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', + }, + }, + { + name: 'lines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxLineInput', + }, + }, + }, + }, + ], + isDeprecated: false, }, { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemFee" - } - } + name: 'cartId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "fulfilledAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'context', + type: { + kind: 'OBJECT', + name: 'DraftOrderContext', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "fulfillmentChannelId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'createdAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": true + args: [], + isDeprecated: false, }, { - "name": "fulfillmentMode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemDiscount', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemFee', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemNote" - } - } + name: 'fulfillmentModes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "orderVersion", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'SCALAR', + name: 'ID', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "productId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'lineItems', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'DraftOrderLineItem', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "quantity", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "returnQuantity", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemNote', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "returnTotals", - "type": { - "kind": "OBJECT", - "name": "LineItemReturnTotals" + name: 'number', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "returnedAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'numberDisplay', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "serviceEndsAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'shipping', + type: { + kind: 'OBJECT', + name: 'DraftOrderContact', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "serviceStartAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'shippingLines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'ShippingLine', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "shipping", - "type": { - "kind": "OBJECT", - "name": "DraftOrderContact" + name: 'statuses', + type: { + kind: 'OBJECT', + name: 'DraftOrderStatuses', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "skuId", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "status", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'taxExempted', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemTax', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemTax" - } - } + name: 'totals', + type: { + kind: 'OBJECT', + name: 'DraftOrderTotals', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totals", - "type": { - "kind": "OBJECT", - "name": "LineItemTotals" + name: 'updatedAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'DraftOrderAddress', + fields: [ { - "name": "type", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "unitAmount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "updatedAt", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "DraftOrderLineItemInput", - "inputFields": [ - { - "name": "details", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputDetailsInfo" - } + args: [], + isDeprecated: false, }, { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DiscountInput" - } - } - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "FeeInput" - } - } - } + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "fulfillmentMode", - "type": { - "kind": "ENUM", - "name": "LineItemModeInput" - } + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - }, - "defaultValue": "[]" - }, - { - "name": "productId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "quantity", - "type": { - "kind": "SCALAR", - "name": "Float" - } - }, - { - "name": "serviceEndsAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "serviceStartAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputShippingInfo" - } + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'DraftOrderAddressInput', + inputFields: [ { - "name": "skuId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'addressLine1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxInput" - } - } - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemTotalsInput" - } + name: 'adminArea1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "type", - "type": { - "kind": "ENUM", - "name": "LineItemTypesInput" + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "PHYSICAL" }, { - "name": "unitAmount", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "DraftOrderStatuses", - "fields": [ + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, { - "name": "fulfillmentStatus", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "paymentStatus", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "status", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "DraftOrderTotals", - "fields": [ + kind: 'OBJECT', + name: 'DraftOrderContact', + fields: [ { - "name": "discountTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'address', + type: { + kind: 'OBJECT', + name: 'DraftOrderAddress', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "feeTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "shippingTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "subTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "taxTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "total", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "ExchangeCheckoutTokenInput", - "inputFields": [ + kind: 'OBJECT', + name: 'DraftOrderContext', + fields: [ + { + name: 'channelId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'owner', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "token", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'storeId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput", - "inputFields": [ + kind: 'OBJECT', + name: 'DraftOrderLineItem', + fields: [ { - "name": "type", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'createdAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "FeeInput", - "inputFields": [ + name: 'details', + type: { + kind: 'OBJECT', + name: 'LineItemDetails', + }, + args: [], + isDeprecated: false, + }, { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemDiscount', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "false" + args: [], + isDeprecated: false, }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemFee', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'fulfilledAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'fulfillmentChannelId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: true, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "SCALAR", - "name": "Float" - }, - { - "kind": "ENUM", - "name": "FulfillmentModeInput", - "enumValues": [ - { - "name": "CURBSIDE", - "isDeprecated": false + name: 'fulfillmentMode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "DELIVERY", - "isDeprecated": false + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "DIGITAL", - "isDeprecated": false + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "DRIVE_THRU", - "isDeprecated": false + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "FOR_HERE", - "isDeprecated": false + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemNote', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "GENERAL_CONTAINER", - "isDeprecated": false + name: 'orderVersion', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "GIFT_CARD", - "isDeprecated": false + name: 'productId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "NONE", - "isDeprecated": false + name: 'quantity', + type: { + kind: 'SCALAR', + name: 'Float', + }, + args: [], + isDeprecated: false, }, { - "name": "NON_LODGING_NRR", - "isDeprecated": false + name: 'returnQuantity', + type: { + kind: 'SCALAR', + name: 'Float', + }, + args: [], + isDeprecated: false, }, { - "name": "NON_LODGING_SALE", - "isDeprecated": false + name: 'returnTotals', + type: { + kind: 'OBJECT', + name: 'LineItemReturnTotals', + }, + args: [], + isDeprecated: false, }, { - "name": "PICKUP", - "isDeprecated": false + name: 'returnedAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "PURCHASE", - "isDeprecated": false + name: 'serviceEndsAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "QUICK_STAY", - "isDeprecated": false + name: 'serviceStartAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "REGULAR_STAY", - "isDeprecated": false + name: 'shipping', + type: { + kind: 'OBJECT', + name: 'DraftOrderContact', + }, + args: [], + isDeprecated: false, }, { - "name": "SHIP", - "isDeprecated": false + name: 'skuId', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "TO_GO", - "isDeprecated": false - } - ] - }, - { - "kind": "OBJECT", - "name": "GeoCoordinates", - "fields": [ + name: 'status', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, { - "name": "latitude", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "longitude", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemTax', + }, + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "GoDaddyAppearance", - "fields": [ + args: [], + isDeprecated: false, + }, { - "name": "theme", - "type": { - "kind": "ENUM", - "name": "GoDaddyTheme" + name: 'totals', + type: { + kind: 'OBJECT', + name: 'LineItemTotals', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "variables", - "type": { - "kind": "OBJECT", - "name": "CSSVariables" + name: 'type', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "GoDaddyAppearanceInput", - "inputFields": [ + args: [], + isDeprecated: false, + }, { - "name": "theme", - "type": { - "kind": "ENUM", - "name": "GoDaddyTheme" - } + name: 'unitAmount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "variables", - "type": { - "kind": "INPUT_OBJECT", - "name": "CSSVariablesInput" - } - } + name: 'updatedAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "ENUM", - "name": "GoDaddyTheme", - "enumValues": [ + kind: 'INPUT_OBJECT', + name: 'DraftOrderLineItemInput', + inputFields: [ { - "name": "base", - "isDeprecated": false + name: 'details', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputDetailsInfo', + }, }, { - "name": "orange", - "isDeprecated": false + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'DiscountInput', + }, + }, + }, }, { - "name": "purple", - "isDeprecated": false - } - ] - }, - { - "kind": "SCALAR", - "name": "ID" - }, - { - "kind": "SCALAR", - "name": "Int" - }, - { - "kind": "OBJECT", - "name": "LineItemDetails", - "fields": [ - { - "name": "productAssetUrl", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "selectedAddons", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SelectedAddon" - } - } + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'FeeInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "selectedOptions", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SelectedOption" - } - } + name: 'fulfillmentMode', + type: { + kind: 'ENUM', + name: 'LineItemModeInput', }, - "args": [], - "isDeprecated": false }, { - "name": "sku", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "unitOfMeasure", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "LineItemDiscount", - "fields": [ + }, { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, }, - "args": [], - "isDeprecated": false + defaultValue: '[]', }, { - "name": "code", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'productId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'quantity', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'serviceEndsAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'serviceStartAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputShippingInfo', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "LineItemFee", - "fields": [ + }, { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'skuId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemTotalsInput', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'type', + type: { + kind: 'ENUM', + name: 'LineItemTypesInput', }, - "args": [], - "isDeprecated": false + defaultValue: 'PHYSICAL', }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'unitAmount', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "LineItemInputDetailsInfo", - "inputFields": [ - { - "name": "productAssetUrl", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + kind: 'OBJECT', + name: 'DraftOrderStatuses', + fields: [ { - "name": "selectedAddons", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "SelectedAddonInput" - } - } - } + name: 'fulfillmentStatus', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "selectedOptions", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "SelectedOptionInput" - } - } - } + name: 'paymentStatus', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "sku", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'status', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, - { - "name": "unitOfMeasure", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "LineItemInputShippingInfo", - "inputFields": [ + kind: 'OBJECT', + name: 'DraftOrderTotals', + fields: [ { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderAddressInput" - } + name: 'discountTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'feeTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'shippingTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'subTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'taxTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'total', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "ENUM", - "name": "LineItemModeInput", - "enumValues": [ + kind: 'INPUT_OBJECT', + name: 'ExchangeCheckoutTokenInput', + inputFields: [ { - "name": "CURBSIDE", - "isDeprecated": false + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "DELIVERY", - "isDeprecated": false + name: 'token', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + inputFields: [ { - "name": "DIGITAL", - "isDeprecated": false + name: 'type', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "DRIVE_THRU", - "isDeprecated": false + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'FeeInput', + inputFields: [ { - "name": "FOR_HERE", - "isDeprecated": false + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, }, { - "name": "GENERAL_CONTAINER", - "isDeprecated": false + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "GIFT_CARD", - "isDeprecated": false + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "NONE", - "isDeprecated": false + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "NON_LODGING_NRR", - "isDeprecated": false + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "NON_LODGING_SALE", - "isDeprecated": false + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, }, + ], + isOneOf: false, + }, + { + kind: 'SCALAR', + name: 'Float', + }, + { + kind: 'ENUM', + name: 'FulfillmentModeInput', + enumValues: [ { - "name": "PICKUP", - "isDeprecated": false + name: 'CURBSIDE', + isDeprecated: false, }, { - "name": "PURCHASE", - "isDeprecated": false + name: 'DELIVERY', + isDeprecated: false, }, { - "name": "QUICK_STAY", - "isDeprecated": false + name: 'DIGITAL', + isDeprecated: false, }, { - "name": "REGULAR_STAY", - "isDeprecated": false + name: 'DRIVE_THRU', + isDeprecated: false, }, { - "name": "SHIP", - "isDeprecated": false + name: 'FOR_HERE', + isDeprecated: false, }, { - "name": "TO_GO", - "isDeprecated": false - } - ] - }, - { - "kind": "OBJECT", - "name": "LineItemNote", - "fields": [ - { - "name": "author", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false + name: 'GENERAL_CONTAINER', + isDeprecated: false, }, { - "name": "authorType", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false + name: 'GIFT_CARD', + isDeprecated: false, }, { - "name": "content", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false + name: 'NONE', + isDeprecated: false, }, { - "name": "createdAt", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false + name: 'NON_LODGING_NRR', + isDeprecated: false, }, { - "name": "deletedAt", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false + name: 'NON_LODGING_SALE', + isDeprecated: false, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false + name: 'PICKUP', + isDeprecated: false, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } - }, - "args": [], - "isDeprecated": false + name: 'PURCHASE', + isDeprecated: false, }, { - "name": "shouldNotifyCustomer", - "type": { - "kind": "SCALAR", - "name": "Boolean" - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "LineItemReturnTotals", - "fields": [ - { - "name": "discountTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" - }, - "args": [], - "isDeprecated": false + name: 'QUICK_STAY', + isDeprecated: false, }, { - "name": "feeTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" - }, - "args": [], - "isDeprecated": false + name: 'REGULAR_STAY', + isDeprecated: false, }, { - "name": "subTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" - }, - "args": [], - "isDeprecated": false + name: 'SHIP', + isDeprecated: false, }, { - "name": "taxTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" - }, - "args": [], - "isDeprecated": false + name: 'TO_GO', + isDeprecated: false, }, - { - "name": "total", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] }, { - "kind": "OBJECT", - "name": "LineItemTax", - "fields": [ + kind: 'OBJECT', + name: 'GeoCoordinates', + fields: [ { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'latitude', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'longitude', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'GoDaddyAppearance', + fields: [ { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'theme', + type: { + kind: 'ENUM', + name: 'GoDaddyTheme', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'variables', + type: { + kind: 'OBJECT', + name: 'CSSVariables', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "LineItemTotals", - "fields": [ - { - "name": "discountTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" - }, - "args": [], - "isDeprecated": false - }, + kind: 'INPUT_OBJECT', + name: 'GoDaddyAppearanceInput', + inputFields: [ { - "name": "feeTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'theme', + type: { + kind: 'ENUM', + name: 'GoDaddyTheme', }, - "args": [], - "isDeprecated": false }, { - "name": "subTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'variables', + type: { + kind: 'INPUT_OBJECT', + name: 'CSSVariablesInput', }, - "args": [], - "isDeprecated": false }, - { - "name": "taxTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "LineItemTotalsInput", - "inputFields": [ + kind: 'ENUM', + name: 'GoDaddyTheme', + enumValues: [ { - "name": "discountTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'base', + isDeprecated: false, }, { - "name": "feeTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'orange', + isDeprecated: false, }, { - "name": "subTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'purple', + isDeprecated: false, }, - { - "name": "taxTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } ], - "isOneOf": false }, { - "kind": "ENUM", - "name": "LineItemTypesInput", - "enumValues": [ - { - "name": "ALL", - "isDeprecated": false - }, + kind: 'SCALAR', + name: 'ID', + }, + { + kind: 'SCALAR', + name: 'Int', + }, + { + kind: 'OBJECT', + name: 'LineItemDetails', + fields: [ { - "name": "DIGITAL", - "isDeprecated": false + name: 'productAssetUrl', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "PAY_LINK", - "isDeprecated": false + name: 'selectedAddons', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SelectedAddon', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "PHYSICAL", - "isDeprecated": false + name: 'selectedOptions', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SelectedOption', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "SERVICE", - "isDeprecated": false + name: 'sku', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "STAY", - "isDeprecated": false - } - ] - }, - { - "kind": "ENUM", - "name": "MetafieldTypeInput", - "enumValues": [ - { - "name": "JSON", - "isDeprecated": false - } - ] - }, - { - "kind": "INPUT_OBJECT", - "name": "MoneyInput", - "inputFields": [ - { - "name": "currencyCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'unitOfMeasure', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, - { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Int" - } - } - } ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "MoneyValue", - "fields": [ + kind: 'OBJECT', + name: 'LineItemDiscount', + fields: [ { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Int" + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "Mutation", - "fields": [ + args: [], + isDeprecated: false, + }, { - "name": "applyCheckoutSessionDeliveryMethod", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'code', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionDeliveryMethodInput" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "applyCheckoutSessionDiscount", - "type": { - "kind": "OBJECT", - "name": "DraftOrder" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionDiscountInput" - } - } + args: [], + isDeprecated: false, + }, + { + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, }, - { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isDeprecated": false + }, + args: [], + isDeprecated: false, }, { - "name": "applyCheckoutSessionFulfillmentLocation", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionFulfillmentLocationInput" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "applyCheckoutSessionShippingMethod", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ApplyShippingMethodInput" - } - } - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'LineItemFee', + fields: [ { - "name": "calculateCheckoutSessionTaxes", - "type": { - "kind": "OBJECT", - "name": "CheckoutSessionCalculationResult" + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "args": [ - { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput" - } - }, - { - "name": "lines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxLineInput" - } - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "confirmCheckoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationConfirmCheckoutSessionInput" - } - } - }, - { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "createCheckoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationCreateCheckoutSessionInput" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "exchangeCheckoutToken", - "type": { - "kind": "OBJECT", - "name": "CheckoutAuthToken" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationExchangeCheckoutTokenInput" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "expireCheckoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "refreshCheckoutToken", - "type": { - "kind": "OBJECT", - "name": "CheckoutAuthToken" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'LineItemInputDetailsInfo', + inputFields: [ { - "name": "removeAppliedCheckoutSessionShippingMethod", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'productAssetUrl', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "RemoveShippingMethodInput" - } - } - } - ], - "isDeprecated": false }, { - "name": "updateCheckoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'selectedAddons', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'SelectedAddonInput', + }, + }, }, - "args": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + }, + { + name: 'selectedOptions', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'SelectedOptionInput', + }, }, - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationUpdateCheckoutSessionInput" - } - } - } - ], - "isDeprecated": false + }, }, { - "name": "updateCheckoutSessionDraftOrder", - "type": { - "kind": "OBJECT", - "name": "DraftOrder" + name: 'sku', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationUpdateCheckoutSessionDraftOrderInput" - } - } - } - ], - "isDeprecated": false }, { - "name": "verifyAddress", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "Address" - } - } + name: 'unitOfMeasure', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "input", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MutationVerifyAddressInput" - } - } - } - ], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionDeliveryMethodInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'LineItemInputShippingInfo', + inputFields: [ { - "name": "mode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "ENUM", - "name": "FulfillmentModeInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionDiscountInput", - "inputFields": [ - { - "name": "discountCodes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationApplyCheckoutSessionFulfillmentLocationInput", - "inputFields": [ - { - "name": "fulfillmentLocationId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationConfirmCheckoutSessionInput", - "inputFields": [ - { - "name": "billing", - "type": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutBillingInfoInput" - } + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderAddressInput', + }, }, { - "name": "fulfillmentEndAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "fulfillmentLocationId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fulfillmentStartAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "paymentProcessor", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "paymentProvider", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "paymentToken", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "paymentType", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingInfoInput" - } + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "shippingLines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ConfirmCheckoutShippingLineInput" - } - } - } + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "shippingTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, }, - { - "name": "taxTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "MutationCreateCheckoutSessionInput", - "inputFields": [ + kind: 'ENUM', + name: 'LineItemModeInput', + enumValues: [ { - "name": "appearance", - "type": { - "kind": "INPUT_OBJECT", - "name": "GoDaddyAppearanceInput" - } + name: 'CURBSIDE', + isDeprecated: false, }, { - "name": "channelId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'DELIVERY', + isDeprecated: false, }, { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'DIGITAL', + isDeprecated: false, }, { - "name": "draftOrderId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'DRIVE_THRU', + isDeprecated: false, }, { - "name": "enableAddressAutocomplete", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'FOR_HERE', + isDeprecated: false, }, { - "name": "enableBillingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'GENERAL_CONTAINER', + isDeprecated: false, }, { - "name": "enableLocalPickup", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'GIFT_CARD', + isDeprecated: false, }, { - "name": "enableNotesCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'NONE', + isDeprecated: false, }, { - "name": "enablePaymentMethodCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'NON_LODGING_NRR', + isDeprecated: false, }, { - "name": "enablePhoneCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'NON_LODGING_SALE', + isDeprecated: false, }, { - "name": "enablePromotionCodes", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'PICKUP', + isDeprecated: false, }, { - "name": "enableShipping", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableShippingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'PURCHASE', + isDeprecated: false, }, { - "name": "enableSurcharge", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableTaxCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableTips", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'QUICK_STAY', + isDeprecated: false, }, { - "name": "enabledLocales", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'REGULAR_STAY', + isDeprecated: false, }, { - "name": "enabledPaymentProviders", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "environment", - "type": { - "kind": "ENUM", - "name": "CheckoutSessionEnvironment" - } - }, - { - "name": "experimental_rules", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionExperimentalRulesInput" - } - }, - { - "name": "expiresAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "lineItems", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLineItemInput" - } - } - } - }, - { - "name": "locations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLocationInput" - } - } - } - }, - { - "name": "operatingHours", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionOperatingHoursMapInput" - } - }, - { - "name": "paymentMethods", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodsInput" - } - }, - { - "name": "returnUrl", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionShippingOptionsInput" - } - }, - { - "name": "sourceApp", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "storeId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "storeName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "successUrl", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "taxes", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionTaxesOptionsInput" - } - }, - { - "name": "url", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationExchangeCheckoutTokenInput", - "inputFields": [ - { - "name": "sessionId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "token", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationUpdateCheckoutSessionDraftOrderInput", - "inputFields": [ - { - "name": "billing", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderBillingInfoInput" - } - }, - { - "name": "cartId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "context", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderContextInputUpdate" - } - } - }, - { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateDiscountInput" - } - } - } - }, - { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateFeeInput" - } - } - } - }, - { - "name": "lineItems", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftOrderLineItemsInput" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderShippingInfoInput" - } - }, - { - "name": "shippingLines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftShippingLineInput" - } - } - } - }, - { - "name": "staffUserIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "taxExempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateOrderTaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderTotalsInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "MutationUpdateCheckoutSessionInput", - "inputFields": [ - { - "name": "appearance", - "type": { - "kind": "INPUT_OBJECT", - "name": "GoDaddyAppearanceInput" - } - }, - { - "name": "channelId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "customerId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "enableAddressAutocomplete", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableBillingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableLocalPickup", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "enableNotesCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'SHIP', + isDeprecated: false, }, { - "name": "enablePaymentMethodCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'TO_GO', + isDeprecated: false, }, + ], + }, + { + kind: 'OBJECT', + name: 'LineItemNote', + fields: [ { - "name": "enablePhoneCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'author', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "enablePromotionCodes", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'authorType', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "enableShipping", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'content', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "enableShippingAddressCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'createdAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "enableSurcharge", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'deletedAt', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "enableTaxCollection", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "enableTips", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "enabledLocales", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'shouldNotifyCustomer', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'LineItemReturnTotals', + fields: [ { - "name": "enabledPaymentProviders", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'discountTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "environment", - "type": { - "kind": "ENUM", - "name": "CheckoutSessionEnvironment" - } + name: 'feeTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "experimental_rules", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionExperimentalRulesInput" - } + name: 'subTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "expiresAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'taxTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "locations", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionLocationInput" - } - } - } + name: 'total', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'LineItemTax', + fields: [ { - "name": "operatingHours", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionOperatingHoursMapInput" - } + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "paymentMethods", - "type": { - "kind": "INPUT_OBJECT", - "name": "CheckoutSessionPaymentMethodsInput" - } + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, }, { - "name": "returnUrl", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "sourceApp", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "storeId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "storeName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, }, { - "name": "successUrl", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'LineItemTotals', + fields: [ + { + name: 'discountTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'feeTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'subTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'taxTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'LineItemTotalsInput', + inputFields: [ + { + name: 'discountTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'feeTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'subTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'taxTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'ENUM', + name: 'LineItemTypesInput', + enumValues: [ + { + name: 'ALL', + isDeprecated: false, + }, + { + name: 'DIGITAL', + isDeprecated: false, + }, + { + name: 'PAY_LINK', + isDeprecated: false, + }, + { + name: 'PHYSICAL', + isDeprecated: false, + }, + { + name: 'SERVICE', + isDeprecated: false, + }, + { + name: 'STAY', + isDeprecated: false, + }, + ], + }, + { + kind: 'ENUM', + name: 'MetafieldTypeInput', + enumValues: [ + { + name: 'JSON', + isDeprecated: false, + }, + ], + }, + { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + inputFields: [ + { + name: 'currencyCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Int', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'MoneyValue', + fields: [ + { + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'value', + type: { + kind: 'SCALAR', + name: 'Int', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'Mutation', + fields: [ + { + name: 'applyCheckoutSessionDeliveryMethod', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionDeliveryMethodInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'applyCheckoutSessionDiscount', + type: { + kind: 'OBJECT', + name: 'DraftOrder', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionDiscountInput', + }, + }, + }, + { + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'applyCheckoutSessionFulfillmentLocation', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionFulfillmentLocationInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'applyCheckoutSessionShippingMethod', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ApplyShippingMethodInput', + }, + }, + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'calculateCheckoutSessionTaxes', + type: { + kind: 'OBJECT', + name: 'CheckoutSessionCalculationResult', + }, + args: [ + { + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', + }, + }, + { + name: 'lines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxLineInput', + }, + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'confirmCheckoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationConfirmCheckoutSessionInput', + }, + }, + }, + { + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'createCheckoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationCreateCheckoutSessionInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'exchangeCheckoutToken', + type: { + kind: 'OBJECT', + name: 'CheckoutAuthToken', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationExchangeCheckoutTokenInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'expireCheckoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'refreshCheckoutToken', + type: { + kind: 'OBJECT', + name: 'CheckoutAuthToken', + }, + args: [], + isDeprecated: false, + }, + { + name: 'removeAppliedCheckoutSessionShippingMethod', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'RemoveShippingMethodInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'updateCheckoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [ + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationUpdateCheckoutSessionInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'updateCheckoutSessionDraftOrder', + type: { + kind: 'OBJECT', + name: 'DraftOrder', + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationUpdateCheckoutSessionDraftOrderInput', + }, + }, + }, + ], + isDeprecated: false, + }, + { + name: 'verifyAddress', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'Address', + }, + }, + }, + args: [ + { + name: 'input', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MutationVerifyAddressInput', + }, + }, + }, + ], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionDeliveryMethodInput', + inputFields: [ + { + name: 'mode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'ENUM', + name: 'FulfillmentModeInput', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionDiscountInput', + inputFields: [ + { + name: 'discountCodes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationApplyCheckoutSessionFulfillmentLocationInput', + inputFields: [ + { + name: 'fulfillmentLocationId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationConfirmCheckoutSessionInput', + inputFields: [ + { + name: 'billing', + type: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutBillingInfoInput', + }, + }, + { + name: 'fulfillmentEndAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'fulfillmentLocationId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'fulfillmentStartAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'paymentProcessor', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'paymentProvider', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'paymentToken', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'paymentType', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingInfoInput', + }, + }, + { + name: 'shippingLines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ConfirmCheckoutShippingLineInput', + }, + }, + }, + }, + { + name: 'shippingTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + { + name: 'taxTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationCreateCheckoutSessionInput', + inputFields: [ + { + name: 'appearance', + type: { + kind: 'INPUT_OBJECT', + name: 'GoDaddyAppearanceInput', + }, + }, + { + name: 'channelId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'draftOrderId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'enableAddressAutocomplete', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableBillingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableLocalPickup', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableNotesCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePaymentMethodCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePhoneCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePromotionCodes', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableShipping', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableShippingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableSurcharge', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableTaxCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableTips', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enabledLocales', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'enabledPaymentProviders', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'environment', + type: { + kind: 'ENUM', + name: 'CheckoutSessionEnvironment', + }, + }, + { + name: 'experimental_rules', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionExperimentalRulesInput', + }, + }, + { + name: 'expiresAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'lineItems', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLineItemInput', + }, + }, + }, + }, + { + name: 'locations', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLocationInput', + }, + }, + }, + }, + { + name: 'operatingHours', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionOperatingHoursMapInput', + }, + }, + { + name: 'paymentMethods', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodsInput', + }, + }, + { + name: 'returnUrl', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionShippingOptionsInput', + }, + }, + { + name: 'sourceApp', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'storeId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'storeName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'successUrl', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'taxes', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionTaxesOptionsInput', + }, + }, + { + name: 'url', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationExchangeCheckoutTokenInput', + inputFields: [ + { + name: 'sessionId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'token', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationUpdateCheckoutSessionDraftOrderInput', + inputFields: [ + { + name: 'billing', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderBillingInfoInput', + }, + }, + { + name: 'cartId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'context', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderContextInputUpdate', + }, + }, + }, + { + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateDiscountInput', + }, + }, + }, + }, + { + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateFeeInput', + }, + }, + }, + }, + { + name: 'lineItems', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftOrderLineItemsInput', + }, + }, + { + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, + }, + { + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, + }, + }, + { + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderShippingInfoInput', + }, + }, + { + name: 'shippingLines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftShippingLineInput', + }, + }, + }, + }, + { + name: 'staffUserIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'taxExempted', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateOrderTaxInput', + }, + }, + }, + }, + { + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderTotalsInput', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationUpdateCheckoutSessionInput', + inputFields: [ + { + name: 'appearance', + type: { + kind: 'INPUT_OBJECT', + name: 'GoDaddyAppearanceInput', + }, + }, + { + name: 'channelId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'customerId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'enableAddressAutocomplete', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableBillingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableLocalPickup', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableNotesCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePaymentMethodCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePhoneCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enablePromotionCodes', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableShipping', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableShippingAddressCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableSurcharge', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableTaxCollection', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enableTips', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + { + name: 'enabledLocales', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'enabledPaymentProviders', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + { + name: 'environment', + type: { + kind: 'ENUM', + name: 'CheckoutSessionEnvironment', + }, + }, + { + name: 'experimental_rules', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionExperimentalRulesInput', + }, + }, + { + name: 'expiresAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'locations', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionLocationInput', + }, + }, + }, + }, + { + name: 'operatingHours', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionOperatingHoursMapInput', + }, + }, + { + name: 'paymentMethods', + type: { + kind: 'INPUT_OBJECT', + name: 'CheckoutSessionPaymentMethodsInput', + }, + }, + { + name: 'returnUrl', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'sourceApp', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'storeId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'storeName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'successUrl', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'url', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'MutationVerifyAddressInput', + inputFields: [ + { + name: 'addressLine1', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'ENUM', + name: 'NoteAuthorTypeInput', + enumValues: [ + { + name: 'CUSTOMER', + isDeprecated: false, + }, + { + name: 'MERCHANT', + isDeprecated: false, + }, + { + name: 'NONE', + isDeprecated: false, + }, + ], + }, + { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + inputFields: [ + { + name: 'author', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'authorType', + type: { + kind: 'ENUM', + name: 'NoteAuthorTypeInput', + }, + }, + { + name: 'content', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'createdAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'deletedAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + { + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, + }, + { + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, + }, + { + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'shouldNotifyCustomer', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'SCALAR', + name: 'Null', + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderAddressInput', + inputFields: [ + { + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'countryCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'postalCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderBillingInfoInput', + inputFields: [ + { + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderAddressInput', + }, + }, + { + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderContextInputUpdate', + inputFields: [ + { + name: 'channelId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'storeId', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'OrderMetafield', + fields: [ + { + name: 'key', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'type', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'value', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + inputFields: [ + { + name: 'key', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + { + name: 'type', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'ENUM', + name: 'MetafieldTypeInput', + }, + }, + defaultValue: 'JSON', + }, + { + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderShippingInfoInput', + inputFields: [ + { + name: 'address', + type: { + kind: 'INPUT_OBJECT', + name: 'OrderAddressInput', + }, + }, + { + name: 'companyName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'email', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'firstName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'lastName', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'phone', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'OrderTotalsInput', + inputFields: [ + { + name: 'discountTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'feeTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'shippingTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'subTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'taxTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + { + name: 'total', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'PageInfo', + fields: [ + { + name: 'endCursor', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'hasNextPage', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'hasPreviousPage', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Boolean', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'startCursor', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'PriceAdjustmentShippingLineInput', + inputFields: [ + { + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'subTotal', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, + }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'PriceAdjustmentsCalculationResult', + fields: [ + { + name: 'adjustments', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CalculatedAdjustmentOutput', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'lines', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'CalculatedLineOutput', + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'totalDiscountAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', + }, + args: [], + isDeprecated: false, + }, + { + name: 'totalFeeAmount', + type: { + kind: 'OBJECT', + name: 'SimpleMoney', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'Query', + fields: [ + { + name: 'checkoutSession', + type: { + kind: 'OBJECT', + name: 'CheckoutSession', + }, + args: [], + isDeprecated: false, + }, + { + name: 'validateCheckoutToken', + type: { + kind: 'OBJECT', + name: 'CheckoutTokenValidation', + }, + args: [ + { + name: 'token', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + ], + isDeprecated: false, + }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'RemoveShippingMethodInput', + inputFields: [ + { + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "url", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'serviceCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "MutationVerifyAddressInput", - "inputFields": [ + kind: 'OBJECT', + name: 'SKU', + fields: [ + { + name: 'attributeValues', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUAttributeValue', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'attributes', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUAttribute', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'code', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'createdAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'disableShipping', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + args: [], + isDeprecated: false, + }, + { + name: 'htmlDescription', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'mediaUrls', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'metafields', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUMetafieldsConnection', + }, + }, + args: [ + { + name: 'after', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'before', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, + { + name: 'first', + type: { + kind: 'SCALAR', + name: 'Int', + }, + }, + { + name: 'last', + type: { + kind: 'SCALAR', + name: 'Int', + }, + }, + ], + isDeprecated: false, + }, + { + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'prices', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUPrice', + }, + }, + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'status', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'unitOfWeight', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + { + name: 'updatedAt', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'DateTime', + }, + }, + args: [], + isDeprecated: false, + }, { - "name": "addressLine1", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'weight', + type: { + kind: 'SCALAR', + name: 'Float', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUAttribute', + fields: [ { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'htmlDescription', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'values', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SKUAttributeValue', + }, + }, + }, + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUAttributeValue', + fields: [ { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'label', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "ENUM", - "name": "NoteAuthorTypeInput", - "enumValues": [ + kind: 'OBJECT', + name: 'SKUMetafield', + fields: [ + { + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'ID', + }, + }, + args: [], + isDeprecated: false, + }, { - "name": "CUSTOMER", - "isDeprecated": false + name: 'key', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'namespace', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, + { + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUMetafieldsConnection', + fields: [ { - "name": "MERCHANT", - "isDeprecated": false + name: 'edges', + type: { + kind: 'LIST', + ofType: { + kind: 'OBJECT', + name: 'SKUMetafieldsConnectionEdge', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "NONE", - "isDeprecated": false - } - ] + name: 'pageInfo', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'PageInfo', + }, + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "NoteInput", - "inputFields": [ + kind: 'OBJECT', + name: 'SKUMetafieldsConnectionEdge', + fields: [ + { + name: 'cursor', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, + }, { - "name": "author", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'node', + type: { + kind: 'OBJECT', + name: 'SKUMetafield', + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SKUPrice', + fields: [ { - "name": "authorType", - "type": { - "kind": "ENUM", - "name": "NoteAuthorTypeInput" - } + name: 'currencyCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + args: [], + isDeprecated: false, }, { - "name": "content", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'value', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'Float', + }, + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'SelectedAddon', + fields: [ { - "name": "createdAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'attribute', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "deletedAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'sku', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'values', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'SelectedAddonValue', + }, + }, + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'SelectedAddonInput', + inputFields: [ { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } + name: 'attribute', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'sku', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "shouldNotifyCustomer", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - } + name: 'values', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'SelectedAddonValueInput', + }, + }, + }, + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "SCALAR", - "name": "Null" + kind: 'OBJECT', + name: 'SelectedAddonValue', + fields: [ + { + name: 'costAdjustment', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, + }, + { + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, + ], + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "OrderAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'SelectedAddonValueInput', + inputFields: [ { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'amountIncreased', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'costAdjustment', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, + }, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, + ], + isOneOf: false, + }, + { + kind: 'OBJECT', + name: 'SelectedOption', + fields: [ { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'attribute', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'values', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'INPUT_OBJECT', + name: 'SelectedOptionInput', + inputFields: [ { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'attribute', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "countryCode", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'values', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + }, }, - { - "name": "postalCode", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "OrderBillingInfoInput", - "inputFields": [ + kind: 'OBJECT', + name: 'ShippingLine', + fields: [ { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderAddressInput" - } + name: 'amount', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemDiscount', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'OrderMetafield', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "OrderContextInputUpdate", - "inputFields": [ - { - "name": "channelId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "storeId", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "OrderMetafield", - "fields": [ - { - "name": "key", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "type", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'LineItemTax', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'totals', + type: { + kind: 'OBJECT', + name: 'ShippingLineTotals', }, - "args": [], - "isDeprecated": false - } + args: [], + isDeprecated: false, + }, ], - "interfaces": [] + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput", - "inputFields": [ + kind: 'OBJECT', + name: 'ShippingLineTotals', + fields: [ { - "name": "key", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'subTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "type", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "ENUM", - "name": "MetafieldTypeInput" - } + name: 'taxTotal', + type: { + kind: 'OBJECT', + name: 'MoneyValue', }, - "defaultValue": "JSON" + args: [], + isDeprecated: false, }, - { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } ], - "isOneOf": false + interfaces: [], }, { - "kind": "INPUT_OBJECT", - "name": "OrderShippingInfoInput", - "inputFields": [ - { - "name": "address", - "type": { - "kind": "INPUT_OBJECT", - "name": "OrderAddressInput" - } - }, + kind: 'ENUM', + name: 'ShippingLineType', + enumValues: [ { - "name": "companyName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'FEE', + isDeprecated: false, }, { - "name": "email", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'SHIPPING', + isDeprecated: false, }, { - "name": "firstName", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'SKU', + isDeprecated: false, }, - { - "name": "lastName", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "phone", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false }, { - "kind": "INPUT_OBJECT", - "name": "OrderTotalsInput", - "inputFields": [ + kind: 'OBJECT', + name: 'ShippingRate', + fields: [ { - "name": "discountTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "feeTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'carrierCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "shippingTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'cost', + type: { + kind: 'OBJECT', + name: 'ShippingRateMoneyValue', + }, + args: [], + isDeprecated: false, }, { - "name": "subTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'description', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "taxTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'displayName', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "total", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "PageInfo", - "fields": [ - { - "name": "endCursor", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "hasNextPage", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "hasPreviousPage", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - "args": [], - "isDeprecated": false + name: 'features', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, + }, + args: [], + isDeprecated: false, }, { - "name": "startCursor", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'maxDeliveryDate', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "PriceAdjustmentShippingLineInput", - "inputFields": [ - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + args: [], + isDeprecated: false, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'minDeliveryDate', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, }, { - "name": "subTotal", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - } + name: 'serviceCode', + type: { + kind: 'SCALAR', + name: 'String', + }, + args: [], + isDeprecated: false, + }, ], - "isOneOf": false + interfaces: [], }, { - "kind": "OBJECT", - "name": "PriceAdjustmentsCalculationResult", - "fields": [ + kind: 'OBJECT', + name: 'ShippingRateCalculationResult', + fields: [ { - "name": "adjustments", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CalculatedAdjustmentOutput" - } - } + name: 'rates', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'OBJECT', + name: 'ShippingRate', + }, + }, }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, + ], + interfaces: [], + }, + { + kind: 'OBJECT', + name: 'ShippingRateMoneyValue', + fields: [ { - "name": "lines", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "CalculatedLineOutput" - } - } + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "totalDiscountAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" + name: 'value', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, - { - "name": "totalFeeAmount", - "type": { - "kind": "OBJECT", - "name": "SimpleMoney" - }, - "args": [], - "isDeprecated": false - } ], - "interfaces": [] + interfaces: [], }, { - "kind": "OBJECT", - "name": "Query", - "fields": [ + kind: 'OBJECT', + name: 'SimpleMoney', + fields: [ { - "name": "checkoutSession", - "type": { - "kind": "OBJECT", - "name": "CheckoutSession" + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false + args: [], + isDeprecated: false, }, { - "name": "validateCheckoutToken", - "type": { - "kind": "OBJECT", - "name": "CheckoutTokenValidation" + name: 'value', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [ - { - "name": "token", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "RemoveShippingMethodInput", - "inputFields": [ - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + args: [], + isDeprecated: false, }, - { - "name": "serviceCode", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + interfaces: [], + }, + { + kind: 'SCALAR', + name: 'String', }, { - "kind": "OBJECT", - "name": "SKU", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', + inputFields: [ { - "name": "attributeValues", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUAttributeValue" - } - } - } + name: 'addressLine1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - }, - { - "name": "attributes", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUAttribute" - } - } - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "code", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "createdAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false }, { - "name": "disableShipping", - "type": { - "kind": "SCALAR", - "name": "Boolean" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "htmlDescription", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "ID" - } - }, - "args": [], - "isDeprecated": false - }, - { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "mediaUrls", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'addressLine2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUMetafieldsConnection" - } + name: 'addressLine3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [ - { - "name": "after", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "before", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "first", - "type": { - "kind": "SCALAR", - "name": "Int" - } - }, - { - "name": "last", - "type": { - "kind": "SCALAR", - "name": "Int" - } - } - ], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'adminArea1', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "prices", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUPrice" - } - } - } + name: 'adminArea2', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "status", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea3', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "unitOfWeight", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'adminArea4', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "updatedAt", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "DateTime" - } + name: 'countryCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "weight", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'postalCode', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "SKUAttribute", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'TaxInput', + inputFields: [ { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'amount', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "htmlDescription", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false + defaultValue: 'false', }, { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "ID" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "values", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SKUAttributeValue" - } - } - } - }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SKUAttributeValue", - "fields": [ - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "ID" - } + name: 'name', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "label", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "SKUMetafield", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'TaxLineInput', + inputFields: [ { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "ID" - } + name: 'classification', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "key", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'destination', + type: { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', }, - "args": [], - "isDeprecated": false }, { - "name": "namespace", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'origin', + type: { + kind: 'INPUT_OBJECT', + name: 'TaxDestinationAddressInput', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SKUMetafieldsConnection", - "fields": [ + }, { - "name": "edges", - "type": { - "kind": "LIST", - "ofType": { - "kind": "OBJECT", - "name": "SKUMetafieldsConnectionEdge" - } + name: 'quantity', + type: { + kind: 'SCALAR', + name: 'Int', }, - "args": [], - "isDeprecated": false }, { - "name": "pageInfo", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "PageInfo" - } + name: 'subtotalPrice', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SKUMetafieldsConnectionEdge", - "fields": [ + }, { - "name": "cursor", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'type', + type: { + kind: 'ENUM', + name: 'ShippingLineType', }, - "args": [], - "isDeprecated": false }, { - "name": "node", - "type": { - "kind": "OBJECT", - "name": "SKUMetafield" + name: 'unitPrice', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "SKUPrice", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDiscountInput', + inputFields: [ { - "name": "currencyCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', }, - "args": [], - "isDeprecated": false }, { - "name": "value", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "Float" - } + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "SelectedAddon", - "fields": [ + defaultValue: 'false', + }, { - "name": "attribute", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'code', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "sku", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "values", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "SelectedAddonValue" - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "SelectedAddonInput", - "inputFields": [ - { - "name": "attribute", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } }, { - "name": "sku", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "values", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "SelectedAddonValueInput" - } - } - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "SelectedAddonValue", - "fields": [ - { - "name": "costAdjustment", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "INPUT_OBJECT", - "name": "SelectedAddonValueInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - }, - { - "name": "amountIncreased", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "costAdjustment", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - }, - { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "SelectedOption", - "fields": [ - { - "name": "attribute", - "type": { - "kind": "SCALAR", - "name": "String" - }, - "args": [], - "isDeprecated": false - }, - { - "name": "values", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + }, + { + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "SelectedOptionInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftLineItemInput', + inputFields: [ { - "name": "attribute", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'details', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputDetailsInfo', + }, }, { - "name": "values", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - } - } - ], - "isOneOf": false - }, - { - "kind": "OBJECT", - "name": "ShippingLine", - "fields": [ - { - "name": "amount", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'DiscountInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemDiscount" - } - } + name: 'externalId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'FeeInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "OrderMetafield" - } - } + name: 'fulfillmentChannelId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'fulfillmentMode', + type: { + kind: 'ENUM', + name: 'LineItemModeInput', }, - "args": [], - "isDeprecated": false }, { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'id', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, }, - "args": [], - "isDeprecated": false }, { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "LineItemTax" - } - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "totals", - "type": { - "kind": "OBJECT", - "name": "ShippingLineTotals" + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "ShippingLineTotals", - "fields": [ + defaultValue: '[]', + }, { - "name": "subTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'productId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "taxTotal", - "type": { - "kind": "OBJECT", - "name": "MoneyValue" + name: 'quantity', + type: { + kind: 'SCALAR', + name: 'Float', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "ENUM", - "name": "ShippingLineType", - "enumValues": [ - { - "name": "FEE", - "isDeprecated": false }, { - "name": "SHIPPING", - "isDeprecated": false + name: 'serviceEndsAt', + type: { + kind: 'SCALAR', + name: 'DateTime', + }, }, { - "name": "SKU", - "isDeprecated": false - } - ] - }, - { - "kind": "OBJECT", - "name": "ShippingRate", - "fields": [ - { - "name": "carrierCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'serviceStartAt', + type: { + kind: 'SCALAR', + name: 'DateTime', }, - "args": [], - "isDeprecated": false }, { - "name": "cost", - "type": { - "kind": "OBJECT", - "name": "ShippingRateMoneyValue" + name: 'shipping', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemInputShippingInfo', }, - "args": [], - "isDeprecated": false }, { - "name": "description", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'skuId', + type: { + kind: 'SCALAR', + name: 'String', }, - "args": [], - "isDeprecated": false }, { - "name": "displayName", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'tags', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "features", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'TaxInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "maxDeliveryDate", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'LineItemTotalsInput', }, - "args": [], - "isDeprecated": false }, { - "name": "minDeliveryDate", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'type', + type: { + kind: 'ENUM', + name: 'LineItemTypesInput', }, - "args": [], - "isDeprecated": false }, { - "name": "serviceCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'unitAmount', + type: { + kind: 'INPUT_OBJECT', + name: 'MoneyInput', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "ShippingRateCalculationResult", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftOrderInput', + inputFields: [ { - "name": "rates", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "OBJECT", - "name": "ShippingRate" - } - } + name: 'lineItems', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftOrderLineItemsInput', }, - "args": [], - "isDeprecated": false - } - ], - "interfaces": [] - }, - { - "kind": "OBJECT", - "name": "ShippingRateMoneyValue", - "fields": [ + }, { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'notes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'NoteInput', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'taxExempted', + type: { + kind: 'SCALAR', + name: 'Boolean', }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "OBJECT", - "name": "SimpleMoney", - "fields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftOrderLineItemsInput', + inputFields: [ + { + name: 'add', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'CreateDraftLineItemInput', + }, + }, + }, + }, { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" + name: 'remove', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, - "args": [], - "isDeprecated": false }, { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Float" + name: 'update', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftLineItemInput', + }, + }, }, - "args": [], - "isDeprecated": false - } + }, ], - "interfaces": [] + isOneOf: false, }, { - "kind": "SCALAR", - "name": "String" - }, - { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftShippingLineInput', + inputFields: [ + { + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, + }, + { + name: 'discounts', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateDiscountInput', + }, + }, + }, + }, { - "name": "addressLine1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "addressLine2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'fees', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateFeeInput', + }, + }, + }, }, { - "name": "addressLine3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea1", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "adminArea2", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea3", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "adminArea4", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "countryCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateTaxInput', + }, + }, + }, }, { - "name": "postalCode", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateDraftShippingLineTotalsInput', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "TaxInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateDraftShippingLineTotalsInput', + inputFields: [ + { + name: 'subTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, + }, { - "name": "amount", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'taxTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'UpdateFeeInput', + inputFields: [ { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', }, - "defaultValue": "false" }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'appliedBeforeTax', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "name", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "TaxLineInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + inputFields: [ { - "name": "classification", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'currencyCode', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "destination", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput" - } + name: 'value', + type: { + kind: 'SCALAR', + name: 'Int', + }, }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'UpdateNoteInput', + inputFields: [ { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, + name: 'author', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, { - "name": "origin", - "type": { - "kind": "INPUT_OBJECT", - "name": "TaxDestinationAddressInput" - } + name: 'authorType', + type: { + kind: 'ENUM', + name: 'NoteAuthorTypeInput', + }, }, { - "name": "quantity", - "type": { - "kind": "SCALAR", - "name": "Int" - } + name: 'content', + type: { + kind: 'NON_NULL', + ofType: { + kind: 'SCALAR', + name: 'String', + }, + }, }, { - "name": "subtotalPrice", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "type", - "type": { - "kind": "ENUM", - "name": "ShippingLineType" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "unitPrice", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } + name: 'shouldNotifyCustomer', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', + }, ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "UpdateDiscountInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateOrderTaxInput', + inputFields: [ { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'additional', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', }, - "defaultValue": "false" }, { - "name": "code", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftLineItemInput", - "inputFields": [ - { - "name": "details", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputDetailsInfo" - } - }, - { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "DiscountInput" - } - } - } - }, - { - "name": "externalId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "FeeInput" - } - } - } - }, - { - "name": "fulfillmentChannelId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "fulfillmentMode", - "type": { - "kind": "ENUM", - "name": "LineItemModeInput" - } - }, - { - "name": "id", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - }, - "defaultValue": "[]" - }, - { - "name": "productId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "quantity", - "type": { - "kind": "SCALAR", - "name": "Float" - } - }, - { - "name": "serviceEndsAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "serviceStartAt", - "type": { - "kind": "SCALAR", - "name": "DateTime" - } - }, - { - "name": "shipping", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemInputShippingInfo" - } - }, - { - "name": "skuId", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "tags", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "TaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "LineItemTotalsInput" - } - }, - { - "name": "type", - "type": { - "kind": "ENUM", - "name": "LineItemTypesInput" - } - }, - { - "name": "unitAmount", - "type": { - "kind": "INPUT_OBJECT", - "name": "MoneyInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftOrderInput", - "inputFields": [ - { - "name": "lineItems", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftOrderLineItemsInput" - } - }, - { - "name": "notes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "NoteInput" - } - } - } - }, - { - "name": "taxExempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftOrderLineItemsInput", - "inputFields": [ - { - "name": "add", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "CreateDraftLineItemInput" - } - } - } - }, - { - "name": "remove", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } - } - }, - { - "name": "update", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftLineItemInput" - } - } - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftShippingLineInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - }, - { - "name": "discounts", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateDiscountInput" - } - } - } - }, - { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } - }, - { - "name": "fees", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateFeeInput" - } - } - } - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateTaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftShippingLineTotalsInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateDraftShippingLineTotalsInput", - "inputFields": [ - { - "name": "subTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "taxTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateFeeInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "appliedBeforeTax", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "false" }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput", - "inputFields": [ - { - "name": "currencyCode", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, }, - { - "name": "value", - "type": { - "kind": "SCALAR", - "name": "Int" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "UpdateNoteInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateShippingLineInput', + inputFields: [ { - "name": "author", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, }, { - "name": "authorType", - "type": { - "kind": "ENUM", - "name": "NoteAuthorTypeInput" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "content", - "type": { - "kind": "NON_NULL", - "ofType": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "shouldNotifyCustomer", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'requestedProvider', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "false" - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateOrderTaxInput", - "inputFields": [ + }, { - "name": "additional", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'requestedService', + type: { + kind: 'SCALAR', + name: 'String', }, - "defaultValue": "false" }, { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'taxes', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'UpdateTaxInput', + }, + }, + }, }, { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" + name: 'totals', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateShippingLineTotalsInput', }, - "defaultValue": "false" }, + ], + isOneOf: false, + }, + { + kind: 'INPUT_OBJECT', + name: 'UpdateShippingLineTotalsInput', + inputFields: [ { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'subTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } - }, - { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'taxTotal', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, }, - { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } ], - "isOneOf": false + isOneOf: false, }, { - "kind": "INPUT_OBJECT", - "name": "UpdateShippingLineInput", - "inputFields": [ + kind: 'INPUT_OBJECT', + name: 'UpdateTaxInput', + inputFields: [ + { + name: 'amount', + type: { + kind: 'INPUT_OBJECT', + name: 'UpdateMoneyInput', + }, + }, { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } + name: 'exempted', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, + defaultValue: 'false', }, { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } - }, - { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'externalIds', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'ExternalIdsInput', + }, + }, + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedProvider", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "requestedService", - "type": { - "kind": "SCALAR", - "name": "String" - } - }, - { - "name": "taxes", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "UpdateTaxInput" - } - } - } - }, - { - "name": "totals", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateShippingLineTotalsInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateShippingLineTotalsInput", - "inputFields": [ - { - "name": "subTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - }, - { - "name": "taxTotal", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - } - ], - "isOneOf": false - }, - { - "kind": "INPUT_OBJECT", - "name": "UpdateTaxInput", - "inputFields": [ - { - "name": "amount", - "type": { - "kind": "INPUT_OBJECT", - "name": "UpdateMoneyInput" - } - }, - { - "name": "exempted", - "type": { - "kind": "SCALAR", - "name": "Boolean" - }, - "defaultValue": "false" - }, - { - "name": "externalIds", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "ExternalIdsInput" - } - } - } + name: 'id', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "id", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'included', + type: { + kind: 'SCALAR', + name: 'Boolean', + }, }, { - "name": "included", - "type": { - "kind": "SCALAR", - "name": "Boolean" - } + name: 'metafields', + type: { + kind: 'LIST', + ofType: { + kind: 'NON_NULL', + ofType: { + kind: 'INPUT_OBJECT', + name: 'OrderMetafieldInput', + }, + }, + }, }, { - "name": "metafields", - "type": { - "kind": "LIST", - "ofType": { - "kind": "NON_NULL", - "ofType": { - "kind": "INPUT_OBJECT", - "name": "OrderMetafieldInput" - } - } - } - }, - { - "name": "name", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'name', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "ratePercentage", - "type": { - "kind": "SCALAR", - "name": "String" - } + name: 'ratePercentage', + type: { + kind: 'SCALAR', + name: 'String', + }, }, { - "name": "referenceId", - "type": { - "kind": "SCALAR", - "name": "String" - } - } + name: 'referenceId', + type: { + kind: 'SCALAR', + name: 'String', + }, + }, ], - "isOneOf": false - } + isOneOf: false, + }, ], - "directives": [] - } + directives: [], + }, } as const; -export { introspection }; \ No newline at end of file +export { introspection }; From 641d4a3d372d5b1b16ae90ec7b588440a1fd2c0b Mon Sep 17 00:00:00 2001 From: Wes Cole Date: Thu, 6 Nov 2025 14:36:34 -0500 Subject: [PATCH 19/23] Update order of accessing session --- .../src/components/checkout/checkout.tsx | 6 +- .../checkout/form/checkout-form-container.tsx | 14 +- packages/react/src/lib/godaddy/graphql-env.ts | 15828 ++++++++-------- 3 files changed, 7924 insertions(+), 7924 deletions(-) diff --git a/packages/react/src/components/checkout/checkout.tsx b/packages/react/src/components/checkout/checkout.tsx index 674a4ddb..cdc232aa 100644 --- a/packages/react/src/components/checkout/checkout.tsx +++ b/packages/react/src/components/checkout/checkout.tsx @@ -227,13 +227,13 @@ export function Checkout(props: CheckoutProps) { const [checkoutErrors, setCheckoutErrors] = React.useState< string[] | undefined >(undefined); - const { t } = useGoDaddyContext(); + const { t } = useGoDaddyContext() + + const { session, jwt, isLoading: isLoadingJWT } = useCheckoutSession(props); useTheme(session?.appearance?.theme); useVariables(session?.appearance?.variables || props?.appearance?.variables); - const { session, jwt, isLoading: isLoadingJWT } = useCheckoutSession(props); - const formSchema = React.useMemo(() => { const extendedSchema = checkoutFormSchema ? baseCheckoutSchema.extend(checkoutFormSchema) diff --git a/packages/react/src/components/checkout/form/checkout-form-container.tsx b/packages/react/src/components/checkout/form/checkout-form-container.tsx index bc17109d..055ae17a 100644 --- a/packages/react/src/components/checkout/form/checkout-form-container.tsx +++ b/packages/react/src/components/checkout/form/checkout-form-container.tsx @@ -51,13 +51,13 @@ export function CheckoutFormContainer({ [order, props.defaultValues, session?.shipping?.originAddress?.countryCode] ); - if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { - const returnUrl = session?.returnUrl; - if (returnUrl) { - window.location.href = returnUrl; - return null; - } - } + // if (!isConfirmingCheckout && !draftOrderQuery.isLoading && !order) { + // const returnUrl = session?.returnUrl; + // if (returnUrl) { + // window.location.href = returnUrl; + // return null; + // } + // } if (draftOrderQuery.isLoading || isLoadingJWT) { return ; diff --git a/packages/react/src/lib/godaddy/graphql-env.ts b/packages/react/src/lib/godaddy/graphql-env.ts index fa77d6d9..5b20f176 100644 --- a/packages/react/src/lib/godaddy/graphql-env.ts +++ b/packages/react/src/lib/godaddy/graphql-env.ts @@ -23,9835 +23,9835 @@ * ``` */ const introspection = { - __schema: { - queryType: { - name: 'Query', + "__schema": { + "queryType": { + "name": "Query" }, - mutationType: { - name: 'Mutation', + "mutationType": { + "name": "Mutation" }, - subscriptionType: null, - types: [ + "subscriptionType": null, + "types": [ { - kind: 'OBJECT', - name: 'Address', - fields: [ + "kind": "OBJECT", + "name": "Address", + "fields": [ { - name: 'addressDetails', - type: { - kind: 'OBJECT', - name: 'AddressDetails', + "name": "addressDetails", + "type": { + "kind": "OBJECT", + "name": "AddressDetails" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'AddressDetails', - fields: [ + "kind": "OBJECT", + "name": "AddressDetails", + "fields": [ { - name: 'addressType', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressType", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'buildingName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "buildingName", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'deliveryService', - type: { - kind: 'SCALAR', - name: 'String', + "name": "deliveryService", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'geoCoordinates', - type: { - kind: 'OBJECT', - name: 'GeoCoordinates', + "name": "geoCoordinates", + "type": { + "kind": "OBJECT", + "name": "GeoCoordinates" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'streetName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "streetName", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'streetNumber', - type: { - kind: 'SCALAR', - name: 'String', + "name": "streetNumber", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'streetType', - type: { - kind: 'SCALAR', - name: 'String', + "name": "streetType", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'subBuilding', - type: { - kind: 'SCALAR', - name: 'String', + "name": "subBuilding", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'AddressInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "AddressInput", + "inputFields": [ { - name: 'addressLine1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "addressLine1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'adminArea2', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea2", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'AdjustmentAmount', - fields: [ + "kind": "OBJECT", + "name": "AdjustmentAmount", + "fields": [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'AdjustmentPercentage', - fields: [ + "kind": "OBJECT", + "name": "AdjustmentPercentage", + "fields": [ { - name: 'maximumAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "maximumAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'percentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "percentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'UNION', - name: 'AdjustmentValue', - possibleTypes: [ + "kind": "UNION", + "name": "AdjustmentValue", + "possibleTypes": [ { - kind: 'OBJECT', - name: 'AdjustmentAmount', + "kind": "OBJECT", + "name": "AdjustmentAmount" }, { - kind: 'OBJECT', - name: 'AdjustmentPercentage', - }, - ], + "kind": "OBJECT", + "name": "AdjustmentPercentage" + } + ] }, { - kind: 'INPUT_OBJECT', - name: 'ApplyShippingMethodInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "ApplyShippingMethodInput", + "inputFields": [ { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'subTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "subTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } }, { - name: 'taxTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "taxTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'SCALAR', - name: 'Boolean', + "kind": "SCALAR", + "name": "Boolean" }, { - kind: 'UNION', - name: 'CalculatedAdjustment', - possibleTypes: [ + "kind": "UNION", + "name": "CalculatedAdjustment", + "possibleTypes": [ { - kind: 'OBJECT', - name: 'CalculatedDiscount', + "kind": "OBJECT", + "name": "CalculatedDiscount" }, { - kind: 'OBJECT', - name: 'CalculatedFee', - }, - ], + "kind": "OBJECT", + "name": "CalculatedFee" + } + ] }, { - kind: 'OBJECT', - name: 'CalculatedAdjustmentOutput', - fields: [ + "kind": "OBJECT", + "name": "CalculatedAdjustmentOutput", + "fields": [ { - name: 'adjustment', - type: { - kind: 'UNION', - name: 'CalculatedAdjustment', + "name": "adjustment", + "type": { + "kind": "UNION", + "name": "CalculatedAdjustment" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "totalAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CalculatedDiscount', - fields: [ + "kind": "OBJECT", + "name": "CalculatedDiscount", + "fields": [ { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "ID" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'UNION', - name: 'AdjustmentValue', + "name": "value", + "type": { + "kind": "UNION", + "name": "AdjustmentValue" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CalculatedFee', - fields: [ + "kind": "OBJECT", + "name": "CalculatedFee", + "fields": [ { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "ID" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'UNION', - name: 'AdjustmentValue', + "name": "value", + "type": { + "kind": "UNION", + "name": "AdjustmentValue" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CalculatedLineOutput', - fields: [ + "kind": "OBJECT", + "name": "CalculatedLineOutput", + "fields": [ { - name: 'adjustments', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CalculatedAdjustmentOutput', - }, - }, + "name": "adjustments", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CalculatedAdjustmentOutput" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'calculationLine', - type: { - kind: 'OBJECT', - name: 'CalculationLineOutput', + "name": "calculationLine", + "type": { + "kind": "OBJECT", + "name": "CalculationLineOutput" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalDiscountAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "totalDiscountAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalFeeAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', + "name": "totalFeeAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CalculationLineOutput', - fields: [ + "kind": "OBJECT", + "name": "CalculationLineOutput", + "fields": [ { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', + "name": "type", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutAuthToken', - fields: [ + "kind": "OBJECT", + "name": "CheckoutAuthToken", + "fields": [ { - name: 'expiresAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "expiresAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'expiresIn', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "expiresIn", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'jwt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "jwt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSession', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSession", + "fields": [ { - name: 'addresses', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'Address', - }, - }, + "name": "addresses", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Address" + } + } }, - args: [ + "args": [ { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressesInput', - }, - }, - }, + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressesInput" + } + } + } ], - isDeprecated: false, + "isDeprecated": false }, { - name: 'channelId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "channelId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'createdAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "createdAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'defaultOperatingHours', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', + "name": "defaultOperatingHours", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'draftOrder', - type: { - kind: 'OBJECT', - name: 'DraftOrder', + "name": "draftOrder", + "type": { + "kind": "OBJECT", + "name": "DraftOrder" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableAddressAutocomplete', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableAddressAutocomplete", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableBillingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableBillingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableLocalPickup', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableLocalPickup", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableNotesCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableNotesCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enablePaymentMethodCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enablePaymentMethodCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enablePhoneCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enablePhoneCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enablePromotionCodes', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enablePromotionCodes", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableShipping', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableShippingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableShippingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableSurcharge', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableSurcharge", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableTaxCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableTaxCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enableTips', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "enableTips", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enabledLocales', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "enabledLocales", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enabledPaymentProviders', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "enabledPaymentProviders", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'environment', - type: { - kind: 'ENUM', - name: 'CheckoutSessionEnvironment', + "name": "environment", + "type": { + "kind": "ENUM", + "name": "CheckoutSessionEnvironment" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'experimental_rules', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionExperimentalRules', + "name": "experimental_rules", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionExperimentalRules" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'expiresAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "expiresAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'lineItems', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'DraftOrderLineItem', - }, - }, + "name": "lineItems", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DraftOrderLineItem" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'locations', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionLocation', - }, - }, + "name": "locations", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionLocation" + } + } }, - args: [], - isDeprecated: false, - }, - { - name: 'paymentMethods', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethods', + "args": [], + "isDeprecated": false + }, + { + "name": "paymentMethods", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethods" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'returnUrl', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "returnUrl", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionShippingOptions', + "name": "shipping", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionShippingOptions" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'skus', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionSkusConnection', - }, + "name": "skus", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionSkusConnection" + } }, - args: [ + "args": [ { - name: 'after', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'before', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'first', - type: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } }, { - name: 'last', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } ], - isDeprecated: false, + "isDeprecated": false }, { - name: 'sourceApp', - type: { - kind: 'SCALAR', - name: 'String', + "name": "sourceApp", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'status', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'ENUM', - name: 'CheckoutSessionStatus', - }, + "name": "status", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "CheckoutSessionStatus" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'storeId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "storeId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'storeName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "storeName", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'successUrl', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "successUrl", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionTaxesOptions', + "name": "taxes", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionTaxesOptions" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'token', - type: { - kind: 'SCALAR', - name: 'String', + "name": "token", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'updatedAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "updatedAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'url', - type: { - kind: 'SCALAR', - name: 'String', + "name": "url", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionAddress', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionAddress", + "fields": [ { - name: 'addressDetails', - type: { - kind: 'OBJECT', - name: 'AddressDetails', + "name": "addressDetails", + "type": { + "kind": "OBJECT", + "name": "AddressDetails" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressDetailsInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressDetailsInput", + "inputFields": [ { - name: 'addressType', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressType", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'buildingName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "buildingName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'deliveryService', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "deliveryService", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'geoCoordinates', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionGeoCoordinatesInput', - }, + "name": "geoCoordinates", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionGeoCoordinatesInput" + } }, { - name: 'streetName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "streetName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'streetNumber', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "streetNumber", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'streetType', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "streetType", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'subBuilding', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "subBuilding", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressInput", + "inputFields": [ { - name: 'addressDetails', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressDetailsInput', - }, + "name": "addressDetails", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressDetailsInput" + } }, { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressesInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressesInput", + "inputFields": [ { - name: 'query', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, + "name": "query", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculateTaxesInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculateTaxesInput", + "inputFields": [ { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - }, + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput" + } }, { - name: 'lines', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLineInput', - }, - }, - }, - }, + "name": "lines", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLineInput" + } + } + } + } }, { - name: 'origin', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - }, - }, + "name": "origin", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedLine', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedLine", + "fields": [ { - name: 'calculationLine', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationLine', + "name": "calculationLine", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculationLine" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxAmounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionTaxAmount', - }, - }, + "name": "taxAmounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionTaxAmount" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalTaxAmount', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionTotalTaxAmount', + "name": "totalTaxAmount", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionTotalTaxAmount" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedRate', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedRate", + "fields": [ { - name: 'calculationMethod', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculationMethod", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedRateValue', + "name": "value", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedRateValue" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedRateValue', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedRateValue", + "fields": [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'appliedAmount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "appliedAmount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'appliedPercentage', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "appliedPercentage", + "type": { + "kind": "SCALAR", + "name": "Float" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'percentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "percentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationAddressInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationAddressInput", + "inputFields": [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationLine', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculationLine", + "fields": [ { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLineInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLineInput", + "inputFields": [ { - name: 'classification', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "classification", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - }, + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput" + } }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'origin', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - }, + "name": "origin", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput" + } }, { - name: 'quantity', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, - }, + "name": "quantity", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + } }, { - name: 'subtotalPrice', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "subtotalPrice", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'type', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "type", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'unitPrice', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "unitPrice", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationLocationInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationLocationInput", + "inputFields": [ { - name: 'address', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionCalculationAddressInput', - }, - }, - }, + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionCalculationAddressInput" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationResult', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionCalculationResult", + "fields": [ { - name: 'lines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedLine', - }, - }, + "name": "lines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedLine" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxAmounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionTaxAmount', - }, - }, + "name": "taxAmounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionTaxAmount" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totalTaxAmount', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionTotalTaxAmount', + "name": "totalTaxAmount", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionTotalTaxAmount" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionDayHours", + "fields": [ { - name: 'closeTime', - type: { - kind: 'SCALAR', - name: 'String', + "name": "closeTime", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'openTime', - type: { - kind: 'SCALAR', - name: 'String', + "name": "openTime", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput", + "inputFields": [ { - name: 'closeTime', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "closeTime", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + } }, { - name: 'openTime', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "openTime", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'ENUM', - name: 'CheckoutSessionEnvironment', - enumValues: [ + "kind": "ENUM", + "name": "CheckoutSessionEnvironment", + "enumValues": [ { - name: 'dev', - isDeprecated: false, + "name": "dev", + "isDeprecated": false }, { - name: 'ote', - isDeprecated: false, + "name": "ote", + "isDeprecated": false }, { - name: 'prod', - isDeprecated: false, + "name": "prod", + "isDeprecated": false }, { - name: 'test', - isDeprecated: false, - }, - ], + "name": "test", + "isDeprecated": false + } + ] }, { - kind: 'OBJECT', - name: 'CheckoutSessionExperimentalRules', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionExperimentalRules", + "fields": [ { - name: 'freeShipping', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionFreeShippingRule', + "name": "freeShipping", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionFreeShippingRule" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'localDelivery', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionLocalDeliveryRule', + "name": "localDelivery", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionLocalDeliveryRule" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionExperimentalRulesInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionExperimentalRulesInput", + "inputFields": [ { - name: 'freeShipping', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionFreeShippingRuleInput', - }, - }, + "name": "freeShipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionFreeShippingRuleInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionFreeShippingRule', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionFreeShippingRule", + "fields": [ { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'minimumOrderTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "minimumOrderTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionFreeShippingRuleInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionFreeShippingRuleInput", + "inputFields": [ { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + } }, { - name: 'minimumOrderTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, - }, - }, + "name": "minimumOrderTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionGeoCoordinatesInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionGeoCoordinatesInput", + "inputFields": [ { - name: 'latitude', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, - }, + "name": "latitude", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + } }, { - name: 'longitude', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, - }, + "name": "longitude", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLineItemInput", + "inputFields": [ + { + "name": "quantity", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } }, + { + "name": "skuId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLineItemInput', - inputFields: [ + "kind": "OBJECT", + "name": "CheckoutSessionLocalDeliveryRule", + "fields": [ + { + "name": "enabled", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "minimumOrderTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionLocation", + "fields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionAddress" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, { - name: 'quantity', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "isDefault", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } }, + "args": [], + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "operatingHours", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLocationInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressInput" + } + } + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "isDefault", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionOperatingHoursMap", + "fields": [ + { + "name": "default", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "locations", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours" + } + } + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionOperatingHoursMapInput", + "inputFields": [ + { + "name": "default", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionStoreHoursInput" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig", + "fields": [ + { + "name": "checkoutTypes", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "processor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput", + "inputFields": [ + { + "name": "checkoutTypes", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + } }, + { + "name": "processor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionLocalDeliveryRule', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethods", + "fields": [ { - name: 'enabled', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "applePay", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'minimumOrderTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "card", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionLocation', - fields: [ { - name: 'address', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionAddress', - }, + "name": "express", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "googlePay", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'isDefault', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "offline", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'operatingHours', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', + "name": "paypal", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, + { + "name": "paze", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionPaymentMethodConfig" + }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLocationInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodsInput", + "inputFields": [ { - name: 'address', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressInput', - }, - }, + "name": "applePay", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "card", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } }, { - name: 'isDefault', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, + "name": "express", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } }, + { + "name": "googlePay", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } + }, + { + "name": "offline", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } + }, + { + "name": "paypal", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } + }, + { + "name": "paze", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodConfigInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionOperatingHoursMap', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionShippingOptions", + "fields": [ { - name: 'default', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', + "name": "fulfillmentLocationId", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'locations', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', - }, - }, + "name": "originAddress", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionAddress" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionOperatingHoursMapInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionShippingOptionsInput", + "inputFields": [ { - name: 'default', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionStoreHoursInput', - }, - }, + "name": "fulfillmentLocationId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "originAddress", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - fields: [ + "kind": "OBJECT", + "name": "CheckoutSessionSkusConnection", + "fields": [ { - name: 'checkoutTypes', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, + "name": "edges", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionSkusConnectionEdge" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'processor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - inputFields: [ + "kind": "OBJECT", + "name": "CheckoutSessionSkusConnectionEdge", + "fields": [ { - name: 'checkoutTypes', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'processor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "node", + "type": { + "kind": "OBJECT", + "name": "SKU" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethods', - fields: [ + "kind": "ENUM", + "name": "CheckoutSessionStatus", + "enumValues": [ { - name: 'applePay', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - }, - args: [], - isDeprecated: false, + "name": "ACTIVE", + "isDeprecated": false }, { - name: 'card', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - }, - args: [], - isDeprecated: false, + "name": "CANCELLED", + "isDeprecated": false }, { - name: 'express', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - }, - args: [], - isDeprecated: false, + "name": "COMPLETED", + "isDeprecated": false }, { - name: 'googlePay', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', - }, - args: [], - isDeprecated: false, + "name": "CREATED", + "isDeprecated": false }, { - name: 'offline', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', + "name": "EXPIRED", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionStoreHours", + "fields": [ + { + "name": "hours", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CheckoutSessionWeekHours" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'paypal', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', + "name": "leadTime", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'paze', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionPaymentMethodConfig', + "name": "pickupWindowInDays", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, + { + "name": "timeZone", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodsInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionStoreHoursInput", + "inputFields": [ { - name: 'applePay', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - }, + "name": "hours", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionWeekHoursInput" + } + } }, { - name: 'card', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - }, + "name": "leadTime", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } }, { - name: 'express', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - }, + "name": "pickupWindowInDays", + "type": { + "kind": "SCALAR", + "name": "Int" + } }, { - name: 'googlePay', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', - }, - }, + "name": "timeZone", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionTaxAmount", + "fields": [ { - name: 'offline', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', + "name": "rate", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculatedRate" }, + "args": [], + "isDeprecated": false }, { - name: 'paypal', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', + "name": "totalTaxAmount", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionTotalTaxAmount" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionTaxesOptions", + "fields": [ { - name: 'paze', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodConfigInput', + "name": "originAddress", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionAddress" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'CheckoutSessionShippingOptions', - fields: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionTaxesOptionsInput", + "inputFields": [ { - name: 'fulfillmentLocationId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "originAddress", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionAddressInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "CheckoutSessionTotalTaxAmount", + "fields": [ + { + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'originAddress', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionAddress', + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Float" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionShippingOptionsInput', - inputFields: [ + "kind": "OBJECT", + "name": "CheckoutSessionWeekHours", + "fields": [ { - name: 'fulfillmentLocationId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "friday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, + "args": [], + "isDeprecated": false }, { - name: 'originAddress', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressInput', + "name": "monday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionSkusConnection', - fields: [ { - name: 'edges', - type: { - kind: 'LIST', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionSkusConnectionEdge', - }, + "name": "saturday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'pageInfo', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - }, + "name": "sunday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionSkusConnectionEdge', - fields: [ { - name: 'cursor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "thursday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'node', - type: { - kind: 'OBJECT', - name: 'SKU', + "name": "tuesday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, + { + "name": "wednesday", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionDayHours" + }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'ENUM', - name: 'CheckoutSessionStatus', - enumValues: [ + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionWeekHoursInput", + "inputFields": [ { - name: 'ACTIVE', - isDeprecated: false, + "name": "friday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, { - name: 'CANCELLED', - isDeprecated: false, + "name": "monday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, { - name: 'COMPLETED', - isDeprecated: false, + "name": "saturday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, { - name: 'CREATED', - isDeprecated: false, + "name": "sunday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, { - name: 'EXPIRED', - isDeprecated: false, + "name": "thursday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } }, + { + "name": "tuesday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } + }, + { + "name": "wednesday", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionDayHoursInput" + } + } ], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionStoreHours', - fields: [ - { - name: 'hours', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CheckoutSessionWeekHours', - }, - }, - args: [], - isDeprecated: false, - }, + "kind": "OBJECT", + "name": "CheckoutTokenValidation", + "fields": [ { - name: 'leadTime', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "expiresAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'pickupWindowInDays', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "sessionId", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'timeZone', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "valid", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionStoreHoursInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutBillingInfoInput", + "inputFields": [ { - name: 'hours', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionWeekHoursInput', - }, - }, + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutDestinationAddressInput" + } }, { - name: 'leadTime', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, - }, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'pickupWindowInDays', - type: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'timeZone', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionTaxAmount', - fields: [ { - name: 'rate', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculatedRate', - }, - args: [], - isDeprecated: false, + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'totalTaxAmount', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionTotalTaxAmount', - }, - args: [], - isDeprecated: false, - }, + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutSessionTaxesOptions', - fields: [ + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutDestinationAddressInput", + "inputFields": [ { - name: 'originAddress', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionAddress', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionTaxesOptionsInput', - inputFields: [ - { - name: 'originAddress', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionAddressInput', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionTotalTaxAmount', - fields: [ - { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'CheckoutSessionWeekHours', - fields: [ { - name: 'friday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'monday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'saturday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'sunday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'thursday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'tuesday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'wednesday', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionDayHours', - }, - args: [], - isDeprecated: false, - }, + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionWeekHoursInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingInfoInput", + "inputFields": [ { - name: 'friday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutDestinationAddressInput" + } }, { - name: 'monday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'saturday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - { - name: 'sunday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + { + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'thursday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingLineInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'tuesday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', - }, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutTaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingLineTotalsInput" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingLineTotalsInput", + "inputFields": [ + { + "name": "subTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + }, + { + "name": "taxTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutTaxInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + }, + { + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ContactInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DraftOrderAddressInput" + } + } + }, + { + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "firstName", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "lastName", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "CreateDraftLineItemInput", + "inputFields": [ + { + "name": "details", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputDetailsInfo" + } + }, + { + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DiscountInput" + } + } + } + }, + { + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "FeeInput" + } + } + } + }, + { + "name": "fulfillmentChannelId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fulfillmentMode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "LineItemModeInput" + } + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + }, + "defaultValue": "[]" + }, + { + "name": "productId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "quantity", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } + } + }, + { + "name": "serviceEndsAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "serviceStartAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputShippingInfo" + } + }, + { + "name": "skuId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxInput" + } + } + } }, { - name: 'wednesday', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionDayHoursInput', + "name": "totals", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "LineItemTotalsInput" + } + } + }, + { + "name": "type", + "type": { + "kind": "ENUM", + "name": "LineItemTypesInput" }, + "defaultValue": "PHYSICAL" }, + { + "name": "unitAmount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'CheckoutTokenValidation', - fields: [ + "kind": "SCALAR", + "name": "DateTime" + }, + { + "kind": "INPUT_OBJECT", + "name": "DestinationAddressInput", + "inputFields": [ { - name: 'expiresAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - args: [], - isDeprecated: false, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'sessionId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'valid', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - args: [], - isDeprecated: false, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + { + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutBillingInfoInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "DiscountInput", + "inputFields": [ { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutDestinationAddressInput', - }, + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "code", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } }, { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "DraftOrder", + "fields": [ + { + "name": "billing", + "type": { + "kind": "OBJECT", + "name": "DraftOrderContact" }, + "args": [], + "isDeprecated": false }, { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculatedAdjustments", + "type": { + "kind": "OBJECT", + "name": "PriceAdjustmentsCalculationResult" }, + "args": [ + { + "name": "discountCodes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "shippingLines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "PriceAdjustmentShippingLineInput" + } + } + } + } + ], + "isDeprecated": false }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculatedShippingRates", + "type": { + "kind": "OBJECT", + "name": "ShippingRateCalculationResult" }, + "args": [ + { + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "DestinationAddressInput" + } + } + ], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutDestinationAddressInput', - inputFields: [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculatedTaxes", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculationResult" }, + "args": [ + { + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput" + } + }, + { + "name": "lines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxLineInput" + } + } + } + } + ], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "cartId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "context", + "type": { + "kind": "OBJECT", + "name": "DraftOrderContext" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "createdAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemDiscount" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemFee" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "fulfillmentModes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingInfoInput', - inputFields: [ { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutDestinationAddressInput', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "ID" }, + "args": [], + "isDeprecated": false }, { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "lineItems", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "DraftOrderLineItem" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, + "args": [], + "isDeprecated": false + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemNote" + } + } + }, + "args": [], + "isDeprecated": false }, { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "number", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "numberDisplay", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', + "name": "shipping", + "type": { + "kind": "OBJECT", + "name": "DraftOrderContact" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingLineInput', - inputFields: [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "shippingLines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ShippingLine" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "statuses", + "type": { + "kind": "OBJECT", + "name": "DraftOrderStatuses" }, + "args": [], + "isDeprecated": false }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', + "name": "taxExempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutTaxInput', - }, - }, + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemTax" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingLineTotalsInput', - }, + "name": "totals", + "type": { + "kind": "OBJECT", + "name": "DraftOrderTotals" }, + "args": [], + "isDeprecated": false }, + { + "name": "updatedAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingLineTotalsInput', - inputFields: [ + "kind": "OBJECT", + "name": "DraftOrderAddress", + "fields": [ { - name: 'subTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'taxTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutTaxInput', - inputFields: [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, + { + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'ContactInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "DraftOrderAddressInput", + "inputFields": [ { - name: 'address', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'DraftOrderAddressInput', - }, - }, + "name": "addressLine1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'firstName', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'lastName', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'CreateDraftLineItemInput', - inputFields: [ + "kind": "OBJECT", + "name": "DraftOrderContact", + "fields": [ { - name: 'details', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputDetailsInfo', + "name": "address", + "type": { + "kind": "OBJECT", + "name": "DraftOrderAddress" }, + "args": [], + "isDeprecated": false }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'DiscountInput', - }, - }, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'FeeInput', - }, - }, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentChannelId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentMode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'ENUM', - name: 'LineItemModeInput', - }, + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DraftOrderContext", + "fields": [ { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "channelId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, + "name": "owner", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "storeId", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DraftOrderLineItem", + "fields": [ { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, + "name": "createdAt", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: '[]', + "args": [], + "isDeprecated": false }, { - name: 'productId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "details", + "type": { + "kind": "OBJECT", + "name": "LineItemDetails" }, + "args": [], + "isDeprecated": false }, { - name: 'quantity', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemDiscount" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'serviceEndsAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'serviceStartAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemFee" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputShippingInfo', + "name": "fulfilledAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "fulfillmentChannelId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": true }, { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "fulfillmentMode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxInput', - }, - }, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'LineItemTotalsInput', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'ENUM', - name: 'LineItemTypesInput', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: 'PHYSICAL', + "args": [], + "isDeprecated": false }, { - name: 'unitAmount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemNote" + } + } }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'SCALAR', - name: 'DateTime', - }, - { - kind: 'INPUT_OBJECT', - name: 'DestinationAddressInput', - inputFields: [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "orderVersion", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "productId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "quantity", + "type": { + "kind": "SCALAR", + "name": "Float" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "returnQuantity", + "type": { + "kind": "SCALAR", + "name": "Float" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "returnTotals", + "type": { + "kind": "OBJECT", + "name": "LineItemReturnTotals" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "returnedAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "serviceEndsAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "serviceStartAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "shipping", + "type": { + "kind": "OBJECT", + "name": "DraftOrderContact" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'DiscountInput', - inputFields: [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "skuId", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: 'false', + "args": [], + "isDeprecated": false }, { - name: 'code', - type: { - kind: 'SCALAR', - name: 'String', + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemTax" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, + "name": "totals", + "type": { + "kind": "OBJECT", + "name": "LineItemTotals" }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "type", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "unitAmount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "updatedAt", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'DraftOrder', - fields: [ + "kind": "INPUT_OBJECT", + "name": "DraftOrderLineItemInput", + "inputFields": [ { - name: 'billing', - type: { - kind: 'OBJECT', - name: 'DraftOrderContact', - }, - args: [], - isDeprecated: false, + "name": "details", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputDetailsInfo" + } }, { - name: 'calculatedAdjustments', - type: { - kind: 'OBJECT', - name: 'PriceAdjustmentsCalculationResult', - }, - args: [ - { - name: 'discountCodes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'shippingLines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'PriceAdjustmentShippingLineInput', - }, - }, - }, - }, - ], - isDeprecated: false, + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DiscountInput" + } + } + } }, { - name: 'calculatedShippingRates', - type: { - kind: 'OBJECT', - name: 'ShippingRateCalculationResult', - }, - args: [ - { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'DestinationAddressInput', - }, - }, - ], - isDeprecated: false, + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'calculatedTaxes', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationResult', - }, - args: [ - { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', - }, - }, - { - name: 'lines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxLineInput', - }, - }, - }, - }, - ], - isDeprecated: false, + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "FeeInput" + } + } + } }, { - name: 'cartId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "fulfillmentMode", + "type": { + "kind": "ENUM", + "name": "LineItemModeInput" + } }, { - name: 'context', - type: { - kind: 'OBJECT', - name: 'DraftOrderContext', - }, - args: [], - isDeprecated: false, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + }, + "defaultValue": "[]" + }, + { + "name": "productId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "quantity", + "type": { + "kind": "SCALAR", + "name": "Float" + } + }, + { + "name": "serviceEndsAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "serviceStartAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } }, { - name: 'createdAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - args: [], - isDeprecated: false, + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputShippingInfo" + } }, { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "skuId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemDiscount', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxInput" + } + } + } }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemFee', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemTotalsInput" + } }, { - name: 'fulfillmentModes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "type", + "type": { + "kind": "ENUM", + "name": "LineItemTypesInput" }, - args: [], - isDeprecated: false, + "defaultValue": "PHYSICAL" }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'ID', + "name": "unitAmount", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "DraftOrderStatuses", + "fields": [ + { + "name": "fulfillmentStatus", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'lineItems', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'DraftOrderLineItem', - }, - }, + "name": "paymentStatus", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "DraftOrderTotals", + "fields": [ { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemNote', - }, - }, + "name": "discountTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'number', - type: { - kind: 'SCALAR', - name: 'String', + "name": "feeTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'numberDisplay', - type: { - kind: 'SCALAR', - name: 'String', + "name": "shippingTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'OBJECT', - name: 'DraftOrderContact', + "name": "subTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'shippingLines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'ShippingLine', - }, - }, + "name": "taxTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'statuses', - type: { - kind: 'OBJECT', - name: 'DraftOrderStatuses', + "name": "total", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "ExchangeCheckoutTokenInput", + "inputFields": [ + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput", + "inputFields": [ + { + "name": "type", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'taxExempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "FeeInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemTax', - }, - }, + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "defaultValue": "false" }, { - name: 'totals', - type: { - kind: 'OBJECT', - name: 'DraftOrderTotals', - }, - args: [], - isDeprecated: false, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'updatedAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - args: [], - isDeprecated: false, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - interfaces: [], + "isOneOf": false + }, + { + "kind": "SCALAR", + "name": "Float" }, { - kind: 'OBJECT', - name: 'DraftOrderAddress', - fields: [ + "kind": "ENUM", + "name": "FulfillmentModeInput", + "enumValues": [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "CURBSIDE", + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DELIVERY", + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DIGITAL", + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DRIVE_THRU", + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "FOR_HERE", + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "GENERAL_CONTAINER", + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "GIFT_CARD", + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "NONE", + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "NON_LODGING_NRR", + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'DraftOrderAddressInput', - inputFields: [ { - name: 'addressLine1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "NON_LODGING_SALE", + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "PICKUP", + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "PURCHASE", + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "QUICK_STAY", + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "REGULAR_STAY", + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "SHIP", + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "TO_GO", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "GeoCoordinates", + "fields": [ { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "latitude", + "type": { + "kind": "SCALAR", + "name": "Float" }, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "longitude", + "type": { + "kind": "SCALAR", + "name": "Float" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'DraftOrderContact', - fields: [ - { - name: 'address', - type: { - kind: 'OBJECT', - name: 'DraftOrderAddress', - }, - args: [], - isDeprecated: false, - }, + "kind": "SCALAR", + "name": "ID" + }, + { + "kind": "SCALAR", + "name": "Int" + }, + { + "kind": "OBJECT", + "name": "LineItemDetails", + "fields": [ { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "productAssetUrl", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', + "name": "selectedAddons", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SelectedAddon" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "selectedOptions", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SelectedOption" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', + "name": "sku", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', + "name": "unitOfMeasure", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'DraftOrderContext', - fields: [ + "kind": "OBJECT", + "name": "LineItemDiscount", + "fields": [ { - name: 'channelId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'owner', - type: { - kind: 'SCALAR', - name: 'String', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'storeId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "code", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'DraftOrderLineItem', - fields: [ { - name: 'createdAt', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'details', - type: { - kind: 'OBJECT', - name: 'LineItemDetails', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemDiscount', - }, - }, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "LineItemFee", + "fields": [ { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemFee', - }, - }, + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'fulfilledAt', - type: { - kind: 'SCALAR', - name: 'String', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentChannelId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: true, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentMode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "LineItemInputDetailsInfo", + "inputFields": [ + { + "name": "productAssetUrl", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "selectedAddons", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SelectedAddonInput" + } + } + } }, { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemNote', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "selectedOptions", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SelectedOptionInput" + } + } + } }, { - name: 'orderVersion', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "sku", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'productId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, + "name": "unitOfMeasure", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "LineItemInputShippingInfo", + "inputFields": [ { - name: 'quantity', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderAddressInput" + } }, { - name: 'returnQuantity', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'returnTotals', - type: { - kind: 'OBJECT', - name: 'LineItemReturnTotals', - }, - args: [], - isDeprecated: false, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'returnedAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'serviceEndsAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'serviceStartAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "ENUM", + "name": "LineItemModeInput", + "enumValues": [ { - name: 'shipping', - type: { - kind: 'OBJECT', - name: 'DraftOrderContact', - }, - args: [], - isDeprecated: false, + "name": "CURBSIDE", + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DELIVERY", + "isDeprecated": false }, { - name: 'status', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "DIGITAL", + "isDeprecated": false }, { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "DRIVE_THRU", + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemTax', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "FOR_HERE", + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'OBJECT', - name: 'LineItemTotals', - }, - args: [], - isDeprecated: false, + "name": "GENERAL_CONTAINER", + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "GIFT_CARD", + "isDeprecated": false }, { - name: 'unitAmount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "NONE", + "isDeprecated": false }, { - name: 'updatedAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "NON_LODGING_NRR", + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'DraftOrderLineItemInput', - inputFields: [ { - name: 'details', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputDetailsInfo', - }, + "name": "NON_LODGING_SALE", + "isDeprecated": false }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'DiscountInput', - }, - }, - }, + "name": "PICKUP", + "isDeprecated": false }, { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "PURCHASE", + "isDeprecated": false }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'FeeInput', - }, - }, - }, + "name": "QUICK_STAY", + "isDeprecated": false }, { - name: 'fulfillmentMode', - type: { - kind: 'ENUM', - name: 'LineItemModeInput', - }, + "name": "REGULAR_STAY", + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "SHIP", + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, - }, + "name": "TO_GO", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "LineItemNote", + "fields": [ { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "author", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, + "name": "authorType", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: '[]', + "args": [], + "isDeprecated": false }, { - name: 'productId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "content", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'quantity', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "createdAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'serviceEndsAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "deletedAt", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'serviceStartAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputShippingInfo', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "shouldNotifyCustomer", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "LineItemReturnTotals", + "fields": [ { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "discountTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxInput', - }, - }, + "name": "feeTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemTotalsInput', + "name": "subTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'ENUM', - name: 'LineItemTypesInput', + "name": "taxTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - defaultValue: 'PHYSICAL', + "args": [], + "isDeprecated": false }, { - name: 'unitAmount', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', + "name": "total", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'OBJECT', - name: 'DraftOrderStatuses', - fields: [ - { - name: 'fulfillmentStatus', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'paymentStatus', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, + "kind": "OBJECT", + "name": "LineItemTax", + "fields": [ { - name: 'status', - type: { - kind: 'SCALAR', - name: 'String', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'DraftOrderTotals', - fields: [ { - name: 'discountTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'feeTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'shippingTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'subTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'total', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'ExchangeCheckoutTokenInput', - inputFields: [ + "kind": "OBJECT", + "name": "LineItemTotals", + "fields": [ { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "discountTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'token', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "feeTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - inputFields: [ { - name: 'type', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "subTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "taxTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'FeeInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "LineItemTotalsInput", + "inputFields": [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', - }, - { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "discountTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "feeTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "subTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "taxTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } ], - isOneOf: false, - }, - { - kind: 'SCALAR', - name: 'Float', + "isOneOf": false }, { - kind: 'ENUM', - name: 'FulfillmentModeInput', - enumValues: [ - { - name: 'CURBSIDE', - isDeprecated: false, - }, - { - name: 'DELIVERY', - isDeprecated: false, - }, - { - name: 'DIGITAL', - isDeprecated: false, - }, - { - name: 'DRIVE_THRU', - isDeprecated: false, - }, + "kind": "ENUM", + "name": "LineItemTypesInput", + "enumValues": [ { - name: 'FOR_HERE', - isDeprecated: false, + "name": "ALL", + "isDeprecated": false }, { - name: 'GENERAL_CONTAINER', - isDeprecated: false, + "name": "DIGITAL", + "isDeprecated": false }, { - name: 'GIFT_CARD', - isDeprecated: false, + "name": "PAY_LINK", + "isDeprecated": false }, { - name: 'NONE', - isDeprecated: false, + "name": "PHYSICAL", + "isDeprecated": false }, { - name: 'NON_LODGING_NRR', - isDeprecated: false, + "name": "SERVICE", + "isDeprecated": false }, { - name: 'NON_LODGING_SALE', - isDeprecated: false, - }, - { - name: 'PICKUP', - isDeprecated: false, - }, - { - name: 'PURCHASE', - isDeprecated: false, - }, - { - name: 'QUICK_STAY', - isDeprecated: false, - }, + "name": "STAY", + "isDeprecated": false + } + ] + }, + { + "kind": "ENUM", + "name": "MetafieldTypeInput", + "enumValues": [ { - name: 'REGULAR_STAY', - isDeprecated: false, - }, + "name": "JSON", + "isDeprecated": false + } + ] + }, + { + "kind": "INPUT_OBJECT", + "name": "MoneyInput", + "inputFields": [ { - name: 'SHIP', - isDeprecated: false, + "name": "currencyCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'TO_GO', - isDeprecated: false, - }, + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Int" + } + } + } ], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'GeoCoordinates', - fields: [ + "kind": "OBJECT", + "name": "MoneyValue", + "fields": [ { - name: 'latitude', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'longitude', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Int" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], - }, - { - kind: 'SCALAR', - name: 'ID', + "interfaces": [] }, { - kind: 'SCALAR', - name: 'Int', - }, - { - kind: 'OBJECT', - name: 'LineItemDetails', - fields: [ + "kind": "OBJECT", + "name": "Mutation", + "fields": [ { - name: 'productAssetUrl', - type: { - kind: 'SCALAR', - name: 'String', + "name": "applyCheckoutSessionDeliveryMethod", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionDeliveryMethodInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'selectedAddons', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SelectedAddon', - }, - }, + "name": "applyCheckoutSessionDiscount", + "type": { + "kind": "OBJECT", + "name": "DraftOrder" }, - args: [], - isDeprecated: false, - }, - { - name: 'selectedOptions', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SelectedOption', - }, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionDiscountInput" + } + } }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'sku', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'unitOfMeasure', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'LineItemDiscount', - fields: [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "applyCheckoutSessionFulfillmentLocation", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionFulfillmentLocationInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "applyCheckoutSessionShippingMethod", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ApplyShippingMethodInput" + } + } + } + } + } + ], + "isDeprecated": false }, { - name: 'code', - type: { - kind: 'SCALAR', - name: 'String', + "name": "calculateCheckoutSessionTaxes", + "type": { + "kind": "OBJECT", + "name": "CheckoutSessionCalculationResult" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput" + } + }, + { + "name": "lines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxLineInput" + } + } + } + } + ], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "confirmCheckoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, - }, - { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationConfirmCheckoutSessionInput" + } + } }, - }, - args: [], - isDeprecated: false, + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "createCheckoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationCreateCheckoutSessionInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "exchangeCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutAuthToken" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationExchangeCheckoutTokenInput" + } + } + } + ], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'LineItemFee', - fields: [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "expireCheckoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "refreshCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutAuthToken" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "removeAppliedCheckoutSessionShippingMethod", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "RemoveShippingMethodInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, + "name": "updateCheckoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationUpdateCheckoutSessionInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "updateCheckoutSessionDraftOrder", + "type": { + "kind": "OBJECT", + "name": "DraftOrder" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationUpdateCheckoutSessionDraftOrderInput" + } + } + } + ], + "isDeprecated": false }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "verifyAddress", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "Address" + } + } }, - args: [], - isDeprecated: false, - }, + "args": [ + { + "name": "input", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MutationVerifyAddressInput" + } + } + } + ], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'LineItemInputDetailsInfo', - inputFields: [ - { - name: 'productAssetUrl', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'selectedAddons', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'SelectedAddonInput', - }, - }, - }, - }, - { - name: 'selectedOptions', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'SelectedOptionInput', - }, - }, - }, - }, - { - name: 'sku', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionDeliveryMethodInput", + "inputFields": [ { - name: 'unitOfMeasure', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "mode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "FulfillmentModeInput" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'LineItemInputShippingInfo', - inputFields: [ - { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderAddressInput', - }, + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionDiscountInput", + "inputFields": [ + { + "name": "discountCodes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationApplyCheckoutSessionFulfillmentLocationInput", + "inputFields": [ + { + "name": "fulfillmentLocationId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationConfirmCheckoutSessionInput", + "inputFields": [ + { + "name": "billing", + "type": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutBillingInfoInput" + } }, { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "fulfillmentEndAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "fulfillmentLocationId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fulfillmentStartAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "paymentProcessor", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "paymentProvider", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "paymentToken", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "paymentType", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingInfoInput" + } }, { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "shippingLines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ConfirmCheckoutShippingLineInput" + } + } + } }, { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "shippingTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } }, + { + "name": "taxTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'ENUM', - name: 'LineItemModeInput', - enumValues: [ + "kind": "INPUT_OBJECT", + "name": "MutationCreateCheckoutSessionInput", + "inputFields": [ { - name: 'CURBSIDE', - isDeprecated: false, + "name": "channelId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'DELIVERY', - isDeprecated: false, + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'DIGITAL', - isDeprecated: false, + "name": "draftOrderId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'DRIVE_THRU', - isDeprecated: false, + "name": "enableAddressAutocomplete", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableBillingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'FOR_HERE', - isDeprecated: false, + "name": "enableLocalPickup", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'GENERAL_CONTAINER', - isDeprecated: false, + "name": "enableNotesCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'GIFT_CARD', - isDeprecated: false, + "name": "enablePaymentMethodCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'NONE', - isDeprecated: false, + "name": "enablePhoneCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enablePromotionCodes", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'NON_LODGING_NRR', - isDeprecated: false, + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableShippingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableSurcharge", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'NON_LODGING_SALE', - isDeprecated: false, + "name": "enableTaxCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableTips", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'PICKUP', - isDeprecated: false, + "name": "enabledLocales", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, { - name: 'PURCHASE', - isDeprecated: false, + "name": "enabledPaymentProviders", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "environment", + "type": { + "kind": "ENUM", + "name": "CheckoutSessionEnvironment" + } + }, + { + "name": "experimental_rules", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionExperimentalRulesInput" + } + }, + { + "name": "expiresAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "lineItems", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLineItemInput" + } + } + } + }, + { + "name": "locations", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLocationInput" + } + } + } + }, + { + "name": "operatingHours", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionOperatingHoursMapInput" + } + }, + { + "name": "paymentMethods", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodsInput" + } + }, + { + "name": "returnUrl", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionShippingOptionsInput" + } + }, + { + "name": "sourceApp", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "storeId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "storeName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "successUrl", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "taxes", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionTaxesOptionsInput" + } + }, + { + "name": "url", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationExchangeCheckoutTokenInput", + "inputFields": [ + { + "name": "sessionId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationUpdateCheckoutSessionDraftOrderInput", + "inputFields": [ + { + "name": "billing", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderBillingInfoInput" + } + }, + { + "name": "cartId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "context", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderContextInputUpdate" + } + } + }, + { + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateDiscountInput" + } + } + } + }, + { + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateFeeInput" + } + } + } + }, + { + "name": "lineItems", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftOrderLineItemsInput" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + } + }, + { + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderShippingInfoInput" + } + }, + { + "name": "shippingLines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftShippingLineInput" + } + } + } + }, + { + "name": "staffUserIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "taxExempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateOrderTaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderTotalsInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "MutationUpdateCheckoutSessionInput", + "inputFields": [ + { + "name": "channelId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "customerId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "enableAddressAutocomplete", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableBillingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableLocalPickup", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enableNotesCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enablePaymentMethodCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'QUICK_STAY', - isDeprecated: false, + "name": "enablePhoneCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "enablePromotionCodes", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'REGULAR_STAY', - isDeprecated: false, + "name": "enableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'SHIP', - isDeprecated: false, + "name": "enableShippingAddressCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'TO_GO', - isDeprecated: false, + "name": "enableSurcharge", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, - ], - }, - { - kind: 'OBJECT', - name: 'LineItemNote', - fields: [ { - name: 'author', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "enableTaxCollection", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'authorType', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "enableTips", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'content', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "enabledLocales", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, { - name: 'createdAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "enabledPaymentProviders", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, { - name: 'deletedAt', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "environment", + "type": { + "kind": "ENUM", + "name": "CheckoutSessionEnvironment" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "experimental_rules", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionExperimentalRulesInput" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "expiresAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } }, { - name: 'shouldNotifyCustomer', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, + "name": "locations", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionLocationInput" + } + } + } }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'LineItemReturnTotals', - fields: [ { - name: 'discountTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "operatingHours", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionOperatingHoursMapInput" + } }, { - name: 'feeTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "paymentMethods", + "type": { + "kind": "INPUT_OBJECT", + "name": "CheckoutSessionPaymentMethodsInput" + } }, { - name: 'subTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "returnUrl", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'taxTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "sourceApp", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'total', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "storeId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "storeName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "successUrl", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "url", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'LineItemTax', - fields: [ + "kind": "INPUT_OBJECT", + "name": "MutationVerifyAddressInput", + "inputFields": [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "addressLine1", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + { + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'LineItemTotals', - fields: [ - { - name: 'discountTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, - }, + "kind": "ENUM", + "name": "NoteAuthorTypeInput", + "enumValues": [ { - name: 'feeTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "CUSTOMER", + "isDeprecated": false }, { - name: 'subTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "MERCHANT", + "isDeprecated": false }, { - name: 'taxTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], + "name": "NONE", + "isDeprecated": false + } + ] }, { - kind: 'INPUT_OBJECT', - name: 'LineItemTotalsInput', - inputFields: [ - { - name: 'discountTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, + "kind": "INPUT_OBJECT", + "name": "NoteInput", + "inputFields": [ { - name: 'feeTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "author", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'subTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "authorType", + "type": { + "kind": "ENUM", + "name": "NoteAuthorTypeInput" + } }, { - name: 'taxTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "content", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, - ], - isOneOf: false, - }, - { - kind: 'ENUM', - name: 'LineItemTypesInput', - enumValues: [ { - name: 'ALL', - isDeprecated: false, + "name": "createdAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } }, { - name: 'DIGITAL', - isDeprecated: false, + "name": "deletedAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } }, { - name: 'PAY_LINK', - isDeprecated: false, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'PHYSICAL', - isDeprecated: false, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } }, { - name: 'SERVICE', - isDeprecated: false, + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'STAY', - isDeprecated: false, - }, + "name": "shouldNotifyCustomer", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + } ], + "isOneOf": false }, { - kind: 'ENUM', - name: 'MetafieldTypeInput', - enumValues: [ - { - name: 'JSON', - isDeprecated: false, - }, - ], + "kind": "SCALAR", + "name": "Null" }, { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "OrderAddressInput", + "inputFields": [ { - name: 'currencyCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Int', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'MoneyValue', - fields: [ - { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Int', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'Mutation', - fields: [ - { - name: 'applyCheckoutSessionDeliveryMethod', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionDeliveryMethodInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'applyCheckoutSessionDiscount', - type: { - kind: 'OBJECT', - name: 'DraftOrder', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionDiscountInput', - }, - }, - }, - { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'applyCheckoutSessionFulfillmentLocation', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionFulfillmentLocationInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'applyCheckoutSessionShippingMethod', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ApplyShippingMethodInput', - }, - }, - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'calculateCheckoutSessionTaxes', - type: { - kind: 'OBJECT', - name: 'CheckoutSessionCalculationResult', - }, - args: [ - { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', - }, - }, - { - name: 'lines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxLineInput', - }, - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'confirmCheckoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationConfirmCheckoutSessionInput', - }, - }, - }, - { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'createCheckoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationCreateCheckoutSessionInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'exchangeCheckoutToken', - type: { - kind: 'OBJECT', - name: 'CheckoutAuthToken', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationExchangeCheckoutTokenInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'expireCheckoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'refreshCheckoutToken', - type: { - kind: 'OBJECT', - name: 'CheckoutAuthToken', - }, - args: [], - isDeprecated: false, - }, - { - name: 'removeAppliedCheckoutSessionShippingMethod', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'RemoveShippingMethodInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'updateCheckoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationUpdateCheckoutSessionInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'updateCheckoutSessionDraftOrder', - type: { - kind: 'OBJECT', - name: 'DraftOrder', - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationUpdateCheckoutSessionDraftOrderInput', - }, - }, - }, - ], - isDeprecated: false, - }, - { - name: 'verifyAddress', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'Address', - }, - }, - }, - args: [ - { - name: 'input', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MutationVerifyAddressInput', - }, - }, - }, - ], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionDeliveryMethodInput', - inputFields: [ - { - name: 'mode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'ENUM', - name: 'FulfillmentModeInput', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionDiscountInput', - inputFields: [ - { - name: 'discountCodes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationApplyCheckoutSessionFulfillmentLocationInput', - inputFields: [ - { - name: 'fulfillmentLocationId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationConfirmCheckoutSessionInput', - inputFields: [ - { - name: 'billing', - type: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutBillingInfoInput', - }, - }, - { - name: 'fulfillmentEndAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'fulfillmentLocationId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'fulfillmentStartAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'paymentProcessor', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'paymentProvider', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'paymentToken', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'paymentType', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingInfoInput', - }, - }, - { - name: 'shippingLines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ConfirmCheckoutShippingLineInput', - }, - }, - }, - }, - { - name: 'shippingTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - { - name: 'taxTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationCreateCheckoutSessionInput', - inputFields: [ - { - name: 'channelId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'draftOrderId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'enableAddressAutocomplete', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableBillingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableLocalPickup', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableNotesCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePaymentMethodCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePhoneCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePromotionCodes', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableShipping', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableShippingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableSurcharge', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableTaxCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableTips', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enabledLocales', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'enabledPaymentProviders', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'environment', - type: { - kind: 'ENUM', - name: 'CheckoutSessionEnvironment', - }, - }, - { - name: 'experimental_rules', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionExperimentalRulesInput', - }, - }, - { - name: 'expiresAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'lineItems', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLineItemInput', - }, - }, - }, - }, - { - name: 'locations', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLocationInput', - }, - }, - }, - }, - { - name: 'operatingHours', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionOperatingHoursMapInput', - }, - }, - { - name: 'paymentMethods', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodsInput', - }, - }, - { - name: 'returnUrl', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionShippingOptionsInput', - }, - }, - { - name: 'sourceApp', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'storeId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'storeName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'successUrl', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'taxes', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionTaxesOptionsInput', - }, - }, - { - name: 'url', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationExchangeCheckoutTokenInput', - inputFields: [ - { - name: 'sessionId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'token', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationUpdateCheckoutSessionDraftOrderInput', - inputFields: [ - { - name: 'billing', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderBillingInfoInput', - }, - }, - { - name: 'cartId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'context', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderContextInputUpdate', - }, - }, - }, - { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateDiscountInput', - }, - }, - }, - }, - { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateFeeInput', - }, - }, - }, - }, - { - name: 'lineItems', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftOrderLineItemsInput', - }, - }, - { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, - }, - { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, - }, - }, - { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderShippingInfoInput', - }, - }, - { - name: 'shippingLines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftShippingLineInput', - }, - }, - }, - }, - { - name: 'staffUserIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'taxExempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateOrderTaxInput', - }, - }, - }, - }, - { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderTotalsInput', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationUpdateCheckoutSessionInput', - inputFields: [ - { - name: 'channelId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'customerId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'enableAddressAutocomplete', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableBillingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableLocalPickup', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableNotesCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePaymentMethodCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePhoneCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enablePromotionCodes', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableShipping', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableShippingAddressCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableSurcharge', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableTaxCollection', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enableTips', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - { - name: 'enabledLocales', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'enabledPaymentProviders', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - { - name: 'environment', - type: { - kind: 'ENUM', - name: 'CheckoutSessionEnvironment', - }, - }, - { - name: 'experimental_rules', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionExperimentalRulesInput', - }, - }, - { - name: 'expiresAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'locations', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionLocationInput', - }, - }, - }, - }, - { - name: 'operatingHours', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionOperatingHoursMapInput', - }, - }, - { - name: 'paymentMethods', - type: { - kind: 'INPUT_OBJECT', - name: 'CheckoutSessionPaymentMethodsInput', - }, - }, - { - name: 'returnUrl', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'sourceApp', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'storeId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'storeName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'successUrl', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'url', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'MutationVerifyAddressInput', - inputFields: [ - { - name: 'addressLine1', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'ENUM', - name: 'NoteAuthorTypeInput', - enumValues: [ - { - name: 'CUSTOMER', - isDeprecated: false, - }, - { - name: 'MERCHANT', - isDeprecated: false, - }, - { - name: 'NONE', - isDeprecated: false, - }, - ], - }, - { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - inputFields: [ - { - name: 'author', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'authorType', - type: { - kind: 'ENUM', - name: 'NoteAuthorTypeInput', - }, - }, - { - name: 'content', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'createdAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'deletedAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, - }, - { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, - }, - { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'shouldNotifyCustomer', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'SCALAR', - name: 'Null', - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderAddressInput', - inputFields: [ - { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'countryCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'postalCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderBillingInfoInput', - inputFields: [ - { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderAddressInput', - }, - }, - { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderContextInputUpdate', - inputFields: [ - { - name: 'channelId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'storeId', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'OrderMetafield', - fields: [ - { - name: 'key', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'type', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - inputFields: [ - { - name: 'key', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'type', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'ENUM', - name: 'MetafieldTypeInput', - }, - }, - defaultValue: 'JSON', - }, - { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderShippingInfoInput', - inputFields: [ - { - name: 'address', - type: { - kind: 'INPUT_OBJECT', - name: 'OrderAddressInput', - }, - }, - { - name: 'companyName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'email', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'firstName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'lastName', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'phone', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'OrderTotalsInput', - inputFields: [ - { - name: 'discountTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'feeTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'shippingTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'subTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'taxTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - { - name: 'total', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'PageInfo', - fields: [ - { - name: 'endCursor', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'hasNextPage', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'hasPreviousPage', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Boolean', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'startCursor', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'PriceAdjustmentShippingLineInput', - inputFields: [ - { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'subTotal', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'PriceAdjustmentsCalculationResult', - fields: [ - { - name: 'adjustments', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CalculatedAdjustmentOutput', - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'lines', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'CalculatedLineOutput', - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'totalDiscountAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', - }, - args: [], - isDeprecated: false, - }, - { - name: 'totalFeeAmount', - type: { - kind: 'OBJECT', - name: 'SimpleMoney', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'Query', - fields: [ - { - name: 'checkoutSession', - type: { - kind: 'OBJECT', - name: 'CheckoutSession', - }, - args: [], - isDeprecated: false, - }, - { - name: 'validateCheckoutToken', - type: { - kind: 'OBJECT', - name: 'CheckoutTokenValidation', - }, - args: [ - { - name: 'token', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - ], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'RemoveShippingMethodInput', - inputFields: [ - { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'serviceCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'SKU', - fields: [ - { - name: 'attributeValues', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUAttributeValue', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'attributes', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUAttribute', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'code', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'createdAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'disableShipping', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - args: [], - isDeprecated: false, - }, - { - name: 'htmlDescription', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'mediaUrls', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'metafields', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUMetafieldsConnection', - }, - }, - args: [ - { - name: 'after', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'before', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'first', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, - { - name: 'last', - type: { - kind: 'SCALAR', - name: 'Int', - }, - }, - ], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'prices', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUPrice', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'status', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'unitOfWeight', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'updatedAt', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'DateTime', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'weight', - type: { - kind: 'SCALAR', - name: 'Float', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUAttribute', - fields: [ - { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'htmlDescription', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'values', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SKUAttributeValue', - }, - }, - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUAttributeValue', - fields: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'label', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUMetafield', - fields: [ - { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'ID', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'key', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'namespace', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUMetafieldsConnection', - fields: [ - { - name: 'edges', - type: { - kind: 'LIST', - ofType: { - kind: 'OBJECT', - name: 'SKUMetafieldsConnectionEdge', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'pageInfo', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'PageInfo', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUMetafieldsConnectionEdge', - fields: [ - { - name: 'cursor', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'node', - type: { - kind: 'OBJECT', - name: 'SKUMetafield', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SKUPrice', - fields: [ - { - name: 'currencyCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - args: [], - isDeprecated: false, - }, - { - name: 'value', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'Float', - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'SelectedAddon', - fields: [ - { - name: 'attribute', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'sku', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - { - name: 'values', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'SelectedAddonValue', - }, - }, - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'SelectedAddonInput', - inputFields: [ - { - name: 'attribute', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - { - name: 'sku', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, - { - name: 'values', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'SelectedAddonValueInput', - }, - }, - }, - }, - }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'SelectedAddonValue', - fields: [ - { - name: 'costAdjustment', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, - }, - { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, - }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'SelectedAddonValueInput', - inputFields: [ - { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, - { - name: 'amountIncreased', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'costAdjustment', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - ], - isOneOf: false, - }, - { - kind: 'OBJECT', - name: 'SelectedOption', - fields: [ { - name: 'attribute', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'values', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, - ], - interfaces: [], - }, - { - kind: 'INPUT_OBJECT', - name: 'SelectedOptionInput', - inputFields: [ { - name: 'attribute', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'values', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - }, + "name": "countryCode", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "postalCode", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'OBJECT', - name: 'ShippingLine', - fields: [ + "kind": "INPUT_OBJECT", + "name": "OrderBillingInfoInput", + "inputFields": [ { - name: 'amount', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderAddressInput" + } }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemDiscount', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'OrderMetafield', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "OrderContextInputUpdate", + "inputFields": [ + { + "name": "channelId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', + "name": "storeId", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "OrderMetafield", + "fields": [ + { + "name": "key", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'LineItemTax', - }, - }, + "name": "type", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'OBJECT', - name: 'ShippingLineTotals', + "name": "value", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, - }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'ShippingLineTotals', - fields: [ + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput", + "inputFields": [ { - name: 'subTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', - }, - args: [], - isDeprecated: false, + "name": "key", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'taxTotal', - type: { - kind: 'OBJECT', - name: 'MoneyValue', + "name": "type", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "ENUM", + "name": "MetafieldTypeInput" + } }, - args: [], - isDeprecated: false, + "defaultValue": "JSON" }, + { + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'ENUM', - name: 'ShippingLineType', - enumValues: [ + "kind": "INPUT_OBJECT", + "name": "OrderShippingInfoInput", + "inputFields": [ + { + "name": "address", + "type": { + "kind": "INPUT_OBJECT", + "name": "OrderAddressInput" + } + }, { - name: 'FEE', - isDeprecated: false, + "name": "companyName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'SHIPPING', - isDeprecated: false, + "name": "email", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'SKU', - isDeprecated: false, + "name": "firstName", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "lastName", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "phone", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'ShippingRate', - fields: [ + "kind": "INPUT_OBJECT", + "name": "OrderTotalsInput", + "inputFields": [ { - name: 'carrierCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "discountTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, - { - name: 'cost', - type: { - kind: 'OBJECT', - name: 'ShippingRateMoneyValue', - }, - args: [], - isDeprecated: false, + { + "name": "feeTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'description', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "shippingTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'displayName', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "subTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'features', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, - }, - args: [], - isDeprecated: false, + "name": "taxTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'maxDeliveryDate', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "total", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "PageInfo", + "fields": [ + { + "name": "endCursor", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hasNextPage", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "hasPreviousPage", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + "args": [], + "isDeprecated": false }, { - name: 'minDeliveryDate', - type: { - kind: 'SCALAR', - name: 'String', + "name": "startCursor", + "type": { + "kind": "SCALAR", + "name": "String" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "PriceAdjustmentShippingLineInput", + "inputFields": [ + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'serviceCode', - type: { - kind: 'SCALAR', - name: 'String', - }, - args: [], - isDeprecated: false, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "subTotal", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + } ], - interfaces: [], + "isOneOf": false }, { - kind: 'OBJECT', - name: 'ShippingRateCalculationResult', - fields: [ + "kind": "OBJECT", + "name": "PriceAdjustmentsCalculationResult", + "fields": [ { - name: 'rates', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'OBJECT', - name: 'ShippingRate', - }, - }, + "name": "adjustments", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CalculatedAdjustmentOutput" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, - ], - interfaces: [], - }, - { - kind: 'OBJECT', - name: 'ShippingRateMoneyValue', - fields: [ { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "lines", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "CalculatedLineOutput" + } + } }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "totalDiscountAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, + { + "name": "totalFeeAmount", + "type": { + "kind": "OBJECT", + "name": "SimpleMoney" + }, + "args": [], + "isDeprecated": false + } ], - interfaces: [], + "interfaces": [] }, { - kind: 'OBJECT', - name: 'SimpleMoney', - fields: [ + "kind": "OBJECT", + "name": "Query", + "fields": [ { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', + "name": "checkoutSession", + "type": { + "kind": "OBJECT", + "name": "CheckoutSession" }, - args: [], - isDeprecated: false, + "args": [], + "isDeprecated": false }, { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "validateCheckoutToken", + "type": { + "kind": "OBJECT", + "name": "CheckoutTokenValidation" }, - args: [], - isDeprecated: false, + "args": [ + { + "name": "token", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "RemoveShippingMethodInput", + "inputFields": [ + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + { + "name": "serviceCode", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - interfaces: [], - }, - { - kind: 'SCALAR', - name: 'String', + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', - inputFields: [ + "kind": "OBJECT", + "name": "SKU", + "fields": [ { - name: 'addressLine1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "attributeValues", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUAttributeValue" + } + } + } }, + "args": [], + "isDeprecated": false + }, + { + "name": "attributes", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUAttribute" + } + } + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "code", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "createdAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "disableShipping", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "htmlDescription", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } + }, + "args": [], + "isDeprecated": false + }, + { + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "mediaUrls", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'addressLine3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "metafields", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUMetafieldsConnection" + } }, + "args": [ + { + "name": "after", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "before", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "first", + "type": { + "kind": "SCALAR", + "name": "Int" + } + }, + { + "name": "last", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } + ], + "isDeprecated": false }, { - name: 'adminArea1', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea2', - type: { - kind: 'SCALAR', - name: 'String', + "name": "prices", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUPrice" + } + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea3', - type: { - kind: 'SCALAR', - name: 'String', + "name": "status", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'adminArea4', - type: { - kind: 'SCALAR', - name: 'String', + "name": "unitOfWeight", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'countryCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "updatedAt", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "DateTime" + } }, + "args": [], + "isDeprecated": false }, { - name: 'postalCode', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "weight", + "type": { + "kind": "SCALAR", + "name": "Float" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'TaxInput', - inputFields: [ + "kind": "OBJECT", + "name": "SKUAttribute", + "fields": [ { - name: 'amount', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "htmlDescription", + "type": { + "kind": "SCALAR", + "name": "String" }, - defaultValue: 'false', + "args": [], + "isDeprecated": false }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } }, + "args": [], + "isDeprecated": false }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "values", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SKUAttributeValue" + } + } + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "SKUAttributeValue", + "fields": [ { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } }, + "args": [], + "isDeprecated": false }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "label", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'TaxLineInput', - inputFields: [ + "kind": "OBJECT", + "name": "SKUMetafield", + "fields": [ { - name: 'classification', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "ID" + } }, + "args": [], + "isDeprecated": false }, { - name: 'destination', - type: { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', + "name": "key", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "namespace", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'origin', - type: { - kind: 'INPUT_OBJECT', - name: 'TaxDestinationAddressInput', + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "SKUMetafieldsConnection", + "fields": [ { - name: 'quantity', - type: { - kind: 'SCALAR', - name: 'Int', + "name": "edges", + "type": { + "kind": "LIST", + "ofType": { + "kind": "OBJECT", + "name": "SKUMetafieldsConnectionEdge" + } }, + "args": [], + "isDeprecated": false }, { - name: 'subtotalPrice', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', - }, + "name": "pageInfo", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "PageInfo" + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "SKUMetafieldsConnectionEdge", + "fields": [ { - name: 'type', - type: { - kind: 'ENUM', - name: 'ShippingLineType', + "name": "cursor", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'unitPrice', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', + "name": "node", + "type": { + "kind": "OBJECT", + "name": "SKUMetafield" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDiscountInput', - inputFields: [ + "kind": "OBJECT", + "name": "SKUPrice", + "fields": [ { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', + "name": "currencyCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } }, + "args": [], + "isDeprecated": false }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "value", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "Float" + } }, - defaultValue: 'false', - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "SelectedAddon", + "fields": [ { - name: 'code', - type: { - kind: 'SCALAR', - name: 'String', + "name": "attribute", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, + "name": "sku", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "values", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "SelectedAddonValue" + } + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "SelectedAddonInput", + "inputFields": [ { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "attribute", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "sku", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', + "name": "values", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "SelectedAddonValueInput" + } + } + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "SelectedAddonValue", + "fields": [ + { + "name": "costAdjustment", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "SelectedAddonValueInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + }, + { + "name": "amountIncreased", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "costAdjustment", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + }, + { + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "SelectedOption", + "fields": [ + { + "name": "attribute", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "values", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftLineItemInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "SelectedOptionInput", + "inputFields": [ { - name: 'details', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputDetailsInfo', - }, + "name": "attribute", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'DiscountInput', - }, - }, - }, - }, + "name": "values", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + } + } + ], + "isOneOf": false + }, + { + "kind": "OBJECT", + "name": "ShippingLine", + "fields": [ { - name: 'externalId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "amount", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'FeeInput', - }, - }, + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemDiscount" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentChannelId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'fulfillmentMode', - type: { - kind: 'ENUM', - name: 'LineItemModeInput', + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "OrderMetafield" + } + } }, + "args": [], + "isDeprecated": false }, { - name: 'id', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "LineItemTax" + } + } }, - defaultValue: '[]', + "args": [], + "isDeprecated": false }, { - name: 'productId', - type: { - kind: 'SCALAR', - name: 'String', + "name": "totals", + "type": { + "kind": "OBJECT", + "name": "ShippingLineTotals" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ShippingLineTotals", + "fields": [ { - name: 'quantity', - type: { - kind: 'SCALAR', - name: 'Float', + "name": "subTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'serviceEndsAt', - type: { - kind: 'SCALAR', - name: 'DateTime', + "name": "taxTotal", + "type": { + "kind": "OBJECT", + "name": "MoneyValue" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "ENUM", + "name": "ShippingLineType", + "enumValues": [ { - name: 'serviceStartAt', - type: { - kind: 'SCALAR', - name: 'DateTime', - }, + "name": "FEE", + "isDeprecated": false }, { - name: 'shipping', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemInputShippingInfo', - }, + "name": "SHIPPING", + "isDeprecated": false }, { - name: 'skuId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "SKU", + "isDeprecated": false + } + ] + }, + { + "kind": "OBJECT", + "name": "ShippingRate", + "fields": [ { - name: 'tags', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "carrierCode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'TaxInput', - }, - }, + "name": "cost", + "type": { + "kind": "OBJECT", + "name": "ShippingRateMoneyValue" }, + "args": [], + "isDeprecated": false }, { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'LineItemTotalsInput', + "name": "description", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'type', - type: { - kind: 'ENUM', - name: 'LineItemTypesInput', + "name": "displayName", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'unitAmount', - type: { - kind: 'INPUT_OBJECT', - name: 'MoneyInput', + "name": "features", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, + "args": [], + "isDeprecated": false }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftOrderInput', - inputFields: [ { - name: 'lineItems', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftOrderLineItemsInput', + "name": "maxDeliveryDate", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'notes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'NoteInput', - }, - }, + "name": "minDeliveryDate", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'taxExempted', - type: { - kind: 'SCALAR', - name: 'Boolean', + "name": "serviceCode", + "type": { + "kind": "SCALAR", + "name": "String" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftOrderLineItemsInput', - inputFields: [ + "kind": "OBJECT", + "name": "ShippingRateCalculationResult", + "fields": [ { - name: 'add', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'CreateDraftLineItemInput', - }, - }, + "name": "rates", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "OBJECT", + "name": "ShippingRate" + } + } }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "OBJECT", + "name": "ShippingRateMoneyValue", + "fields": [ { - name: 'remove', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'update', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftLineItemInput', - }, - }, + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Float" }, - }, + "args": [], + "isDeprecated": false + } ], - isOneOf: false, + "interfaces": [] }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftShippingLineInput', - inputFields: [ + "kind": "OBJECT", + "name": "SimpleMoney", + "fields": [ { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" }, + "args": [], + "isDeprecated": false }, { - name: 'discounts', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateDiscountInput', - }, - }, + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Float" }, - }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "SCALAR", + "name": "String" + }, + { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput", + "inputFields": [ { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "addressLine1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'fees', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateFeeInput', - }, - }, - }, + "name": "addressLine2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "addressLine3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "adminArea1", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea2", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea3", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "adminArea4", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateTaxInput', - }, - }, - }, + "name": "countryCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftShippingLineTotalsInput', - }, - }, + "name": "postalCode", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateDraftShippingLineTotalsInput', - inputFields: [ - { - name: 'subTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, - }, + "kind": "INPUT_OBJECT", + "name": "TaxInput", + "inputFields": [ { - name: 'taxTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, + "name": "amount", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'UpdateFeeInput', - inputFields: [ { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'appliedBeforeTax', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "name", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "TaxLineInput", + "inputFields": [ { - name: 'currencyCode', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "classification", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'value', - type: { - kind: 'SCALAR', - name: 'Int', - }, + "name": "destination", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput" + } }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'UpdateNoteInput', - inputFields: [ { - name: 'author', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, { - name: 'authorType', - type: { - kind: 'ENUM', - name: 'NoteAuthorTypeInput', - }, + "name": "origin", + "type": { + "kind": "INPUT_OBJECT", + "name": "TaxDestinationAddressInput" + } }, { - name: 'content', - type: { - kind: 'NON_NULL', - ofType: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "quantity", + "type": { + "kind": "SCALAR", + "name": "Int" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "subtotalPrice", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "type", + "type": { + "kind": "ENUM", + "name": "ShippingLineType" + } }, { - name: 'shouldNotifyCustomer', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', - }, + "name": "unitPrice", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateOrderTaxInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "UpdateDiscountInput", + "inputFields": [ { - name: 'additional', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } }, { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', + "name": "code", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftLineItemInput", + "inputFields": [ + { + "name": "details", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputDetailsInfo" + } + }, + { + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "DiscountInput" + } + } + } + }, + { + "name": "externalId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "FeeInput" + } + } + } + }, + { + "name": "fulfillmentChannelId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fulfillmentMode", + "type": { + "kind": "ENUM", + "name": "LineItemModeInput" + } + }, + { + "name": "id", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + }, + "defaultValue": "[]" + }, + { + "name": "productId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "quantity", + "type": { + "kind": "SCALAR", + "name": "Float" + } + }, + { + "name": "serviceEndsAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "serviceStartAt", + "type": { + "kind": "SCALAR", + "name": "DateTime" + } + }, + { + "name": "shipping", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemInputShippingInfo" + } + }, + { + "name": "skuId", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "tags", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "TaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "LineItemTotalsInput" + } + }, + { + "name": "type", + "type": { + "kind": "ENUM", + "name": "LineItemTypesInput" + } + }, + { + "name": "unitAmount", + "type": { + "kind": "INPUT_OBJECT", + "name": "MoneyInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftOrderInput", + "inputFields": [ + { + "name": "lineItems", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftOrderLineItemsInput" + } + }, + { + "name": "notes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "NoteInput" + } + } + } + }, + { + "name": "taxExempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftOrderLineItemsInput", + "inputFields": [ + { + "name": "add", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "CreateDraftLineItemInput" + } + } + } + }, + { + "name": "remove", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } + } + }, + { + "name": "update", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftLineItemInput" + } + } + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftShippingLineInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + }, + { + "name": "discounts", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateDiscountInput" + } + } + } + }, + { + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } + }, + { + "name": "fees", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateFeeInput" + } + } + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateTaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftShippingLineTotalsInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateDraftShippingLineTotalsInput", + "inputFields": [ + { + "name": "subTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + }, + { + "name": "taxTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateFeeInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', + "name": "appliedBeforeTax", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput", + "inputFields": [ + { + "name": "currencyCode", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "value", + "type": { + "kind": "SCALAR", + "name": "Int" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateShippingLineInput', - inputFields: [ + "kind": "INPUT_OBJECT", + "name": "UpdateNoteInput", + "inputFields": [ { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, + "name": "author", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "authorType", + "type": { + "kind": "ENUM", + "name": "NoteAuthorTypeInput" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "content", + "type": { + "kind": "NON_NULL", + "ofType": { + "kind": "SCALAR", + "name": "String" + } + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } }, { - name: 'requestedProvider', - type: { - kind: 'SCALAR', - name: 'String', + "name": "shouldNotifyCustomer", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, - }, + "defaultValue": "false" + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateOrderTaxInput", + "inputFields": [ { - name: 'requestedService', - type: { - kind: 'SCALAR', - name: 'String', + "name": "additional", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, { - name: 'taxes', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'UpdateTaxInput', - }, - }, - }, + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } }, { - name: 'totals', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateShippingLineTotalsInput', + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" }, + "defaultValue": "false" }, - ], - isOneOf: false, - }, - { - kind: 'INPUT_OBJECT', - name: 'UpdateShippingLineTotalsInput', - inputFields: [ { - name: 'subTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'taxTotal', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } + }, + { + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, + { + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, + "isOneOf": false }, { - kind: 'INPUT_OBJECT', - name: 'UpdateTaxInput', - inputFields: [ - { - name: 'amount', - type: { - kind: 'INPUT_OBJECT', - name: 'UpdateMoneyInput', - }, - }, + "kind": "INPUT_OBJECT", + "name": "UpdateShippingLineInput", + "inputFields": [ { - name: 'exempted', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, - defaultValue: 'false', + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } }, { - name: 'externalIds', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'ExternalIdsInput', - }, - }, - }, + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } + }, + { + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'id', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedProvider", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "requestedService", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "taxes", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "UpdateTaxInput" + } + } + } + }, + { + "name": "totals", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateShippingLineTotalsInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateShippingLineTotalsInput", + "inputFields": [ + { + "name": "subTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + }, + { + "name": "taxTotal", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "INPUT_OBJECT", + "name": "UpdateTaxInput", + "inputFields": [ + { + "name": "amount", + "type": { + "kind": "INPUT_OBJECT", + "name": "UpdateMoneyInput" + } + }, + { + "name": "exempted", + "type": { + "kind": "SCALAR", + "name": "Boolean" + }, + "defaultValue": "false" + }, + { + "name": "externalIds", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "ExternalIdsInput" + } + } + } }, { - name: 'included', - type: { - kind: 'SCALAR', - name: 'Boolean', - }, + "name": "id", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'metafields', - type: { - kind: 'LIST', - ofType: { - kind: 'NON_NULL', - ofType: { - kind: 'INPUT_OBJECT', - name: 'OrderMetafieldInput', - }, - }, - }, + "name": "included", + "type": { + "kind": "SCALAR", + "name": "Boolean" + } }, { - name: 'name', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "metafields", + "type": { + "kind": "LIST", + "ofType": { + "kind": "NON_NULL", + "ofType": { + "kind": "INPUT_OBJECT", + "name": "OrderMetafieldInput" + } + } + } + }, + { + "name": "name", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'ratePercentage', - type: { - kind: 'SCALAR', - name: 'String', - }, + "name": "ratePercentage", + "type": { + "kind": "SCALAR", + "name": "String" + } }, { - name: 'referenceId', - type: { - kind: 'SCALAR', - name: 'String', - }, - }, + "name": "referenceId", + "type": { + "kind": "SCALAR", + "name": "String" + } + } ], - isOneOf: false, - }, + "isOneOf": false + } ], - directives: [], - }, + "directives": [] + } } as const; -export { introspection }; +export { introspection }; \ No newline at end of file From 82713a58a4669d34b8b38649c801a035c483123b Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Thu, 6 Nov 2025 14:35:38 -0600 Subject: [PATCH 20/23] fix create session input types and fix delivery method logic --- .../checkout/delivery/delivery-method.tsx | 24 +- .../checkout/form/checkout-form.tsx | 2 +- packages/react/src/lib/godaddy/godaddy.ts | 12 +- packages/react/src/lib/godaddy/graphql-env.ts | 501 ++++++++++++++++++ packages/react/src/server.ts | 3 +- 5 files changed, 530 insertions(+), 12 deletions(-) diff --git a/packages/react/src/components/checkout/delivery/delivery-method.tsx b/packages/react/src/components/checkout/delivery/delivery-method.tsx index eccbba56..5aa5aaa7 100644 --- a/packages/react/src/components/checkout/delivery/delivery-method.tsx +++ b/packages/react/src/components/checkout/delivery/delivery-method.tsx @@ -1,4 +1,5 @@ import { Store, Truck } from 'lucide-react'; +import { useEffect } from 'react'; import { useFormContext } from 'react-hook-form'; import { type CheckoutFormData, @@ -73,10 +74,29 @@ export function DeliveryMethodForm() { }; const availableMethods = [ - DELIVERY_METHODS[0], + ...(session?.enableShipping ? [DELIVERY_METHODS[0]] : []), ...(session?.enableLocalPickup ? [DELIVERY_METHODS[1]] : []), ]; + // Set default delivery method when component loads + useEffect(() => { + const currentValue = form.getValues('deliveryMethod'); + const isCurrentValueValid = availableMethods.some( + (method) => method.id === currentValue + ); + + if (!currentValue || !isCurrentValueValid) { + const defaultMethod = availableMethods.length === 1 + ? availableMethods[0].id + : DeliveryMethods.SHIP; + form.setValue('deliveryMethod', defaultMethod); + } + }, [availableMethods, form]); + + if (availableMethods.length === 0) { + return null; + } + return (
@@ -108,7 +128,7 @@ export function DeliveryMethodForm() { - {session?.enableShipping ? ( + {session?.enableShipping || session?.enableLocalPickup ? ( diff --git a/packages/react/src/lib/godaddy/godaddy.ts b/packages/react/src/lib/godaddy/godaddy.ts index 989db68c..06872967 100644 --- a/packages/react/src/lib/godaddy/godaddy.ts +++ b/packages/react/src/lib/godaddy/godaddy.ts @@ -1,5 +1,5 @@ import { convertCSSVariablesToCamelCase } from '@/components/checkout/utils/case-conversion'; -import type { CSSVariables, GoDaddyAppearance } from '@/godaddy-provider'; +import type { GoDaddyAppearance } from '@/godaddy-provider'; import type { ResultOf } from '@/gql.tada'; import { graphqlRequestWithErrors } from '@/lib/graphql-with-errors'; import type { @@ -40,7 +40,7 @@ import { GetCheckoutSessionQuery, } from './queries'; -function _getHostByEnvironment(apiHost?: string): string { +function getHostByEnvironment(apiHost?: string): string { // Use provided apiHost, otherwise default to production return `https://checkout.commerce.${apiHost || 'api.godaddy.com'}`; } @@ -53,13 +53,9 @@ export type CreateCheckoutSessionInputWithKebabCase = Omit< appearance?: GoDaddyAppearance; }; -function getHostByEnvironment(): string { - return `https://checkout.commerce.${process.env.GODADDY_HOST || process.env.NEXT_PUBLIC_GODADDY_HOST || 'api.godaddy.com'}`; -} - export async function createCheckoutSession( input: CreateCheckoutSessionInputWithKebabCase, - { accessToken }: { accessToken: string } + { accessToken, apiHost }: { accessToken: string; apiHost?: string } ): Promise< ResultOf['createCheckoutSession'] > { @@ -91,7 +87,7 @@ export async function createCheckoutSession( }), }; - const GODADDY_HOST = getHostByEnvironment(); + const GODADDY_HOST = getHostByEnvironment(apiHost); const response = await graphqlRequestWithErrors< ResultOf >( diff --git a/packages/react/src/lib/godaddy/graphql-env.ts b/packages/react/src/lib/godaddy/graphql-env.ts index 5b20f176..49a059f7 100644 --- a/packages/react/src/lib/godaddy/graphql-env.ts +++ b/packages/react/src/lib/godaddy/graphql-env.ts @@ -383,6 +383,420 @@ const introspection = { "kind": "SCALAR", "name": "Boolean" }, + { + "kind": "OBJECT", + "name": "CSSVariables", + "fields": [ + { + "name": "accent", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "accentForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "background", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "border", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "card", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "cardForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "defaultFontFamily", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destructive", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "destructiveForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fontMono", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fontSans", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "fontSerif", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "foreground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "input", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "muted", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "mutedForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "popover", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "popoverForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "primary", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "primaryForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "radius", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "ring", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "secondary", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "secondaryBackground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "secondaryForeground", + "type": { + "kind": "SCALAR", + "name": "String" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "CSSVariablesInput", + "inputFields": [ + { + "name": "accent", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "accentForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "background", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "border", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "card", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "cardForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "defaultFontFamily", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "destructive", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "destructiveForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fontMono", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fontSans", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "fontSerif", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "foreground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "input", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "muted", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "mutedForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "popover", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "popoverForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "primary", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "primaryForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "radius", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "ring", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "secondary", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "secondaryBackground", + "type": { + "kind": "SCALAR", + "name": "String" + } + }, + { + "name": "secondaryForeground", + "type": { + "kind": "SCALAR", + "name": "String" + } + } + ], + "isOneOf": false + }, { "kind": "UNION", "name": "CalculatedAdjustment", @@ -685,6 +1099,15 @@ const introspection = { ], "isDeprecated": false }, + { + "name": "appearance", + "type": { + "kind": "OBJECT", + "name": "GoDaddyAppearance" + }, + "args": [], + "isDeprecated": false + }, { "name": "channelId", "type": { @@ -5005,6 +5428,70 @@ const introspection = { ], "interfaces": [] }, + { + "kind": "OBJECT", + "name": "GoDaddyAppearance", + "fields": [ + { + "name": "theme", + "type": { + "kind": "ENUM", + "name": "GoDaddyTheme" + }, + "args": [], + "isDeprecated": false + }, + { + "name": "variables", + "type": { + "kind": "OBJECT", + "name": "CSSVariables" + }, + "args": [], + "isDeprecated": false + } + ], + "interfaces": [] + }, + { + "kind": "INPUT_OBJECT", + "name": "GoDaddyAppearanceInput", + "inputFields": [ + { + "name": "theme", + "type": { + "kind": "ENUM", + "name": "GoDaddyTheme" + } + }, + { + "name": "variables", + "type": { + "kind": "INPUT_OBJECT", + "name": "CSSVariablesInput" + } + } + ], + "isOneOf": false + }, + { + "kind": "ENUM", + "name": "GoDaddyTheme", + "enumValues": [ + { + "name": "base", + "isDeprecated": false + }, + { + "name": "orange", + "isDeprecated": false + }, + { + "name": "purple", + "isDeprecated": false + } + ] + }, { "kind": "SCALAR", "name": "ID" @@ -6280,6 +6767,13 @@ const introspection = { "kind": "INPUT_OBJECT", "name": "MutationCreateCheckoutSessionInput", "inputFields": [ + { + "name": "appearance", + "type": { + "kind": "INPUT_OBJECT", + "name": "GoDaddyAppearanceInput" + } + }, { "name": "channelId", "type": { @@ -6751,6 +7245,13 @@ const introspection = { "kind": "INPUT_OBJECT", "name": "MutationUpdateCheckoutSessionInput", "inputFields": [ + { + "name": "appearance", + "type": { + "kind": "INPUT_OBJECT", + "name": "GoDaddyAppearanceInput" + } + }, { "name": "channelId", "type": { diff --git a/packages/react/src/server.ts b/packages/react/src/server.ts index acd1d8fa..fc9ee3c9 100644 --- a/packages/react/src/server.ts +++ b/packages/react/src/server.ts @@ -1,6 +1,7 @@ 'use server'; import * as GoDaddy from '@/lib/godaddy/godaddy'; +import { CreateCheckoutSessionInputWithKebabCase } from '@/lib/godaddy/godaddy'; import { getEnvVar } from '@/lib/utils'; import type { CheckoutSessionInput, CheckoutSessionOptions } from '@/types'; @@ -8,7 +9,7 @@ let accessToken: string | undefined; let accessTokenExpiresAt: number | undefined; export async function createCheckoutSession( - input: CheckoutSessionInput['input'], + input: CreateCheckoutSessionInputWithKebabCase, options?: CheckoutSessionOptions ) { const CLIENT_ID = options?.auth?.clientId || ''; From 0575b723883a1d3d33703b21f4735b2fa404c5b3 Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Thu, 6 Nov 2025 14:57:44 -0600 Subject: [PATCH 21/23] add appearance data to checkout session query --- packages/react/src/lib/godaddy/queries.ts | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/packages/react/src/lib/godaddy/queries.ts b/packages/react/src/lib/godaddy/queries.ts index 63d10fb3..a884ade8 100644 --- a/packages/react/src/lib/godaddy/queries.ts +++ b/packages/react/src/lib/godaddy/queries.ts @@ -25,6 +25,36 @@ export const GetCheckoutSessionQuery = graphql(` enableShippingAddressCollection enableBillingAddressCollection enableAddressAutocomplete + appearance { + theme + variables { + fontSans + fontSerif + fontMono + defaultFontFamily + background + secondaryBackground + foreground + card + cardForeground + popover + popoverForeground + primary + primaryForeground + secondary + secondaryForeground + muted + mutedForeground + accent + accentForeground + destructive + destructiveForeground + border + input + ring + radius + } + } experimental_rules { freeShipping { enabled From f27f2a6647c05a43c0e0da001c8426e831da32ff Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Thu, 6 Nov 2025 15:17:29 -0600 Subject: [PATCH 22/23] modify viewable sections --- .../src/components/checkout/form/checkout-form.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/packages/react/src/components/checkout/form/checkout-form.tsx b/packages/react/src/components/checkout/form/checkout-form.tsx index 6d509ebe..dbb35dfa 100644 --- a/packages/react/src/components/checkout/form/checkout-form.tsx +++ b/packages/react/src/components/checkout/form/checkout-form.tsx @@ -162,7 +162,8 @@ export function CheckoutForm({ const totalSavings = Math.abs(orderDiscount + lineItemDiscounts); const [gridTemplateAreas, sectionLength] = React.useMemo(() => { - const { enableTips, paymentMethods } = session || {}; + const { enableTips, paymentMethods, enableShipping, enableLocalPickup } = + session || {}; if (!props?.layout) { const enableExpressCheckout = Object.values(paymentMethods ?? {}).some( method => @@ -170,10 +171,13 @@ export function CheckoutForm({ Array.isArray(method.checkoutTypes) && method.checkoutTypes.includes(CheckoutType.EXPRESS) ); - const defaultTemplate = ` ${enableExpressCheckout ? "'express-checkout'" : ''} 'contact' 'delivery' '${deliveryMethodToGridArea[deliveryMethod]}' ${enableTips ? "'tips'" : ''} 'payment'`; + + const enableDelivery = enableShipping || enableLocalPickup; + const defaultTemplate = ` ${enableExpressCheckout ? "'express-checkout'" : ''} 'contact' ${enableDelivery ? "'delivery'" : ''} '${deliveryMethodToGridArea[deliveryMethod]}' ${enableTips ? "'tips'" : ''} 'payment'`; // Return consistent tuple type: [string, number] - let totalSections = 3; + let totalSections = 2; enableTips && totalSections++; + enableDelivery && totalSections++; enableExpressCheckout && totalSections++; return [defaultTemplate, totalSections]; } From 975459a4126baddf336699342b5a080bb0951a0c Mon Sep 17 00:00:00 2001 From: Phil Bennett Date: Mon, 10 Nov 2025 10:52:58 -0600 Subject: [PATCH 23/23] add changeset for version change --- .changeset/loose-taxis-grab.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/loose-taxis-grab.md diff --git a/.changeset/loose-taxis-grab.md b/.changeset/loose-taxis-grab.md new file mode 100644 index 00000000..cc4e8de8 --- /dev/null +++ b/.changeset/loose-taxis-grab.md @@ -0,0 +1,5 @@ +--- +"@godaddy/react": patch +--- + +Add auth-token exchange