storefront/utils

Types

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 Edge(a) {
  Edge(node: a)
}

Constructors

  • Edge(node: a)
pub type Image {
  Image(
    url: String,
    alt_text: String,
    width: String,
    height: String,
  )
}

Constructors

  • Image(
      url: String,
      alt_text: String,
      width: String,
      height: String,
    )
pub type Images {
  Images(images: List(Image))
}

Constructors

  • Images(images: List(Image))
pub type Maybe(a) {
  Maybe(option.Option(a))
}

Constructors

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

Constructors

  • Money(amount: String, currency_code: String)
pub type PriceRange {
  PriceRange(max_variant_price: Money, min_variant_price: Money)
}

Constructors

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

Constructors

  • ProductOption(id: String, name: String, values: List(String))
pub type ProductVariant {
  ProductVariant(
    id: String,
    title: String,
    available_for_sale: Bool,
    selected_options: SelectedOption,
    price: Money,
  )
}

Constructors

  • ProductVariant(
      id: String,
      title: String,
      available_for_sale: Bool,
      selected_options: SelectedOption,
      price: Money,
    )
pub type SelectedOption {
  SelectedOption(name: String, value: String)
}

Constructors

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

Constructors

  • Seo(title: String, description: String)

Values

pub fn cost_decoder() -> decode.Decoder(Cost)
pub fn image_connection_decoder() -> decode.Decoder(
  Connection(Image),
)
pub fn image_decoder() -> decode.Decoder(Image)
pub fn image_edges_decoder() -> decode.Decoder(Edge(Image))
pub fn image_to_json(image: Image) -> json.Json
pub fn money_decoder() -> decode.Decoder(Money)
pub fn money_to_json(money: Money) -> json.Json
pub fn price_range_decoder() -> decode.Decoder(PriceRange)
pub fn price_range_to_json(price_range: PriceRange) -> json.Json
pub fn product_variant_to_json(
  product_variant: ProductVariant,
) -> 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 seo_decoder() -> decode.Decoder(Seo)
pub fn seo_to_json(seo: Seo) -> json.Json
Search Document