oas: [2/n] improve schema oas (#9040)

This commit is contained in:
Shahed Nasser
2024-09-06 18:53:07 +03:00
committed by GitHub
parent 0482b7751d
commit 7a80593b68
20 changed files with 168 additions and 204 deletions
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCollectionResponse * @schema AdminCollectionResponse
* type: object * type: object
* description: SUMMARY * description: The collection's details.
* x-schemaName: AdminCollectionResponse * x-schemaName: AdminCollectionResponse
* required: * required:
* - collection * - collection
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateApiKey * @schema AdminCreateApiKey
* type: object * type: object
* description: SUMMARY * description: The API key's details.
* x-schemaName: AdminCreateApiKey * x-schemaName: AdminCreateApiKey
* required: * required:
* - title * - title
@@ -10,10 +10,10 @@
* title: * title:
* type: string * type: string
* title: title * title: title
* description: The api key's title. * description: The API key's title.
* type: * type:
* type: string * type: string
* description: The api key's type. * description: The API key's type. Use `secret` for a user's API key; Use `publishable` for Publishable API keys.
* enum: * enum:
* - publishable * - publishable
* - secret * - secret
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateApplicationMethod * @schema AdminCreateApplicationMethod
* type: object * type: object
* description: The promotion's application method. * description: The application method's details.
* x-schemaName: AdminCreateApplicationMethod * x-schemaName: AdminCreateApplicationMethod
* required: * required:
* - value * - value
@@ -15,7 +15,7 @@
* value: * value:
* type: number * type: number
* title: value * title: value
* description: The application method's value. * description: The discounted amount applied by the associated promotion based on the `type`.
* currency_code: * currency_code:
* type: string * type: string
* title: currency_code * title: currency_code
@@ -23,23 +23,23 @@
* max_quantity: * max_quantity:
* type: number * type: number
* title: max_quantity * title: max_quantity
* description: The application method's max quantity. * description: The max quantity allowed in the cart for the associated promotion to be applied.
* type: * type:
* type: string * type: string
* description: The application method's type. * description: The type of the application method indicating how the associated promotion is applied.
* enum: * enum:
* - fixed * - fixed
* - percentage * - percentage
* target_type: * target_type:
* type: string * type: string
* description: The application method's target type. * description: The target type of the application method indicating whether the associated promotion is applied to the cart's items, shipping methods, or the whole order.
* enum: * enum:
* - items * - items
* - shipping_methods * - shipping_methods
* - order * - order
* allocation: * allocation:
* type: string * type: string
* description: The application method's allocation. * description: The allocation value that indicates whether the associated promotion is applied on each item in a cart or split between the items in the cart.
* enum: * enum:
* - each * - each
* - across * - across
@@ -56,11 +56,11 @@
* apply_to_quantity: * apply_to_quantity:
* type: number * type: number
* title: apply_to_quantity * title: apply_to_quantity
* description: The application method's apply to quantity. * description: The quantity that results from matching the `buyget` promotion's condition. For example, if the promotion is a "Buy 2 shirts get 1 free", the value f this attribute is `1`.
* buy_rules_min_quantity: * buy_rules_min_quantity:
* type: number * type: number
* title: buy_rules_min_quantity * title: buy_rules_min_quantity
* description: The application method's buy rules min quantity. * description: The minimum quantity required for a `buyget` promotion to be applied. For example, if the promotion is a "Buy 2 shirts get 1 free", the value of this attribute is `2`.
* *
*/ */
@@ -1,53 +0,0 @@
/**
* @schema AdminCreateCampaign
* type: object
* description: The promotion's campaign.
* x-schemaName: AdminCreateCampaign
* properties:
* name:
* type: string
* title: name
* description: The campaign's name.
* description:
* type: string
* title: description
* description: The campaign's description.
* currency:
* type: string
* title: currency
* description: The campaign's currency.
* campaign_identifier:
* type: string
* title: campaign_identifier
* description: The campaign's campaign identifier.
* starts_at:
* type: string
* title: starts_at
* description: The campaign's starts at.
* format: date-time
* ends_at:
* type: string
* title: ends_at
* description: The campaign's ends at.
* format: date-time
* budget:
* type: object
* description: The campaign's budget.
* properties:
* type:
* type: string
* description: The budget's type.
* enum:
* - spend
* - usage
* currency_code:
* type: string
* title: currency_code
* description: The budget's currency code.
* limit:
* type: number
* title: limit
* description: The budget's limit.
*
*/
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateCollection * @schema AdminCreateCollection
* type: object * type: object
* description: SUMMARY * description: the product collection's details.
* x-schemaName: AdminCreateCollection * x-schemaName: AdminCreateCollection
* required: * required:
* - title * - title
@@ -16,7 +16,7 @@
* description: The collection's handle. * description: The collection's handle.
* metadata: * metadata:
* type: object * type: object
* description: The collection's metadata. * description: The collection's metadata, used to store custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateCustomerGroup * @schema AdminCreateCustomerGroup
* type: object * type: object
* description: SUMMARY * description: The customer group's details.
* x-schemaName: AdminCreateCustomerGroup * x-schemaName: AdminCreateCustomerGroup
* required: * required:
* - name * - name
@@ -12,7 +12,7 @@
* description: The customer group's name. * description: The customer group's name.
* metadata: * metadata:
* type: object * type: object
* description: The customer group's metadata. * description: The customer group's metadata, used to store custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateFulfillment * @schema AdminCreateFulfillment
* type: object * type: object
* description: SUMMARY * description: The filfillment's details.
* x-schemaName: AdminCreateFulfillment * x-schemaName: AdminCreateFulfillment
* required: * required:
* - location_id * - location_id
@@ -17,27 +17,27 @@
* location_id: * location_id:
* type: string * type: string
* title: location_id * title: location_id
* description: The fulfillment's location id. * description: The ID of the location the items are fulfilled from.
* provider_id: * provider_id:
* type: string * type: string
* title: provider_id * title: provider_id
* description: The fulfillment's provider id. * description: The ID of the provider handling this fulfillment.
* delivery_address: * delivery_address:
* type: object * type: object
* description: The fulfillment's delivery address. * description: The address to deliver the items to.
* properties: * properties:
* first_name: * first_name:
* type: string * type: string
* title: first_name * title: first_name
* description: The delivery address's first name. * description: The customer's first name.
* last_name: * last_name:
* type: string * type: string
* title: last_name * title: last_name
* description: The delivery address's last name. * description: The customer's last name.
* phone: * phone:
* type: string * type: string
* title: phone * title: phone
* description: The delivery address's phone. * description: The customer's phone.
* company: * company:
* type: string * type: string
* title: company * title: company
@@ -45,11 +45,11 @@
* address_1: * address_1:
* type: string * type: string
* title: address_1 * title: address_1
* description: The delivery address's address 1. * description: The delivery address's first line.
* address_2: * address_2:
* type: string * type: string
* title: address_2 * title: address_2
* description: The delivery address's address 2. * description: The delivery address's second line.
* city: * city:
* type: string * type: string
* title: city * title: city
@@ -68,13 +68,13 @@
* description: The delivery address's postal code. * description: The delivery address's postal code.
* metadata: * metadata:
* type: object * type: object
* description: The delivery address's metadata. * description: The delivery address's metadata, used to store custom key-value pairs.
* items: * items:
* type: array * type: array
* description: The fulfillment's items. * description: The items to fulfill.
* items: * items:
* type: object * type: object
* description: The item's items. * description: An item to fulfill.
* required: * required:
* - title * - title
* - sku * - sku
@@ -88,11 +88,11 @@
* sku: * sku:
* type: string * type: string
* title: sku * title: sku
* description: The item's sku. * description: The item's SKU.
* quantity: * quantity:
* type: number * type: number
* title: quantity * title: quantity
* description: The item's quantity. * description: The quantity to fulfill of the item.
* barcode: * barcode:
* type: string * type: string
* title: barcode * title: barcode
@@ -100,17 +100,17 @@
* line_item_id: * line_item_id:
* type: string * type: string
* title: line_item_id * title: line_item_id
* description: The item's line item id. * description: The ID of the associated line item.
* inventory_item_id: * inventory_item_id:
* type: string * type: string
* title: inventory_item_id * title: inventory_item_id
* description: The item's inventory item id. * description: The ID of the inventory item associated with the underlying variant.
* labels: * labels:
* type: array * type: array
* description: The fulfillment's labels. * description: The labels for the fulfillment's shipments.
* items: * items:
* type: object * type: object
* description: The label's labels. * description: A shipment's label.
* required: * required:
* - tracking_number * - tracking_number
* - tracking_url * - tracking_url
@@ -123,48 +123,48 @@
* tracking_url: * tracking_url:
* type: string * type: string
* title: tracking_url * title: tracking_url
* description: The label's tracking url. * description: The label's tracking URL.
* label_url: * label_url:
* type: string * type: string
* title: label_url * title: label_url
* description: The label's label url. * description: The label's URL.
* order:
* type: object
* description: The fulfillment's order.
* order_id: * order_id:
* type: string * type: string
* title: order_id * title: order_id
* description: The fulfillment's order id. * description: The ID of the order this fulfillment is created for.
* shipping_option_id: * shipping_option_id:
* type: string * type: string
* title: shipping_option_id * title: shipping_option_id
* description: The fulfillment's shipping option id. * description: The ID of the shipping option used in the order.
* data: * data:
* type: object * type: object
* description: The fulfillment's data. * description: Any data useful for the fulfillment provider to handle the fulfillment.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
* description: Learn more about the data property.
* packed_at: * packed_at:
* type: string * type: string
* title: packed_at * title: packed_at
* description: The fulfillment's packed at. * description: The date and time the fulfillment was packed.
* format: date-time * format: date-time
* shipped_at: * shipped_at:
* type: string * type: string
* title: shipped_at * title: shipped_at
* description: The fulfillment's shipped at. * description: The date and time the fulfillment was shipped.
* format: date-time * format: date-time
* delivered_at: * delivered_at:
* type: string * type: string
* title: delivered_at * title: delivered_at
* description: The fulfillment's delivered at. * description: The date and time the fulfillment was delivered.
* format: date-time * format: date-time
* canceled_at: * canceled_at:
* type: string * type: string
* title: canceled_at * title: canceled_at
* description: The fulfillment's canceled at. * description: The date and time the fulfillment was canceled.
* format: date-time * format: date-time
* metadata: * metadata:
* type: object * type: object
* description: The fulfillment's metadata. * description: The fulfillment's metadata, used to store custom key-value pairs.
* *
*/ */
@@ -1,17 +1,17 @@
/** /**
* @schema AdminCreateInventoryItem * @schema AdminCreateInventoryItem
* type: object * type: object
* description: SUMMARY * description: The inventory item's details.
* x-schemaName: AdminCreateInventoryItem * x-schemaName: AdminCreateInventoryItem
* properties: * properties:
* sku: * sku:
* type: string * type: string
* title: sku * title: sku
* description: The inventory item's sku. * description: The inventory item's SKU.
* hs_code: * hs_code:
* type: string * type: string
* title: hs_code * title: hs_code
* description: The inventory item's hs code. * description: The inventory item's HS code.
* weight: * weight:
* type: number * type: number
* title: weight * title: weight
@@ -47,18 +47,18 @@
* description: * description:
* type: string * type: string
* title: description * title: description
* description: The inventory item's description. * description: The description of the variant associated with the inventory item.
* requires_shipping: * requires_shipping:
* type: boolean * type: boolean
* title: requires_shipping * title: requires_shipping
* description: The inventory item's requires shipping. * description: Whether the item requires shipping.
* thumbnail: * thumbnail:
* type: string * type: string
* title: thumbnail * title: thumbnail
* description: The inventory item's thumbnail. * description: The inventory item's thumbnail.
* metadata: * metadata:
* type: object * type: object
* description: The inventory item's metadata. * description: The inventory item's metadata, used to store custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreatePriceList * @schema AdminCreatePriceList
* type: object * type: object
* description: SUMMARY * description: The price list's details.
* x-schemaName: AdminCreatePriceList * x-schemaName: AdminCreatePriceList
* required: * required:
* - title * - title
@@ -18,11 +18,13 @@
* starts_at: * starts_at:
* type: string * type: string
* title: starts_at * title: starts_at
* description: The price list's starts at. * description: The date and time the price list starts at.
* format: date-time
* ends_at: * ends_at:
* type: string * type: string
* title: ends_at * title: ends_at
* description: The price list's ends at. * description: The date and time the price list ends at.
* format: date-time
* status: * status:
* type: string * type: string
* description: The price list's status. * description: The price list's status.
@@ -38,12 +40,14 @@
* rules: * rules:
* type: object * type: object
* description: The price list's rules. * description: The price list's rules.
* example:
* product_category_id: pcat_123
* prices: * prices:
* type: array * type: array
* description: The price list's prices. * description: The price list's prices.
* items: * items:
* type: object * type: object
* description: The price's prices. * description: A price's details.
* required: * required:
* - currency_code * - currency_code
* - amount * - amount
@@ -60,18 +64,20 @@
* variant_id: * variant_id:
* type: string * type: string
* title: variant_id * title: variant_id
* description: The price's variant id. * description: The ID of the product variant this price is for.
* min_quantity: * min_quantity:
* type: number * type: number
* title: min_quantity * title: min_quantity
* description: The price's min quantity. * description: The minimum quantity required in the cart for this price to be applied.
* max_quantity: * max_quantity:
* type: number * type: number
* title: max_quantity * title: max_quantity
* description: The price's max quantity. * description: The maximum quantity in the cart that shouldn't be crossed for this price to be applied.
* rules: * rules:
* type: object * type: object
* description: The price's rules. * description: The price's rules.
* example:
* region_id: reg_123
* *
*/ */
@@ -1,21 +1,23 @@
/** /**
* @schema AdminCreatePricePreference * @schema AdminCreatePricePreference
* type: object * type: object
* description: SUMMARY * description: The price preference's details.
* x-schemaName: AdminCreatePricePreference * x-schemaName: AdminCreatePricePreference
* properties: * properties:
* attribute: * attribute:
* type: string * type: string
* title: attribute * title: attribute
* description: The price preference's attribute. * description: The name of the attribute the price preference applies on.
* example: currency_code
* value: * value:
* type: string * type: string
* title: value * title: value
* description: The price preference's value. * description: The attribute's value.
* example: usd
* is_tax_inclusive: * is_tax_inclusive:
* type: boolean * type: boolean
* title: is_tax_inclusive * title: is_tax_inclusive
* description: The price preference's is tax inclusive. * description: Whether the price is tax inclusive if the value of the specified attribute matches the specified value.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateProduct * @schema AdminCreateProduct
* type: object * type: object
* description: The create's details. * description: The product's details.
* x-schemaName: AdminCreateProduct * x-schemaName: AdminCreateProduct
* required: * required:
* - title * - title
@@ -9,47 +9,47 @@
* title: * title:
* type: string * type: string
* title: title * title: title
* description: The create's title. * description: The product's title.
* subtitle: * subtitle:
* type: string * type: string
* title: subtitle * title: subtitle
* description: The create's subtitle. * description: The product's subtitle.
* description: * description:
* type: string * type: string
* title: description * title: description
* description: The create's description. * description: The product's description.
* is_giftcard: * is_giftcard:
* type: boolean * type: boolean
* title: is_giftcard * title: is_giftcard
* description: The create's is giftcard. * description: Whether the product is a gift card.
* discountable: * discountable:
* type: boolean * type: boolean
* title: discountable * title: discountable
* description: The create's discountable. * description: Whether the product is discountable.
* images: * images:
* type: array * type: array
* description: The create's images. * description: The product's images.
* items: * items:
* type: object * type: object
* description: The image's images. * description: A product's image details.
* required: * required:
* - url * - url
* properties: * properties:
* url: * url:
* type: string * type: string
* title: url * title: url
* description: The image's url. * description: The image's URL.
* thumbnail: * thumbnail:
* type: string * type: string
* title: thumbnail * title: thumbnail
* description: The create's thumbnail. * description: The URL of the product's thumbnail.
* handle: * handle:
* type: string * type: string
* title: handle * title: handle
* description: The create's handle. * description: The product's handle.
* status: * status:
* type: string * type: string
* description: The create's status. * description: The product's status.
* enum: * enum:
* - draft * - draft
* - proposed * - proposed
@@ -58,17 +58,17 @@
* type_id: * type_id:
* type: string * type: string
* title: type_id * title: type_id
* description: The create's type id. * description: The ID of the type the product belongs to.
* collection_id: * collection_id:
* type: string * type: string
* title: collection_id * title: collection_id
* description: The create's collection id. * description: The ID of the collection the product belongs to.
* categories: * categories:
* type: array * type: array
* description: The create's categories. * description: The categories the product belongs to.
* items: * items:
* type: object * type: object
* description: The category's categories. * description: A category's details.
* required: * required:
* - id * - id
* properties: * properties:
@@ -78,10 +78,10 @@
* description: The category's ID. * description: The category's ID.
* tags: * tags:
* type: array * type: array
* description: The create's tags. * description: The product's tags.
* items: * items:
* type: object * type: object
* description: The tag's tags. * description: A tag's details.
* required: * required:
* - id * - id
* properties: * properties:
@@ -91,20 +91,20 @@
* description: The tag's ID. * description: The tag's ID.
* options: * options:
* type: array * type: array
* description: The create's options. * description: The product's options.
* items: * items:
* $ref: "#/components/schemas/AdminCreateProductOption" * $ref: "#/components/schemas/AdminCreateProductOption"
* variants: * variants:
* type: array * type: array
* description: The create's variants. * description: The product's variants.
* items: * items:
* $ref: "#/components/schemas/AdminCreateProductVariant" * $ref: "#/components/schemas/AdminCreateProductVariant"
* sales_channels: * sales_channels:
* type: array * type: array
* description: The create's sales channels. * description: The sales channels the product is available in.
* items: * items:
* type: object * type: object
* description: The sales channel's sales channels. * description: A sales channel's details.
* required: * required:
* - id * - id
* properties: * properties:
@@ -115,38 +115,38 @@
* weight: * weight:
* type: number * type: number
* title: weight * title: weight
* description: The create's weight. * description: The product's weight.
* length: * length:
* type: number * type: number
* title: length * title: length
* description: The create's length. * description: The product's length.
* height: * height:
* type: number * type: number
* title: height * title: height
* description: The create's height. * description: The product's height.
* width: * width:
* type: number * type: number
* title: width * title: width
* description: The create's width. * description: The product's width.
* hs_code: * hs_code:
* type: string * type: string
* title: hs_code * title: hs_code
* description: The create's hs code. * description: The product's HS code.
* mid_code: * mid_code:
* type: string * type: string
* title: mid_code * title: mid_code
* description: The create's mid code. * description: The product's MID code.
* origin_country: * origin_country:
* type: string * type: string
* title: origin_country * title: origin_country
* description: The create's origin country. * description: The product's origin country.
* material: * material:
* type: string * type: string
* title: material * title: material
* description: The create's material. * description: The product's material.
* metadata: * metadata:
* type: object * type: object
* description: The create's metadata. * description: The product's metadata, used to store custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateProductCategory * @schema AdminCreateProductCategory
* type: object * type: object
* description: SUMMARY * description: The product category's details.
* x-schemaName: AdminCreateProductCategory * x-schemaName: AdminCreateProductCategory
* required: * required:
* - name * - name
@@ -21,22 +21,22 @@
* is_internal: * is_internal:
* type: boolean * type: boolean
* title: is_internal * title: is_internal
* description: The product category's is internal. * description: Whether the product category is only used and seen by admin users.
* is_active: * is_active:
* type: boolean * type: boolean
* title: is_active * title: is_active
* description: The product category's is active. * description: Whether the product category is active.
* parent_category_id: * parent_category_id:
* type: string * type: string
* title: parent_category_id * title: parent_category_id
* description: The product category's parent category id. * description: The ID of a category that's the parent of this one.
* rank: * rank:
* type: number * type: number
* title: rank * title: rank
* description: The product category's rank. * description: The sorting order of the product category among sibling categories.
* metadata: * metadata:
* type: object * type: object
* description: The product category's metadata. * description: The product category's metadata, used to store custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateProductOption * @schema AdminCreateProductOption
* type: object * type: object
* description: SUMMARY * description: The product option's details.
* x-schemaName: AdminCreateProductOption * x-schemaName: AdminCreateProductOption
* required: * required:
* - title * - title
@@ -10,14 +10,14 @@
* title: * title:
* type: string * type: string
* title: title * title: title
* description: The product's title. * description: The product option's title.
* values: * values:
* type: array * type: array
* description: The product's values. * description: The product option's values.
* items: * items:
* type: string * type: string
* title: values * title: values
* description: The value's values. * description: A value.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateProductTag * @schema AdminCreateProductTag
* type: object * type: object
* description: SUMMARY * description: The product tag's details.
* x-schemaName: AdminCreateProductTag * x-schemaName: AdminCreateProductTag
* required: * required:
* - value * - value
@@ -12,7 +12,7 @@
* description: The product tag's value. * description: The product tag's value.
* metadata: * metadata:
* type: object * type: object
* description: The product tag's metadata. * description: The product tag's metadata, used to store custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateProductVariant * @schema AdminCreateProductVariant
* type: object * type: object
* description: The create's details. * description: The product variant's details.
* x-schemaName: AdminCreateProductVariant * x-schemaName: AdminCreateProductVariant
* required: * required:
* - title * - title
@@ -10,78 +10,79 @@
* title: * title:
* type: string * type: string
* title: title * title: title
* description: The create's title. * description: The variant's title.
* sku: * sku:
* type: string * type: string
* title: sku * title: sku
* description: The create's sku. * description: The variant's SKU.
* ean: * ean:
* type: string * type: string
* title: ean * title: ean
* description: The create's ean. * description: The variant's EAN.
* upc: * upc:
* type: string * type: string
* title: upc * title: upc
* description: The create's upc. * description: The variant's UPC.
* barcode: * barcode:
* type: string * type: string
* title: barcode * title: barcode
* description: The create's barcode. * description: The variant's barcode.
* hs_code: * hs_code:
* type: string * type: string
* title: hs_code * title: hs_code
* description: The create's hs code. * description: The variant's HS code.
* mid_code: * mid_code:
* type: string * type: string
* title: mid_code * title: mid_code
* description: The create's mid code. * description: The variant's MID code.
* allow_backorder: * allow_backorder:
* type: boolean * type: boolean
* title: allow_backorder * title: allow_backorder
* description: The create's allow backorder. * description: Whether it's allowed to order this variant when it's out of stock.
* manage_inventory: * manage_inventory:
* type: boolean * type: boolean
* title: manage_inventory * title: manage_inventory
* description: The create's manage inventory. * description: Whether Medusa manages the variant's inventory quantity. If disabled, the product variant is always considered in stock.
* variant_rank: * variant_rank:
* type: number * type: number
* title: variant_rank * title: variant_rank
* description: The create's variant rank. * description: The sorting order of the variant among other variants in the product.
* weight: * weight:
* type: number * type: number
* title: weight * title: weight
* description: The create's weight. * description: The variant's weight.
* length: * length:
* type: number * type: number
* title: length * title: length
* description: The create's length. * description: The variant's length.
* height: * height:
* type: number * type: number
* title: height * title: height
* description: The create's height. * description: The variant's height.
* width: * width:
* type: number * type: number
* title: width * title: width
* description: The create's width. * description: The variant's width.
* origin_country: * origin_country:
* type: string * type: string
* title: origin_country * title: origin_country
* description: The create's origin country. * description: The variant's origin country.
* material: * material:
* type: string * type: string
* title: material * title: material
* description: The create's material. * description: The variant's material.
* metadata: * metadata:
* type: object * type: object
* description: The create's metadata. * description: The variant's metadata, used to store custom key-value pairs.
* prices: * prices:
* type: array * type: array
* description: The create's prices. * description: The variant's prices.
* items: * items:
* $ref: "#/components/schemas/AdminCreateProductVariantPrice" * $ref: "#/components/schemas/AdminCreateProductVariantPrice"
* options: * options:
* type: object * type: object
* description: The create's options. * description: The variant's options, where the key is an option's name, and the value is the option's value.
* * example:
* Color: Black
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateProductVariantPrice * @schema AdminCreateProductVariantPrice
* type: object * type: object
* description: The price's prices. * description: The details of a variant's price.
* x-schemaName: AdminCreateProductVariantPrice * x-schemaName: AdminCreateProductVariantPrice
* required: * required:
* - currency_code * - currency_code
@@ -18,14 +18,16 @@
* min_quantity: * min_quantity:
* type: number * type: number
* title: min_quantity * title: min_quantity
* description: The price's min quantity. * description: The minimum quantity that must be available in the cart for this price to apply.
* max_quantity: * max_quantity:
* type: number * type: number
* title: max_quantity * title: max_quantity
* description: The price's max quantity. * description: The maximum quantity that must not be surpassed in the cart for this price to apply.
* rules: * rules:
* type: object * type: object
* description: The price's rules. * description: The price's rules.
* example:
* region_id: reg_123
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreatePromotionRule * @schema AdminCreatePromotionRule
* type: object * type: object
* description: The rule's rules. * description: The promotion rule's details.
* x-schemaName: AdminCreatePromotionRule * x-schemaName: AdminCreatePromotionRule
* required: * required:
* - operator * - operator
@@ -10,7 +10,7 @@
* properties: * properties:
* operator: * operator:
* type: string * type: string
* description: The rule's operator. * description: The operator used to check whether the buy rule applies on a cart. For example, `eq` means that the cart's value for the specified attribute must match the specified value.
* enum: * enum:
* - gt * - gt
* - lt * - lt
@@ -26,18 +26,21 @@
* attribute: * attribute:
* type: string * type: string
* title: attribute * title: attribute
* description: The rule's attribute. * description: The attribute to compare against when checking whether a promotion can be applied on a cart.
* example: item.product.id
* values: * values:
* oneOf: * oneOf:
* - type: string * - type: string
* title: values * title: values
* description: The rule's values. * description: The attribute's value.
* example: prod_123
* - type: array * - type: array
* description: The rule's values. * description: The allowed attribute values.
* items: * items:
* type: string * type: string
* title: values * title: values
* description: The value's values. * description: An attribute value.
* example: prod_123
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateRefundReason * @schema AdminCreateRefundReason
* type: object * type: object
* description: SUMMARY * description: The refund reason's details.
* x-schemaName: AdminCreateRefundReason * x-schemaName: AdminCreateRefundReason
* required: * required:
* - label * - label
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateRegion * @schema AdminCreateRegion
* type: object * type: object
* description: SUMMARY * description: The region's details.
* x-schemaName: AdminCreateRegion * x-schemaName: AdminCreateRegion
* required: * required:
* - name * - name
@@ -15,31 +15,34 @@
* type: string * type: string
* title: currency_code * title: currency_code
* description: The region's currency code. * description: The region's currency code.
* example: usd
* countries: * countries:
* type: array * type: array
* description: The region's countries. * description: The region's countries.
* items: * items:
* type: string * type: string
* title: countries * title: countries
* description: The country's countries. * description: A country code.
* example: us
* automatic_taxes: * automatic_taxes:
* type: boolean * type: boolean
* title: automatic_taxes * title: automatic_taxes
* description: The region's automatic taxes. * description: Whether taxes are calculated automatically during checkout in this region.
* is_tax_inclusive: * is_tax_inclusive:
* type: boolean * type: boolean
* title: is_tax_inclusive * title: is_tax_inclusive
* description: The region's is tax inclusive. * description: Whether prices in this region are tax inclusive.
* payment_providers: * payment_providers:
* type: array * type: array
* description: The region's payment providers. * description: The payment providers enabled in this region.
* items: * items:
* type: string * type: string
* title: payment_providers * title: payment_providers
* description: The payment provider's payment providers. * description: A payment provider's ID.
* example: pp_stripe_stripe
* metadata: * metadata:
* type: object * type: object
* description: The region's metadata. * description: The region's metadata, used to store custom key-value pairs.
* *
*/ */
@@ -1,7 +1,7 @@
/** /**
* @schema AdminCreateReservation * @schema AdminCreateReservation
* type: object * type: object
* description: SUMMARY * description: The reservation's details.
* x-schemaName: AdminCreateReservation * x-schemaName: AdminCreateReservation
* required: * required:
* - location_id * - location_id
@@ -11,26 +11,26 @@
* line_item_id: * line_item_id:
* type: string * type: string
* title: line_item_id * title: line_item_id
* description: The reservation's line item id. * description: The ID of the line item this reservation is created for.
* location_id: * location_id:
* type: string * type: string
* title: location_id * title: location_id
* description: The reservation's location id. * description: The ID of the location the quantity is reserved from.
* inventory_item_id: * inventory_item_id:
* type: string * type: string
* title: inventory_item_id * title: inventory_item_id
* description: The reservation's inventory item id. * description: The ID of the inventory item associated with the line item's variant.
* quantity: * quantity:
* type: number * type: number
* title: quantity * title: quantity
* description: The reservation's quantity. * description: The reserved quantity.
* description: * description:
* type: string * type: string
* title: description * title: description
* description: The reservation's description. * description: The reservation's description.
* metadata: * metadata:
* type: object * type: object
* description: The reservation's metadata. * description: The reservation's metadata, used to store custom key-value pairs.
* *
*/ */