// ----------------------------------------------------------------------------- // Enum Typedefs // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- // Model Typedefs // ----------------------------------------------------------------------------- /** * @typedef {Object} Product * @property {number} [id] An unsigned 64-bit integer that's used as a unique identifier for the product. Each id is unique across the Shopify system. No two products will have the same id, even if they're from different shops. * @property {string} [title] The name of the product. * @property {string} [handle] A unique human-friendly string for the product. Automatically generated from the product's title. Used by the Liquid templating language to refer to objects. * @property {string} [description] A description of the product. * @property {string} [description_html] A description of the product. Supports HTML formatting. * @property {number} [item_count] The number of units included. If it is > 1, then it is a pack. * @property {string} [product_type] The product type * @property {string} [gender] The marketed gender of the products * @property {Color[]} [colors] * @property {Size[]} [sizes] * @property {Object[]} [images] * @property {Variant[]} [variants] * @property {Breadcrumb[]} [breadcrumbs] * @property {Detail[]} [details] * @property {string} [created_at] The date and time (ISO 8601 format) when the product was created. * @property {string} [updated_at] The date and time (ISO 8601 format) when the product was last modified. */ /** * A particular size options for a product * @typedef {Object} Size * @property {string} [name] The name of the option which this size was created from * @property {SizeValues[]} [values] */ /** * @typedef {Object} SizeValues * @property {string} [id] The internal name of the size * @property {string} [name] The visual name of the size * @property {string} [guidance] Size related guidance for more specific examples for the user */ /** * @typedef {Object} Color * @property {string} [id] The slug id of the color * @property {number} [position] The order in which the color should be displayed * @property {string} [name] The name of the color * @property {string} [fill] A 80x80 url of an image of the swatch to use on FE */ /** * @typedef {Object} Variant * @property {number} [id] The unique numeric identifier for the product variant. * @property {number} [product_id] The unique numeric identifier for the product. * @property {string} [sku] A unique identifier for the product variant in the shop. Required in order to connect to a FulfillmentService. * @property {string} [title] The title of the product variant. * @property {boolean} [is_available] If the variant is availabor not * @property {Price} [price] * @property {Shipping} [shipping] * @property {string} [created_at] The date and time (ISO 8601 format) when the product was created. * @property {string} [updated_at] The date and time (ISO 8601 format) when the product was last modified. * @property {Size[]} [sizes] */ /** * @typedef {Object} Shipping * @property {boolean} [requires_shipping] This property is deprecated. Use the `requires_shipping` property on the InventoryItem resource instead. * @property {number} [grams] The weight of the product variant in grams. * @property {number} [weight] The weight of the product variant in the unit system specified with weight_unit. * @property {string} [weight_unit] The unit of measurement that applies to the product variant's weight. If you don't specify a value for weight_unit, then the shop's default unit of measurement is applied. Valid values: g, kg, oz, and lb. */ /** * @typedef {Object} Breadcrumb * @property {string} [name] The name of the breadcrumb section * @property {string} [link] Pieces of a collections page url to use for link * @property {number} [position] Order position */ /** * @typedef {Object} Image * @property {number} [id] A unique numeric identifier for the product image. * @property {number} [position] The order of the product image in the list. The first product image is at position 1 and is the 'main' image for the product. * @property {string} [alt] ALT text * @property {string} [src] Specifies the location of the product image. This parameter supports URL filters that you can use to retrieve modified copies of the image. For example, add _small, to the filename to retrieve a scaled copy of the image at 100 x 100 px (for example, ipod-nano_small.png), or add _2048x2048 to retrieve a copy of the image constrained at 2048 x 2048 px resolution (for example, ipod-nano_2048x2048.png). */ /** * @typedef {Object} Price * @property {string} [msrp] The original price of the item before an adjustment or a sale. * @property {string} [price] The price of the product variant. * @property {boolean} [isDiscounted] true If the product is discounted * @property {string} [percentOff] percentOff which is a whole number as a string, based on the percentage price is off of msrp prices. */ /** * @typedef {Object} Detail * @property {string} [icon_handle] the name used to generate the silhouette icon image for a product detail * @property {string} [title] the title of the details / set of tech features * @property {Tech[]} [tech] */ /** * @typedef {Object} Tech * @property {string} [title] name of the tech feature * @property {string} [handle] a unique internal name used to identify the tech feature * @property {string} [content] the copy wrote for the tech feature */ // ----------------------------------------------------------------------------- // Union Typedefs // -----------------------------------------------------------------------------