chore(docs): Generated JS Client Reference (#5421)

* chore(docs): Generated JS Client Reference (automated)

* fix js client reference

* fix links

---------

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-10-20 14:01:27 +03:00
committed by GitHub
co-authored by olivermrbl Shahed nasser
parent 83f46b9b32
commit 9dcd62c731
1604 changed files with 211689 additions and 151746 deletions
@@ -191,9 +191,9 @@ This request accepts [many request-body parameters](https://docs.medusajs.com/ap
- `code`: This parameter is required. It is a unique code. The customer redeems the discount using this code.
- `rule`: This parameter is required. It is an object having at least the following fields:
- `type`: A string indicating the type of discount. It can be `fixed`, `percentage`, or `free_shipping`. When using the Medusa JS Client, you must use the enum type [DiscountRuleType](../../../references/js-client/enums/internal-3.DiscountRuleType.md) for the value.
- `type`: A string indicating the type of discount. It can be `fixed`, `percentage`, or `free_shipping`. When using the Medusa JS Client, you must use the enum type [DiscountRuleType](../../../references/js-client/internal/enums/admin_collections.internal.DiscountRuleType.mdx) for the value.
- `value`: A number indicating the value of the discount. If the discount type is `fixed`, then it will be the fixed amount to discount from the carts totals or its items. If the discount type is `percentage`, then it will be the percentage to discount from the items in the cart. If the type is `free_shipping`, it has no effect and can be set to `0`.
- `allocation`: A string indicating how the discount should be applied. Can be `item` or `total`. If the type is not `fixed`, then this has no effect. When using the Medusa JS Client, you must use the enum type [AllocationType](../../../references/js-client/enums/internal-3.AllocationType.md) for the value.
- `allocation`: A string indicating how the discount should be applied. Can be `item` or `total`. If the type is not `fixed`, then this has no effect. When using the Medusa JS Client, you must use the enum type [AllocationType](../../../references/js-client/internal/enums/admin_collections.internal.AllocationType.mdx) for the value.
- `regions`: An array of region IDs this discount can be used in. If the type of discount is `fixed`, only one region can be passed.
This request returns the full `discount` object.