export interface PlatformBillingStatus { balanceCents: number; justCreditedCents: number; monthSpendCents: number; monthTopupCents: number; limits: { monthlyCapUsd: number | null; }; /** Visible pricing terms: margin over provider cost + any discount. */ pricing?: { marginMultiplier: number; discountPct: number; atCost: boolean; }; /** Client-visible capability rate card (margin/discount applied). */ rates?: { thinking: { inPerMTokUsd: number; outPerMTokUsd: number; }; hearing: { perHourUsd: number; }; voice: { per1kCharsUsd: number; }; fast: { inPerMTokUsd: number; outPerMTokUsd: number; }; }; hasPaymentMethod: boolean; pendingTopups: Array<{ amountCents: number; createdAt: string; }>; recent: Array<{ kind: string; amountCents: number; status: string; note: string | null; createdAt: string; }>; /** * GENUINE Anthropic account spend from the Admin cost_report API (matches * the console bill) — null/unavailable until ANTHROPIC_ADMIN_KEY is * configured on the platform. */ anthropic?: { available: boolean; reason?: string; todayUsd?: number; last7dUsd?: number; monthToDateUsd?: number; asOf?: string; } | null; } export declare function resolvePlatformBillingAuth(): { baseUrl: string; apiKey: string; } | null; export declare function fetchBillingStatus(): Promise<{ ok: true; data: PlatformBillingStatus; } | { ok: false; error: string; }>; export declare function createTopupCheckout(amountUsd: number): Promise<{ ok: true; data: { url: string; sessionId: string; }; } | { ok: false; error: string; }>; export declare function createPortalSession(): Promise<{ ok: true; data: { url: string; }; } | { ok: false; error: string; }>; export declare function setMonthlyCap(monthlyCapUsd: number | null): Promise<{ ok: true; data: unknown; } | { ok: false; error: string; }>; export declare function formatCents(cents: number): string;