import { DocumentNode, GraphQLSchema, type ExecutionArgs } from 'graphql'; import type { CollectUsageCallback, HivePluginOptions } from './types.js'; interface UsageCollector { collect(): CollectUsageCallback; collectSubscription(args: { args: ExecutionArgs; }): void; dispose(): Promise; } export declare function createUsage(pluginOptions: HivePluginOptions): UsageCollector; interface CacheResult { document: string; fields: string[]; } export declare function createCollector({ schema, max, ttl, processVariables, }: { schema: GraphQLSchema; max?: number; ttl?: number; processVariables?: boolean; }): (arg: DocumentNode, arg2: { [key: string]: unknown; } | null) => { key: string; value: CacheResult; cacheHit: boolean; }; export interface Report { size: number; map: OperationMap; operations?: RequestOperation[]; subscriptionOperations?: SubscriptionOperation[]; } interface RequestOperation { operationMapKey: string; timestamp: number; execution: { ok: boolean; duration: number; errorsTotal: number; }; metadata?: { client?: { name: string; version: string; }; }; } interface SubscriptionOperation { operationMapKey: string; timestamp: number; metadata?: { client?: { name: string; version: string; }; }; } interface OperationMapRecord { operation: string; operationName?: string | null; fields: string[]; } interface OperationMap { [key: string]: OperationMapRecord; } export {}; //# sourceMappingURL=usage.d.ts.map