chore(oas): [21/21] improve oas schemas (#9339)

* improve oas

* more improvements

* add missing descriptions

---------

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
This commit is contained in:
Shahed Nasser
2024-09-27 13:40:24 +03:00
committed by GitHub
parent 38778b37e2
commit 74b3385a65
26 changed files with 433 additions and 235 deletions

View File

@@ -27,14 +27,110 @@
* type: object * type: object
* description: The state of the step's invokation function. * description: The state of the step's invokation function.
* x-schemaName: WorkflowExecutionFn * x-schemaName: WorkflowExecutionFn
* properties:
* state:
* type: string
* description: The invokation step's state.
* enum:
* - not_started
* - invoking
* - compensating
* - done
* - reverted
* - failed
* - dormant
* - skipped
* - skipped_failure
* - timeout
* status:
* type: string
* description: The invokation step's state.
* enum:
* - idle
* - ok
* - waiting_response
* - temp_failure
* - permanent_failure
* required:
* - state
* - status
* definition: * definition:
* type: object * type: object
* description: The step's definition details. * description: The step's definition details.
* x-schemaName: WorkflowExecutionDefinition * x-schemaName: WorkflowExecutionDefinition
* properties:
* async:
* type: boolean
* title: async
* description: Whether the step is async.
* compensateAsync:
* type: boolean
* title: compensateAsync
* description: Whether the compensation function of the step is async.
* noCompensation:
* type: boolean
* title: noCompensation
* description: Whether the step doesn't have a compensation function.
* continueOnPermanentFailure:
* type: boolean
* title: continueOnPermanentFailure
* description: Whether the step continues executing even if its status is changed to failed.
* maxRetries:
* type: number
* title: maxRetries
* description: The maximum number of times to retry the step.
* noWait:
* type: boolean
* title: noWait
* description: Whether the workflow shouldn't wait for the step to finish before moving to the next step.
* default: false
* retryInterval:
* type: number
* title: retryInterval
* description: The interval in seconds between retry attempts when the step fails.
* retryIntervalAwaiting:
* type: number
* title: retryIntervalAwaiting
* description: The interval in seconds to retry a step even if its status is `waiting_response`.
* saveResponse:
* type: boolean
* title: saveResponse
* description: Whether the step's response is stored.
* timeout:
* type: number
* title: timeout
* description: The maximum time in seconds to wait for this step to complete. If the step exceeds this time, the step's state is changed to `timeout`, but the step continues executing.
* compensate: * compensate:
* type: object * type: object
* description: The state of the step's compensation function. * description: The state of the step's compensation function.
* x-schemaName: WorkflowExecutionFn * x-schemaName: WorkflowExecutionFn
* properties:
* state:
* type: string
* description: The compensation function's state.
* enum:
* - not_started
* - invoking
* - compensating
* - done
* - reverted
* - failed
* - dormant
* - skipped
* - skipped_failure
* - timeout
* status:
* type: string
* description: The compensation function's status.
* enum:
* - idle
* - ok
* - waiting_response
* - temp_failure
* - permanent_failure
* required:
* - state
* - status
* depth: * depth:
* type: number * type: number
* title: depth * title: depth

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreOrderResponse * @schema StoreOrderResponse
* type: object * type: object
* description: SUMMARY * description: The order's details.
* x-schemaName: StoreOrderResponse * x-schemaName: StoreOrderResponse
* required: * required:
* - order * - order

View File

@@ -19,80 +19,45 @@
* type: string * type: string
* title: currency_code * title: currency_code
* description: The payment collection's currency code. * description: The payment collection's currency code.
* example: usd
* region_id: * region_id:
* type: string * type: string
* title: region_id * title: region_id
* description: The payment collection's region id. * description: The ID of the associated region.
* amount: * amount:
* oneOf: * type: number
* - type: string * title: amount
* title: amount * description: The payment collection's amount.
* description: The payment collection's amount.
* - type: number
* title: amount
* description: The payment collection's amount.
* - type: string
* title: amount
* description: The payment collection's amount.
* - $ref: "#/components/schemas/IBigNumber"
* authorized_amount: * authorized_amount:
* oneOf: * type: number
* - type: string * title: authorized_amount
* title: authorized_amount * description: The payment collection's authorized amount.
* description: The payment collection's authorized amount.
* - type: number
* title: authorized_amount
* description: The payment collection's authorized amount.
* - type: string
* title: authorized_amount
* description: The payment collection's authorized amount.
* - $ref: "#/components/schemas/IBigNumber"
* captured_amount: * captured_amount:
* oneOf: * type: number
* - type: string * title: captured_amount
* title: captured_amount * description: The payment collection's captured amount.
* description: The payment collection's captured amount.
* - type: number
* title: captured_amount
* description: The payment collection's captured amount.
* - type: string
* title: captured_amount
* description: The payment collection's captured amount.
* - $ref: "#/components/schemas/IBigNumber"
* refunded_amount: * refunded_amount:
* oneOf: * type: number
* - type: string * title: refunded_amount
* title: refunded_amount * description: The payment collection's refunded amount.
* description: The payment collection's refunded amount.
* - type: number
* title: refunded_amount
* description: The payment collection's refunded amount.
* - type: string
* title: refunded_amount
* description: The payment collection's refunded amount.
* - $ref: "#/components/schemas/IBigNumber"
* completed_at: * completed_at:
* oneOf: * type: string
* - type: string * title: completed_at
* title: completed_at * description: The date the payment collection was completed.
* description: The payment collection's completed at. * format: date-time
* - type: string
* title: completed_at
* description: The payment collection's completed at.
* format: date-time
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The payment collection's created at. * description: The date the payment collection was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The payment collection's updated at. * description: The date the payment collection was updated.
* metadata: * metadata:
* type: object * type: object
* description: The payment collection's metadata. * description: The payment collection's metadata, can hold custom key-value pairs.
* status: * status:
* type: string * type: string
* description: The payment collection's status. * description: The payment collection's status.

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StorePaymentCollectionResponse * @schema StorePaymentCollectionResponse
* type: object * type: object
* description: SUMMARY * description: The payment collection's details.
* x-schemaName: StorePaymentCollectionResponse * x-schemaName: StorePaymentCollectionResponse
* required: * required:
* - payment_collection * - payment_collection

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StorePaymentProvider * @schema StorePaymentProvider
* type: object * type: object
* description: The payment provider's payment providers. * description: The payment provider's details
* x-schemaName: StorePaymentProvider * x-schemaName: StorePaymentProvider
* required: * required:
* - id * - id

View File

@@ -69,17 +69,17 @@
* description: The product's ID. * description: The product's ID.
* metadata: * metadata:
* type: object * type: object
* description: The product's metadata. * description: The product's metadata, can hold custom key-value pairs.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The product's created at. * description: The date the product was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The product's updated at. * description: The date the product was updated.
* variants: * variants:
* type: array * type: array
* description: The product's variants. * description: The product's variants.
@@ -96,11 +96,11 @@
* is_giftcard: * is_giftcard:
* type: boolean * type: boolean
* title: is_giftcard * title: is_giftcard
* description: The product's is giftcard. * description: Whether the product is a gift card.
* thumbnail: * thumbnail:
* type: string * type: string
* title: thumbnail * title: thumbnail
* description: The product's thumbnail. * description: The product's thumbnail URL.
* width: * width:
* type: number * type: number
* title: width * title: width
@@ -120,11 +120,11 @@
* hs_code: * hs_code:
* type: string * type: string
* title: hs_code * title: hs_code
* description: The product'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 product's mid code. * description: The product's MID code.
* material: * material:
* type: string * type: string
* title: material * title: material
@@ -134,34 +134,34 @@
* collection_id: * collection_id:
* type: string * type: string
* title: collection_id * title: collection_id
* description: The product's collection id. * description: The ID of the collection that the product belongs to.
* type_id: * type_id:
* type: string * type: string
* title: type_id * title: type_id
* description: The product's type id. * description: The ID of the product's type.
* tags: * tags:
* type: array * type: array
* description: The product's tags. * description: The product's tags.
* items: * items:
* $ref: "#/components/schemas/BaseProductTag" * $ref: "#/components/schemas/StoreProductTag"
* images: * images:
* type: array * type: array
* description: The product's images. * description: The product's images.
* items: * items:
* $ref: "#/components/schemas/BaseProductImage" * $ref: "#/components/schemas/StoreProductImage"
* discountable: * discountable:
* type: boolean * type: boolean
* title: discountable * title: discountable
* description: The product's discountable. * description: Whether the product can be discounted.
* external_id: * external_id:
* type: string * type: string
* title: external_id * title: external_id
* description: The product's external id. * description: The ID of the product in an external service or system.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The product's deleted at. * description: The date the product was deleted.
* *
*/ */

View File

@@ -1,15 +1,13 @@
/** /**
* @schema StoreProductCategory * @schema StoreProductCategory
* type: object * type: object
* description: The category's categories. * description: The category's details.
* x-schemaName: StoreProductCategory * x-schemaName: StoreProductCategory
* required: * required:
* - id * - id
* - name * - name
* - description * - description
* - handle * - handle
* - is_active
* - is_internal
* - rank * - rank
* - parent_category_id * - parent_category_id
* - parent_category * - parent_category
@@ -39,14 +37,6 @@
* type: string * type: string
* title: handle * title: handle
* description: The category's handle. * description: The category's handle.
* is_active:
* type: boolean
* title: is_active
* description: The category's is active.
* is_internal:
* type: boolean
* title: is_internal
* description: The category's is internal.
* rank: * rank:
* type: number * type: number
* title: rank * title: rank
@@ -54,32 +44,32 @@
* parent_category_id: * parent_category_id:
* type: string * type: string
* title: parent_category_id * title: parent_category_id
* description: The category's parent category id. * description: The ID of the category's parent.
* parent_category: * parent_category:
* $ref: "#/components/schemas/BaseProductCategory" * $ref: "#/components/schemas/StoreProductCategory"
* category_children: * category_children:
* type: array * type: array
* description: The category's category children. * description: The category's children.
* items: * items:
* $ref: "#/components/schemas/BaseProductCategory" * $ref: "#/components/schemas/StoreProductCategory"
* metadata: * metadata:
* type: object * type: object
* description: The category's metadata. * description: The category's metadata, can hold custom key-value pairs.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The category's created at. * description: The date the category was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The category's updated at. * description: The date the category was updated.
* deleted_at: * deleted_at:
* type: string * type: string
* format: date-time * format: date-time
* title: deleted_at * title: deleted_at
* description: The category's deleted at. * description: The date the category was deleted.
* *
*/ */

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreProductCategoryListResponse * @schema StoreProductCategoryListResponse
* type: object * type: object
* description: SUMMARY * description: The paginated list of product categories.
* x-schemaName: StoreProductCategoryListResponse * x-schemaName: StoreProductCategoryListResponse
* required: * required:
* - limit * - limit
@@ -12,18 +12,18 @@
* limit: * limit:
* type: number * type: number
* title: limit * title: limit
* description: The product category's limit. * description: The maximum number of items returned.
* offset: * offset:
* type: number * type: number
* title: offset * title: offset
* description: The product category's offset. * description: The number of items skipped before retrieving the returned items.
* count: * count:
* type: number * type: number
* title: count * title: count
* description: The product category's count. * description: The total number of items.
* product_categories: * product_categories:
* type: array * type: array
* description: The product category's product categories. * description: The list of product categories.
* items: * items:
* $ref: "#/components/schemas/StoreProductCategory" * $ref: "#/components/schemas/StoreProductCategory"
* *

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreProductCategoryResponse * @schema StoreProductCategoryResponse
* type: object * type: object
* description: SUMMARY * description: The product category's details.
* x-schemaName: StoreProductCategoryResponse * x-schemaName: StoreProductCategoryResponse
* required: * required:
* - product_category * - product_category

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreProductResponse * @schema StoreProductResponse
* type: object * type: object
* description: SUMMARY * description: The product's details.
* x-schemaName: StoreProductResponse * x-schemaName: StoreProductResponse
* required: * required:
* - product * - product

View File

@@ -0,0 +1,40 @@
/**
* @schema StoreProductTag
* type: object
* description: The tag's details.
* x-schemaName: StoreProductTag
* properties:
* id:
* type: string
* title: id
* description: The tag's ID.
* value:
* type: string
* title: value
* description: The tag's value.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the tag was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the tag was updated.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The date the tag was deleted.
* metadata:
* type: object
* description: The tag's metadata, can hold custom key-value pairs.
* required:
* - id
* - value
* - created_at
* - updated_at
*
*/

View File

@@ -0,0 +1,139 @@
/**
* @schema StoreProductVariant
* type: object
* description: The variant's details.
* x-schemaName: StoreProductVariant
* properties:
* options:
* type: array
* description: The variant's options.
* items:
* $ref: "#/components/schemas/StoreProductOptionValue"
* product:
* $ref: "#/components/schemas/StoreProduct"
* id:
* type: string
* title: id
* description: The variant's ID.
* metadata:
* type: object
* description: The variant's metadata, can hold custom key-value pairs.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the variant was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the variant was updated.
* title:
* type: string
* title: title
* description: The variant's title.
* product_id:
* type: string
* title: product_id
* description: The ID of the product that the variant belongs to.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The date the variant was deleted.
* width:
* type: number
* title: width
* description: The variant's width.
* weight:
* type: number
* title: weight
* description: The variant's weight.
* length:
* type: number
* title: length
* description: The variant's length.
* height:
* type: number
* title: height
* description: The variant's height.
* origin_country:
* type: string
* title: origin_country
* description: The variant's origin country.
* hs_code:
* type: string
* title: hs_code
* description: The variant's HS code.
* mid_code:
* type: string
* title: mid_code
* description: The variant's MID code.
* material:
* type: string
* title: material
* description: The variant's material.
* sku:
* type: string
* title: sku
* description: The variant's SKU.
* barcode:
* type: string
* title: barcode
* description: The variant's barcode.
* ean:
* type: string
* title: ean
* description: The variant's EAN.
* upc:
* type: string
* title: upc
* description: The variant's UPC.
* allow_backorder:
* type: boolean
* title: allow_backorder
* description: Whether the variant can be ordered even if it's not in stock.
* manage_inventory:
* type: boolean
* title: manage_inventory
* description: Whether Medusa manages the variant's inventory. If disabled, the variant is always considered in stock.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/storefront-development/products/inventory
* description: "Storefront guide: How to retrieve a product variant's inventory details."
* inventory_quantity:
* type: number
* title: inventory_quantity
* description: The variant's inventory quantity. This property is only available if you pass `+variants.inventory_quantity` in the `fields` query parameter.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/storefront-development/products/inventory
* description: "Storefront guide: How to retrieve a product variant's inventory details."
* variant_rank:
* type: number
* title: variant_rank
* description: The variant's rank among its siblings.
* calculated_price:
* $ref: "#/components/schemas/BaseCalculatedPriceSet"
* required:
* - options
* - id
* - created_at
* - updated_at
* - title
* - deleted_at
* - width
* - weight
* - length
* - height
* - origin_country
* - hs_code
* - mid_code
* - material
* - sku
* - barcode
* - ean
* - upc
* - allow_backorder
* - manage_inventory
*
*/

View File

@@ -1,77 +0,0 @@
/**
* @schema StoreProductVariantParams
* type: object
* description: The product's variants.
* x-schemaName: StoreProductVariantParams
* properties:
* q:
* type: string
* title: q
* description: The variant's q.
* id:
* oneOf:
* - type: string
* title: id
* description: The variant's ID.
* - type: array
* description: The variant's ID.
* items:
* type: string
* title: id
* description: The id's ID.
* sku:
* oneOf:
* - type: string
* title: sku
* description: The variant's sku.
* - type: array
* description: The variant's sku.
* items:
* type: string
* title: sku
* description: The sku's details.
* product_id:
* oneOf:
* - type: string
* title: product_id
* description: The variant's product id.
* - type: array
* description: The variant's product id.
* items:
* type: string
* title: product_id
* description: The product id's details.
* options:
* type: object
* description: The variant's options.
* limit:
* type: number
* title: limit
* description: The variant's limit.
* offset:
* type: number
* title: offset
* description: The variant's offset.
* order:
* type: string
* title: order
* description: The variant's order.
* fields:
* type: string
* title: fields
* description: The variant's fields.
* $and:
* type: array
* description: Join query parameters with an AND condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $and
* $or:
* type: array
* description: Join query parameters with an OR condition. Each object's content is the same type as the expected query parameters.
* items:
* type: object
* title: $or
*
*/

View File

@@ -20,10 +20,11 @@
* type: string * type: string
* title: currency_code * title: currency_code
* description: The region's currency code. * description: The region's currency code.
* example: usd
* 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 for carts that belong to this region.
* countries: * countries:
* type: array * type: array
* description: The region's countries. * description: The region's countries.
@@ -36,17 +37,17 @@
* $ref: "#/components/schemas/AdminPaymentProvider" * $ref: "#/components/schemas/AdminPaymentProvider"
* metadata: * metadata:
* type: object * type: object
* description: The region's metadata. * description: The region's metadata, can hold custom key-value pairs.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The region's created at. * description: The date the region was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The region's updated at. * description: The date the region was updated.
* *
*/ */

View File

@@ -20,7 +20,7 @@
* order_id: * order_id:
* type: string * type: string
* title: order_id * title: order_id
* description: The return's order id. * description: The ID of the order this return is created for.
* status: * status:
* type: string * type: string
* title: status * title: status
@@ -28,31 +28,31 @@
* exchange_id: * exchange_id:
* type: string * type: string
* title: exchange_id * title: exchange_id
* description: The return's exchange id. * description: The ID of the associated exchange.
* location_id: * location_id:
* type: string * type: string
* title: location_id * title: location_id
* description: The return's location id. * description: The ID of the location the items are returned to.
* claim_id: * claim_id:
* type: string * type: string
* title: claim_id * title: claim_id
* description: The return's claim id. * description: The ID of the associated claim.
* order_version: * order_version:
* type: number * type: number
* title: order_version * title: order_version
* description: The return's order version. * description: The version of the order when the return is applied.
* display_id: * display_id:
* type: number * type: number
* title: display_id * title: display_id
* description: The return's display id. * description: The return's display ID.
* no_notification: * no_notification:
* type: boolean * type: boolean
* title: no_notification * title: no_notification
* description: The return's no notification. * description: Whether the customer should receive updates about changes in the return.
* refund_amount: * refund_amount:
* type: number * type: number
* title: refund_amount * title: refund_amount
* description: The return's refund amount. * description: The return's refunded amount.
* items: * items:
* type: array * type: array
* description: The return's items. * description: The return's items.
@@ -61,16 +61,16 @@
* received_at: * received_at:
* type: string * type: string
* title: received_at * title: received_at
* description: The return's received at. * description: The date the return was received.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The return's created at. * description: The date the return was created.
* canceled_at: * canceled_at:
* type: string * type: string
* title: canceled_at * title: canceled_at
* description: The return's canceled at. * description: The date the return was updated.
* *
*/ */

View File

@@ -28,17 +28,17 @@
* description: The return reason's description. * description: The return reason's description.
* metadata: * metadata:
* type: object * type: object
* description: The return reason's metadata. * description: The return reason's metadata, can hold custom key-value pairs.
* created_at: * created_at:
* type: string * type: string
* format: date-time * format: date-time
* title: created_at * title: created_at
* description: The return reason's created at. * description: The date the return reason was created.
* updated_at: * updated_at:
* type: string * type: string
* format: date-time * format: date-time
* title: updated_at * title: updated_at
* description: The return reason's updated at. * description: The date the return reason was updated.
* *
*/ */

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreReturnReasonResponse * @schema StoreReturnReasonResponse
* type: object * type: object
* description: SUMMARY * description: The return reason's details.
* x-schemaName: StoreReturnReasonResponse * x-schemaName: StoreReturnReasonResponse
* required: * required:
* - return_reason * - return_reason

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreReturnResponse * @schema StoreReturnResponse
* type: object * type: object
* description: SUMMARY * description: The return's details.
* x-schemaName: StoreReturnResponse * x-schemaName: StoreReturnResponse
* required: * required:
* - return * - return

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreShippingOption * @schema StoreShippingOption
* type: object * type: object
* description: The shipping option's shipping options. * description: The shipping option's details.
* x-schemaName: StoreShippingOption * x-schemaName: StoreShippingOption
* required: * required:
* - id * - id
@@ -28,30 +28,30 @@
* description: The shipping option's name. * description: The shipping option's name.
* price_type: * price_type:
* type: string * type: string
* description: The shipping option's price type. * description: The shipping option's price type. If it's `flat`, the price is fixed and is set in the `prices` property. If it's `calculated`, the price is calculated on checkout by the associated fulfillment provider.
* enum: * enum:
* - flat * - flat
* - calculated * - calculated
* service_zone_id: * service_zone_id:
* type: string * type: string
* title: service_zone_id * title: service_zone_id
* description: The shipping option's service zone id. * description: The ID of the service zone the shipping option belongs to.
* provider_id: * provider_id:
* type: string * type: string
* title: provider_id * title: provider_id
* description: The shipping option's provider id. * description: The ID of the fulfillment provider handling this option.
* provider: * provider:
* $ref: "#/components/schemas/BaseFulfillmentProvider" * $ref: "#/components/schemas/BaseFulfillmentProvider"
* shipping_option_type_id: * shipping_option_type_id:
* type: string * type: string
* title: shipping_option_type_id * title: shipping_option_type_id
* description: The shipping option's shipping option type id. * description: The ID of the shipping option's type.
* type: * type:
* $ref: "#/components/schemas/StoreShippingOption" * $ref: "#/components/schemas/StoreShippingOption"
* shipping_profile_id: * shipping_profile_id:
* type: string * type: string
* title: shipping_profile_id * title: shipping_profile_id
* description: The shipping option's shipping profile id. * description: The ID of the associated shipping profile.
* amount: * amount:
* type: number * type: number
* title: amount * title: amount
@@ -59,13 +59,15 @@
* is_tax_inclusive: * is_tax_inclusive:
* type: boolean * type: boolean
* title: is_tax_inclusive * title: is_tax_inclusive
* description: The shipping option's is tax inclusive. * description: Whether the amount includes taxes.
* data: * data:
* type: object * type: object
* description: The shipping option's data. * description: The shipping option's data, useful for the provider handling fulfillment.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
* metadata: * metadata:
* type: object * type: object
* description: The shipping option's metadata. * description: The shipping option's metadata, can hold custom key-value pairs.
* *
*/ */

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreShippingOptionListResponse * @schema StoreShippingOptionListResponse
* type: object * type: object
* description: SUMMARY * description: The shipping option's details.
* x-schemaName: StoreShippingOptionListResponse * x-schemaName: StoreShippingOptionListResponse
* required: * required:
* - shipping_options * - shipping_options

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreUpdateCartLineItem * @schema StoreUpdateCartLineItem
* type: object * type: object
* description: SUMMARY * description: The details to update in the line item.
* x-schemaName: StoreUpdateCartLineItem * x-schemaName: StoreUpdateCartLineItem
* required: * required:
* - quantity * - quantity
@@ -9,10 +9,10 @@
* quantity: * quantity:
* type: number * type: number
* title: quantity * title: quantity
* description: The cart's quantity. * description: The item's quantity.
* metadata: * metadata:
* type: object * type: object
* description: The cart's metadata. * description: The item's metadata, can hold custom key-value pairs.
* *
*/ */

View File

@@ -1,7 +1,7 @@
/** /**
* @schema StoreUpdateCustomer * @schema StoreUpdateCustomer
* type: object * type: object
* description: SUMMARY * description: The details to update in the customer.
* x-schemaName: StoreUpdateCustomer * x-schemaName: StoreUpdateCustomer
* properties: * properties:
* company_name: * company_name:

View File

@@ -1,7 +1,7 @@
/** /**
* @schema UpdateAddress * @schema UpdateAddress
* type: object * type: object
* description: The cart's shipping address. * description: The details to update in the address.
* x-schemaName: UpdateAddress * x-schemaName: UpdateAddress
* required: * required:
* - id * - id
@@ -9,54 +9,55 @@
* id: * id:
* type: string * type: string
* title: id * title: id
* description: The shipping address's ID. * description: The ID of an existing address to update.
* customer_id: * customer_id:
* type: string * type: string
* title: customer_id * title: customer_id
* description: The shipping address's customer id. * description: The ID of the customer that this address belongs to.
* company: * company:
* type: string * type: string
* title: company * title: company
* description: The shipping address's company. * description: The address's company.
* first_name: * first_name:
* type: string * type: string
* title: first_name * title: first_name
* description: The shipping address's first name. * description: The address's first name.
* last_name: * last_name:
* type: string * type: string
* title: last_name * title: last_name
* description: The shipping address's last name. * description: The address's last name.
* address_1: * address_1:
* type: string * type: string
* title: address_1 * title: address_1
* description: The shipping address's address 1. * description: The address's first line.
* address_2: * address_2:
* type: string * type: string
* title: address_2 * title: address_2
* description: The shipping address's address 2. * description: The address's second line.
* city: * city:
* type: string * type: string
* title: city * title: city
* description: The shipping address's city. * description: The address's city.
* country_code: * country_code:
* type: string * type: string
* title: country_code * title: country_code
* description: The shipping address's country code. * description: The address's country code.
* example: usd
* province: * province:
* type: string * type: string
* title: province * title: province
* description: The shipping address's province. * description: The address's province.
* postal_code: * postal_code:
* type: string * type: string
* title: postal_code * title: postal_code
* description: The shipping address's postal code. * description: The address's postal code.
* phone: * phone:
* type: string * type: string
* title: phone * title: phone
* description: The shipping address's phone. * description: The address's phone.
* metadata: * metadata:
* type: object * type: object
* description: The shipping address's metadata. * description: The address's metadata, can hold custom key-value pairs.
* *
*/ */

View File

@@ -1,38 +1,39 @@
/** /**
* @schema UpdateCartData * @schema UpdateCartData
* type: object * type: object
* description: SUMMARY * description: The details to update in a cart.
* x-schemaName: UpdateCartData * x-schemaName: UpdateCartData
* properties: * properties:
* region_id: * region_id:
* type: string * type: string
* title: region_id * title: region_id
* description: The cart's region id. * description: The ID of the associated region. This can affect the prices and currency code of the cart.
* customer_id: * customer_id:
* type: string * type: string
* title: customer_id * title: customer_id
* description: The cart's customer id. * description: The ID of the customer that the cart belongs to.
* sales_channel_id: * sales_channel_id:
* type: string * type: string
* title: sales_channel_id * title: sales_channel_id
* description: The cart's sales channel id. * description: The ID of the associated sales channel. Only products available in this channel can be added to the cart.
* email: * email:
* type: string * type: string
* title: email * title: email
* description: The cart's email. * description: The email of the customer that the cart belongs to.
* format: email * format: email
* currency_code: * currency_code:
* type: string * type: string
* title: currency_code * title: currency_code
* description: The cart's currency code. * description: The cart's currency code.
* example: usd
* shipping_address_id: * shipping_address_id:
* type: string * type: string
* title: shipping_address_id * title: shipping_address_id
* description: The cart's shipping address id. * description: The ID of the cart's shipping address.
* billing_address_id: * billing_address_id:
* type: string * type: string
* title: billing_address_id * title: billing_address_id
* description: The cart's billing address id. * description: The ID of the cart's billing address.
* billing_address: * billing_address:
* oneOf: * oneOf:
* - $ref: "#/components/schemas/CreateAddress" * - $ref: "#/components/schemas/CreateAddress"
@@ -43,7 +44,7 @@
* - $ref: "#/components/schemas/UpdateAddress" * - $ref: "#/components/schemas/UpdateAddress"
* metadata: * metadata:
* type: object * type: object
* description: The cart's metadata. * description: The cart's metadata, ca hold custom key-value pairs.
* *
*/ */

View File

@@ -1,7 +1,7 @@
/** /**
* @schema UpdateOrderReturnReason * @schema UpdateOrderReturnReason
* type: object * type: object
* description: SUMMARY * description: The details to update in a return reason.
* x-schemaName: UpdateOrderReturnReason * x-schemaName: UpdateOrderReturnReason
* properties: * properties:
* id: * id:
@@ -22,7 +22,7 @@
* description: The return reason's description. * description: The return reason's description.
* metadata: * metadata:
* type: object * type: object
* description: The return reason's metadata. * description: The return reason's metadata, can hold custom key-value pairs.
* *
*/ */

View File

@@ -10,6 +10,30 @@
* data: * data:
* type: object * type: object
* description: The context's data. * description: The context's data.
* properties:
* invoke:
* type: object
* description: The step's invokation details.
* required:
* - output
* additionalProperties:
* type: object
* properties:
* output:
* type: object
* description: The invokation's details.
* required:
* - output
* - compensateInput
* properties:
* output:
* description: the step's output
* compensateInput:
* description: the compensation function's input.
* payload:
* description: the payload of the transaction.
* required:
* - invoke
* compensate: * compensate:
* type: object * type: object
* description: The context's compensate. * description: The context's compensate.
@@ -18,7 +42,23 @@
* description: The context's errors. * description: The context's errors.
* items: * items:
* type: object * type: object
* description: The error's errors. * description: The error's details.
* properties:
* error:
* type: object
* description: The error's details.
* action:
* type: string
* title: action
* description: The error's action.
* handlerType:
* type: string
* title: handlerType
* description: The error's handler type.
* required:
* - error
* - action
* - handlerType
* *
*/ */