import { apiPost } from "@/lib/api/client"; import type { BillingMe } from "@/lib/api/types"; import type { ActivePaidBillingPlanKey } from "@/lib/billing/activePlans"; export type CheckoutSession = { url: string; session_id: string; }; export type BillingPortalSession = { url: string; }; export function createCheckoutSession(plan: ActivePaidBillingPlanKey) { return apiPost( "/billing/create-checkout-session", { plan }, ); } export function startBillingTrial() { return apiPost>("/billing/start-trial", {}); } export function createBillingPortalSession() { return apiPost>( "/billing/create-portal-session", {}, ); }