From 6025c702f37d43e18af32bd716f33410d95efd19 Mon Sep 17 00:00:00 2001 From: Riqwan Thamir Date: Wed, 22 Nov 2023 20:28:48 +0100 Subject: [PATCH] fix(pricing,types): remove is_dynamic from model + types (#5664) what: Removing this until we introduce dynamic pricing. Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com> --- .changeset/kind-dolphins-speak.md | 6 ++++ packages/pricing/src/models/price-rule.ts | 3 -- .../types/src/pricing/common/money-amount.ts | 2 -- .../types/src/pricing/common/price-rule.ts | 35 ++++--------------- 4 files changed, 12 insertions(+), 34 deletions(-) create mode 100644 .changeset/kind-dolphins-speak.md diff --git a/.changeset/kind-dolphins-speak.md b/.changeset/kind-dolphins-speak.md new file mode 100644 index 0000000000..0b3b53f44e --- /dev/null +++ b/.changeset/kind-dolphins-speak.md @@ -0,0 +1,6 @@ +--- +"@medusajs/pricing": patch +"@medusajs/types": patch +--- + +fix(pricing,types): remove is_dynamic from model + types diff --git a/packages/pricing/src/models/price-rule.ts b/packages/pricing/src/models/price-rule.ts index aab8908a65..a1d786759b 100644 --- a/packages/pricing/src/models/price-rule.ts +++ b/packages/pricing/src/models/price-rule.ts @@ -39,9 +39,6 @@ export default class PriceRule { }) rule_type: RuleType - @Property({ columnType: "boolean", default: false }) - is_dynamic: boolean - @Property({ columnType: "text" }) value: string diff --git a/packages/types/src/pricing/common/money-amount.ts b/packages/types/src/pricing/common/money-amount.ts index 72e58d2e9a..160abead7b 100644 --- a/packages/types/src/pricing/common/money-amount.ts +++ b/packages/types/src/pricing/common/money-amount.ts @@ -36,8 +36,6 @@ export interface MoneyAmountDTO { max_quantity?: number /** * The details of the relation between the money amount and its associated price set. - * - * @expandable */ price_set_money_amount?: PriceSetMoneyAmountDTO } diff --git a/packages/types/src/pricing/common/price-rule.ts b/packages/types/src/pricing/common/price-rule.ts index 5b22cbe9e9..738d4b3d88 100644 --- a/packages/types/src/pricing/common/price-rule.ts +++ b/packages/types/src/pricing/common/price-rule.ts @@ -4,7 +4,7 @@ import { RuleTypeDTO } from "./rule-type" /** * @interface - * + * * A price rule's data. */ export interface PriceRuleDTO { @@ -18,7 +18,6 @@ export interface PriceRuleDTO { price_set_id: string /** * The associated price set. - * * @expandable */ price_set: PriceSetDTO @@ -28,17 +27,10 @@ export interface PriceRuleDTO { rule_type_id: string /** * The associated rule type. - * + * * @expandable */ rule_type: RuleTypeDTO - /** - * @ignore - * @privateRemarks - * - * Behavior behind this property is not implemented yet. - */ - is_dynamic: boolean /** * The value of the price rule. */ @@ -58,9 +50,9 @@ export interface PriceRuleDTO { } /** - * + * * @interface - * + * * A price rule to create. */ export interface CreatePriceRuleDTO { @@ -76,13 +68,6 @@ export interface CreatePriceRuleDTO { * The ID of the associated rule type. */ rule_type_id: string - /** - * @ignore - * @privateRemarks - * - * Behavior behind this property is not implemented yet. - */ - is_dynamic?: boolean /** * The value of the price rule. */ @@ -92,22 +77,15 @@ export interface CreatePriceRuleDTO { } /** - * + * * @interface - * + * * The data to update in a price rule. The `id` is used to identify which money amount to update. */ export interface UpdatePriceRuleDTO { id: string price_set_id?: string rule_type_id?: string - /** - * @ignore - * @privateRemark - * - * Behavior behind this property is not implemented yet. - */ - is_dynamic?: boolean /** * The value of the price rule. */ @@ -128,7 +106,6 @@ export interface UpdatePriceRuleDTO { /** * @interface - * * Filters to apply on price rules. */ export interface FilterablePriceRuleProps