import type { Effect, Metadata, RealtimeEvent, UIEvent } from '@devvit/protos';
import type { WorkerErrorType } from '@devvit/runtime-lite/client/BrowserLiteClient.js';
import type { FaceplateEvent } from '@reddit/faceplate/event-types.js';
export type DevvitRealtimeSend = {
    event: RealtimeEvent;
};
export type DevvitRealtimeSendEvent = Omit<FaceplateEvent<'devvit-realtime-send'>, 'detail'> & {
    detail: DevvitRealtimeSend;
};
export type DevvitUIEffect = {
    effect: Effect;
    onEvent(event: UIEvent): void;
    metadata?: Metadata | undefined;
};
export type DevvitUIEffectEvent = Omit<FaceplateEvent<'devvit-ui-effect'>, 'detail'> & {
    detail: DevvitUIEffect;
};
export type DevvitUIError = {
    type: WorkerErrorType;
    err: unknown;
};
export declare const DevvitClientPerformanceEventName = "devvit-client-performance-report";
export type DevvitClientPerformanceEvent = {
    /**
     * Duration of the process in ms.
     */
    duration: number;
    /**
     * Name of the process that was measured.
     */
    name: 'time_to_first_frame' | 'init_runtime' | 'fetch_full_bundle' | 'load_full_bundle' | 'blocks_layout';
};
export declare const DevvitRuntimePerformanceEventName = "devvit-runtime-performance-report";
export type DevvitRuntimePerformanceEvent = {
    /**
     * Name of the process that was measured.
     * For now, it's only "runtime_trace".
     */
    name: string;
    /**
     * Duration of the process in ms.
     */
    duration: number;
    /** Specifies if runtime call was "local" or "remote". */
    target: string;
    /** Event count of a single request. */
    eventCount: number;
    /**
     * If target is remote, specify why we are targeting the remote runtime – i.e. `remote_only`, `circuit_break`, `app_error`, etc.
     *
     * Empty string for local runtime calls.
     * */
    intent?: string;
};
export declare const DevvitRuntimeErrorEventName = "devvit-runtime-error";
export type DevvitRuntimeErrorEvent = {
    /**  Exception message */
    message: string;
    /**  "local" or "remote" -- which runtime the error originates from */
    origin: string;
    /**  Version of the runtime, may be unavailable for remote runtimes */
    version: string;
};
//# sourceMappingURL=events.d.ts.map