chore: reorganize docs apps (#7228)

* reorganize docs apps

* add README

* fix directory

* add condition for old docs
This commit is contained in:
Shahed Nasser
2024-05-03 17:36:38 +03:00
committed by GitHub
parent 224ebb2154
commit 4fe28f5a95
6187 changed files with 601447 additions and 598226 deletions
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# AddItemAdjustmentAction
This action indicates that an adjustment must be made to an item. For example, removing $5 off its amount.
<TypeList types={[{"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":"`number`","description":"The amount to remove off the item's total.","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":[]}]} sectionTitle="AddItemAdjustmentAction"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# AddShippingMethodAdjustment
This action indicates that an adjustment must be made on a shipping method. For example, make the shipping method free.
<TypeList types={[{"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":"`number`","description":"The amount to remove off the shipping method's total.","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":[]}]} sectionTitle="AddShippingMethodAdjustment"/>
File diff suppressed because one or more lines are too long
@@ -0,0 +1,15 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# BaseFilterable
An object used to allow specifying flexible queries with and/or conditions.
## Type parameters
<TypeList types={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="BaseFilterable"/>
<TypeList types={[{"name":"$and","type":"([BaseFilterable](page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="BaseFilterable"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# CampaignBudgetDTO
The campaign budget details.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[CampaignBudgetTypeValues](../../types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget:\n\n- `spend` indicates that the budget is limited by the amount discounted by the promotions in the associated campaign.\n- `usage` indicates that the budget is limited by the number of times the promotions of the associated campaign have been used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"The usage from the campaign budget's limit:\n\n- If the budget's type is `spend`, the value of this attribute is the amount discounted so far by the promotions in the associated campaign.\n- If the budget's type is `usage`, the value of this attribute is the number of times the promotions of the associated campaign have been used so far.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CampaignBudgetDTO"/>
@@ -0,0 +1,12 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# CampaignBudgetExceededAction
This action indicates that the promotions within a campaign can no longer be used
as the campaign budget has been exceeded.
<TypeList types={[{"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":[]}]} sectionTitle="CampaignBudgetExceededAction"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# CampaignDTO
The campaign details.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"`string`","description":"The currency of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"[CampaignBudgetDTO](../promotion.CampaignBudgetDTO/page.mdx)","description":"The associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[CampaignBudgetTypeValues](../../types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget:\n\n- `spend` indicates that the budget is limited by the amount discounted by the promotions in the associated campaign.\n- `usage` indicates that the budget is limited by the number of times the promotions of the associated campaign have been used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"The usage from the campaign budget's limit:\n\n- If the budget's type is `spend`, the value of this attribute is the amount discounted so far by the promotions in the associated campaign.\n- If the budget's type is `usage`, the value of this attribute is the number of times the promotions of the associated campaign have been used so far.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="CampaignDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# ComputeActionAdjustmentLine
An action's adjustment line.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the compute action's adjustment line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="ComputeActionAdjustmentLine"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# ComputeActionContext
The context provided when computing actions of promotions.
<TypeList types={[{"name":"items","type":"[ComputeActionItemLine](../promotion.ComputeActionItemLine/page.mdx)[]","description":"The cart's line items.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"[ComputeActionAdjustmentLine](../promotion.ComputeActionAdjustmentLine/page.mdx)[]","description":"The adjustments applied before on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the compute action's adjustment line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"shipping_methods","type":"[ComputeActionShippingLine](../promotion.ComputeActionShippingLine/page.mdx)[]","description":"The cart's shipping methods.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"[ComputeActionAdjustmentLine](../promotion.ComputeActionAdjustmentLine/page.mdx)[]","description":"The adjustments applied before on the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the compute action's adjustment line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} sectionTitle="ComputeActionContext"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# ComputeActionItemLine
A cart's line item passed in the context when computing actions.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the item line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"[ComputeActionAdjustmentLine](../promotion.ComputeActionAdjustmentLine/page.mdx)[]","description":"The adjustments applied before on the line item.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the compute action's adjustment line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="ComputeActionItemLine"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# ComputeActionShippingLine
A cart's shipping method passed in the content when computing actions.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"`number`","description":"The subtotal of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"adjustments","type":"[ComputeActionAdjustmentLine](../promotion.ComputeActionAdjustmentLine/page.mdx)[]","description":"The adjustments applied before on the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the compute action's adjustment line.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="ComputeActionShippingLine"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# Context
A context used to share resources, such as transaction manager, between the application and the module.
## Type parameters
<TypeList types={[{"name":"TManager","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="Context"/>
<TypeList types={[{"name":"__type","type":"`\"MedusaContext\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager","type":"TManager","description":"An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"TManager","description":"An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationLevel","type":"`string`","description":"A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"A string indicating the ID of the current transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"messageAggregator","type":"[IMessageAggregator](../promotion.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="Context"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# CreateApplicationMethodDTO
The application method to be created.
<TypeList types={[{"name":"type","type":"[ApplicationMethodTypeValues](../../types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method indicating how\nthe associated promotion is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating\nwhether the associated promotion is applied to the cart's items,\nshipping methods, or the whole order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion\nis applied on each item in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"The discounted amount applied by the associated promotion based on the `type`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"The minimum quantity required for a `buyget` promotion to be applied.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the\nvalue of this attribute is `2`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"The quantity that results from matching the `buyget` promotion's condition.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the value\nof this attribute is `1`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion","type":"`string` \\| [PromotionDTO](../promotion.PromotionDTO/page.mdx)","description":"The promotion of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_rules","type":"[CreatePromotionRuleDTO](../promotion.CreatePromotionRuleDTO/page.mdx)[]","description":"The target rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string` \\| `string`[]","description":"The values of the promotion rule.\nWhen provided, `PromotionRuleValue` records are\ncreated and associated with the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"buy_rules","type":"[CreatePromotionRuleDTO](../promotion.CreatePromotionRuleDTO/page.mdx)[]","description":"The buy rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string` \\| `string`[]","description":"The values of the promotion rule.\nWhen provided, `PromotionRuleValue` records are\ncreated and associated with the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="CreateApplicationMethodDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# CreateCampaignBudgetDTO
The campaign budget to be created.
<TypeList types={[{"name":"type","type":"[CampaignBudgetTypeValues](../../types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"How much is used of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreateCampaignBudgetDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# CreateCampaignDTO
The campaign to be created.
<TypeList types={[{"name":"name","type":"`string`","description":"The name of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`Date`","description":"The start date of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The end date of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"`string`","description":"The currency of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"[CreateCampaignBudgetDTO](../promotion.CreateCampaignBudgetDTO/page.mdx)","description":"The associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"[CampaignBudgetTypeValues](../../types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"How much is used of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"promotions","type":"Pick&#60;[PromotionDTO](../promotion.PromotionDTO/page.mdx), \"id\"&#62;[]","description":"The promotions of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="CreateCampaignDTO"/>
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# CreatePromotionRuleDTO
The promotion rule to be created.
<TypeList types={[{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string` \\| `string`[]","description":"The values of the promotion rule.\nWhen provided, `PromotionRuleValue` records are\ncreated and associated with the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="CreatePromotionRuleDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# FilterableCampaignProps
The filters to apply on the retrieved campaigns.
<TypeList types={[{"name":"$and","type":"([FilterableCampaignProps](page.mdx) \\| [BaseFilterable](../promotion.BaseFilterable/page.mdx)&#60;[FilterableCampaignProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterableCampaignProps](page.mdx) \\| [BaseFilterable](../promotion.BaseFilterable/page.mdx)&#60;[FilterableCampaignProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter the campaigns by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`[]","description":"Filters the campaigns by their campaign identifier.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterableCampaignProps"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# FilterablePromotionProps
The filters to apply on the retrieved promotions.
<TypeList types={[{"name":"$and","type":"([FilterablePromotionProps](page.mdx) \\| [BaseFilterable](../promotion.BaseFilterable/page.mdx)&#60;[FilterablePromotionProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePromotionProps](page.mdx) \\| [BaseFilterable](../promotion.BaseFilterable/page.mdx)&#60;[FilterablePromotionProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"The IDs to filter the promotions by.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../types/promotion.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter promotions by their code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget_id","type":"`string`[] \\| [OperatorMap](../../types/promotion.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter promotions by the ID of their associated campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Filter promotions by whether they're applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../types/promotion.PromotionTypeValues/page.mdx)[]","description":"Filter promotions by their type.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterablePromotionProps"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# FilterablePromotionRuleProps
The filters to apply on the retrieved promotion rules.
<TypeList types={[{"name":"$and","type":"([FilterablePromotionRuleProps](page.mdx) \\| [BaseFilterable](../promotion.BaseFilterable/page.mdx)&#60;[FilterablePromotionRuleProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([FilterablePromotionRuleProps](page.mdx) \\| [BaseFilterable](../promotion.BaseFilterable/page.mdx)&#60;[FilterablePromotionRuleProps](page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`[]","description":"The IDs to filter the promotion rules by.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FilterablePromotionRuleProps"/>
@@ -0,0 +1,16 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# FindConfig
An object that is used to configure how an entity is retrieved from the database. It accepts as a typed parameter an `Entity` class,
which provides correct typing of field names in its properties.
## Type parameters
<TypeList types={[{"name":"Entity","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
<TypeList types={[{"name":"select","type":"(`string` \\| keyof Entity)[]","description":"An array of strings, each being attribute names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skip","type":"`null` \\| `number`","description":"A number indicating the number of records to skip before retrieving the results.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"take","type":"`null` \\| `number`","description":"A number indicating the number of records to return in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relations","type":"`string`[]","description":"An array of strings, each being relation names of the entity to retrieve in the result.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`object`","description":"An object used to specify how to sort the returned records. Its keys are the names of attributes of the entity, and a key's value can either be `ASC`\nto sort retrieved records in an ascending order, or `DESC` to sort retrieved records in a descending order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"withDeleted","type":"`boolean`","description":"A boolean indicating whether deleted records should also be retrieved as part of the result. This only works if the entity extends the\n`SoftDeletableEntity` class.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"filters","type":"`Record<string, any>`","description":"Enable ORM specific defined filters","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="FindConfig"/>
@@ -0,0 +1,14 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# IMessageAggregator
## Methods
- [save](../../IMessageAggregator/methods/promotion.IMessageAggregator.save/page.mdx)
- [getMessages](../../IMessageAggregator/methods/promotion.IMessageAggregator.getMessages/page.mdx)
- [clearMessages](../../IMessageAggregator/methods/promotion.IMessageAggregator.clearMessages/page.mdx)
- [saveRawMessageData](../../IMessageAggregator/methods/promotion.IMessageAggregator.saveRawMessageData/page.mdx)
@@ -0,0 +1,7 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# IModuleService
@@ -0,0 +1,41 @@
---
displayed_sidebar: promotionReference
slug: /references/promotion
---
import { TypeList } from "docs-ui"
# IPromotionModuleService Reference
This section of the documentation provides a reference to the `IPromotionModuleService` interfaces methods. This is the interface developers use to use the functionalities provided by the Promotion Module.
The main service interface for the Promotion Module.
## Methods
- [registerUsage](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.registerUsage/page.mdx)
- [computeActions](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.computeActions/page.mdx)
- [create](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.create/page.mdx)
- [update](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.update/page.mdx)
- [list](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.list/page.mdx)
- [listAndCount](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.listAndCount/page.mdx)
- [retrieve](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.retrieve/page.mdx)
- [delete](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.delete/page.mdx)
- [softDelete](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.softDelete/page.mdx)
- [restore](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.restore/page.mdx)
- [addPromotionRules](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.addPromotionRules/page.mdx)
- [addPromotionTargetRules](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.addPromotionTargetRules/page.mdx)
- [addPromotionBuyRules](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.addPromotionBuyRules/page.mdx)
- [removePromotionRules](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.removePromotionRules/page.mdx)
- [removePromotionTargetRules](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.removePromotionTargetRules/page.mdx)
- [removePromotionBuyRules](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.removePromotionBuyRules/page.mdx)
- [createCampaigns](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.createCampaigns/page.mdx)
- [updateCampaigns](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.updateCampaigns/page.mdx)
- [listPromotionRules](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.listPromotionRules/page.mdx)
- [updatePromotionRules](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.updatePromotionRules/page.mdx)
- [listCampaigns](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.listCampaigns/page.mdx)
- [listAndCountCampaigns](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.listAndCountCampaigns/page.mdx)
- [retrieveCampaign](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.retrieveCampaign/page.mdx)
- [deleteCampaigns](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.deleteCampaigns/page.mdx)
- [softDeleteCampaigns](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.softDeleteCampaigns/page.mdx)
- [restoreCampaigns](../../IPromotionModuleService/methods/promotion.IPromotionModuleService.restoreCampaigns/page.mdx)
@@ -0,0 +1,9 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# JoinerServiceConfig
<TypeList types={[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKeys","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"alias","type":"[JoinerServiceConfigAlias](../promotion.JoinerServiceConfigAlias/page.mdx) \\| [JoinerServiceConfigAlias](../promotion.JoinerServiceConfigAlias/page.mdx)[]","description":"Property name to use as entrypoint to the service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fieldAlias","type":"`Record<string, string \\| object>`","description":"alias for deeper nested relationships (e.g. &#123; 'price': 'prices.calculated\\_price\\_set.amount' &#125;)","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"relationships","type":"[JoinerRelationship](../../types/promotion.JoinerRelationship/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"extends","type":"`object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"relationship","type":"[JoinerRelationship](../../types/promotion.JoinerRelationship/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"alias","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"foreignKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"primaryKey","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"serviceName","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isInternalService","type":"`boolean`","description":"If true, the relationship is an internal service from the medusa core\nTODO: Remove when there are no more \"internal\" services","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inverse","type":"`boolean`","description":"In an inverted relationship the foreign key is on the other service and the primary key is on the current service","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isList","type":"`boolean`","description":"Force the relationship to return a list","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfig"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# JoinerServiceConfigAlias
<TypeList types={[{"name":"name","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"args","type":"`Record<string, any>`","description":"Extra arguments to pass to the remoteFetchData callback","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="JoinerServiceConfigAlias"/>
@@ -0,0 +1,9 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# MessageAggregatorFormat
<TypeList types={[{"name":"groupBy","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sortBy","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="MessageAggregatorFormat"/>
File diff suppressed because one or more lines are too long
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# PromotionRuleDTO
The promotion rule details.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="PromotionRuleDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# PromotionRuleValueDTO
The promotion rule value details.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="PromotionRuleValueDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# RemoveItemAdjustmentAction
This action indicates that an adjustment must be removed from a line item. For example, remove the $5 discount applied before.
<TypeList types={[{"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":"description","type":"`string`","description":"The promotion's description.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RemoveItemAdjustmentAction"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# RemoveShippingMethodAdjustment
This action indicates that an adjustment must be removed from a shipping method. For example, remove the free shipping discount applied before.
<TypeList types={[{"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":[]}]} sectionTitle="RemoveShippingMethodAdjustment"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# RestoreReturn
An object that is used to specify an entity's related entities that should be restored when the main entity is restored.
## Type parameters
<TypeList types={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RestoreReturn"/>
<TypeList types={[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="RestoreReturn"/>
@@ -0,0 +1,15 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# SoftDeleteReturn
An object that is used to specify an entity's related entities that should be soft-deleted when the main entity is soft-deleted.
## Type parameters
<TypeList types={[{"name":"TReturnableLinkableKeys","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SoftDeleteReturn"/>
<TypeList types={[{"name":"returnLinkableKeys","type":"TReturnableLinkableKeys[]","description":"An array of strings, each being the ID attribute names of the entity's relations.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="SoftDeleteReturn"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# UpdateApplicationMethodDTO
The attributes to update in the application method.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the application method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method indicating how\nthe associated promotion is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating\nwhether the associated promotion is applied to the cart's items,\nshipping methods, or the whole order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion\nis applied on each item in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"The discounted amount applied by the associated promotion based on the `type`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"The minimum quantity required for a `buyget` promotion to be applied.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the\nvalue of this attribute is `2`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"The quantity that results from matching the `buyget` promotion's condition.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the value\nof this attribute is `1`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion","type":"`string` \\| [PromotionDTO](../promotion.PromotionDTO/page.mdx)","description":"The promotion of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateApplicationMethodDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# UpdateCampaignBudgetDTO
The attributes to update in the campaign budget.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the campaign budget.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[CampaignBudgetTypeValues](../../types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"How much is used of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdateCampaignBudgetDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# UpdateCampaignDTO
The attributes to update in the campaign.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the campaign.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"`string`","description":"The currency of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign identifier of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`Date`","description":"The start date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`Date`","description":"The end date of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"Omit&#60;[UpdateCampaignBudgetDTO](../promotion.UpdateCampaignBudgetDTO/page.mdx), \"id\"&#62;","description":"The budget of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"type","type":"[CampaignBudgetTypeValues](../../types/promotion.CampaignBudgetTypeValues/page.mdx)","description":"The type of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`null` \\| `number`","description":"The limit of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"used","type":"`number`","description":"How much is used of the campaign budget.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"promotions","type":"Pick&#60;[PromotionDTO](../promotion.PromotionDTO/page.mdx), \"id\"&#62;[]","description":"The promotions of the campaign.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="UpdateCampaignDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# UpdatePromotionDTO
The attributes to update in the promotion.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../types/promotion.PromotionTypeValues/page.mdx)","description":"The type of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[UpdateApplicationMethodDTO](../promotion.UpdateApplicationMethodDTO/page.mdx)","description":"The associated application method.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the application method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method indicating how\nthe associated promotion is applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating\nwhether the associated promotion is applied to the cart's items,\nshipping methods, or the whole order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion\nis applied on each item in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"The discounted amount applied by the associated promotion based on the `type`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"The minimum quantity required for a `buyget` promotion to be applied.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the\nvalue of this attribute is `2`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"The quantity that results from matching the `buyget` promotion's condition.\nFor example, if the promotion is a \"Buy 2 shirts get 1 free\", the value\nof this attribute is `1`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promotion","type":"`string` \\| [PromotionDTO](../promotion.PromotionDTO/page.mdx)","description":"The promotion of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"campaign_id","type":"`string`","description":"The associated campaign's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdatePromotionDTO"/>
@@ -0,0 +1,11 @@
---
displayed_sidebar: promotionReference
---
import { TypeList } from "docs-ui"
# UpdatePromotionRuleDTO
The attributes to update in the promotion rule.
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string` \\| `string`[]","description":"The values of the promotion rule.\nWhen provided, `PromotionRuleValue` records are\ncreated and associated with the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UpdatePromotionRuleDTO"/>