Work on billing

This commit is contained in:
Jon Staab
2026-03-09 10:04:13 -07:00
parent 01d9d3bd05
commit 1ea087643b
8 changed files with 441 additions and 81 deletions
+7
View File
@@ -192,6 +192,13 @@ export function updateTenantRelay(id: string, input: UpdateRelayInput) {
})
}
export function updateTenantRelayPlan(id: string, plan: string) {
return request<Relay>(`/tenant/relays/${id}/plan`, {
method: "PUT",
body: JSON.stringify({ plan }),
})
}
export function deactivateTenantRelay(id: string) {
return request<Relay>(`/tenant/relays/${id}/deactivate`, {
method: "POST",
+42
View File
@@ -1,3 +1,45 @@
export const RELAY_PLAN_IDS = ["free", "basic", "growth"] as const
export type RelayPlanId = (typeof RELAY_PLAN_IDS)[number]
export const RELAY_PLANS = [
{
id: "free",
label: "Free",
subtitle: "Get started, no commitment.",
price: 0,
priceLabel: "0",
memberLabel: "Up to 10 members",
blossom: false,
livekit: false,
},
{
id: "basic",
label: "Basic",
subtitle: "For growing communities.",
price: 10_000,
priceLabel: "10K",
memberLabel: "Up to 100 members",
blossom: true,
livekit: true,
},
{
id: "growth",
label: "Growth",
subtitle: "For large-scale communities.",
price: 50_000,
priceLabel: "50K",
memberLabel: "Unlimited members",
blossom: true,
livekit: true,
},
] as const satisfies readonly {
id: RelayPlanId
label: string
subtitle: string
price: number
priceLabel: string
memberLabel: string
blossom: boolean
livekit: boolean
}[]