import { z } from 'zod'; import { type APIClient } from '@agentuity/api'; export declare const ServiceStatsError: { new (args?: ({ message: string; } & { message?: string; cause?: unknown; }) | undefined): import("@agentuity/adapter").RichError & { readonly _tag: "ServiceStatsError"; } & Readonly<{ message: string; }>; readonly defaultMessage?: string; }; export declare const KeyValueStatSchema: z.ZodObject<{ namespaceCount: z.ZodNumber; keyCount: z.ZodNumber; totalSizeBytes: z.ZodNumber; }, z.core.$strip>; export declare const VectorStatSchema: z.ZodObject<{ namespaceCount: z.ZodNumber; documentCount: z.ZodNumber; totalSizeBytes: z.ZodNumber; }, z.core.$strip>; export declare const QueueStatSchema: z.ZodObject<{ queueCount: z.ZodNumber; totalMessages: z.ZodNumber; totalDlq: z.ZodNumber; }, z.core.$strip>; export declare const StreamStatSchema: z.ZodObject<{ streamCount: z.ZodNumber; totalSizeBytes: z.ZodNumber; }, z.core.$strip>; export declare const SandboxStatSchema: z.ZodObject<{ totalActive: z.ZodNumber; running: z.ZodNumber; idle: z.ZodNumber; creating: z.ZodNumber; totalExecutions: z.ZodNumber; totalCpuTimeMs: z.ZodNumber; totalMemoryByteSec: z.ZodNumber; totalNetworkEgressBytes: z.ZodNumber; }, z.core.$strip>; export declare const EmailStatSchema: z.ZodObject<{ addressCount: z.ZodNumber; inboundCount: z.ZodNumber; outboundCount: z.ZodNumber; outboundSuccess: z.ZodNumber; outboundFailed: z.ZodNumber; }, z.core.$strip>; export declare const TaskStatSchema: z.ZodObject<{ total: z.ZodDefault; open: z.ZodDefault; inProgress: z.ZodDefault; done: z.ZodDefault; closed: z.ZodDefault; cancelled: z.ZodDefault; }, z.core.$strip>; export declare const ScheduleStatSchema: z.ZodObject<{ scheduleCount: z.ZodNumber; totalDeliveries: z.ZodNumber; successDeliveries: z.ZodNumber; failedDeliveries: z.ZodNumber; }, z.core.$strip>; export declare const DatabaseStatSchema: z.ZodObject<{ databaseCount: z.ZodNumber; totalTableCount: z.ZodNumber; totalRecordCount: z.ZodNumber; totalSizeBytes: z.ZodNumber; }, z.core.$strip>; export declare const ServiceStatsDataSchema: z.ZodObject<{ services: z.ZodObject<{ database: z.ZodOptional>; keyvalue: z.ZodOptional>; vector: z.ZodOptional>; queue: z.ZodOptional>; stream: z.ZodOptional>; sandbox: z.ZodOptional>; email: z.ZodOptional>; task: z.ZodOptional; open: z.ZodDefault; inProgress: z.ZodDefault; done: z.ZodDefault; closed: z.ZodDefault; cancelled: z.ZodDefault; }, z.core.$strip>>; schedule: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; export declare const ServiceStatsResponseSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{ success: z.ZodLiteral; message: z.ZodString; code: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ success: z.ZodLiteral; data: z.ZodObject<{ services: z.ZodObject<{ database: z.ZodOptional>; keyvalue: z.ZodOptional>; vector: z.ZodOptional>; queue: z.ZodOptional>; stream: z.ZodOptional>; sandbox: z.ZodOptional>; email: z.ZodOptional>; task: z.ZodOptional; open: z.ZodDefault; inProgress: z.ZodDefault; done: z.ZodDefault; closed: z.ZodDefault; cancelled: z.ZodDefault; }, z.core.$strip>>; schedule: z.ZodOptional>; }, z.core.$strip>; }, z.core.$strip>; }, z.core.$strip>], "success">; export type KeyValueStat = z.infer; export type VectorStat = z.infer; export type QueueStat = z.infer; export type StreamStat = z.infer; export type SandboxStat = z.infer; export type EmailStat = z.infer; export type TaskStat = z.infer; export type ScheduleStat = z.infer; export type DatabaseStat = z.infer; export type ServiceStatsData = z.infer; export type ServiceStatsResponse = z.infer; /** * Valid service names that can be used to filter stats. */ export declare const VALID_SERVICES: readonly ['database', 'keyvalue', 'email', 'vector', 'schedule', 'task', 'stream', 'sandbox', 'queue']; export type ServiceName = (typeof VALID_SERVICES)[number]; export declare const ServiceStatsOptionsSchema: z.ZodObject<{ service: z.ZodOptional>; start: z.ZodOptional; end: z.ZodOptional; orgIdHeader: z.ZodOptional; }, z.core.$strip>; export type ServiceStatsOptions = z.infer; /** * Get aggregated stats for services used by an organization. * * Returns per-service stats with service-specific fields (counts, sizes, etc.). * Services that error on the backend are omitted from the response. * Services with no provisioned tenant DB return zero values. * * @param client - The API client instance * @param orgId - The organization ID * @param options - Optional filtering (service, time range) * @returns Service stats data with per-service breakdown * @throws {ServiceStatsError} If the API request fails * * @example * ```typescript * // Get stats for all services * const stats = await getServiceStats(client, 'org_123'); * console.log(`KV keys: ${stats.services.keyvalue?.keyCount}`); * ``` * * @example * ```typescript * // Get stats for a specific service * const stats = await getServiceStats(client, 'org_123', { * service: 'keyvalue', * }); * ``` */ export declare function getServiceStats(client: APIClient, orgId: string, options?: ServiceStatsOptions): Promise; //# sourceMappingURL=stats.d.ts.map