admin/types

Types

pub type Cart {
  Cart(
    id: option.Option(String),
    checkout_url: String,
    cost: option.Option(ShopifyCartCost),
    total_quantity: Int,
    lines: List(CartItem),
  )
}

Constructors

pub type CartItem {
  CartItem(
    id: option.Option(String),
    quantity: Int,
    cost: Cost,
    merchandise: Merchandise,
  )
}

Constructors

pub type CartProduct {
  CartProduct(
    id: String,
    handle: String,
    title: String,
    featured_image: Image,
  )
}

Constructors

  • CartProduct(
      id: String,
      handle: String,
      title: String,
      featured_image: Image,
    )
pub type Connection(a) {
  Connection(edges: List(Edge(a)))
}

Constructors

  • Connection(edges: List(Edge(a)))
pub type Cost {
  Cost(total_amount: Money)
}

Constructors

  • Cost(total_amount: Money)
pub type Count {
  Count(count: Int, precision: CountPrecision)
}

Constructors

pub type CountPrecision {
  AtLeast
  Exact
}

Constructors

  • AtLeast
  • Exact
pub type Edge(a) {
  Edge(node: a)
}

Constructors

  • Edge(node: a)
pub type FeaturedMedia {
  FeaturedMedia(
    id: String,
    media_content_type: MediaContentType,
    alt: option.Option(String),
    preview: option.Option(MediaPreviewImage),
  )
}

Constructors

pub type GetProductsQuery {
  GetProductsQuery(products: Connection(Product))
}

Constructors

pub type Image {
  Image(
    url: String,
    id: String,
    alt_text: option.Option(String),
    width: option.Option(Int),
    height: option.Option(Int),
    thumbhash: option.Option(String),
  )
}

Constructors

pub type Maybe(a) {
  Maybe(option.Option(a))
}

Constructors

pub type Media {
  Media(
    id: String,
    media_content_type: String,
    alt: option.Option(String),
    preview: option.Option(Preview),
  )
}

Constructors

pub type MediaConnection {
  MediaConnection(edges: List(MediaEdge))
}

Constructors

pub type MediaContentType {
  ExternalVideo
  ImageContent
  Model3D
  Video
}

Constructors

  • ExternalVideo
  • ImageContent
  • Model3D
  • Video
pub type MediaEdge {
  MediaEdge(node: Media)
}

Constructors

pub type MediaPreviewImage {
  MediaPreviewImage(
    image: option.Option(Image),
    status: MediaPreviewImageStatus,
  )
}

Constructors

pub type MediaPreviewImageStatus {
  Failed
  Processing
  Ready
  Uploaded
}

Constructors

  • Failed
  • Processing
  • Ready
  • Uploaded
pub type Merchandise {
  Merchandise(
    id: String,
    title: String,
    selected_options: List(SelectedOption),
    product: CartProduct,
  )
}

Constructors

pub type Money {
  Money(amount: String, currency_code: String)
}

Constructors

  • Money(amount: String, currency_code: String)
pub type Pagination {
  Pagination(
    has_next_page: Bool,
    has_previous_page: Bool,
    start_cursor: String,
    end_cursor: String,
  )
}

Constructors

  • Pagination(
      has_next_page: Bool,
      has_previous_page: Bool,
      start_cursor: String,
      end_cursor: String,
    )
pub type Preview {
  Preview(image: option.Option(Image), status: String)
}

Constructors

pub type PriceRange {
  PriceRange(max_variant_price: Money, min_variant_price: Money)
}

Constructors

  • PriceRange(max_variant_price: Money, min_variant_price: Money)
pub type Product {
  Product(
    id: String,
    handle: String,
    title: String,
    total_inventory: option.Option(Int),
    description: option.Option(String),
    description_html: option.Option(String),
    vendor: String,
    options: List(ProductOption),
    price_range_v2: ProductPriceRange,
    compare_at_price_range: option.Option(
      ProductCompareAtPriceRange,
    ),
    variants: ProductVariantConnection,
    featured_media: option.Option(Media),
    media: MediaConnection,
    seo: option.Option(Seo),
    tags: List(String),
    updated_at: String,
    created_at: String,
    published_at: option.Option(String),
    variants_count: VariantsCount,
  )
}

Constructors

pub type ProductCompareAtPriceRange {
  ProductCompareAtPriceRange(
    max_variant_compare_at_price: option.Option(Money),
    min_variant_compare_at_price: option.Option(Money),
  )
}

Constructors

pub type ProductConnection {
  ProductConnection(edges: Connection(Product))
}

Constructors

pub type ProductEdge {
  ProductEdge(node: Edge(Product))
}

Constructors

pub type ProductOption {
  ProductOption(id: String, name: String, values: List(String))
}

Constructors

  • ProductOption(id: String, name: String, values: List(String))
pub type ProductPriceRange {
  ProductPriceRange(
    max_variant_price: Money,
    min_variant_price: Money,
  )
}

Constructors

  • ProductPriceRange(
      max_variant_price: Money,
      min_variant_price: Money,
    )
pub type ProductVariant {
  ProductVariant(
    id: String,
    title: String,
    available_for_sale: Bool,
    selected_options: List(SelectedOption),
    price: String,
  )
}

