feat(core): add self host team plan (#9569)

This commit is contained in:
JimmFly
2025-02-07 03:35:24 +00:00
parent 5710e8c639
commit e68bdbde3e
37 changed files with 1702 additions and 72 deletions
@@ -196,7 +196,7 @@ class CreateCheckoutSessionInput implements z.infer<typeof CheckoutParams> {
idempotencyKey?: string;
@Field(() => GraphQLJSONObject, { nullable: true })
args!: { workspaceId?: string; quantity?: number };
args!: { workspaceId?: string; quantity?: number } | null;
}
@Resolver(() => SubscriptionType)
@@ -278,7 +278,7 @@ export class SubscriptionResolver {
if (input.plan === SubscriptionPlan.SelfHostedTeam) {
session = await this.service.checkout(input, {
plan: input.plan as any,
quantity: input.args.quantity ?? 10,
quantity: input.args?.quantity ?? 10,
});
} else {
if (!user) {