extend enum CatalogBooleanFilterName {
  "isLowQuantity"
  isLowQuantity

  "isSoldOut"
  isSoldOut

  "isBackorder"
  isBackorder
}

extend type CatalogProduct {
  """
  True if every purchasable variant of this product is sold out but allows backorders. A storefront UI may use this
  to decide to show a "Backordered" indicator.
  """
  isBackorder: Boolean!

  """
  True if at least one purchasable variant of this product has a low quantity in stock. A storefront UI may use this
  to decide to show a "Low Quantity" indicator.
  """
  isLowQuantity: Boolean!

  """
  True if every purchasable variant of this product is sold out. A storefront UI may use this
  to decide to show a "Sold Out" indicator when `isBackorder` is not also true.
  """
  isSoldOut: Boolean!
}

extend type CatalogProductVariant {
  """
  True for a purchasable variant if an order containing this variant will be accepted even when there is insufficient
  available inventory (`inventoryAvailableToSell`) to fulfill it immediately. For non-purchasable variants, this is true if at least one purchasable
  child variant can be backordered. A storefront UI may use this in combination with `inventoryAvailableToSell` to
  decide whether to show or enable an "Add to Cart" button.
  """
  canBackorder: Boolean!

  """
  The quantity of this item currently available to sell.
  This number is updated when an order is placed by the customer.
  This number does not include reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator).
  If this is a variant, this number is created by summing all child option inventory numbers.
  This is most likely the quantity to display in the storefront UI.
  """
  inventoryAvailableToSell: Int

  """
  The quantity of this item currently in stock.
  This number is updated when an order is processed by the operator.
  This number includes all inventory, including reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator).
  If this is a variant, this number is created by summing all child option inventory numbers.
  This is most likely just used as a reference in the operator UI, and not displayed in the storefront UI.
  """
  inventoryInStock: Int

  """
  True for a purchasable variant if it is sold out but allows backorders. For non-purchasable variants, this is
  true if every purchasable child variant is sold out but allows backorders. A storefront UI may use this
  to decide to show a "Backordered" indicator.
  """
  isBackorder: Boolean!

  """
  True for a purchasable variant if it has a low available quantity (`inventoryAvailableToSell`) in stock.
  For non-purchasable variants, this is true if at least one purchasable child variant has a low available
  quantity in stock. A storefront UI may use this to decide to show a "Low Quantity" indicator.
  """
  isLowQuantity: Boolean!

  """
  True for a purchasable variant if it is sold out (`inventoryAvailableToSell` is 0). For non-purchasable
  variants, this is true if every purchasable child variant is sold out. A storefront UI may use this
  to decide to show a "Sold Out" indicator when `isBackorder` is not also true.
  """
  isSoldOut: Boolean!
}

extend type CartItem {
  """
  The quantity of this item currently available to sell.
  This number is updated when an order is placed by the customer.
  This number does not include reserved inventory (i.e. inventory that has been ordered, but not yet processed by the operator).
  This is most likely the quantity to display in the storefront UI.
  """
  inventoryAvailableToSell: Int

  """
  True if this item is currently sold out but allows backorders. A storefront UI may use this
  to decide to show a "Backordered" indicator.
  """
  isBackorder: Boolean!

  """
  True if this item has a low available quantity (`inventoryAvailableToSell`) in stock.
  A storefront UI may use this to decide to show a "Low Quantity" indicator.
  """
  isLowQuantity: Boolean!

  """
  True if this item is currently sold out (`inventoryAvailableToSell` is 0). A storefront
  UI may use this to decide to show a "Sold Out" indicator when `isBackorder` is not also true.
  """
  isSoldOut: Boolean!
}
