import { AvoInspectorEnvValueType } from "./AvoInspectorEnv"; import { AvoNetworkCallsHandler } from "./AvoNetworkCallsHandler"; import { AvoDeduplicator } from "./AvoDeduplicator"; export declare class AvoInspector { environment: AvoInspectorEnvValueType; avoNetworkCallsHandler: AvoNetworkCallsHandler; avoDeduplicator: AvoDeduplicator; apiKey: string; version: string; private publicEncryptionKey?; private eventSpecFetcher; private eventSpecCache; private eventValidator; private generatedAnonymousId; private pendingCount; private keepAliveTimer; private trackPending; private static _shouldLog; static get shouldLog(): boolean; static set shouldLog(enable: boolean); constructor(options: { apiKey: string; env: AvoInspectorEnvValueType; version: string; appName?: string; publicEncryptionKey?: string; }); trackSchemaFromEvent(eventName: string, eventProperties: { [propName: string]: any; }, streamId?: string): Promise>; _avoFunctionTrackSchemaFromEvent(eventName: string, eventProperties: { [propName: string]: any; }, eventId: string, eventHash: string, streamId?: string): Promise>; /** * Try to fetch event spec and validate, then send a single event call. * If validation succeeds, sends a validated event (with results merged in). * If unavailable, sends a plain event. * * Uses trackPending() to keep the Node process alive until the work completes, * so short-lived processes (CLIs) don't exit before the send finishes — even * when the caller doesn't await the returned promise. */ private sendEventWithOptionalValidation; private doSendEventWithOptionalValidation; enableLogging(enable: boolean): void; extractSchema(eventProperties: { [propName: string]: any; }, shouldLogIfEnabled?: boolean): Array<{ propertyName: string; propertyType: string; children?: any; }>; /** * Fetch event spec and validate. Returns validation results + metadata if * validation succeeds, or null if unavailable (prod, no spec, fetch error). */ private fetchAndValidate; destroy(): void; }