Feat: Base for new billing settings (#4115)

This commit is contained in:
Mike
2025-03-05 18:16:05 +01:00
committed by GitHub
parent 709b87b0fa
commit a13145332b
15 changed files with 938 additions and 489 deletions
@@ -1,3 +1,5 @@
import type { MaybeNullOrUndefined } from '../../core/helpers/utilityTypes.js'
/**
* PLANS
*/
@@ -55,9 +57,21 @@ export const WorkspacePlans = <const>{
export type WorkspacePlans = (typeof WorkspacePlans)[keyof typeof WorkspacePlans]
// TODO: Remove this post workspace migration
export const WorkspaceGuestSeatType = 'guest'
export type WorkspaceGuestSeatType = typeof WorkspaceGuestSeatType
// TODO: Remove this post workspace migration, only needed temporarily to differiante between old and new
export const isNewWorkspacePlan = (
plan: MaybeNullOrUndefined<WorkspacePlans>
): boolean => {
return (
plan === PaidWorkspacePlansNew.Team ||
plan === PaidWorkspacePlansNew.Pro ||
plan === UnpaidWorkspacePlans.Free
)
}
/**
* BILLING INTERVALS
*/