chore(docs): Generated API reference (#2788)

This commit is contained in:
Shahed Nasser
2022-12-13 12:52:58 +02:00
committed by GitHub
parent a77b4a1b7e
commit 52a8e90aac
413 changed files with 11540 additions and 4501 deletions

View File

@@ -1,6 +1,7 @@
title: OAuth
description: Represent an OAuth app
x-resourceId: OAuth
type: object
required:
- id
- display_name

View File

@@ -1,6 +1,7 @@
title: Address
description: An address.
x-resourceId: address
type: object
properties:
id:
type: string

View File

@@ -1,6 +1,7 @@
title: Address Fields
description: Address fields used when creating/updating an address.
x-resourceId: address
type: object
properties:
company:
type: string

View File

@@ -1,6 +1,7 @@
title: Batch Job
description: A Batch Job.
x-resourceId: batch_job
type: object
required:
- type
properties:

View File

@@ -1,6 +1,7 @@
title: Cart
description: Represents a user cart
x-resourceId: cart
type: object
properties:
id:
type: string

View File

@@ -1,6 +1,7 @@
title: Claim Image
description: Represents photo documentation of a claim.
x-resourceId: claim_image
type: object
required:
- claim_item_id
- url

View File

@@ -3,6 +3,7 @@ description: >-
Represents a claimed item along with information about the reasons for the
claim.
x-resourceId: claim_item
type: object
required:
- claim_order_id
- item_id

View File

@@ -4,6 +4,7 @@ description: >-
consists of a subset of items associated with an original order, and can
contain additional information about fulfillments and returns.
x-resourceId: claim_order
type: object
required:
- type
- order_id

View File

@@ -3,6 +3,7 @@ description: >-
Claim Tags are user defined tags that can be assigned to claim items for easy
filtering and grouping.
x-resourceId: claim_tag
type: object
required:
- value
properties:

View File

@@ -1,6 +1,7 @@
title: Country
description: Country details
x-resourceId: country
type: object
required:
- iso_2
- iso_3

View File

@@ -1,6 +1,7 @@
title: Currency
description: Currency
x-resourceId: currency
type: object
required:
- code
- symbol

View File

@@ -4,6 +4,7 @@ description: >-
attach a Custom Shipping Option to a cart in order to set a custom price for a
particular Shipping Option
x-resourceId: custom_shipping_option
type: object
required:
- price
- shipping_option_id

View File

@@ -1,6 +1,7 @@
title: Customer
description: Represents a customer
x-resourceId: customer
type: object
required:
- email
properties:
@@ -18,7 +19,7 @@ properties:
example: Arno
last_name:
type: string
description: The customer's first name
description: The customer's last name
example: Willms
billing_address_id:
type: string

View File

@@ -1,6 +1,7 @@
title: Customer Group
description: Represents a customer group
x-resourceId: customer_group
type: object
required:
- name
properties:

View File

@@ -1,6 +1,7 @@
title: Discount
description: Represents a discount that can be applied to a cart for promotional purposes.
x-resourceId: discount
type: object
required:
- code
- is_dynamic

View File

@@ -1,6 +1,7 @@
title: Discount Condition
description: Holds rule conditions for when a discount is applicable
x-resourceId: discount_condition
type: object
required:
- type
- operator

View File

@@ -1,6 +1,7 @@
title: Product Tag Discount Condition
description: Associates a discount condition with a customer group
x-resourceId: discount_condition_customer_group
type: object
required:
- customer_group_id
- condition_id

View File

@@ -1,6 +1,7 @@
title: Product Discount Condition
description: Associates a discount condition with a product
x-resourceId: discount_condition_product
type: object
required:
- product_id
- condition_id

View File

@@ -1,6 +1,7 @@
title: Product Collection Discount Condition
description: Associates a discount condition with a product collection
x-resourceId: discount_condition_product_collection
type: object
required:
- product_collection_id
- condition_id

View File

@@ -1,6 +1,7 @@
title: Product Tag Discount Condition
description: Associates a discount condition with a product tag
x-resourceId: discount_condition_product_tag
type: object
required:
- product_tag_id
- condition_id

View File

@@ -1,6 +1,7 @@
title: Product Type Discount Condition
description: Associates a discount condition with a product type
x-resourceId: discount_condition_product
type: object
required:
- product_type_id
- condition_id

View File

@@ -3,6 +3,7 @@ description: >-
Holds the rules that governs how a Discount is calculated when applied to a
Cart.
x-resourceId: discount_rule
type: object
required:
- type
- value

View File

@@ -1,6 +1,7 @@
title: DraftOrder
description: Represents a draft order
x-resourceId: draft-order
type: object
properties:
id:
type: string

View File

@@ -1,5 +1,6 @@
title: Response Error
x-resourceId: error
type: object
properties:
code:
type: string

View File

@@ -8,6 +8,7 @@ description: >-
webhooks in order to automatically update and synchronize the state of
Fulfillments.
x-resourceId: fulfillment
type: object
required:
- provider_id
properties:

View File

@@ -3,6 +3,7 @@ description: >-
Correlates a Line Item with a Fulfillment, keeping track of the quantity of
the Line Item.
x-resourceId: fulfillment_item
type: object
required:
- fulfillment_id
- item_id

View File

@@ -1,6 +1,7 @@
title: Fulfillment Provider
description: Represents a fulfillment provider plugin and holds its installation status.
x-resourceId: fulfillment_provider
type: object
properties:
id:
description: The id of the fulfillment provider as given by the plugin.

View File

@@ -3,6 +3,7 @@ description: >-
Gift Cards are redeemable and represent a value that can be used towards the
payment of an Order.
x-resourceId: gift_card
type: object
required:
- code
- value

View File

@@ -3,6 +3,7 @@ description: >-
Gift Card Transactions are created once a Customer uses a Gift Card to pay for
their Order
x-resourceId: gift_card_transaction
type: object
required:
- gift_card_id
- amount

View File

@@ -3,6 +3,7 @@ description: >-
Idempotency Key is used to continue a process in case of any failure that
might occur.
x-resourceId: idempotency_key
type: object
required:
- idempotency_key
properties:

View File

@@ -1,6 +1,7 @@
title: Image
description: Images holds a reference to a URL at which the image file can be found.
x-resourceId: image
type: object
required:
- url
properties:

View File

@@ -1,6 +1,7 @@
title: Invite
description: Represents an invite
x-resourceId: invite
type: object
required:
- user_email
properties:

View File

@@ -5,6 +5,7 @@ description: >-
order and can eventually be referenced in Fulfillments and Returns. Line Items
may also be created when processing Swaps and Claims.
x-resourceId: line_item
type: object
required:
- title
- unit_price

View File

@@ -1,6 +1,7 @@
title: Line Item Adjustment
description: Represents an Line Item Adjustment
x-resourceId: line_item_adjustment
type: object
required:
- item_id
- description

View File

@@ -1,6 +1,7 @@
title: Line Item Tax Line
description: Represents an Line Item Tax Line
x-resourceId: line_item_tax_line
type: object
required:
- item_id
- rate

View File

@@ -6,6 +6,7 @@ description: >-
pricing, the given price in a specific Region. If region-based pricing is used
the amount will be in the currency defined for the Reigon.
x-resourceId: money_amount
type: object
required:
- currency_code
- amount

View File

@@ -1,5 +1,6 @@
title: Multiple Errors
x-resourceId: multiple_errors
type: object
properties:
errors:
type: array

View File

@@ -3,6 +3,7 @@ description: >-
Notes are elements which we can use in association with different resources to
allow users to describe additional information in relation to these.
x-resourceId: note
type: object
required:
- value
- resource_type

View File

@@ -5,6 +5,7 @@ description: >-
chronological timeline for communications sent to a Customer regarding an
Order, and enables resends.
x-resourceId: notification
type: object
required:
- resource_type
- resource_id

View File

@@ -1,6 +1,7 @@
title: Notification Provider
description: Represents a notification provider plugin and holds its installation status.
x-resourceId: notification_provider
type: object
required:
- id
properties:

View File

@@ -1,6 +1,7 @@
title: Notification Resend
description: A resend of a Notification.
x-resourceId: notification_resend
type: object
properties:
id:
description: The notification resend's ID

View File

@@ -1,6 +1,7 @@
title: Order
description: Represents an order
x-resourceId: order
type: object
required:
- customer_id
- email

View File

@@ -1,6 +1,7 @@
title: Order Edit
description: Order edit keeps track of order items changes.
x-resourceId: order_edit
type: object
required:
- order_id
- order

View File

@@ -1,6 +1,7 @@
title: Order Item Change
description: Represents an order edit item change
x-resourceId: order_item_change
type: object
required:
- type
- order_edit_id

View File

@@ -3,6 +3,7 @@ description: >-
Payments represent an amount authorized with a given payment method, Payments
can be captured, canceled or refunded.
x-resourceId: payment
type: object
required:
- amount
- currency_code

View File

@@ -1,6 +1,7 @@
title: Payment Collection
description: Payment Collection
x-resourceId: payment_collection
type: object
required:
- type
- status
@@ -26,12 +27,7 @@ properties:
- awaiting
- authorized
- partially_authorized
- captured
- partially_captured
- refunded
- partially_refunded
- canceled
- requires_action
description:
type: string
description: Description of the payment collection
@@ -41,12 +37,6 @@ properties:
authorized_amount:
type: number
description: Authorized amount of the payment collection.
captured_amount:
type: number
description: Captured amount of the payment collection.
refunded_amount:
type: number
description: Refunded amount of the payment collection.
region_id:
type: string
description: The region's ID

View File

@@ -1,6 +1,7 @@
title: Payment Provider
description: Represents a Payment Provider plugin and holds its installation status.
x-resourceId: payment_provider
type: object
required:
- id
properties:

View File

@@ -7,6 +7,7 @@ description: >-
get promoted to Payments to indicate that they are authorized for
capture/refunds/etc.
x-resourceId: payment_session
type: object
required:
- cart_id
- provider_id

View File

@@ -3,6 +3,7 @@ description: >-
Price Lists represents a set of prices that overrides the default price for
one or more product variants.
x-resourceId: price_list
type: object
required:
- name
- description

View File

@@ -4,6 +4,7 @@ description: >-
as images and descriptions. Products can have multiple options which define
the properties that Product Variants differ by.
x-resourceId: product
type: object
required:
- title
- profile_id

View File

@@ -1,6 +1,7 @@
title: Product Collection
description: Product Collections represents a group of Products that are related.
x-resourceId: product_collection
type: object
required:
- title
properties:

View File

@@ -4,6 +4,7 @@ description: >-
a Product. Common Product Options are "Size" and "Color", but Medusa doesn't
limit what Product Options that can be defined.
x-resourceId: product_option
type: object
required:
- title
- product_id

View File

@@ -3,6 +3,7 @@ description: >-
A value given to a Product Variant's option set. Product Variant have a
Product Option Value for each of the Product Options defined on the Product.
x-resourceId: product_option_value
type: object
required:
- value
- option_id

View File

@@ -1,6 +1,7 @@
title: Product Tag
description: Product Tags can be added to Products for easy filtering and grouping.
x-resourceId: product_tag
type: object
required:
- value
properties:

View File

@@ -3,6 +3,7 @@ description: >-
Associates a tax rate with a product to indicate that the product is taxed in
a certain way
x-resourceId: product_tax_rate
type: object
required:
- product_id
- rate_id

View File

@@ -1,6 +1,7 @@
title: Product Type
description: Product Type can be added to Products for filtering and reporting purposes.
x-resourceId: product_type
type: object
required:
- value
properties:

View File

@@ -3,6 +3,7 @@ description: >-
Associates a tax rate with a product type to indicate that the product type is
taxed in a certain way
x-resourceId: product_type_tax_rate
type: object
required:
- product_type_id
- rate_id

View File

@@ -4,6 +4,7 @@ description: >-
configurations. The maximum number of Product Variants that a Product can have
is given by the number of available Product Option combinations.
x-resourceId: product_variant
type: object
required:
- title
- product_id

View File

@@ -1,6 +1,7 @@
title: Product Variant Prices Fields
description: Product Variants Prices Fields that are only available in some requests.
x-resourceId: product_variant_prices_fields
type: object
properties:
original_price:
type: number

View File

@@ -0,0 +1,37 @@
title: Publishable API key
description: >-
Publishable API key defines scopes (i.e. resources) that are available within
a request.
x-resourceId: publishable_api_key
type: object
properties:
id:
type: string
description: The key's ID
example: pk_01G1G5V27GYX4QXNARRQCW1N8T
created_by:
type: string
description: The unique identifier of the user that created the key.
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
created_by_user:
description: A user object. Available if the relation `created_by_user` is expanded.
type: object
created_at:
type: string
description: The date with timezone at which the resource was created.
format: date-time
revoked_by:
type: string
description: The unique identifier of the user that revoked the key.
example: usr_01G1G5V26F5TB3GPAPNJ8X1S3V
revoked_by_user:
description: A user object. Available if the relation `revoked_by_user` is expanded.
type: object
revoked_at:
type: string
description: The date with timezone at which the key was revoked.
format: date-time
updated_at:
type: string
description: The date with timezone at which the resource was updated.
format: date-time

View File

@@ -0,0 +1,13 @@
title: Publishable API key sales channel
description: Holds mapping between Publishable API keys and Sales Channels
x-resourceId: publishable_api_key_sales_channel
type: object
properties:
sales_channel_id:
type: string
description: The sales channel's ID
example: sc_01G1G5V21KADXNGH29BJMAJ4B4
publishable_key_id:
type: string
description: The publishable API key's ID
example: pak_01G1G5V21KADXNGH29BJMAJ4B4

View File

@@ -4,6 +4,7 @@ description: >-
given reason. Refunds may occur in relation to Returns, Swaps and Claims, but
can also be initiated by a store operator.
x-resourceId: refund
type: object
required:
- order_id
- amount

View File

@@ -5,6 +5,7 @@ description: >-
consist of multiple countries to accomodate common shopping settings across
countries.
x-resourceId: region
type: object
required:
- name
- currency_code

View File

@@ -4,6 +4,7 @@ description: >-
back, along with how the items will be returned. Returns can be used as part
of a Swap.
x-resourceId: return
type: object
required:
- refund_amount
properties:

View File

@@ -3,6 +3,7 @@ description: >-
Correlates a Line Item with a Return, keeping track of the quantity of the
Line Item that will be returned.
x-resourceId: return_item
type: object
required:
- return_id
- item_id

View File

@@ -3,6 +3,7 @@ description: >-
A Reason for why a given product is returned. A Return Reason can be used on
Return Items in order to indicate why a Line Item was returned.
x-resourceId: return_reason
type: object
required:
- value
- label

View File

@@ -1,6 +1,7 @@
title: Sales Channel
description: A Sales Channel
x-resourceId: sales_channel
type: object
required:
- name
properties:

View File

@@ -5,6 +5,7 @@ description: >-
details, that can be necessary for the Fulfillment Provider to handle the
shipment.
x-resourceId: shipping_method
type: object
required:
- shipping_option_id
- price

View File

@@ -1,6 +1,7 @@
title: Shipping Method Tax Line
description: Shipping Method Tax Line
x-resourceId: shipping_method_tax_line
type: object
required:
- shipping_method_id
- rate

View File

@@ -7,6 +7,7 @@ description: >-
distinction makes it possible to customize individual Shipping Methods with
additional information.
x-resourceId: shipping_option
type: object
required:
- name
- region_id

View File

@@ -3,6 +3,7 @@ description: >-
A requirement that a Cart must satisfy for the Shipping Option to be available
to the Cart.
x-resourceId: shipping_option_requirement
type: object
required:
- shipping_option_id
- type

View File

@@ -3,6 +3,7 @@ description: >-
Shipping Profiles have a set of defined Shipping Options that can be used to
fulfill a given set of Products.
x-resourceId: shipping_profile
type: object
required:
- name
- type

View File

@@ -3,6 +3,7 @@ description: >-
Associates a tax rate with a shipping option to indicate that the shipping
option is taxed in a certain way
x-resourceId: shipping_tax_rate
type: object
required:
- shipping_option_id
- rate_id

View File

@@ -1,6 +1,7 @@
title: Staged Job
description: A staged job resource
x-resourceId: staged_job
type: object
required:
- event_name
properties:

View File

@@ -1,6 +1,7 @@
title: Store
description: Holds settings for the Store, such as name, currencies, etc.
x-resourceId: store
type: object
properties:
id:
type: string

View File

@@ -8,6 +8,7 @@ description: >-
amount to be paid for the new Products, a Refund will be issued for the
difference.
x-resourceId: swap
type: object
required:
- fulfillment_status
- payment_status

View File

@@ -1,6 +1,7 @@
title: Tax Line
description: Line item that specifies an amount of tax to add to a line item.
x-resourceId: tax_line
type: object
required:
- rate
- name

View File

@@ -1,6 +1,7 @@
title: Tax Provider
description: The tax service used to calculate taxes
x-resourceId: tax_provider
type: object
properties:
id:
description: The id of the tax provider as given by the plugin.

View File

@@ -3,6 +3,7 @@ description: >-
A Tax Rate can be used to associate a certain rate to charge on products
within a given Region
x-resourceId: line_item
type: object
required:
- name
- region_id

View File

@@ -4,6 +4,7 @@ description: >-
Tracking Links can optionally contain a URL that can be visited to see the
status of the shipment.
x-resourceId: tracking_link
type: object
required:
- tracking_number
- fulfillment_id

View File

@@ -1,6 +1,7 @@
title: User
description: Represents a User who can manage store settings.
x-resourceId: user
type: object
required:
- email
properties: