#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere
TypeScript dockerhacktoberfestjavapdfpdf-converterpdf-editorpdf-manipulationpdf-mergerpdf-ocrpdf-toolspdf-web-appspdfmergerself-hosted
Buy the Team plan on its own Stripe prices (#8139)
ConnorYoh62ba2bc76e1b
diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/AvailablePlansSection.stories.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/AvailablePlansSection.stories.tsxindex 4926f2c805..6acc9bce05 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/AvailablePlansSection.stories.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/AvailablePlansSection.stories.tsx@@ -20,7 +20,7 @@ const PLANS: PlanTier[] = [lookupKey: "free",},{- id: "selfhosted:server:monthly",+ id: "selfhosted:team:monthly",name: "Server",price: 29,currency: "$",@@ -28,7 +28,7 @@ const PLANS: PlanTier[] = [popular: true,features: FEATURES,highlights: ["Everything in Free", "Team workspaces", "Priority support"],- lookupKey: "selfhosted:server:monthly",+ lookupKey: "selfhosted:team:monthly",},{id: "selfhosted:enterprise:monthly",diff --git a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/PlanCard.stories.tsx b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/PlanCard.stories.tsxindex 742ad93910..ec797cfdd5 100644--- a/frontend/editor/src/proprietary/components/shared/config/configSections/plan/PlanCard.stories.tsx+++ b/frontend/editor/src/proprietary/components/shared/config/configSections/plan/PlanCard.stories.tsx@@ -32,7 +32,7 @@ const serverPlanGroup: PlanTierGroup = {period: "month",features: [],highlights: ["Unlimited users", "Priority support", "SSO"],- lookupKey: "selfhosted:server:monthly",+ lookupKey: "selfhosted:team:monthly",},yearly: {id: "server-yearly",@@ -42,7 +42,7 @@ const serverPlanGroup: PlanTierGroup = {period: "year",features: [],highlights: ["Unlimited users", "Priority support", "SSO"],- lookupKey: "selfhosted:server:yearly",+ lookupKey: "selfhosted:team:yearly",},features: [],highlights: ["Unlimited users", "Priority support", "SSO"],diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/StripeCheckout.stories.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/StripeCheckout.stories.tsxindex 3d4066e52c..b1df17d8d7 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/StripeCheckout.stories.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/StripeCheckout.stories.tsx@@ -13,7 +13,7 @@ const PLAN_GROUP: PlanTierGroup = {period: "monthly",features: [],highlights: ["Unlimited documents", "Priority support"],- lookupKey: "selfhosted:server:monthly",+ lookupKey: "selfhosted:team:monthly",},yearly: {id: "server-yearly",@@ -23,7 +23,7 @@ const PLAN_GROUP: PlanTierGroup = {period: "yearly",features: [],highlights: ["Unlimited documents", "Priority support", "2 months free"],- lookupKey: "selfhosted:server:yearly",+ lookupKey: "selfhosted:team:yearly",},features: [],highlights: ["Unlimited documents", "Priority support"],diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/hooks/useCheckoutSession.test.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/hooks/useCheckoutSession.test.tsxindex 379b7ad309..a6dc7c2f52 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/hooks/useCheckoutSession.test.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/hooks/useCheckoutSession.test.tsx@@ -32,14 +32,14 @@ import { pollTeamCheckout } from "@app/utils/licenseCheckoutUtils";import type { CheckoutState } from "@app/components/shared/stripeCheckout/types/checkout";const plan = {- id: "selfhosted:server:yearly",+ id: "selfhosted:team:yearly",name: "Team",price: 0,currency: "usd",period: "yearly",features: [],highlights: [],- lookupKey: "selfhosted:server:yearly",+ lookupKey: "selfhosted:team:yearly",requiresSeats: false,};@@ -108,7 +108,7 @@ describe("useCheckoutSession", () => {const request = createSession.mock.calls[0][0];expect(request).not.toHaveProperty("email");expect(request).toMatchObject({- lookupKey: "selfhosted:server:yearly",+ lookupKey: "selfhosted:team:yearly",serverQuantity: 3,seatCount: 7,installationId: "install-abc",diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/CapacityStage.stories.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/CapacityStage.stories.tsxindex 5e4177a418..2024d401fc 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/CapacityStage.stories.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/CapacityStage.stories.tsx@@ -15,7 +15,7 @@ const yearlyPlan: PlanTier = {period: "/year",features: [],highlights: [],- lookupKey: "selfhosted:server:yearly",+ lookupKey: "selfhosted:team:yearly",};const monthlyPlan: PlanTier = {diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PaymentStage.stories.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PaymentStage.stories.tsxindex 8e928cfe3a..e4e1d123a7 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PaymentStage.stories.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PaymentStage.stories.tsx@@ -10,7 +10,7 @@ const serverPlan: PlanTier = {period: "month",features: [],highlights: [],- lookupKey: "selfhosted:server:monthly",+ lookupKey: "selfhosted:team:monthly",};/**diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PlanSelectionStage.stories.tsx b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PlanSelectionStage.stories.tsxindex c37e51ed53..fa211e1210 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PlanSelectionStage.stories.tsx+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/stages/PlanSelectionStage.stories.tsx@@ -17,7 +17,7 @@ const serverPlanGroup: PlanTierGroup = {period: "month",features: [],highlights: [],- lookupKey: "selfhosted:server:monthly",+ lookupKey: "selfhosted:team:monthly",},yearly: {id: "server-yearly",@@ -27,7 +27,7 @@ const serverPlanGroup: PlanTierGroup = {period: "year",features: [],highlights: [],- lookupKey: "selfhosted:server:yearly",+ lookupKey: "selfhosted:team:yearly",},features: [],highlights: [],diff --git a/frontend/editor/src/proprietary/components/shared/stripeCheckout/utils/capacity.ts b/frontend/editor/src/proprietary/components/shared/stripeCheckout/utils/capacity.tsindex 9af68bd64b..eba9897f16 100644--- a/frontend/editor/src/proprietary/components/shared/stripeCheckout/utils/capacity.ts+++ b/frontend/editor/src/proprietary/components/shared/stripeCheckout/utils/capacity.ts@@ -1,7 +1,7 @@/*** Team-plan capacity: the plan is sold in blocks of users.*- * A block is what Stripe charges for (one unit of `selfhosted:server:*`), but nothing+ * A block is what Stripe charges for (one unit of `selfhosted:team:*`), but nothing* customer-facing says so: the buyer picks a number of users and the line item prices it per block.* Only `server_quantity` on the checkout request speaks in blocks, because that is what the* subscription line item counts.diff --git a/frontend/editor/src/proprietary/services/licenseService.ts b/frontend/editor/src/proprietary/services/licenseService.tsindex c2c81ef51e..1c9945a5cc 100644--- a/frontend/editor/src/proprietary/services/licenseService.ts+++ b/frontend/editor/src/proprietary/services/licenseService.ts@@ -79,8 +79,8 @@ const getCurrencySymbol = (currency: string): string => {// Self-hosted plan lookup keysconst SELF_HOSTED_LOOKUP_KEYS = [- "selfhosted:server:monthly",- "selfhosted:server:yearly",+ "selfhosted:team:monthly",+ "selfhosted:team:yearly","selfhosted:enterpriseseat:monthly","selfhosted:enterpriseseat:yearly",];@@ -166,10 +166,10 @@ const licenseService = {// Build plan tiersconst plans: PlanTier[] = [{- id: "selfhosted:server:monthly",- lookupKey: "selfhosted:server:monthly",+ id: "selfhosted:team:monthly",+ lookupKey: "selfhosted:team:monthly",name: "Team - Monthly",- price: getPriceInfo("selfhosted:server:monthly"),+ price: getPriceInfo("selfhosted:team:monthly"),currency: currencySymbol,period: "/month",popular: false,@@ -177,10 +177,10 @@ const licenseService = {highlights: planHighlights.SERVER_MONTHLY,},{- id: "selfhosted:server:yearly",- lookupKey: "selfhosted:server:yearly",+ id: "selfhosted:team:yearly",+ lookupKey: "selfhosted:team:yearly",name: "Team - Yearly",- price: getPriceInfo("selfhosted:server:yearly"),+ price: getPriceInfo("selfhosted:team:yearly"),currency: currencySymbol,period: "/year",popular: true,@@ -189,9 +189,9 @@ const licenseService = {},{id: "selfhosted:enterprise:monthly",- lookupKey: "selfhosted:server:monthly",+ lookupKey: "selfhosted:team:monthly",name: "Enterprise - Monthly",- price: getPriceInfo("selfhosted:server:monthly"),+ price: getPriceInfo("selfhosted:team:monthly"),seatPrice: getPriceInfo("selfhosted:enterpriseseat:monthly"),currency: currencySymbol,period: "/month",@@ -202,9 +202,9 @@ const licenseService = {},{id: "selfhosted:enterprise:yearly",- lookupKey: "selfhosted:server:yearly",+ lookupKey: "selfhosted:team:yearly",name: "Enterprise - Yearly",- price: getPriceInfo("selfhosted:server:yearly"),+ price: getPriceInfo("selfhosted:team:yearly"),seatPrice: getPriceInfo("selfhosted:enterpriseseat:yearly"),currency: currencySymbol,period: "/year",@@ -271,10 +271,10 @@ const licenseService = {// Server tierconst serverMonthly = plans.find(- (p) => p.lookupKey === "selfhosted:server:monthly",+ (p) => p.lookupKey === "selfhosted:team:monthly",);const serverYearly = plans.find(- (p) => p.lookupKey === "selfhosted:server:yearly",+ (p) => p.lookupKey === "selfhosted:team:yearly",);if (serverMonthly || serverYearly) {groups.push({diff --git a/frontend/editor/src/proprietary/services/serverPlanCheckout.test.ts b/frontend/editor/src/proprietary/services/serverPlanCheckout.test.tsindex 1f53520db0..d9384dd14f 100644--- a/frontend/editor/src/proprietary/services/serverPlanCheckout.test.ts+++ b/frontend/editor/src/proprietary/services/serverPlanCheckout.test.ts@@ -23,7 +23,7 @@ import {} from "@app/services/serverPlanCheckout";const plan = {- lookupKey: "selfhosted:server:yearly",+ lookupKey: "selfhosted:team:yearly",serverQuantity: 2,installationId: "inst-1",uiMode: "embedded",@@ -87,7 +87,7 @@ describe("createServerPlanCheckoutSession", () => {expect(options.body).not.toHaveProperty("self_hosted");expect(options.body).not.toHaveProperty("email");expect(options.body).toMatchObject({- lookup_key: "selfhosted:server:yearly",+ lookup_key: "selfhosted:team:yearly",server_quantity: 2,installation_id: "inst-1",ui_mode: "embedded",diff --git a/frontend/editor/src/proprietary/services/serverPlanCheckout.ts b/frontend/editor/src/proprietary/services/serverPlanCheckout.tsindex ec3a488be5..623d5979b1 100644--- a/frontend/editor/src/proprietary/services/serverPlanCheckout.ts+++ b/frontend/editor/src/proprietary/services/serverPlanCheckout.ts@@ -9,7 +9,7 @@ import { getAccessToken } from "@app/auth/session";* context, so a plain-HTTP instance asks for `"hosted"` and supplies the two return URLs.*/export interface ServerPlanCheckoutRequest {- /** Stripe price lookup key for the chosen period, e.g. `selfhosted:server:yearly`. */+ /** Stripe price lookup key for the chosen period, e.g. `selfhosted:team:yearly`. */lookupKey: string;/** User blocks being bought. One block is the Team plan's user allowance. */serverQuantity: number;diff --git a/frontend/editor/src/proprietary/services/supabaseClient.test.ts b/frontend/editor/src/proprietary/services/supabaseClient.test.tsindex 6237501afb..70b0ca59e8 100644--- a/frontend/editor/src/proprietary/services/supabaseClient.test.ts+++ b/frontend/editor/src/proprietary/services/supabaseClient.test.ts@@ -138,7 +138,7 @@ it("uses only the validated owner session for Team checkout despite callback creconst { createServerPlanCheckoutSession } =await import("@app/services/serverPlanCheckout");await createServerPlanCheckoutSession({- lookupKey: "selfhosted:server:monthly",+ lookupKey: "selfhosted:team:monthly",serverQuantity: 1,uiMode: "hosted",});