UNPKG

@shopify/hydrogen-react

Version:

React components, hooks, and utilities for creating custom Shopify storefronts

1,128 lines (1,047 loc) 405 kB
/** * THIS FILE IS AUTO-GENERATED, DO NOT EDIT * Based on Customer Account API 2026-01 * If changes need to happen to the types defined in this file, then generally the Storefront API needs to update. After it's updated, you can run `npm run graphql-types`. * Except custom Scalars, which are defined in the `codegen.ts` file */ /* eslint-disable */ export type Maybe<T> = T | null; export type InputMaybe<T> = Maybe<T>; export type Exact<T extends {[key: string]: unknown}> = {[K in keyof T]: T[K]}; export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]>; }; export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]>; }; export type MakeEmpty<T extends {[key: string]: unknown}, K extends keyof T> = { [_ in K]?: never; }; export type Incremental<T> = | T | {[P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never}; /** All built-in and custom scalars, mapped to their actual values */ export type Scalars = { ID: {input: string; output: string}; String: {input: string; output: string}; Boolean: {input: boolean; output: boolean}; Int: {input: number; output: number}; Float: {input: number; output: number}; DateTime: {input: string; output: string}; Decimal: {input: string; output: string}; HTML: {input: string; output: string}; ISO8601DateTime: {input: string; output: string}; JSON: {input: unknown; output: unknown}; URL: {input: string; output: string}; UnsignedInt64: {input: string; output: string}; }; /** The bank account payment details related to a transaction. */ export type AchPaymentDetails = { __typename?: 'AchPaymentDetails'; /** The name of the bank used. */ bankName: Scalars['String']['output']; /** The last four digits of the bank account used. */ last4?: Maybe<Scalars['String']['output']>; }; /** A sale that includes an additional fee charge. */ export type AdditionalFeeSale = Node & Sale & { __typename?: 'AdditionalFeeSale'; /** The type of order action represented by the sale. */ actionType: SaleActionType; /** The unique ID of the sale. */ id: Scalars['ID']['output']; /** The type of line associated with the sale. */ lineType: SaleLineType; /** The number of units ordered or intended to be returned. */ quantity?: Maybe<Scalars['Int']['output']>; /** The individual taxes associated with the sale. */ taxes: Array<SaleTax>; /** The total sale amount after taxes and discounts. */ totalAmount: MoneyV2; /** The total amount of discounts allocated to the sale after taxes. */ totalDiscountAmountAfterTaxes: MoneyV2; /** The total discounts allocated to the sale before taxes. */ totalDiscountAmountBeforeTaxes: MoneyV2; /** The total tax amount for the sale. */ totalTaxAmount: MoneyV2; }; /** The address form field. */ export type AddressFormField = { __typename?: 'AddressFormField'; /** The mode of the address field. */ mode: AddressFormFieldMode; }; /** Defines the mode for an address form field. */ export type AddressFormFieldMode = /** * Indicates that the form field should be hidden from the UI. * Any values provided by the client will be ignored by the backend. */ | 'IGNORED' /** Indicates that the form field is visible in the UI and can be left empty. */ | 'OPTIONAL' /** Indicates that the form field is visible in the UI and requires a non-empty value. */ | 'REQUIRED'; /** The settings for the address form. */ export type AddressFormSettings = { __typename?: 'AddressFormSettings'; /** The setting for the Address2 form field. */ address2: AddressFormField; /** Whether the address autocompletion is enabled. */ addressAutocompletion: Scalars['Boolean']['output']; /** The setting for the Company form field. */ company: AddressFormField; /** The setting for the First name form field. */ firstName: AddressFormField; /** The setting for the Phone form field. */ phone: AddressFormField; }; /** A sale event that results in an adjustment to the order price. */ export type AdjustmentSale = Node & Sale & { __typename?: 'AdjustmentSale'; /** The type of order action represented by the sale. */ actionType: SaleActionType; /** The unique ID of the sale. */ id: Scalars['ID']['output']; /** The type of line associated with the sale. */ lineType: SaleLineType; /** The number of units ordered or intended to be returned. */ quantity?: Maybe<Scalars['Int']['output']>; /** The individual taxes associated with the sale. */ taxes: Array<SaleTax>; /** The total sale amount after taxes and discounts. */ totalAmount: MoneyV2; /** The total amount of discounts allocated to the sale after taxes. */ totalDiscountAmountAfterTaxes: MoneyV2; /** The total discounts allocated to the sale before taxes. */ totalDiscountAmountBeforeTaxes: MoneyV2; /** The total tax amount for the sale. */ totalTaxAmount: MoneyV2; }; /** A Shopify app. */ export type App = Node & { __typename?: 'App'; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** The name of the app. */ title: Scalars['String']['output']; }; /** The input fields for the billing address received from Apple Pay. */ export type ApplePayBillingAddressInput = { /** The first line of the address, typically the street address or PO Box number. */ address1?: InputMaybe<Scalars['String']['input']>; /** The second line of the address, typically the apartment, suite, or unit number. */ address2?: InputMaybe<Scalars['String']['input']>; /** The region of the address, such as the province, state, or district. */ administrativeArea?: InputMaybe<Scalars['String']['input']>; /** The name of the country. */ country?: InputMaybe<Scalars['String']['input']>; /** The two-letter code for the country of the address. */ countryCode?: InputMaybe<CountryCode>; /** The family name of the customer. */ familyName?: InputMaybe<Scalars['String']['input']>; /** The given name of the customer. */ givenName?: InputMaybe<Scalars['String']['input']>; /** The name of the city, district, village, or town. */ locality?: InputMaybe<Scalars['String']['input']>; /** The telephone number of the customer. */ phoneNumber?: InputMaybe<Scalars['String']['input']>; /** The zip or postal code of the address. */ postalCode?: InputMaybe<Scalars['String']['input']>; }; /** Return type for `applePayCreditCardAdd` mutation. */ export type ApplePayCreditCardAddPayload = { __typename?: 'ApplePayCreditCardAddPayload'; /** The newly added credit card. */ creditCard?: Maybe<CustomerCreditCard>; /** If the card verification result is processing. When this is true, credit_card will be null. */ processing?: Maybe<Scalars['Boolean']['output']>; /** The list of errors that occurred from executing the mutation. */ userErrors: Array<UserErrorsPaymentInstrumentUserErrors>; }; /** Return type for `applePayCreditCardUpdate` mutation. */ export type ApplePayCreditCardUpdatePayload = { __typename?: 'ApplePayCreditCardUpdatePayload'; /** The updated credit card. */ creditCard?: Maybe<CustomerCreditCard>; /** If the card verification result is processing. When this is true, credit_card will be null. */ processing?: Maybe<Scalars['Boolean']['output']>; /** The list of errors that occurred from executing the mutation. */ userErrors: Array<UserErrorsPaymentInstrumentUserErrors>; }; /** Return type for `applePaySessionCreate` mutation. */ export type ApplePaySessionCreatePayload = { __typename?: 'ApplePaySessionCreatePayload'; /** The object that contains the session data. */ body?: Maybe<Scalars['String']['output']>; /** The ID for the created session. */ id?: Maybe<Scalars['String']['output']>; /** Whether the session is ready. The `body` field is `null` while this value is `false`. */ ready?: Maybe<Scalars['Boolean']['output']>; /** The list of errors that occurred from executing the mutation. */ userErrors: Array<ApplePaySessionUserError>; }; /** The error codes for failures to create Apple Pay sessions. */ export type ApplePaySessionUserError = DisplayableError & { __typename?: 'ApplePaySessionUserError'; /** The error code. */ code?: Maybe<ApplePaySessionUserErrorCode>; /** The path to the input field that caused the error. */ field?: Maybe<Array<Scalars['String']['output']>>; /** The error message. */ message: Scalars['String']['output']; }; /** Possible error codes that can be returned by `ApplePaySessionUserError`. */ export type ApplePaySessionUserErrorCode = /** Apple Pay session could not be created. */ | 'SESSION_COULD_NOT_BE_CREATED' /** Validation URL is not an Apple Pay gateway endpoint. */ | 'VALIDATION_URL_IS_INVALID'; /** The configuration settings for the Apple Pay wallet. */ export type ApplePayWalletConfig = { __typename?: 'ApplePayWalletConfig'; /** Supported card networks for Apple Pay. */ supportedNetworks: Array<Scalars['String']['output']>; }; /** The details about the gift card used on the checkout. */ export type AppliedGiftCard = Node & { __typename?: 'AppliedGiftCard'; /** The amount deducted from the gift card. */ amountUsed: MoneyV2; /** The remaining amount on the gift card. */ balance: MoneyV2; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** The last characters of the gift card. */ lastCharacters: Scalars['String']['output']; /** The amount applied to the checkout in its currency. */ presentmentAmountUsed: MoneyV2; }; /** * A custom property. Attributes are used to store additional information about a Shopify resource, such as * products, customers, or orders. Attributes are stored as key-value pairs. * * For example, a list of attributes might include whether a customer is a first-time buyer (`"customer_first_order": "true"`), * whether an order is gift-wrapped (`"gift_wrapped": "true"`), a preferred delivery date * (`"preferred_delivery_date": "2025-10-01"`), the discount applied (`"loyalty_discount_applied": "10%"`), and any * notes provided by the customer (`"customer_notes": "Please leave at the front door"`). */ export type Attribute = { __typename?: 'Attribute'; /** The key or name of the attribute. For example, `"customer_first_order"`. */ key: Scalars['String']['output']; /** The value of the attribute. For example, `"true"`. */ value?: Maybe<Scalars['String']['output']>; }; /** Captures the intentions of a discount that was automatically applied. */ export type AutomaticDiscountApplication = DiscountApplication & { __typename?: 'AutomaticDiscountApplication'; /** The method by which the discount's value is allocated to its entitled items. */ allocationMethod: DiscountApplicationAllocationMethod; /** The lines of targetType that the discount is allocated over. */ targetSelection: DiscountApplicationTargetSelection; /** The type of line that the discount is applicable towards. */ targetType: DiscountApplicationTargetType; /** The title of the application. */ title: Scalars['String']['output']; /** The value of the discount application. */ value: PricingValue; }; /** A collection of available shipping rates for a checkout. */ export type AvailableShippingRates = { __typename?: 'AvailableShippingRates'; /** * Whether the shipping rates are ready. * The `shippingRates` field is `null` when this value is `false`. * This field should be polled until its value becomes `true`. */ ready: Scalars['Boolean']['output']; /** The fetched shipping rates. `null` until the `ready` field is `true`. */ shippingRates?: Maybe<Array<ShippingRate>>; }; /** The type of bank account holder. */ export type BankAccountHolderType = /** A company account holder. */ | 'COMPANY' /** An individual account holder. */ | 'INDIVIDUAL'; /** The type of bank account. */ export type BankAccountType = /** A checking account. */ | 'CHECKING' /** A savings account. */ | 'SAVINGS'; /** Represents a bank account payment instrument. */ export type BankPaymentInstrument = Node & PaymentInstrument & { __typename?: 'BankPaymentInstrument'; /** The type of account holder. */ accountHolderType?: Maybe<BankAccountHolderType>; /** The type of bank account. */ accountType: BankAccountType; /** The name of the bank. */ bankName: Scalars['String']['output']; /** The billing address associated with the bank account. */ billingAddress?: Maybe<PaymentInstrumentBillingAddress>; /** The list of open draft orders associated with this payment instrument. */ draftOrders: DraftOrderConnection; /** The globally-unique ID. */ id: Scalars['ID']['output']; /** The last four digits of the account number. */ lastDigits: Scalars['String']['output']; /** The list of pending orders associated with this payment instrument. */ orders: OrderConnection; /** The list of subscription contracts charged using this payment instrument. */ subscriptionContracts: SubscriptionContractConnection; }; /** Represents a bank account payment instrument. */ export type BankPaymentInstrumentDraftOrdersArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; }; /** Represents a bank account payment instrument. */ export type BankPaymentInstrumentOrdersArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; }; /** Represents a bank account payment instrument. */ export type BankPaymentInstrumentSubscriptionContractsArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<SubscriptionContractsSortKeys>; }; /** A bank payment method that can be used for recurring and future payments. */ export type BankPaymentMethod = { __typename?: 'BankPaymentMethod'; /** The payment provider client credentials. */ paymentProviderClientCredentials: PaymentProviderClientCredentials; }; /** The input fields required for updating a business contact. */ export type BusinessContactUpdateInput = { /** The first name of the business contact. */ firstName?: InputMaybe<Scalars['String']['input']>; /** The last name of the business contact. */ lastName?: InputMaybe<Scalars['String']['input']>; /** The locale of the business contact. */ locale?: InputMaybe<Scalars['String']['input']>; /** The title of the business contact. */ title?: InputMaybe<Scalars['String']['input']>; }; /** Return type for `businessContactUpdate` mutation. */ export type BusinessContactUpdatePayload = { __typename?: 'BusinessContactUpdatePayload'; /** The updated business contact information. */ businessContact?: Maybe<CompanyContact>; /** The list of errors that occurred from executing the mutation. */ userErrors: Array<UserErrorsBusinessContactUserErrors>; }; /** Possible error codes that can be returned by `BusinessCustomerUserError`. */ export type BusinessCustomerErrorCode = /** The input value is blank. */ | 'BLANK' /** Business location doesn't exist. */ | 'BUSINESS_LOCATION_NOT_FOUND' /** Deleting the resource failed. */ | 'FAILED_TO_DELETE' /** An internal error occurred. */ | 'INTERNAL_ERROR' /** The input value is invalid. */ | 'INVALID' /** The input is invalid. */ | 'INVALID_INPUT' /** The number of resources exceeded the limit. */ | 'LIMIT_REACHED' /** The input is empty. */ | 'NO_INPUT' /** Permission denied. */ | 'PERMISSION_DENIED' /** Missing a required field. */ | 'REQUIRED' /** The resource wasn't found. */ | 'RESOURCE_NOT_FOUND' /** The input value is already taken. */ | 'TAKEN' /** The field value is too long. */ | 'TOO_LONG' /** Unexpected type. */ | 'UNEXPECTED_TYPE'; /** An error that happens during the execution of a business customer mutation. */ export type BusinessCustomerUserError = DisplayableError & { __typename?: 'BusinessCustomerUserError'; /** The error code. */ code?: Maybe<BusinessCustomerErrorCode>; /** The path to the input field that caused the error. */ field?: Maybe<Array<Scalars['String']['output']>>; /** The error message. */ message: Scalars['String']['output']; }; /** Return type for `businessLocationCreditCardAdd` mutation. */ export type BusinessLocationCreditCardAddPayload = { __typename?: 'BusinessLocationCreditCardAddPayload'; /** The newly added credit card. */ creditCard?: Maybe<CustomerCreditCard>; /** The URL to redirect the customer to for completing the 3D Secure payment flow. */ nextActionUrl?: Maybe<Scalars['URL']['output']>; /** If the card verification result is processing. When this is true, credit_card will be null. */ processing?: Maybe<Scalars['Boolean']['output']>; /** The list of errors that occurred from executing the mutation. */ userErrors: Array<UserErrorsBusinessLocationPaymentInstrumentUserErrors>; }; /** Return type for `businessLocationCreditCardUpdate` mutation. */ export type BusinessLocationCreditCardUpdatePayload = { __typename?: 'BusinessLocationCreditCardUpdatePayload'; /** The updated credit card. */ creditCard?: Maybe<CustomerCreditCard>; /** If the card verification result is processing. When this is true, credit_card will be null. */ processing?: Maybe<Scalars['Boolean']['output']>; /** The list of errors that occurred from executing the mutation. */ userErrors: Array<UserErrorsBusinessLocationPaymentInstrumentUserErrors>; }; /** Return type for `businessLocationPaymentInstrumentRemove` mutation. */ export type BusinessLocationPaymentInstrumentRemovePayload = { __typename?: 'BusinessLocationPaymentInstrumentRemovePayload'; /** The ID of the removed payment instrument. */ deletedPaymentInstrumentId?: Maybe<Scalars['ID']['output']>; /** The list of errors that occurred from executing the mutation. */ userErrors: Array<UserErrorsBusinessLocationPaymentInstrumentUserErrors>; }; /** The configuration for the buyer's checkout. */ export type BuyerExperienceConfiguration = { __typename?: 'BuyerExperienceConfiguration'; /** The deposit amount required for the order. */ deposit?: Maybe<DepositConfiguration>; /** * Whether the buyer must pay at checkout or * can choose to pay at checkout or pay later using net terms. */ payNowOnly: Scalars['Boolean']['output']; /** The merchant configured payment terms. */ paymentTermsTemplate?: Maybe<PaymentTermsTemplate>; }; /** The input fields to calculate return amounts associated with an order. */ export type CalculateReturnInput = { /** The ID of the order that will be returned. */ orderId: Scalars['ID']['input']; /** The line items from the order to include in the return. */ returnLineItems: Array<CalculateReturnLineItemInput>; }; /** The input fields for return line items on a calculated return. */ export type CalculateReturnLineItemInput = { /** The ID of the line item to be returned. */ lineItemId: Scalars['ID']['input']; /** The quantity of the item to be returned.Quantity can't exceed the line item's fulfilled quantity. */ quantity: Scalars['Int']['input']; }; /** The calculated financial outcome of a return based on the line items requested for return.Includes the monetary values of the line items, along with applicable taxes, discounts, and otherfees on the order. Financial summary may include return fees depending onthe [return rules](https://help.shopify.com/manual/fulfillment/managing-orders/returns/return-rules)at the time the order was placed. */ export type CalculatedReturn = { __typename?: 'CalculatedReturn'; /** A breakdown of the monetary values for the calculated return. */ financialSummary: ReturnFinancialSummary; /** A list of line items being processed for a return. */ returnLineItems: CalculatedReturnLineItemConnection; }; /** The calculated financial outcome of a return based on the line items requested for return.Includes the monetary values of the line items, along with applicable taxes, discounts, and otherfees on the order. Financial summary may include return fees depending onthe [return rules](https://help.shopify.com/manual/fulfillment/managing-orders/returns/return-rules)at the time the order was placed. */ export type CalculatedReturnReturnLineItemsArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; }; /** The line item being processed for a return and its calculated monetary values. */ export type CalculatedReturnLineItem = { __typename?: 'CalculatedReturnLineItem'; /** The line item being processed for a return. */ lineItem: LineItem; /** The quantity being returned. */ quantity: Scalars['Int']['output']; /** The subtotal of the return line item without target all discounts. */ subtotalBeforeTargetAllDiscountsSet: MoneyBag; /** The subtotal of the return line item. */ subtotalSet: MoneyBag; /** The total tax of the return line item. */ totalTaxSet: MoneyBag; }; /** An auto-generated type for paginating through multiple CalculatedReturnLineItems. */ export type CalculatedReturnLineItemConnection = { __typename?: 'CalculatedReturnLineItemConnection'; /** The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. */ edges: Array<CalculatedReturnLineItemEdge>; /** A list of nodes that are contained in CalculatedReturnLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. */ nodes: Array<CalculatedReturnLineItem>; /** An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. */ pageInfo: PageInfo; }; /** An auto-generated type which holds one CalculatedReturnLineItem and a cursor during pagination. */ export type CalculatedReturnLineItemEdge = { __typename?: 'CalculatedReturnLineItemEdge'; /** The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). */ cursor: Scalars['String']['output']; /** The item at the end of CalculatedReturnLineItemEdge. */ node: CalculatedReturnLineItem; }; /** The card payment details related to a transaction. */ export type CardPaymentDetails = { __typename?: 'CardPaymentDetails'; /** The brand of the credit card used. */ cardBrand: Scalars['String']['output']; /** The last four digits of the credit card used. */ last4?: Maybe<Scalars['String']['output']>; }; /** A container for information required to checkout items and pay. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */ export type Checkout = Node & { __typename?: 'Checkout'; /** The gift cards used on the checkout. */ appliedGiftCards: Array<AppliedGiftCard>; /** * The available shipping rates for this Checkout. * Should only be used when checkout `requiresShipping` is `true` and * the shipping address is valid. */ availableShippingRates?: Maybe<AvailableShippingRates>; /** The date and time when the checkout was created. */ createdAt: Scalars['DateTime']['output']; /** The currency code for the checkout. */ currencyCode: CurrencyCode; /** The extra information added to the checkout. */ customAttributes: Array<Attribute>; /** The discounts applied on the checkout. */ discountApplications: DiscountApplicationConnection; /** The email associated with this checkout. */ email?: Maybe<Scalars['String']['output']>; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** A list of line item objects, each containing information about an item in the checkout. */ lineItems: CheckoutLineItemConnection; /** * The sum of all the prices of all the items in the checkout, * excluding duties, taxes, shipping, and discounts. */ lineItemsSubtotalPrice: MoneyV2; /** The note associated with the checkout. */ note?: Maybe<Scalars['String']['output']>; /** The amount left to be paid. This is equal to the cost of the line items, duties, taxes, and shipping, minus discounts and gift cards. */ paymentDue: MoneyV2; /** * Whether the Checkout is ready and can be completed. Checkouts may * have asynchronous operations that can take time to finish. If you want * to complete a checkout or ensure all the fields are populated and up to * date, polling is required until the value is true. */ ready: Scalars['Boolean']['output']; /** Whether the fulfillment requires shipping. */ requiresShipping: Scalars['Boolean']['output']; /** The address where the line items will be shipped. */ shippingAddress?: Maybe<CustomerMailingAddress>; /** The discounts allocated to the shipping line by discount applications. */ shippingDiscountAllocations: Array<DiscountAllocation>; /** The selected shipping rate, transitioned to a `shipping_line` object. */ shippingLine?: Maybe<ShippingRate>; /** The price at checkout before duties, shipping, and taxes. */ subtotalPrice: MoneyV2; /** Whether the checkout is tax exempt. */ taxExempt: Scalars['Boolean']['output']; /** Whether taxes are included in the line item and shipping line prices. */ taxesIncluded: Scalars['Boolean']['output']; /** The sum of all the duties applied to the line items in the checkout. */ totalDuties?: Maybe<MoneyV2>; /** * The sum of all the prices of all the items in the checkout, * duties, taxes, and discounts included. */ totalPrice: MoneyV2; /** The sum of all the taxes applied to the line items and shipping lines in the checkout. */ totalTax: MoneyV2; /** The URL for the checkout, accessible from the web. */ webUrl: Scalars['URL']['output']; }; /** A container for information required to checkout items and pay. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */ export type CheckoutDiscountApplicationsArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; }; /** A container for information required to checkout items and pay. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */ export type CheckoutLineItemsArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; }; /** A line item in the checkout, grouped by variant and attributes. */ export type CheckoutLineItem = Node & { __typename?: 'CheckoutLineItem'; /** An array of Key-Value pairs providing extra information about the line item. */ customAttributes: Array<Attribute>; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** The price of the line item. */ price?: Maybe<MoneyV2>; /** The quantity of the line item. */ quantity: Scalars['Int']['output']; /** The title of the line item. Defaults to the product's title. */ title: Scalars['String']['output']; /** The unit price of the line item. */ unitPrice?: Maybe<MoneyV2>; /** The name of the variant. */ variantTitle?: Maybe<Scalars['String']['output']>; }; /** An auto-generated type for paginating through multiple CheckoutLineItems. */ export type CheckoutLineItemConnection = { __typename?: 'CheckoutLineItemConnection'; /** The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. */ edges: Array<CheckoutLineItemEdge>; /** A list of nodes that are contained in CheckoutLineItemEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. */ nodes: Array<CheckoutLineItem>; /** An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. */ pageInfo: PageInfo; }; /** An auto-generated type which holds one CheckoutLineItem and a cursor during pagination. */ export type CheckoutLineItemEdge = { __typename?: 'CheckoutLineItemEdge'; /** The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). */ cursor: Scalars['String']['output']; /** The item at the end of CheckoutLineItemEdge. */ node: CheckoutLineItem; }; /** Represents a company's information. */ export type Company = HasMetafields & Node & { __typename?: 'Company'; /** The list of company draft orders. */ draftOrders: DraftOrderConnection; /** A unique externally-supplied ID for the company. */ externalId?: Maybe<Scalars['String']['output']>; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** The list of locations that the business of the business contact belongs to. */ locations: CompanyLocationConnection; /** A metafield found by namespace and key. */ metafield?: Maybe<Metafield>; /** * The metafields associated with the resource matching the * supplied list of namespaces and keys. */ metafields: Array<Maybe<Metafield>>; /** The name of the company. */ name: Scalars['String']['output']; /** The list of customer orders under the company. */ orders: OrderConnection; /** The profile of the customer. */ profile?: Maybe<CompanyContact>; }; /** Represents a company's information. */ export type CompanyDraftOrdersArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<DraftOrderByCompanySortKeys>; }; /** Represents a company's information. */ export type CompanyLocationsArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<CompanyLocationSortKeys>; }; /** Represents a company's information. */ export type CompanyMetafieldArgs = { key: Scalars['String']['input']; namespace: Scalars['String']['input']; }; /** Represents a company's information. */ export type CompanyMetafieldsArgs = { identifiers: Array<HasMetafieldsIdentifier>; }; /** Represents a company's information. */ export type CompanyOrdersArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<OrderByCompanySortKeys>; }; /** The address of a company location, either billing or shipping. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */ export type CompanyAddress = Node & { __typename?: 'CompanyAddress'; /** The first line of the address. It is typically the street address or PO Box number. */ address1: Scalars['String']['output']; /** The second line of the address. It is typically the apartment, suite, or unit number. */ address2?: Maybe<Scalars['String']['output']>; /** The city, district, village, or town. */ city?: Maybe<Scalars['String']['output']>; /** The name of the company. */ company: Scalars['String']['output']; /** The name of the company. */ companyName: Scalars['String']['output']; /** The name of the country of the address. */ country?: Maybe<Scalars['String']['output']>; /** The two-letter code for the country of the address, for example, US. */ countryCode: CountryCode; /** The two-letter code for the country of the address, for example, US. */ countryCodeV2: CountryCode; /** * The date and time (in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) * when the company address was created. */ createdAt: Scalars['DateTime']['output']; /** The first name of the recipient. */ firstName?: Maybe<Scalars['String']['output']>; /** The formatted version of the address. */ formatted: Array<Scalars['String']['output']>; /** The formatted version of the address. */ formattedAddress: Array<Scalars['String']['output']>; /** A comma-separated list of the city, province, and country values. */ formattedArea?: Maybe<Scalars['String']['output']>; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** The last name of the recipient. */ lastName?: Maybe<Scalars['String']['output']>; /** The latitude coordinate of the address. */ latitude?: Maybe<Scalars['Float']['output']>; /** The longitude coordinate of the address. */ longitude?: Maybe<Scalars['Float']['output']>; /** The unique phone number of the customer, formatted using the E.164 standard, for example, _+16135551111_. */ phone?: Maybe<Scalars['String']['output']>; /** The region of the address, such as the province, state, or district. */ province?: Maybe<Scalars['String']['output']>; /** The alphanumeric code for the region, for example, ON. */ provinceCode?: Maybe<Scalars['String']['output']>; /** The identity of the recipient, for example, 'Receiving Department'. */ recipient?: Maybe<Scalars['String']['output']>; /** * The date and time (in [ISO 8601 format](http://en.wikipedia.org/wiki/ISO_8601)) * when the company address was last updated. */ updatedAt: Scalars['DateTime']['output']; /** The zip or postal code of the address. */ zip?: Maybe<Scalars['String']['output']>; /** The alphanumeric code for the region, for example, ON. */ zoneCode?: Maybe<Scalars['String']['output']>; }; /** The address of a company location, either billing or shipping. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */ export type CompanyAddressFormattedArgs = { withCompanyName?: InputMaybe<Scalars['Boolean']['input']>; withName?: InputMaybe<Scalars['Boolean']['input']>; }; /** The address of a company location, either billing or shipping. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */ export type CompanyAddressFormattedAddressArgs = { withCompanyName?: InputMaybe<Scalars['Boolean']['input']>; withName?: InputMaybe<Scalars['Boolean']['input']>; }; /** The input fields for creating or updating a company location address. */ export type CompanyAddressInput = { /** The first line of the address, typically the street address or PO Box number. */ address1?: InputMaybe<Scalars['String']['input']>; /** The second line of the address, typically the number of the apartment, suite, or unit. */ address2?: InputMaybe<Scalars['String']['input']>; /** The name of the city, district, village, or town. */ city?: InputMaybe<Scalars['String']['input']>; /** The two-letter code for the country of the address. */ countryCode?: InputMaybe<CountryCode>; /** The first name in the address. */ firstName?: InputMaybe<Scalars['String']['input']>; /** The last name in the address. */ lastName?: InputMaybe<Scalars['String']['input']>; /** A unique phone number for the business location, formatted using the E.164 standard, for example, _+16135551111_. */ phone?: InputMaybe<Scalars['String']['input']>; /** The identity of the recipient, for example, 'Receiving Department'. */ recipient?: InputMaybe<Scalars['String']['input']>; /** The zip or postal code of the address. */ zip?: InputMaybe<Scalars['String']['input']>; /** The code for the region of the address, such as the province, state, or district, for example, QC for Quebec, Canada. */ zoneCode?: InputMaybe<Scalars['String']['input']>; }; /** The valid values for the address type of a company. */ export type CompanyAddressType = /** The address is a billing address. */ | 'BILLING' /** The address is a shipping address. */ | 'SHIPPING'; /** Represents the customer's contact information. */ export type CompanyContact = Node & { __typename?: 'CompanyContact'; /** The information of the copmany contact's company. */ company?: Maybe<Company>; /** The customer associated to this contact. */ customer: Customer; /** The list of company contact's draft orders. */ draftOrders: DraftOrderConnection; /** Whether the company contact has permissions on locations in the scope. */ hasPermissionOnLocations: Scalars['Boolean']['output']; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** The list of locations that the company contact belongs to. */ locations: CompanyLocationConnection; /** The list of company contact's orders. */ orders: OrderConnection; /** The current status of the company contact. */ status: CompanyContactStatusType; /** The list of tax exemptions applied to the company contact with additional details. */ taxExemptionsDetails: Array<TaxExemptionDetails>; /** The job title of the company contact. */ title?: Maybe<Scalars['String']['output']>; }; /** Represents the customer's contact information. */ export type CompanyContactDraftOrdersArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<DraftOrderSortKeys>; }; /** Represents the customer's contact information. */ export type CompanyContactHasPermissionOnLocationsArgs = { permissions: Array<PermittedOperation>; resource: ResourceType; scope: ContactPermissionLocationScopeType; }; /** Represents the customer's contact information. */ export type CompanyContactLocationsArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<CompanyLocationSortKeys>; }; /** Represents the customer's contact information. */ export type CompanyContactOrdersArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<OrderByContactSortKeys>; }; /** An auto-generated type for paginating through multiple CompanyContacts. */ export type CompanyContactConnection = { __typename?: 'CompanyContactConnection'; /** The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. */ edges: Array<CompanyContactEdge>; /** A list of nodes that are contained in CompanyContactEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. */ nodes: Array<CompanyContact>; /** An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. */ pageInfo: PageInfo; }; /** An auto-generated type which holds one CompanyContact and a cursor during pagination. */ export type CompanyContactEdge = { __typename?: 'CompanyContactEdge'; /** The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). */ cursor: Scalars['String']['output']; /** The item at the end of CompanyContactEdge. */ node: CompanyContact; }; /** A role for a company contact. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */ export type CompanyContactRole = Node & { __typename?: 'CompanyContactRole'; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** The name of the role. */ name: Scalars['String']['output']; /** The permissions on a specified resource. */ resourcePermission: Array<PermittedOperation>; /** A list of permissions on all resources. */ resourcePermissions: Array<ResourcePermission>; }; /** A role for a company contact. Apps using the Customer Account API must meet the protected customer data [requirements](https://shopify.dev/docs/apps/launch/protected-customer-data). */ export type CompanyContactRoleResourcePermissionArgs = { resource: ResourceType; }; /** Represents information about a company contact role assignment. */ export type CompanyContactRoleAssignment = Node & { __typename?: 'CompanyContactRoleAssignment'; /** The company contact for whom this role is assigned. */ contact: CompanyContact; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** The role that's assigned. */ role: CompanyContactRole; }; /** An auto-generated type for paginating through multiple CompanyContactRoleAssignments. */ export type CompanyContactRoleAssignmentConnection = { __typename?: 'CompanyContactRoleAssignmentConnection'; /** The connection between the node and its parent. Each edge contains a minimum of the edge's cursor and the node. */ edges: Array<CompanyContactRoleAssignmentEdge>; /** A list of nodes that are contained in CompanyContactRoleAssignmentEdge. You can fetch data about an individual node, or you can follow the edges to fetch data about a collection of related nodes. At each node, you specify the fields that you want to retrieve. */ nodes: Array<CompanyContactRoleAssignment>; /** An object that’s used to retrieve [cursor information](https://shopify.dev/api/usage/pagination-graphql) about the current page. */ pageInfo: PageInfo; }; /** An auto-generated type which holds one CompanyContactRoleAssignment and a cursor during pagination. */ export type CompanyContactRoleAssignmentEdge = { __typename?: 'CompanyContactRoleAssignmentEdge'; /** The position of each node in an array, used in [pagination](https://shopify.dev/api/usage/pagination-graphql). */ cursor: Scalars['String']['output']; /** The item at the end of CompanyContactRoleAssignmentEdge. */ node: CompanyContactRoleAssignment; }; /** The set of valid sort keys for the CompanyContactRoleAssignment query. */ export type CompanyContactRoleAssignmentSortKeys = /** Sort by the `created_at` value. */ | 'CREATED_AT' /** Sort by the `id` value. */ | 'ID' /** Sort by the `location_name` value. */ | 'LOCATION_NAME' /** Sort by the `updated_at` value. */ | 'UPDATED_AT'; /** The set of valid sort keys for the CompanyContact query. */ export type CompanyContactSortKeys = /** Sort by the `company_id` value. */ | 'COMPANY_ID' /** Sort by the `created_at` value. */ | 'CREATED_AT' /** Sort by the `email` value. */ | 'EMAIL' /** Sort by the `id` value. */ | 'ID' /** Sort by the `name` value. */ | 'NAME' /** Sort by the `name_email` value. */ | 'NAME_EMAIL' /** * Sort by relevance to the search terms when the `query` parameter is specified on the connection. * Don't use this sort key when no search query is specified. */ | 'RELEVANCE' /** Sort by the `title` value. */ | 'TITLE' /** Sort by the `updated_at` value. */ | 'UPDATED_AT'; /** A flag to describe the current status of a company contact. */ export type CompanyContactStatusType = /** The contact is disabled and removed from the company. */ | 'DISABLED' /** The contact is enabled and active. */ | 'ENABLED'; /** Represents a company's business location. */ export type CompanyLocation = HasMetafields & HasStoreCreditAccounts & Node & { __typename?: 'CompanyLocation'; /** The list of all available payment methods that can be used for recurring and future payments. */ availablePaymentMethods: Array<PaymentMethod>; /** The billing address of the company location. */ billingAddress?: Maybe<CompanyAddress>; /** The configuration of the buyer's B2B checkout. */ buyerExperienceConfiguration?: Maybe<BuyerExperienceConfiguration>; /** The list of contacts under a particular business location. */ contacts: CompanyContactConnection; /** The credit card corresponding to the provided ID. */ creditCard?: Maybe<CustomerCreditCard>; /** The list of stored credit cards. */ creditCards: CustomerCreditCardConnection; /** The list of company draft orders. */ draftOrders: DraftOrderConnection; /** A unique externally-supplied ID for the location. */ externalId?: Maybe<Scalars['String']['output']>; /** A globally-unique ID. */ id: Scalars['ID']['output']; /** * The market that includes the location's shipping address. If the shipping address is empty, the shop's primary market is returned. * @deprecated This `market` field will be removed in a future version of the API. */ market: Market; /** A metafield found by namespace and key. */ metafield?: Maybe<Metafield>; /** * The metafields associated with the resource matching the * supplied list of namespaces and keys. */ metafields: Array<Maybe<Metafield>>; /** The name of the company location. */ name: Scalars['String']['output']; /** The list of customer orders under the company. */ orders: OrderConnection; /** The payment instrument corresponding to the provided ID. */ paymentInstrument?: Maybe< BankPaymentInstrument | CustomerCreditCard | PaypalBillingAgreement >; /** The list of stored payment instruments. */ paymentInstruments: PaymentInstrumentConnection; /** The list of roles assigned to this location. */ roleAssignments: CompanyContactRoleAssignmentConnection; /** The shipping address of the company location. */ shippingAddress?: Maybe<CompanyAddress>; /** A list of the owner resource's store credit accounts. Store credit accounts are not shown for shops with store credit disabled at checkout. */ storeCreditAccounts: StoreCreditAccountConnection; /** The list of tax exemptions applied to the location. */ taxExemptions: Array<TaxExemption>; /** The list of tax exemptions applied to the location with additional details. */ taxExemptionsDetails: Array<TaxExemptionDetails>; /** The tax id of the company location. */ taxIdentifier?: Maybe<Scalars['String']['output']>; }; /** Represents a company's business location. */ export type CompanyLocationContactsArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<CompanyContactSortKeys>; }; /** Represents a company's business location. */ export type CompanyLocationCreditCardArgs = { id: Scalars['ID']['input']; }; /** Represents a company's business location. */ export type CompanyLocationCreditCardsArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; }; /** Represents a company's business location. */ export type CompanyLocationDraftOrdersArgs = { after?: InputMaybe<Scalars['String']['input']>; before?: InputMaybe<Scalars['String']['input']>; first?: InputMaybe<Scalars['Int']['input']>; last?: InputMaybe<Scalars['Int']['input']>; query?: InputMaybe<Scalars['String']['input']>; reverse?: InputMaybe<Scalars['Boolean']['input']>; sortKey?: InputMaybe<DraftOrderByLocationSortKeys>; }; /** Represents a company's business location. */ export type CompanyLocationMetafieldArgs = { key: Scalars['String']['input']; namespace: Scalars['String']['input']; }; /** Represents a company's business location. */ export type CompanyLocationMetafieldsArgs = { identifiers: Array<HasMetafieldsIdentifier>; }; /** Represents a company's business location. */ export type CompanyLocationOrdersArgs = { after?: InputMaybe<Scalars['String']['input']>; b