Feat: Update pricing plan features (#4357)
* Feat: Update pricing plan features * Clean up old stuff * Add features to old plans * pls dont complain anymore * pls work * fix(shared): add back features to the unlimited plan --------- Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
This commit is contained in:
@@ -7,21 +7,16 @@ import {
|
||||
WorkspacePlans
|
||||
} from './plans.js'
|
||||
|
||||
type StringTemplate<Data extends object> = (data: Data) => string
|
||||
|
||||
/**
|
||||
* WORKSPACE FEATURES
|
||||
*/
|
||||
|
||||
export const WorkspacePlanFeatures = <const>{
|
||||
// Core features pretty much available to everyone
|
||||
Workspace: 'workspace',
|
||||
RoleManagement: 'roleManagement',
|
||||
GuestUsers: 'guestUsers',
|
||||
PrivateAutomateFunctions: 'privateAutomateFunctions',
|
||||
AutomateBeta: 'automateBeta',
|
||||
DomainDiscoverability: 'domainDiscoverability',
|
||||
// Optional/plan specific
|
||||
DomainSecurity: 'domainBasedSecurityPolicies',
|
||||
PrioritySupport: 'prioritySupport',
|
||||
SSO: 'oidcSso',
|
||||
CustomDataRegion: 'workspaceDataRegionSpecificity'
|
||||
}
|
||||
@@ -30,24 +25,13 @@ export type WorkspacePlanFeatures =
|
||||
(typeof WorkspacePlanFeatures)[keyof typeof WorkspacePlanFeatures]
|
||||
|
||||
export const WorkspacePlanFeaturesMetadata = (<const>{
|
||||
// Old
|
||||
[WorkspacePlanFeatures.Workspace]: {
|
||||
displayName: 'Workspace',
|
||||
description: 'A shared space for your team and projects'
|
||||
[WorkspacePlanFeatures.AutomateBeta]: {
|
||||
displayName: 'Automate beta access',
|
||||
description: 'Some automate text'
|
||||
},
|
||||
[WorkspacePlanFeatures.RoleManagement]: {
|
||||
displayName: 'Role management',
|
||||
description: "Control individual members' access and edit rights"
|
||||
},
|
||||
[WorkspacePlanFeatures.GuestUsers]: {
|
||||
displayName: 'Guest users',
|
||||
description: (params: { price: number | string }) =>
|
||||
`Give guests access to specific projects in the workspace at ${params.price}/month/guest`
|
||||
},
|
||||
[WorkspacePlanFeatures.PrivateAutomateFunctions]: {
|
||||
displayName: 'Private automate functions',
|
||||
description:
|
||||
'Create and manage private automation functions securely within your workspace'
|
||||
[WorkspacePlanFeatures.DomainDiscoverability]: {
|
||||
displayName: 'Domain discoverability',
|
||||
description: 'Some domain discoverability text'
|
||||
},
|
||||
[WorkspacePlanFeatures.DomainSecurity]: {
|
||||
displayName: 'Domain security',
|
||||
@@ -60,17 +44,12 @@ export const WorkspacePlanFeaturesMetadata = (<const>{
|
||||
[WorkspacePlanFeatures.CustomDataRegion]: {
|
||||
displayName: 'Custom data residency',
|
||||
description: 'Store the workspace data in a custom region'
|
||||
},
|
||||
[WorkspacePlanFeatures.PrioritySupport]: {
|
||||
displayName: 'Priority support',
|
||||
description: 'Personal and fast support'
|
||||
}
|
||||
}) satisfies Record<
|
||||
WorkspacePlanFeatures,
|
||||
{
|
||||
displayName: string
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
description: string | StringTemplate<any>
|
||||
description: string
|
||||
}
|
||||
>
|
||||
|
||||
@@ -97,63 +76,46 @@ export type WorkspacePlanConfig<Plan extends WorkspacePlans = WorkspacePlans> =
|
||||
}
|
||||
|
||||
const baseFeatures = [
|
||||
WorkspacePlanFeatures.Workspace,
|
||||
WorkspacePlanFeatures.RoleManagement,
|
||||
WorkspacePlanFeatures.GuestUsers,
|
||||
WorkspacePlanFeatures.PrivateAutomateFunctions
|
||||
WorkspacePlanFeatures.AutomateBeta,
|
||||
WorkspacePlanFeatures.DomainDiscoverability
|
||||
] as const
|
||||
|
||||
const teamFeatures = [...baseFeatures]
|
||||
|
||||
const proFeatures = [
|
||||
...teamFeatures,
|
||||
WorkspacePlanFeatures.DomainSecurity,
|
||||
WorkspacePlanFeatures.SSO,
|
||||
WorkspacePlanFeatures.CustomDataRegion,
|
||||
WorkspacePlanFeatures.PrioritySupport
|
||||
]
|
||||
|
||||
export const WorkspacePaidPlanConfigs: {
|
||||
[plan in PaidWorkspacePlans]: WorkspacePlanConfig<plan>
|
||||
} = {
|
||||
// Old
|
||||
[PaidWorkspacePlans.Starter]: {
|
||||
plan: PaidWorkspacePlans.Starter,
|
||||
features: [...baseFeatures, WorkspacePlanFeatures.DomainSecurity],
|
||||
features: [...baseFeatures],
|
||||
limits: unlimited
|
||||
},
|
||||
[PaidWorkspacePlans.Plus]: {
|
||||
plan: PaidWorkspacePlans.Plus,
|
||||
features: [
|
||||
...baseFeatures,
|
||||
WorkspacePlanFeatures.DomainSecurity,
|
||||
WorkspacePlanFeatures.SSO
|
||||
],
|
||||
features: [...baseFeatures, WorkspacePlanFeatures.SSO],
|
||||
limits: unlimited
|
||||
},
|
||||
[PaidWorkspacePlans.Business]: {
|
||||
plan: PaidWorkspacePlans.Business,
|
||||
features: [
|
||||
...baseFeatures,
|
||||
WorkspacePlanFeatures.DomainSecurity,
|
||||
WorkspacePlanFeatures.SSO,
|
||||
WorkspacePlanFeatures.CustomDataRegion,
|
||||
WorkspacePlanFeatures.PrioritySupport
|
||||
WorkspacePlanFeatures.CustomDataRegion
|
||||
],
|
||||
limits: unlimited
|
||||
},
|
||||
[PaidWorkspacePlans.Team]: {
|
||||
plan: PaidWorkspacePlans.Team,
|
||||
features: teamFeatures,
|
||||
features: [...baseFeatures],
|
||||
limits: {
|
||||
projectCount: 5,
|
||||
modelCount: 25,
|
||||
versionsHistory: { value: 30, unit: 'day' }
|
||||
}
|
||||
},
|
||||
// New
|
||||
[PaidWorkspacePlans.TeamUnlimited]: {
|
||||
plan: PaidWorkspacePlans.TeamUnlimited,
|
||||
features: teamFeatures,
|
||||
features: [...baseFeatures],
|
||||
limits: {
|
||||
projectCount: null,
|
||||
modelCount: null,
|
||||
@@ -162,7 +124,12 @@ export const WorkspacePaidPlanConfigs: {
|
||||
},
|
||||
[PaidWorkspacePlans.Pro]: {
|
||||
plan: PaidWorkspacePlans.Pro,
|
||||
features: proFeatures,
|
||||
features: [
|
||||
...baseFeatures,
|
||||
WorkspacePlanFeatures.DomainSecurity,
|
||||
WorkspacePlanFeatures.SSO,
|
||||
WorkspacePlanFeatures.CustomDataRegion
|
||||
],
|
||||
limits: {
|
||||
projectCount: 10,
|
||||
modelCount: 50,
|
||||
@@ -171,7 +138,12 @@ export const WorkspacePaidPlanConfigs: {
|
||||
},
|
||||
[PaidWorkspacePlans.ProUnlimited]: {
|
||||
plan: PaidWorkspacePlans.ProUnlimited,
|
||||
features: proFeatures,
|
||||
features: [
|
||||
...baseFeatures,
|
||||
WorkspacePlanFeatures.DomainSecurity,
|
||||
WorkspacePlanFeatures.SSO,
|
||||
WorkspacePlanFeatures.CustomDataRegion
|
||||
],
|
||||
limits: {
|
||||
projectCount: null,
|
||||
modelCount: null,
|
||||
@@ -190,8 +162,7 @@ export const WorkspaceUnpaidPlanConfigs: {
|
||||
...baseFeatures,
|
||||
WorkspacePlanFeatures.DomainSecurity,
|
||||
WorkspacePlanFeatures.SSO,
|
||||
WorkspacePlanFeatures.CustomDataRegion,
|
||||
WorkspacePlanFeatures.PrioritySupport
|
||||
WorkspacePlanFeatures.CustomDataRegion
|
||||
],
|
||||
limits: unlimited
|
||||
},
|
||||
@@ -201,8 +172,7 @@ export const WorkspaceUnpaidPlanConfigs: {
|
||||
...baseFeatures,
|
||||
WorkspacePlanFeatures.DomainSecurity,
|
||||
WorkspacePlanFeatures.SSO,
|
||||
WorkspacePlanFeatures.CustomDataRegion,
|
||||
WorkspacePlanFeatures.PrioritySupport
|
||||
WorkspacePlanFeatures.CustomDataRegion
|
||||
],
|
||||
limits: unlimited
|
||||
},
|
||||
@@ -233,7 +203,7 @@ export const WorkspaceUnpaidPlanConfigs: {
|
||||
limits: {
|
||||
projectCount: 1,
|
||||
modelCount: 5,
|
||||
versionsHistory: { value: 1, unit: 'week' }
|
||||
versionsHistory: { value: 7, unit: 'day' }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user