storefront/utils
Types
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 Money {
Money(amount: String, currency_code: String)
}
Constructors
-
Money(amount: String, currency_code: String)
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)
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 money_decoder() -> decode.Decoder(Money)
pub fn price_range_decoder() -> decode.Decoder(PriceRange)
pub fn price_range_to_json(price_range: PriceRange) -> json.Json
pub fn product_option_decoder() -> decode.Decoder(ProductOption)
pub fn product_variant_decoder() -> decode.Decoder(ProductVariant)
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 selected_option_decoder() -> decode.Decoder(SelectedOption)
pub fn seo_decoder() -> decode.Decoder(Seo)