From 8c2f61a00409d51a6db26943ec157d4ed2923ac2 Mon Sep 17 00:00:00 2001 From: Mythie Date: Wed, 12 Jun 2024 21:27:05 +1000 Subject: [PATCH] fix: add regular plan to price type enum --- .../ee/server-only/stripe/get-document-related-prices.ts.ts | 2 +- .../ee/server-only/stripe/get-primary-account-plan-prices.ts | 2 +- packages/lib/constants/billing.ts | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packages/ee/server-only/stripe/get-document-related-prices.ts.ts b/packages/ee/server-only/stripe/get-document-related-prices.ts.ts index 81b32a7b9..9cdd227c0 100644 --- a/packages/ee/server-only/stripe/get-document-related-prices.ts.ts +++ b/packages/ee/server-only/stripe/get-document-related-prices.ts.ts @@ -6,5 +6,5 @@ import { getPricesByPlan } from './get-prices-by-plan'; * Returns the Stripe prices of items that affect the amount of documents a user can create. */ export const getDocumentRelatedPrices = async () => { - return await getPricesByPlan([STRIPE_PLAN_TYPE.COMMUNITY, STRIPE_PLAN_TYPE.ENTERPRISE]); + return await getPricesByPlan([STRIPE_PLAN_TYPE.REGULAR, STRIPE_PLAN_TYPE.COMMUNITY, STRIPE_PLAN_TYPE.ENTERPRISE]); }; diff --git a/packages/ee/server-only/stripe/get-primary-account-plan-prices.ts b/packages/ee/server-only/stripe/get-primary-account-plan-prices.ts index 0eb368ce7..ea299c618 100644 --- a/packages/ee/server-only/stripe/get-primary-account-plan-prices.ts +++ b/packages/ee/server-only/stripe/get-primary-account-plan-prices.ts @@ -6,5 +6,5 @@ import { getPricesByPlan } from './get-prices-by-plan'; * Returns the prices of items that count as the account's primary plan. */ export const getPrimaryAccountPlanPrices = async () => { - return await getPricesByPlan([STRIPE_PLAN_TYPE.COMMUNITY, STRIPE_PLAN_TYPE.ENTERPRISE]); + return await getPricesByPlan([STRIPE_PLAN_TYPE.REGULAR, STRIPE_PLAN_TYPE.COMMUNITY, STRIPE_PLAN_TYPE.ENTERPRISE]); }; diff --git a/packages/lib/constants/billing.ts b/packages/lib/constants/billing.ts index 0d8dee6e2..17178662d 100644 --- a/packages/lib/constants/billing.ts +++ b/packages/lib/constants/billing.ts @@ -4,6 +4,7 @@ export enum STRIPE_CUSTOMER_TYPE { } export enum STRIPE_PLAN_TYPE { + REGULAR = 'regular', TEAM = 'team', COMMUNITY = 'community', ENTERPRISE = 'enterprise',