oas: [15/n] improve oas schemas (#9216)

Improve OAS schemas [15/n]

Note: validation error will be fixed once #9218 is merged
This commit is contained in:
Shahed Nasser
2024-09-26 16:03:41 +03:00
committed by GitHub
parent d352ea8122
commit 97b72f4662
22 changed files with 250 additions and 633 deletions

View File

@@ -56,7 +56,7 @@
* type: array
* description: The customer's addresses.
* items:
* $ref: "#/components/schemas/BaseCustomerAddress"
* $ref: "#/components/schemas/AdminCustomerAddress"
* phone:
* type: string
* title: phone

View File

@@ -23,7 +23,7 @@
* type: array
* description: The customer group's customers.
* items:
* $ref: "#/components/schemas/BaseCustomer"
* $ref: "#/components/schemas/AdminCustomer"
* metadata:
* type: object
* description: The customer group's metadata, used to store custom key-value pairs.

View File

@@ -120,7 +120,7 @@
* title: variant_id
* description: The ID of the associated variant.
* product:
* $ref: "#/components/schemas/BaseProduct"
* $ref: "#/components/schemas/AdminProduct"
* product_id:
* type: string
* title: product_id

View File

@@ -16,7 +16,7 @@
* title: title
* description: The product option's title.
* product:
* $ref: "#/components/schemas/BaseProduct"
* $ref: "#/components/schemas/AdminProduct"
* product_id:
* type: string
* title: product_id

View File

@@ -109,7 +109,7 @@
* items:
* $ref: "#/components/schemas/BaseProductOptionValue"
* product:
* $ref: "#/components/schemas/BaseProduct"
* $ref: "#/components/schemas/AdminProduct"
* product_id:
* type: string
* title: product_id

View File

@@ -1,7 +1,7 @@
/**
* @schema AdminWorkflowExecutionResponse
* type: object
* description: SUMMARY
* description: The workflow execution's details.
* x-schemaName: AdminWorkflowExecutionResponse
* required:
* - workflow_execution

View File

@@ -1,7 +1,7 @@
/**
* @schema ApiKeyResponse
* type: object
* description: The api key's details.
* description: The API key's details.
* x-schemaName: ApiKeyResponse
* required:
* - id
@@ -18,46 +18,47 @@
* id:
* type: string
* title: id
* description: The api key's ID.
* description: The API key's ID.
* token:
* type: string
* title: token
* description: The api key's token.
* description: The API key's token.
* redacted:
* type: string
* title: redacted
* description: The api key's redacted.
* description: The redacted form of the API key's token. This is useful when showing portion of the token. For example `sk_...123`.
* title:
* type: string
* title: title
* description: The api key's title.
* description: The API key's title.
* type:
* type: string
* description: The API key's type. `secret` API keys are used for authenticating admin users, and `publishable` API key are used for storefronts and similar clients to scope requests to sales channels.
* enum:
* - secret
* - publishable
* last_used_at:
* type: string
* title: last_used_at
* description: The api key's last used at.
* description: The date the API key was last used.
* format: date-time
* created_by:
* type: string
* title: created_by
* description: The api key's created by.
* description: The ID of the user that created the API key.
* created_at:
* type: string
* title: created_at
* description: The api key's created at.
* description: The date the API key was created.
* format: date-time
* revoked_by:
* type: string
* title: revoked_by
* description: The api key's revoked by.
* description: The ID of the user that revoked the API key.
* revoked_at:
* type: string
* title: revoked_at
* description: The api key's revoked at.
* description: The date the API key was revoked.
* format: date-time
*
*/

View File

@@ -1,7 +1,7 @@
/**
* @schema BaseApplicationMethod
* type: object
* description: The promotion's application method.
* description: The application method's details.
* x-schemaName: BaseApplicationMethod
* required:
* - id
@@ -12,53 +12,54 @@
* description: The application method's ID.
* type:
* type: string
* description: The application method's type.
* description: How the associated promotion is applied. `fixed` means a fixed amount is discounted; `percentage` means a percentage of the original amount is discounted.
* enum:
* - fixed
* - percentage
* target_type:
* type: string
* description: The application method's target type.
* description: Which item does the promotion apply to. `items` mean the promotion applies to the cart's items; `shipping_methods` means the promotion applies to the cart's shipping methods; `order` means the promotion applies on the entire order.
* enum:
* - items
* - shipping_methods
* - order
* allocation:
* type: string
* description: The application method's allocation.
* description: How is the promotion amount discounted. `each` means the discounted amount is applied on each applicable item; `across` means the discounted amount is split accross the applicable items.
* enum:
* - each
* - across
* value:
* type: number
* title: value
* description: The application method's value.
* description: The amount to be discounted.
* currency_code:
* type: string
* title: currency_code
* description: The application method's currency code.
* example: usd
* max_quantity:
* type: number
* 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.
* buy_rules_min_quantity:
* type: number
* 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`.
* apply_to_quantity:
* type: number
* 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 of this attribute is `1`.
* promotion:
* $ref: "#/components/schemas/BasePromotion"
* target_rules:
* type: array
* description: The application method's target rules.
* description: The application method's target rules. These rules indicate which items / shipping methods the promotion applies to.
* items:
* $ref: "#/components/schemas/BasePromotionRule"
* buy_rules:
* type: array
* description: The application method's buy rules.
* description: The application method's buy rules. These rules indicate which items are part of the "Buy X" rule.
* items:
* $ref: "#/components/schemas/BasePromotionRule"
*

View File

@@ -1,8 +1,33 @@
/**
* @schema BaseCapture
* type: object
* description: The capture's captures.
* description: The details of a captured payment.
* x-schemaName: BaseCapture
* required:
* - id
* - amount
* - created_at
* - payment
* properties:
* id:
* type: string
* title: id
* description: The payment capture's ID.
* amount:
* type: number
* title: amount
* description: The captured amount.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the capture was created.
* created_by:
* type: string
* title: created_by
* description: The ID of the user that captured the payment.
* payment:
* $ref: "#/components/schemas/BasePayment"
*
*/

View File

@@ -1,8 +0,0 @@
/**
* @schema BaseCart
* type: object
* description: The item's cart.
* x-schemaName: BaseCart
*
*/

View File

@@ -1,74 +0,0 @@
/**
* @schema BaseCartAddress
* type: object
* description: The parent's billing address.
* x-schemaName: BaseCartAddress
* required:
* - id
* - created_at
* - updated_at
* properties:
* id:
* type: string
* title: id
* description: The billing address's ID.
* customer_id:
* type: string
* title: customer_id
* description: The billing address's customer id.
* first_name:
* type: string
* title: first_name
* description: The billing address's first name.
* last_name:
* type: string
* title: last_name
* description: The billing address's last name.
* phone:
* type: string
* title: phone
* description: The billing address's phone.
* company:
* type: string
* title: company
* description: The billing address's company.
* address_1:
* type: string
* title: address_1
* description: The billing address's address 1.
* address_2:
* type: string
* title: address_2
* description: The billing address's address 2.
* city:
* type: string
* title: city
* description: The billing address's city.
* country_code:
* type: string
* title: country_code
* description: The billing address's country code.
* province:
* type: string
* title: province
* description: The billing address's province.
* postal_code:
* type: string
* title: postal_code
* description: The billing address's postal code.
* metadata:
* type: object
* description: The billing address's metadata.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The billing address's created at.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The billing address's updated at.
*
*/

View File

@@ -1,311 +0,0 @@
/**
* @schema BaseCartLineItem
* type: object
* description: The item's items.
* x-schemaName: BaseCartLineItem
* required:
* - id
* - title
* - quantity
* - requires_shipping
* - is_discountable
* - is_tax_inclusive
* - unit_price
* - cart
* - cart_id
* - original_total
* - original_subtotal
* - original_tax_total
* - item_total
* - item_subtotal
* - item_tax_total
* - total
* - subtotal
* - tax_total
* - discount_total
* - discount_tax_total
* properties:
* id:
* type: string
* title: id
* description: The item's ID.
* title:
* type: string
* title: title
* description: The item's title.
* subtitle:
* type: string
* title: subtitle
* description: The item's subtitle.
* thumbnail:
* type: string
* title: thumbnail
* description: The item's thumbnail.
* quantity:
* oneOf:
* - type: string
* title: quantity
* description: The item's quantity.
* - type: number
* title: quantity
* description: The item's quantity.
* - type: string
* title: quantity
* description: The item's quantity.
* - $ref: "#/components/schemas/IBigNumber"
* product:
* $ref: "#/components/schemas/BaseProduct"
* product_id:
* type: string
* title: product_id
* description: The item's product id.
* product_title:
* type: string
* title: product_title
* description: The item's product title.
* product_description:
* type: string
* title: product_description
* description: The item's product description.
* product_subtitle:
* type: string
* title: product_subtitle
* description: The item's product subtitle.
* product_type:
* type: string
* title: product_type
* description: The item's product type.
* product_collection:
* type: string
* title: product_collection
* description: The item's product collection.
* product_handle:
* type: string
* title: product_handle
* description: The item's product handle.
* variant:
* $ref: "#/components/schemas/BaseProductVariant"
* variant_id:
* type: string
* title: variant_id
* description: The item's variant id.
* variant_sku:
* type: string
* title: variant_sku
* description: The item's variant sku.
* variant_barcode:
* type: string
* title: variant_barcode
* description: The item's variant barcode.
* variant_title:
* type: string
* title: variant_title
* description: The item's variant title.
* variant_option_values:
* type: object
* description: The item's variant option values.
* requires_shipping:
* type: boolean
* title: requires_shipping
* description: The item's requires shipping.
* is_discountable:
* type: boolean
* title: is_discountable
* description: The item's is discountable.
* is_tax_inclusive:
* type: boolean
* title: is_tax_inclusive
* description: The item's is tax inclusive.
* compare_at_unit_price:
* oneOf:
* - type: string
* title: compare_at_unit_price
* description: The item's compare at unit price.
* - type: number
* title: compare_at_unit_price
* description: The item's compare at unit price.
* - type: string
* title: compare_at_unit_price
* description: The item's compare at unit price.
* - $ref: "#/components/schemas/IBigNumber"
* unit_price:
* oneOf:
* - type: string
* title: unit_price
* description: The item's unit price.
* - type: number
* title: unit_price
* description: The item's unit price.
* - type: string
* title: unit_price
* description: The item's unit price.
* - $ref: "#/components/schemas/IBigNumber"
* tax_lines:
* type: array
* description: The item's tax lines.
* items:
* $ref: "#/components/schemas/BaseLineItemTaxLine"
* adjustments:
* type: array
* description: The item's adjustments.
* items:
* $ref: "#/components/schemas/BaseLineItemAdjustment"
* cart:
* $ref: "#/components/schemas/BaseCart"
* cart_id:
* type: string
* title: cart_id
* description: The item's cart id.
* metadata:
* type: object
* description: The item's metadata.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The item's created at.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The item's updated at.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The item's deleted at.
* original_total:
* oneOf:
* - type: string
* title: original_total
* description: The item's original total.
* - type: number
* title: original_total
* description: The item's original total.
* - type: string
* title: original_total
* description: The item's original total.
* - $ref: "#/components/schemas/IBigNumber"
* original_subtotal:
* oneOf:
* - type: string
* title: original_subtotal
* description: The item's original subtotal.
* - type: number
* title: original_subtotal
* description: The item's original subtotal.
* - type: string
* title: original_subtotal
* description: The item's original subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* original_tax_total:
* oneOf:
* - type: string
* title: original_tax_total
* description: The item's original tax total.
* - type: number
* title: original_tax_total
* description: The item's original tax total.
* - type: string
* title: original_tax_total
* description: The item's original tax total.
* - $ref: "#/components/schemas/IBigNumber"
* item_total:
* oneOf:
* - type: string
* title: item_total
* description: The item's item total.
* - type: number
* title: item_total
* description: The item's item total.
* - type: string
* title: item_total
* description: The item's item total.
* - $ref: "#/components/schemas/IBigNumber"
* item_subtotal:
* oneOf:
* - type: string
* title: item_subtotal
* description: The item's item subtotal.
* - type: number
* title: item_subtotal
* description: The item's item subtotal.
* - type: string
* title: item_subtotal
* description: The item's item subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* item_tax_total:
* oneOf:
* - type: string
* title: item_tax_total
* description: The item's item tax total.
* - type: number
* title: item_tax_total
* description: The item's item tax total.
* - type: string
* title: item_tax_total
* description: The item's item tax total.
* - $ref: "#/components/schemas/IBigNumber"
* total:
* oneOf:
* - type: string
* title: total
* description: The item's total.
* - type: number
* title: total
* description: The item's total.
* - type: string
* title: total
* description: The item's total.
* - $ref: "#/components/schemas/IBigNumber"
* subtotal:
* oneOf:
* - type: string
* title: subtotal
* description: The item's subtotal.
* - type: number
* title: subtotal
* description: The item's subtotal.
* - type: string
* title: subtotal
* description: The item's subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* tax_total:
* oneOf:
* - type: string
* title: tax_total
* description: The item's tax total.
* - type: number
* title: tax_total
* description: The item's tax total.
* - type: string
* title: tax_total
* description: The item's tax total.
* - $ref: "#/components/schemas/IBigNumber"
* discount_total:
* oneOf:
* - type: string
* title: discount_total
* description: The item's discount total.
* - type: number
* title: discount_total
* description: The item's discount total.
* - type: string
* title: discount_total
* description: The item's discount total.
* - $ref: "#/components/schemas/IBigNumber"
* discount_tax_total:
* oneOf:
* - type: string
* title: discount_tax_total
* description: The item's discount tax total.
* - type: number
* title: discount_tax_total
* description: The item's discount tax total.
* - type: string
* title: discount_tax_total
* description: The item's discount tax total.
* - $ref: "#/components/schemas/IBigNumber"
*
*/

View File

@@ -1,7 +1,7 @@
/**
* @schema BaseCartShippingMethod
* type: object
* description: The shipping method's shipping methods.
* description: A cart's shipping method.
* x-schemaName: BaseCartShippingMethod
* required:
* - id
@@ -27,7 +27,7 @@
* cart_id:
* type: string
* title: cart_id
* description: The shipping method's cart id.
* description: The ID of the cart this shipping method belongs to.
* name:
* type: string
* title: name
@@ -37,31 +37,25 @@
* title: description
* description: The shipping method's description.
* amount:
* oneOf:
* - type: string
* title: amount
* description: The shipping method's amount.
* - type: number
* title: amount
* description: The shipping method's amount.
* - type: string
* title: amount
* description: The shipping method's amount.
* - $ref: "#/components/schemas/IBigNumber"
* type: number
* title: amount
* description: The shipping method's amount.
* is_tax_inclusive:
* type: boolean
* title: is_tax_inclusive
* description: The shipping method's is tax inclusive.
* description: Whether the shipping method's amount is tax inclusive.
* shipping_option_id:
* type: string
* title: shipping_option_id
* description: The shipping method's shipping option id.
* description: The ID of the shipping option this method was created from.
* data:
* type: object
* description: The shipping method's data.
* description: The shipping method's data, useful for fulfillment handling by third-party services.
* externalDocs:
* url: https://docs.medusajs.com/v2/resources/commerce-modules/cart/concepts#data-property
* metadata:
* type: object
* description: The shipping method's metadata.
* description: The shipping method's metadata, can hold custom key-value pairs.
* tax_lines:
* type: array
* description: The shipping method's tax lines.
@@ -69,115 +63,51 @@
* $ref: "#/components/schemas/BaseShippingMethodTaxLine"
* adjustments:
* type: array
* description: The shipping method's adjustments.
* description: The shipping method's adjustments, such as applied promotions.
* items:
* $ref: "#/components/schemas/BaseShippingMethodAdjustment"
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The shipping method's created at.
* description: The date the shipping method was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The shipping method's updated at.
* description: The date the shipping method was updated.
* original_total:
* oneOf:
* - type: string
* title: original_total
* description: The shipping method's original total.
* - type: number
* title: original_total
* description: The shipping method's original total.
* - type: string
* title: original_total
* description: The shipping method's original total.
* - $ref: "#/components/schemas/IBigNumber"
* type: string
* title: original_total
* description: The shipping method's total including taxes, excluding promotions.
* original_subtotal:
* oneOf:
* - type: string
* title: original_subtotal
* description: The shipping method's original subtotal.
* - type: number
* title: original_subtotal
* description: The shipping method's original subtotal.
* - type: string
* title: original_subtotal
* description: The shipping method's original subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* type: string
* title: original_subtotal
* description: The shipping method's total excluding taxes, including promotions.
* original_tax_total:
* oneOf:
* - type: string
* title: original_tax_total
* description: The shipping method's original tax total.
* - type: number
* title: original_tax_total
* description: The shipping method's original tax total.
* - type: string
* title: original_tax_total
* description: The shipping method's original tax total.
* - $ref: "#/components/schemas/IBigNumber"
* type: string
* title: original_tax_total
* description: The total taxes applied on the shipping method's amount including promotions.
* total:
* oneOf:
* - type: string
* title: total
* description: The shipping method's total.
* - type: number
* title: total
* description: The shipping method's total.
* - type: string
* title: total
* description: The shipping method's total.
* - $ref: "#/components/schemas/IBigNumber"
* type: string
* title: total
* description: The shipping method's total amount including taxes and promotions.
* subtotal:
* oneOf:
* - type: string
* title: subtotal
* description: The shipping method's subtotal.
* - type: number
* title: subtotal
* description: The shipping method's subtotal.
* - type: string
* title: subtotal
* description: The shipping method's subtotal.
* - $ref: "#/components/schemas/IBigNumber"
* type: string
* title: subtotal
* description: The shipping method's total amount excluding taxes, including promotions.
* tax_total:
* oneOf:
* - type: string
* title: tax_total
* description: The shipping method's tax total.
* - type: number
* title: tax_total
* description: The shipping method's tax total.
* - type: string
* title: tax_total
* description: The shipping method's tax total.
* - $ref: "#/components/schemas/IBigNumber"
* type: string
* title: tax_total
* description: The total taxes applied on the shipping method's amount including promotions.
* discount_total:
* oneOf:
* - type: string
* title: discount_total
* description: The shipping method's discount total.
* - type: number
* title: discount_total
* description: The shipping method's discount total.
* - type: string
* title: discount_total
* description: The shipping method's discount total.
* - $ref: "#/components/schemas/IBigNumber"
* type: string
* title: discount_total
* description: The total amount discounted.
* discount_tax_total:
* oneOf:
* - type: string
* title: discount_tax_total
* description: The shipping method's discount tax total.
* - type: number
* title: discount_tax_total
* description: The shipping method's discount tax total.
* - type: string
* title: discount_tax_total
* description: The shipping method's discount tax total.
* - $ref: "#/components/schemas/IBigNumber"
* type: string
* title: discount_total
* description: The taxes applied on the discounted amount.
*
*/

View File

@@ -1,8 +1,103 @@
/**
* @schema BaseClaim
* type: object
* description: The order change's claim.
* description: The claim's details.
* x-schemaName: BaseClaim
* required:
* - id
* - type
* - order_id
* - display_id
* - order_version
* - created_at
* - updated_at
* - canceled_at
* - additional_items
* - claim_items
* properties:
* id:
* type: string
* title: id
* description: The claim's ID.
* type:
* type: string
* description: The claim's type. If `refund`, the customer is refunded for the damaged item. If `replace`, new items are sent to the customer.
* enum:
* - refund
* - replace
* order_id:
* type: string
* title: order_id
* description: The ID of the order the claim is created for.
* return_id:
* type: string
* title: return_id
* description: The ID of the returned used to return the items from the customer.
* display_id:
* type: string
* title: display_id
* description: The claim's display ID.
* order_version:
* type: string
* title: order_version
* description: The version of the order when the claim is applied.
* refund_amount:
* type: number
* title: refund_amount
* description: The amount to be refunded.
* created_by:
* type: string
* title: created_by
* description: The ID of the user that created the claim.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the claim was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the claim was updated.
* canceled_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the claim was canceled.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The date the claim was deleted.
* additional_items:
* type: array
* description: The items sent to the customer if the claim's type is `replace`.
* items:
* $ref: "#/components/schemas/BaseClaimItem"
* claim_items:
* type: array
* description: The claim items from the original order.
* items:
* $ref: "#/components/schemas/BaseClaimItem"
* no_notification:
* type: boolean
* title: no_notification
* description: Whether to send the customer notifications on the claim's updates.
* order:
* $ref: "#/components/schemas/BaseOrder"
* shipping_methods:
* type: array
* description: The claim's shipping methods, used to send the new items.
* items:
* $ref: "#/components/schemas/BaseOrderShippingMethod"
* transactions:
* type: array
* description: The claim's transactions, such as the refunds made.
* items:
* $ref: "#/components/schemas/BaseOrderTransaction"
* metadata:
* type: object
* description: The claim's metadata, can hold custom key-value pairs.
*
*/

View File

@@ -1,7 +1,7 @@
/**
* @schema BaseClaimItem
* type: object
* description: The claim item's claim items.
* description: The claim item's details.
* x-schemaName: BaseClaimItem
* required:
* - id
@@ -19,22 +19,22 @@
* claim_id:
* type: string
* title: claim_id
* description: The claim item's claim id.
* description: The ID of the claim this item belongs to.
* order_id:
* type: string
* title: order_id
* description: The claim item's order id.
* description: The ID of the order this item belongs to.
* item_id:
* type: string
* title: item_id
* description: The claim item's item id.
* description: The ID of the item in the order.
* quantity:
* type: number
* title: quantity
* description: The claim item's quantity.
* description: The quantity claimed.
* reason:
* type: string
* description: The claim item's reason.
* description: The claim's reason.
* enum:
* - missing_item
* - wrong_item
@@ -42,20 +42,20 @@
* - other
* raw_quantity:
* type: object
* description: The claim item's raw quantity.
* description: The quantity claimed.
* metadata:
* type: object
* description: The claim item's metadata.
* description: The item's metadata, can hold custom key-value pairs.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The claim item's created at.
* description: The date the claim was created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The claim item's updated at.
* description: The date the claim was updated.
*
*/

View File

@@ -1,8 +1,52 @@
/**
* @schema BaseCollection
* type: object
* description: The product's collection.
* description: The collection's details.
* x-schemaName: BaseCollection
* required:
* - id
* - title
* - handle
* - created_at
* - updated_at
* - deleted_at
* - metadata
* properties:
* id:
* type: string
* title: id
* description: The collection's ID.
* title:
* type: string
* title: title
* description: The collection's title.
* handle:
* type: string
* title: handle
* description: The collection's handle.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The date the collection is created.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The date the collection is updated.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The date the collection is deleted.
* products:
* type: array
* description: The collection's products.
* items:
* $ref: "#/components/schemas/AdminProduct"
* metadata:
* type: object
* description: The collection's metadata, can hold custom key-value pairs.
*
*/

View File

@@ -1,78 +0,0 @@
/**
* @schema BaseCustomer
* type: object
* description: The customer's details.
* x-schemaName: BaseCustomer
* required:
* - id
* - email
* - default_billing_address_id
* - default_shipping_address_id
* - company_name
* - first_name
* - last_name
* - addresses
* properties:
* id:
* type: string
* title: id
* description: The customer's ID.
* email:
* type: string
* title: email
* description: The customer's email.
* format: email
* default_billing_address_id:
* type: string
* title: default_billing_address_id
* description: The ID of the address used as the default billing address.
* default_shipping_address_id:
* type: string
* title: default_shipping_address_id
* description: The ID of the address used as the default shipping address.
* company_name:
* type: string
* title: company_name
* description: The customer's company name.
* first_name:
* type: string
* title: first_name
* description: The customer's first name.
* last_name:
* type: string
* title: last_name
* description: The customer's last name.
* addresses:
* type: array
* description: The customer's addresses.
* items:
* $ref: "#/components/schemas/BaseCustomerAddress"
* phone:
* type: string
* title: phone
* description: The customer's phone.
* metadata:
* type: object
* description: The customer's metadata, used to store custom key-value pairs.
* created_by:
* type: string
* title: created_by
* description: The ID of the user that created this customer, if available.
* created_at:
* type: string
* format: date-time
* title: created_at
* description: The customer's creation date.
* updated_at:
* type: string
* format: date-time
* title: updated_at
* description: The customer's update date.
* deleted_at:
* type: string
* format: date-time
* title: deleted_at
* description: The customer's deletion date.
*
*/

View File

@@ -1,8 +0,0 @@
/**
* @schema BaseCustomerAddress
* type: object
* description: The address's addresses.
* x-schemaName: BaseCustomerAddress
*
*/

View File

@@ -57,14 +57,14 @@
* title: currency_code
* description: The parent's currency code.
* shipping_address:
* $ref: "#/components/schemas/BaseCartAddress"
* $ref: "#/components/schemas/StoreCartAddress"
* billing_address:
* $ref: "#/components/schemas/BaseCartAddress"
* $ref: "#/components/schemas/StoreCartAddress"
* items:
* type: array
* description: The parent's items.
* items:
* $ref: "#/components/schemas/BaseCartLineItem"
* $ref: "#/components/schemas/StoreCartLineItem"
* shipping_methods:
* type: array
* description: The parent's shipping methods.

View File

@@ -54,7 +54,7 @@
* description: The item's quantity.
* - $ref: "#/components/schemas/IBigNumber"
* product:
* $ref: "#/components/schemas/BaseProduct"
* $ref: "#/components/schemas/StoreProduct"
* product_id:
* type: string
* title: product_id
@@ -151,7 +151,7 @@
* items:
* $ref: "#/components/schemas/BaseLineItemAdjustment"
* cart:
* $ref: "#/components/schemas/BaseCart"
* $ref: "#/components/schemas/StoreCart"
* cart_id:
* type: string
* title: cart_id

View File

@@ -46,7 +46,7 @@
* type: array
* description: The parent's addresses.
* items:
* $ref: "#/components/schemas/BaseCustomerAddress"
* $ref: "#/components/schemas/StoreCustomerAddress"
* phone:
* type: string
* title: phone

View File

@@ -130,7 +130,7 @@
* title: material
* description: The product's material.
* collection:
* $ref: "#/components/schemas/BaseCollection"
* $ref: "#/components/schemas/StoreCollection"
* collection_id:
* type: string
* title: collection_id