chore(docs): Generated References (#9026)

Generated the following references:
- `modules`
- `product`
- `promotion`
- `types`
This commit is contained in:
github-actions[bot] authored and GitHub committed 2024-09-06 08:53:22 +00:00
1 parent abe7b66999
commit a5748c6e1f
47 files changed
+1720800 -1718144

No files matched your search

@@ -19,14 +19,10 @@ computed actions.
```ts
await promotionModuleService.registerUsage([
{
action: "addItemAdjustment",
item_id: "cali_123",
amount: 50,
code: "50OFF",
},
{
action: "addShippingMethodAdjustment",
shipping_method_id: "casm_123",
amount: 5000,
code: "FREESHIPPING",
},
@@ -35,7 +31,7 @@ await promotionModuleService.registerUsage([
## Parameters
<TypeList types={[{"name":"computedActions","type":"[ComputeActions](../../../types/promotion.ComputeActions/page.mdx)[]","description":"The computed actions to adjust their promotion's campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"action","type":"`\"addItemAdjustment\"`","description":"The type of action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The associated item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/promotion.BigNumberInput/page.mdx)","description":"The amount to remove off the item's total.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/promotion.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`\"removeItemAdjustment\"`","description":"The type of action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustment_id","type":"`string`","description":"The associated adjustment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`\"addShippingMethodAdjustment\"`","description":"The type of action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_method_id","type":"`string`","description":"The associated shipping method's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"[BigNumberInput](../../../types/promotion.BigNumberInput/page.mdx)","description":"The amount to remove off the shipping method's total.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/promotion.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`\"removeShippingMethodAdjustment\"`","description":"The type of action","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustment_id","type":"`string`","description":"The associated adjustment's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`\"campaignBudgetExceeded\"`","description":"The type of action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The promotion's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The promotion's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The promotion's description.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="registerUsage"/>
<TypeList types={[{"name":"computedActions","type":"[UsageComputedActions](../../../types/promotion.UsageComputedActions/page.mdx)[]","description":"The computed actions to adjust their promotion's campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../types/promotion.BigNumberInput/page.mdx)","description":"The amount to remove off the shipping method's total.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/promotion.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="registerUsage"/>
## Returns
@@ -0,0 +1,36 @@
---
displayed_sidebar: promotionReference
slug: /references/promotion/revertUsage
sidebar_label: revertUsage
---
import { TypeList } from "docs-ui"
# revertUsage - Promotion Module Reference
This documentation provides a reference to the `revertUsage` method. This belongs to the Promotion Module.
This method is used to revert the changes made by registerUsage action
## Example
```ts
await promotionModuleService.revertUsage([
{
amount: 50,
code: "50OFF",
},
{
amount: 5000,
code: "FREESHIPPING",
},
])
```
## Parameters
<TypeList types={[{"name":"computedActions","type":"[UsageComputedActions](../../../types/promotion.UsageComputedActions/page.mdx)[]","description":"The computed actions to adjust their promotion's campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../types/promotion.BigNumberInput/page.mdx)","description":"The amount to remove off the shipping method's total.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/promotion.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="revertUsage"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"Resolves when the campaign budgets have been adjusted successfully.","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="revertUsage"/>
@@ -14,6 +14,7 @@ The main service interface for the Promotion Module.
## Methods
- [registerUsage](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.registerUsage/page.mdx)
- [revertUsage](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.revertUsage/page.mdx)
- [computeActions](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.computeActions/page.mdx)
- [createPromotions](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.createPromotions/page.mdx)
- [updatePromotions](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.updatePromotions/page.mdx)
@@ -0,0 +1,15 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# UsageComputedActions
**UsageComputedActions**: `Object`
These computed action types can affect a campaign's budget.
## Properties
<TypeList types={[{"name":"amount","type":"[BigNumberInput](../promotion.BigNumberInput/page.mdx)","description":"The amount to remove off the shipping method's total.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../promotion.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UsageComputedActions"/>