* 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
12 lines
449 B
TypeScript
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>;
|
|
}
|