docs-util: fix incorrect relations in data model references + other fixes (#12487)
* fix price model incorrect relations * fix events that don't have workflows showing * fix notification example
This commit is contained in:
1 parent
3ddcd872a0
commit
30aa317ff1
11 files changed
+2874
-2854
No files matched your search
+8
-4
@@ -273,11 +273,15 @@ export default async function userCreatedHandler({
|
||||
const notificationModuleService = container.resolve(
|
||||
Modules.NOTIFICATION
|
||||
)
|
||||
const userModule = container.resolve(
|
||||
Modules.USER
|
||||
)
|
||||
const query = container.resolve("query")
|
||||
|
||||
const user = await userModule.retrieveUser(data.id)
|
||||
const { data: [user] } = await query.graph({
|
||||
entity: "user",
|
||||
fields: ["*"],
|
||||
filters: {
|
||||
id: data.id,
|
||||
}
|
||||
})
|
||||
|
||||
await notificationModuleService.createNotifications({
|
||||
to: user.email,
|
||||
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the Price data model. It belongs to the Pricing Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/e09fd61a8f649959a6c0819c1d867abf05ae0dc4/packages/modules/pricing/src/models/price.ts#L6" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/c661e064885ca0a874a443b293f9bb48b2742cf7/packages/modules/pricing/src/models/price.ts#L6" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](./page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`NumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`NumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_list_rules","type":"HasMany<[PriceListRule](../pricing_models.PriceListRule/page.mdx)>","description":"The associated `PriceListRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price list rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"value","type":"`JSONProperty`","description":"The value of the price list rule. For example, `reg_123`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"starts_at","type":"`DateTimeProperty`","description":"The date the price list starts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"Line truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceSet](../pricing_models.PriceSet/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](./page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceSet](../pricing_models.PriceSet/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`NumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`NumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":true,"defaultValue":"","expandable":true,"children":[]}]}]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"BelongsTo<[Price](./page.mdx)>","description":"The associated `Price`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceSet](../pricing_models.PriceSet/page.mdx)>","description":"The associated `PrLine truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the PriceList data model. It belongs to the Pricing Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/e09fd61a8f649959a6c0819c1d867abf05ae0dc4/packages/modules/pricing/src/models/price-list.ts#L9" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/c661e064885ca0a874a443b293f9bb48b2742cf7/packages/modules/pricing/src/models/price-list.ts#L9" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceList](./page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list_rules","type":"HasMany<[PriceListRule](../pricing_models.PriceListRule/page.mdx)>","description":"The associated `PriceListRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"starts_at","type":"`DateTimeProperty`","description":"The date the price list starts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`DateTimeProperty`","description":"The date the price list ends.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priorLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceSet](../pricing_models.PriceSet/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"BelongsTo<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price`.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"title","type":"`TextProperty`","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`NumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`NumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](./page.mdx)>","description":"The associated `PriceList`.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name"Line truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the PriceListRule data model. It belongs to the Pricing Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/e09fd61a8f649959a6c0819c1d867abf05ae0dc4/packages/modules/pricing/src/models/price-list-rule.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/c661e064885ca0a874a443b293f9bb48b2742cf7/packages/modules/pricing/src/models/price-list-rule.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price list rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`NumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`NumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_list_rules","type":"HasMany<[PriceListRule](./page.mdx)>","description":"The associated `PriceListRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price list rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"value","type":"`JSONProperty`","description":"The value of the price list rule. For example, `reg_123`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"starts_at","type":"`DateTimeProperty`","description":"The date the price list starts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`DateTimeProperty`","description":"The date the price list ends.","optional":true,"defaultValue":"","expandable":false,"childreLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price list rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceSet](../pricing_models.PriceSet/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`NumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`NumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":true,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_list_rules","type":"HasMany<[PriceListRule](./page.mdx)>","description":"The associated `PriceListRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price list rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"value","type":"`JSONProperty`","description":"The value of the price list rule. For example, `reg_123`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"starts_at","type":"`DateTimeProperty`","description":"The date the price list starts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`DateTimeProperty`","description":"The date the price list ends.","optional":true,"defaultValue":"","expandable":false,"children"Line truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the PriceRule data model. It belongs to the Pricing Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/e09fd61a8f649959a6c0819c1d867abf05ae0dc4/packages/modules/pricing/src/models/price-rule.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/c661e064885ca0a874a443b293f9bb48b2742cf7/packages/modules/pricing/src/models/price-rule.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"BelongsTo<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list_rules","type":"HasMany<[PriceListRule](../pricing_models.PriceListRule/page.mdx)>","description":"The associated `PriceListRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"starts_at","type":"`DateTimeProperty`","description":"The date the price list starts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`DateTimeProperty`","description":"The date the price list ends.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_rules","type":"HasMany<[PriceRule](./page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","opLine truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"BelongsTo<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceSet](../pricing_models.PriceSet/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_rules","type":"HasMany<[PriceRule](./page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"BelongsTo<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price`.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"title","type":"`TextProperty`","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`NumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`NumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TexLine truncated
|
||||
+2
-2
@@ -10,6 +10,6 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the PriceSet data model. It belongs to the Pricing Module.
|
||||
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/e09fd61a8f649959a6c0819c1d867abf05ae0dc4/packages/modules/pricing/src/models/price-set.ts#L4" />
|
||||
<SourceCodeLink link="https://github.com/medusajs/medusa/blob/c661e064885ca0a874a443b293f9bb48b2742cf7/packages/modules/pricing/src/models/price-set.ts#L4" />
|
||||
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"price_list_rules","type":"HasMany<[PriceListRule](../pricing_models.PriceListRule/page.mdx)>","description":"The associated `PriceListRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[]},{"name":"starts_at","type":"`DateTimeProperty`","description":"The date the price list starts.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`DateTimeProperty`","description":"The date the price list ends.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price list.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"BelongsTo<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price`.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"title","type":"`TextProperty`","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`NumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`NumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,Line truncated
|
||||
<TypeList types={[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`TextProperty`","description":"The currency code of the price. For example, `usd`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`BigNumberProperty`","description":"The amount of the price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_set","type":"BelongsTo<[PriceSet](./page.mdx)>","description":"The associated `PriceSet`.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"price_rules","type":"HasMany<[PriceRule](../pricing_models.PriceRule/page.mdx)>","description":"The associated `PriceRule` records.","optional":false,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`TextProperty`","description":"The attribute of the price rule. For example, `region_id`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`TextProperty`","description":"The value of the price rule. For example, `reg_123`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"EnumProperty<typeof [PricingRuleOperator](../../../utils/PricingUtils/enums/utils.PricingUtils.PricingRuleOperator/page.mdx)>","description":"The operator of the price rule. For example, `eq`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priority","type":"`NumberProperty`","description":"The priority of the price rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price","type":"BelongsTo<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price`.","optional":false,"defaultValue":"","expandable":true,"children":[]}]},{"name":"title","type":"`TextProperty`","description":"The title of the price","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"min_quantity","type":"`NumberProperty`","description":"The minimum quantity that must be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`NumberProperty`","description":"The maximum quantity allowed to be available in the cart for the price to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules_count","type":"`NumberProperty`","description":"The total number of rules of the price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_list","type":"BelongsTo<[PriceList](../pricing_models.PriceList/page.mdx)>","description":"The associated `PriceList`.","optional":true,"defaultValue":"","expandable":true,"children":[{"name":"id","type":"PrimaryKeyModifier<IdProperty>","description":"The ID of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`TextProperty`","description":"The title of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`TextProperty`","description":"The description of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"EnumProperty<typeof [PriceListStatus](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListStatus/page.mdx)>","description":"The status of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"EnumProperty<typeof [PriceListType](../../../utils/PricingUtils/enums/utils.PricingUtils.PriceListType/page.mdx)>","description":"The type of the price list.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"HasMany<[Price](../pricing_models.Price/page.mdx)>","description":"The associated `Price` records.","optional":false,"defaultValLine truncated
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
+8
-4
@@ -148,11 +148,15 @@ export default async function userCreatedHandler({
|
||||
const notificationModuleService = container.resolve(
|
||||
Modules.NOTIFICATION
|
||||
)
|
||||
const userModule = container.resolve(
|
||||
Modules.USER
|
||||
)
|
||||
const query = container.resolve("query")
|
||||
|
||||
const user = await userModule.retrieveUser(data.id)
|
||||
const { data: [user] } = await query.graph({
|
||||
entity: "user",
|
||||
fields: ["*"],
|
||||
filters: {
|
||||
id: data.id,
|
||||
}
|
||||
})
|
||||
|
||||
await notificationModuleService.createNotifications({
|
||||
to: user.email,
|
||||
|
||||
@@ -137,14 +137,16 @@ export class DmlRelationsResolver {
|
||||
properties: DeclarationReflection[]
|
||||
): DeclarationReflection | undefined {
|
||||
return this.dmlReflectionsAndProperties.find(({ properties: refProps }) => {
|
||||
return properties.every((property) => {
|
||||
return refProps.find(
|
||||
(refProp) =>
|
||||
refProp.name === property.name &&
|
||||
(refProp.type as ReferenceType).name ===
|
||||
(property.type as ReferenceType).name
|
||||
)
|
||||
})
|
||||
return (
|
||||
properties.every((property) => {
|
||||
return refProps.find(
|
||||
(refProp) =>
|
||||
refProp.name === property.name &&
|
||||
(refProp.type as ReferenceType).name ===
|
||||
(property.type as ReferenceType).name
|
||||
)
|
||||
}) && properties.length === refProps.length
|
||||
)
|
||||
})?.reflection
|
||||
}
|
||||
|
||||
|
||||
+19
-9
@@ -15,7 +15,8 @@ export default function () {
|
||||
const showHeader = (this.children?.length ?? 0) > 1
|
||||
|
||||
function parseChildren(children: DeclarationReflection[]) {
|
||||
children?.forEach((child, index) => {
|
||||
let count = 0
|
||||
children.forEach((child, index) => {
|
||||
content.push(
|
||||
formatEventsType(child as DeclarationReflection, {
|
||||
subtitleLevel,
|
||||
@@ -27,13 +28,16 @@ export default function () {
|
||||
content.push("---")
|
||||
content.push("")
|
||||
}
|
||||
count++
|
||||
})
|
||||
|
||||
return count
|
||||
}
|
||||
|
||||
if (this.kind === ReflectionKind.Module) {
|
||||
this.children?.forEach((child, index) => {
|
||||
parseChildren(child.children || [])
|
||||
if (index < this.children!.length - 1) {
|
||||
const count = parseChildren(child.children || [])
|
||||
if (count > 0 && index < this.children!.length - 1) {
|
||||
content.push("")
|
||||
content.push("---")
|
||||
content.push("")
|
||||
@@ -71,7 +75,9 @@ function formatEventsType(
|
||||
}
|
||||
content.push("")
|
||||
|
||||
const eventProperties = eventVariable.type.declaration.children || []
|
||||
const eventProperties = (
|
||||
eventVariable.type.declaration.children || []
|
||||
).filter((child) => (getEventWorkflows(child)?.length || 0) > 0)
|
||||
|
||||
content.push(`${subHeaderPrefix} Summary`)
|
||||
content.push("")
|
||||
@@ -154,11 +160,7 @@ function formatEventsType(
|
||||
.find((tag) => tag.tag === "@eventPayload")
|
||||
?.content.map((content) => content.text)
|
||||
.join("")
|
||||
const workflows = event.comment?.blockTags
|
||||
.find((tag) => tag.tag === "@workflows")
|
||||
?.content.map((content) => content.text)
|
||||
.join("")
|
||||
.split(", ")
|
||||
const workflows = getEventWorkflows(event)
|
||||
const deprecatedTag = event.comment?.blockTags.find(
|
||||
(tag) => tag.tag === "@deprecated"
|
||||
)
|
||||
@@ -258,3 +260,11 @@ function getEventHeading({
|
||||
function getEventNameSlug(eventName: string) {
|
||||
return slugify(eventName.replace(".", ""), { lower: true })
|
||||
}
|
||||
|
||||
function getEventWorkflows(event: DeclarationReflection): string[] | undefined {
|
||||
return event.comment?.blockTags
|
||||
.find((tag) => tag.tag === "@workflows")
|
||||
?.content.map((content) => content.text)
|
||||
.join("")
|
||||
.split(", ")
|
||||
}
|
||||
Reference in new issue
Block a user