Skip to main content

ShopifyProduct

interface ShopifyProduct {
    id: string
    handle: string
    title: string
    description: string
    descriptionHtml: string
    availableForSale: boolean
    featuredImage: ShopifyImage | null
    images: ShopifyImage[]
    priceRange: ShopifyPriceRange
    compareAtPriceRange: ShopifyPriceRange
    options: ShopifyProductOption[]
    variants: ShopifyProductVariant[]
    productType: string
    vendor: string
    tags: string[]
    createdAt: string
    updatedAt: string
    publishedAt: string
    onlineStoreUrl: string | null
    seo: ShopifySeo
}

ShopifyProductVariant

interface ShopifyProductVariant {
    id: string
    title: string
    availableForSale: boolean
    price: ShopifyMoney
    compareAtPrice: ShopifyMoney | null
    image: ShopifyImage | null
    selectedOptions: Array<{
        name: string
        value: string
    }>
    sku: string | null
}

ShopifyProductOption

interface ShopifyProductOption {
    id: string
    name: string
    values: string[]
}

ProductsResult

Response from shoppy.products.list()
interface ProductsResult {
    items: ShopifyProduct[]
    pageInfo: ShopifyPageInfo
}

ProductField

Available fields for .select() on products.
type ProductField =
    | 'id'
    | 'handle'
    | 'title'
    | 'description'
    | 'descriptionHtml'
    | 'availableForSale'
    | 'featuredImage'
    | 'images'
    | 'priceRange'
    | 'compareAtPriceRange'
    | 'options'
    | 'variants'
    | 'productType'
    | 'vendor'
    | 'tags'
    | 'createdAt'
    | 'updatedAt'
    | 'publishedAt'
    | 'onlineStoreUrl'
    | 'seo'