Files
calendar/packages/features/ee/billing/billing-service.ts
T
Joe Au-YeungandGitHub d6306dcd22 fix: Disable custom templates for trialing teams (#18748)
* Create `checkIfTeamHasActivePlan` method on `stripe-billing-service`

* Add `checkIfTeamPlanIsActive` to `InternalTeamBilling`

* Create `hasActiveTeamPlan` trpc endpoint

* Check for active team plan when updating workflows

* Create `useHasActiveTeamPlan` hook

* Use `useHasActiveTeamPlan` on workflow edit page

* Type fixes

* Type fix

* Add `accepted` to team query
2025-01-20 14:48:33 +00:00

12 lines
449 B
TypeScript

export interface BillingService {
checkoutSessionIsPaid(paymentId: string): Promise<boolean>;
handleSubscriptionCancel(subscriptionId: string): Promise<void>;
handleSubscriptionCreation(subscriptionId: string): Promise<void>;
handleSubscriptionUpdate(args: {
subscriptionId: string;
subscriptionItemId: string;
membershipCount: number;
}): Promise<void>;
checkIfTeamHasActivePlan(subscriptionId: string): Promise<boolean>;
}