import api from "@/lib/api-client.ts"; import { IBilling, IBillingPlan, IBillingPortal, ICheckoutLink, } from "@/ee/billing/types/billing.types.ts"; export async function getBilling(): Promise { const req = await api.post("/billing/info"); return req.data; } export async function getBillingPlans(): Promise { const req = await api.post("/billing/plans"); return req.data; } export async function getCheckoutLink(data: { priceId: string; }): Promise { const req = await api.post("/billing/checkout", data); return req.data; } export async function getBillingPortalLink(): Promise { const req = await api.post("/billing/portal"); return req.data; }