Constructors

  • ProductVariant(
      id: String,
      title: String,
      available_for_sale: Bool,
      selected_options: List(SelectedOption),
      price: String,
    )
pub type ProductVariantConnection {
  ProductVariantConnection(edges: List(ProductVariantEdge))
}

Constructors

pub type ProductVariantEdge {
  ProductVariantEdge(node: ProductVariant)
}

Constructors

pub type Products {
  Products(products: List(Product))
}

Constructors

  • Products(products: List(Product))
pub type SelectedOption {
  SelectedOption(name: String, value: String)
}

Constructors

  • SelectedOption(name: String, value: String)
pub type Seo {
  Seo(
    description: option.Option(String),
    title: option.Option(String),
  )
}

Constructors

pub type ShopifyCart {
  ShopifyCart(
    id: option.Option(String),
    checkout_url: String,
    cost: option.Option(ShopifyCartCost),
    lines: Connection(CartItem),
    total_quantity: Int,
  )
}

Constructors

pub type ShopifyCartCost {
  ShopifyCartCost(
    total_amount: Money,
    subtotal_amount: Money,
    total_tax_amount: Money,
  )
}

Constructors

  • ShopifyCartCost(
      total_amount: Money,
      subtotal_amount: Money,
      total_tax_amount: Money,
    )
pub type ShopifyCollection {
  ShopifyCollection(
    handle: String,
    title: String,
    description: String,
    seo: Seo,
    updated_at: String,
  )
}

Constructors

  • ShopifyCollection(
      handle: String,
      title: String,
      description: String,
      seo: Seo,
      updated_at: String,
    )
pub type SortKey {
  InventoryTotal
  Title
  ProductType
  Vendor
  UpdatedAt
  CreatedAt
  PublishedAt
  Price
  Id
  Relevance
}

Constructors

  • InventoryTotal
  • Title
  • ProductType
  • Vendor
  • UpdatedAt
  • CreatedAt
  • PublishedAt
  • Price
  • Id
  • Relevance
pub type VariantsCount {
  VariantsCount(count: Int, precision: String)
}

Constructors

  • VariantsCount(count: Int, precision: String)

Values

pub fn cart_decoder() -> decode.Decoder(Cart)
pub fn cart_item_connection_decoder() -> decode.Decoder(
  Connection(CartItem),
)
pub fn cart_item_edge_decoder() -> decode.Decoder(Edge(CartItem))
pub fn cost_decoder() -> decode.Decoder(Cost)
pub fn count_decoder() -> decode.Decoder(Count)
pub fn count_precision_to_json(
  count_precision: CountPrecision,
) -> json.Json
pub fn count_to_json(count: Count) -> json.Json
pub fn get_products_query_decoder() -> decode.Decoder(
  GetProductsQuery,
)
pub fn image_connection_decoder() -> decode.Decoder(
  Connection(Image),
)
pub fn image_connection_to_json(
  connection: Connection(Image),
) -> json.Json
pub fn image_edge_to_json(edge: Edge(Image)) -> json.Json
pub fn image_edges_decoder() -> decode.Decoder(Edge(Image))
pub fn media_content_type_decoder() -> decode.Decoder(
  MediaContentType,
)
pub fn media_content_type_to_json(
  media_content_type: MediaContentType,
) -> json.Json
pub fn media_preview_image_decoder() -> decode.Decoder(
  MediaPreviewImage,
)
pub fn media_preview_image_status_decoder() -> decode.Decoder(
  MediaPreviewImageStatus,
)
pub fn media_preview_image_status_to_json(
  media_preview_image_status: MediaPreviewImageStatus,
) -> json.Json
pub fn media_preview_image_to_json(
  media_preview_image: MediaPreviewImage,
) -> json.Json
pub fn merchandise_decoder() -> decode.Decoder(Merchandise)
pub fn pagination_decoder() -> decode.Decoder(Pagination)
pub fn pagination_to_json(pagination: Pagination) -> json.Json
pub fn price_range_decoder() -> decode.Decoder(PriceRange)
pub fn price_range_to_json(price_range: PriceRange) -> json.Json
pub fn product_connection_decoder() -> decode.Decoder(
  Connection(Product),
)
pub fn product_connection_to_json(
  connection: Connection(Product),
) -> json.Json
pub fn product_decoder() -> decode.Decoder(Product)
pub fn product_edge_to_json(edge: Edge(Product)) -> json.Json
pub fn product_edges_decoder() -> decode.Decoder(Edge(Product))
pub fn product_to_json(product: Product) -> json.Json
pub fn remove_edges_and_nodes(array: Connection(a)) -> List(a)
pub fn reshape_images(
  images: Connection(Image),
  product_title: String,
) -> List(Image)
pub fn shopify_cart_decoder() -> decode.Decoder(ShopifyCart)
pub fn sort_key_decoder() -> decode.Decoder(SortKey)
pub fn sort_key_from_string(
  value: String,
) -> option.Option(SortKey)
pub fn sort_key_to_json(sort_key: SortKey) -> json.Json
Search Document