/** * Client for RecourseOS Billing API. * * Handles license validation, usage reporting, and budget sync. */ export interface LicenseInfo { valid: boolean; orgId?: string; orgName?: string; features?: string[]; error?: string; } export interface ManagedResource { resourceId: string; resourceType: string; action: 'create' | 'update' | 'delete'; estimatedMonthlyCost: number; agentId?: string; } export interface BudgetInfo { limit: number; period: 'day' | 'week' | 'month'; onExceed: 'block' | 'escalate' | 'warn'; currentSpend: number; periodStart: string; } export interface BillingClientConfig { apiUrl?: string; licenseKey?: string; } /** * Create a billing client instance. */ export declare function createBillingClient(config?: BillingClientConfig): { /** * Check if cost tracking is enabled (license key configured). */ isEnabled(): boolean; /** * Get the configured license key. */ getLicenseKey(): string | null; /** * Set the license key. */ setLicenseKey(key: string): void; /** * Clear the license key. */ clearLicenseKey(): void; /** * Validate the current license. */ validateLicense(): Promise; /** * Record a managed resource change. * Resources are queued and sent in batches. */ recordResource(resource: ManagedResource): void; /** * Flush queued resource changes to the API. */ flushResources(): Promise; /** * Get current usage for the billing period. */ getCurrentUsage(): Promise | null>; /** * Get budgets for all agents. */ getBudgets(): Promise | null>; /** * Set budget for an agent. */ setBudget(agentId: string, budget: Partial): Promise; }; /** * Get the default billing client instance. */ export declare function getBillingClient(): ReturnType; //# sourceMappingURL=billing-client.d.ts.map