chore(docs): Generated API Reference (#4706)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <shahednasser@gmail.com>
This commit is contained in:
github-actions[bot]
2023-08-07 16:54:48 +03:00
committed by GitHub
parent efdea04963
commit 658339767b
1138 changed files with 11740 additions and 7043 deletions

View File

@@ -2,9 +2,9 @@ type: object
properties:
code:
type: string
description: A unique code that will be used to redeem the Discount
description: A unique code that will be used to redeem the discount
rule:
description: The Discount Rule that defines how Discounts are calculated
description: The discount rule that defines how discounts are calculated
type: object
required:
- id
@@ -18,11 +18,15 @@ properties:
value:
type: number
description: >-
The value that the discount represents; this will depend on the type
of the discount
The value that the discount represents. This will depend on the type
of the discount.
allocation:
type: string
description: The scope that the discount should apply to.
description: >-
The scope that the discount should apply to. `total` indicates that
the discount should be applied on the cart total, and `item` indicates
that the discount should be applied to each discountable item in the
cart.
enum:
- total
- item
@@ -31,7 +35,8 @@ properties:
description: >-
A set of conditions that can be used to limit when the discount can be
used. Only one of `products`, `product_types`, `product_collections`,
`product_tags`, and `customer_groups` should be provided.
`product_tags`, and `customer_groups` should be provided based on the
discount condition's type.
items:
type: object
required:
@@ -39,69 +44,73 @@ properties:
properties:
id:
type: string
description: The ID of the Rule
description: The ID of the condition
operator:
type: string
description: Operator of the condition
description: >-
Operator of the condition. `in` indicates that discountable
resources are within the specified resources. `not_in` indicates
that discountable resources are everything but the specified
resources.
enum:
- in
- not_in
products:
type: array
description: list of product IDs if the condition is applied on products.
description: list of product IDs if the condition's type is `products`.
items:
type: string
product_types:
type: array
description: >-
list of product type IDs if the condition is applied on product
types.
list of product type IDs if the condition's type is
`product_types`.
items:
type: string
product_collections:
type: array
description: >-
list of product collection IDs if the condition is applied on
product collections.
list of product collection IDs if the condition's type is
`product_collections`.
items:
type: string
product_tags:
type: array
description: >-
list of product tag IDs if the condition is applied on product
tags.
list of product tag IDs if the condition's type is
`product_tags`.
items:
type: string
customer_groups:
type: array
description: >-
list of customer group IDs if the condition is applied on
customer groups.
list of customer group IDs if the condition's type is
`customer_groups`.
items:
type: string
is_disabled:
type: boolean
description: >-
Whether the Discount code is disabled on creation. You will have to enable
it later to make it available to Customers.
Whether the discount code is disabled on creation. If set to `true`, it
will not be available for customers.
starts_at:
type: string
format: date-time
description: The time at which the Discount should be available.
description: The date and time at which the discount should be available.
ends_at:
type: string
format: date-time
description: The time at which the Discount should no longer be available.
description: The date and time at which the discount should no longer be available.
valid_duration:
type: string
description: Duration the discount runs between
description: The duration the discount runs between
example: P3Y6M4DT12H30M5S
usage_limit:
type: number
description: Maximum times the discount can be used
description: Maximum number of times the discount can be used
regions:
description: >-
A list of Region ids representing the Regions in which the Discount can be
A list of region IDs representing the Regions in which the Discount can be
used.
type: array
items:
@@ -109,3 +118,7 @@ properties:
metadata:
description: An object containing metadata of the discount
type: object
externalDocs:
description: Learn about the metadata attribute, and how to delete and update it.
url: >-
https://docs.medusajs.com/development/entities/overview#metadata-attribute