Skip to main content

ShopifyCustomer

interface ShopifyCustomer {
    id: string
    email: string | null
    firstName: string | null
    lastName: string | null
    displayName: string
    phone: string | null
    acceptsMarketing: boolean
    createdAt: string
    updatedAt: string
    defaultAddress: ShopifyCustomerAddress | null
    addresses: ShopifyCustomerAddress[]
    numberOfOrders: string
    tags: string[]
}

ShopifyCustomerAddress

interface ShopifyCustomerAddress {
    id: string
    address1: string | null
    address2: string | null
    city: string | null
    company: string | null
    country: string | null
    countryCodeV2: string | null
    firstName: string | null
    lastName: string | null
    phone: string | null
    province: string | null
    provinceCode: string | null
    zip: string | null
    formatted: string[]
}

ShopifyOrder

interface ShopifyOrder {
    id: string
    orderNumber: number
    name: string
    processedAt: string
    financialStatus: string | null
    fulfillmentStatus: string
    totalPrice: ShopifyMoney
    subtotalPrice: ShopifyMoney | null
    totalShippingPrice: ShopifyMoney
    totalTax: ShopifyMoney | null
    currencyCode: string
    lineItems: ShopifyConnection<ShopifyOrderLineItem>
    shippingAddress: ShopifyCustomerAddress | null
    statusUrl: string
}

ShopifyOrderLineItem

interface ShopifyOrderLineItem {
    title: string
    quantity: number
    variant: {
        id: string
        title: string
        price: ShopifyMoney
        image: ShopifyImage | null
        product: {
            handle: string
        }
    } | null
}

ShopifyCustomerAccessToken

interface ShopifyCustomerAccessToken {
    accessToken: string
    expiresAt: string
}

CustomerRegisterInput

Input for customer registration.
interface CustomerRegisterInput {
    email: string
    password: string
    firstName?: string
    lastName?: string
    phone?: string
    acceptsMarketing?: boolean
}

CustomerUpdateInput

Input for updating customer profile.
interface CustomerUpdateInput {
    firstName?: string
    lastName?: string
    phone?: string
    acceptsMarketing?: boolean
}

AddressInput

Input for creating/updating addresses.
interface AddressInput {
    address1?: string
    address2?: string
    city?: string
    company?: string
    country?: string
    firstName?: string
    lastName?: string
    phone?: string
    province?: string
    zip?: string
}

CustomerSubscriber

Callback function for customer auth subscriptions.
type CustomerSubscriber = (customer: ShopifyCustomer | null) => void