feat(cloud): improved upgrade journey

This commit is contained in:
Henry
2026-05-18 23:20:11 +01:00
parent 6ea622e7f7
commit cf566e04c6
15 changed files with 262 additions and 200 deletions

View File

@@ -39,6 +39,7 @@ const workspaceSubscriptionSchema = z.object({
status: z.string(),
seats: z.number().nullable(),
unlimitedSeats: z.boolean().nullable(),
partnerTier: z.number().nullable(),
periodStart: z.date().nullable(),
periodEnd: z.date().nullable(),
});

View File

@@ -14,6 +14,7 @@ export const updateById = async (
periodStart?: Date | null;
periodEnd?: Date | null;
cancelAtPeriodEnd?: boolean | null;
stripeSubscriptionId?: string | null;
},
) => {
const [result] = await db

View File

@@ -239,6 +239,7 @@ export const getByPublicIdWithMembers = (
status: true,
seats: true,
unlimitedSeats: true,
partnerTier: true,
periodStart: true,
periodEnd: true,
},

View File

@@ -12,6 +12,7 @@ export interface Subscription {
status: string;
seats: number | null;
unlimitedSeats: boolean;
partnerTier: number | null;
periodStart: Date | null;
periodEnd: Date | null;
referenceId: string | null;