import type { HttpRequestOptions } from './util'; import type { DeviceConfig } from 'roku-deploy'; export declare class RokuECP { /** * Enables perfetto tracing for the specified channel */ enablePerfettoTracing(options: BaseOptions & { appId: string; }): Promise; /** * Trigger a heap snapshot capture. This doesn't return it, but instead will cause it to be written to the already-connected perfetto websocket. */ triggerHeapSnapshot(options: BaseOptions & { appId: string; }): Promise; getRegistry(options: BaseOptions & { appId: string; }): Promise; getAppState(options: BaseOptions & { appId: string; }): Promise; exitApp(options: BaseOptions & { appId: string; }): Promise; } export declare enum EcpStatus { ok = "ok", failed = "failed" } interface BaseOptions { remotePort?: number; requestOptions?: HttpRequestOptions; /** * The roku-deploy device config for the target device. When this is an RCE device config, * roku-deploy routes the request through the instance's ECP proxy instead of the local HTTP * ECP endpoint. */ device: DeviceConfig; } interface BaseEcpResponse { status: EcpStatus; errorMessage?: string; } export type RokuEcpParam = Parameters[0]; export interface EcpRegistryData extends BaseEcpResponse { devId?: string; plugins?: Array; sections?: Record>; spaceAvailable?: string; state?: string; } export declare enum AppState { active = "active", background = "background", inactive = "inactive", unknown = "unknown" } export interface EcpAppStateData { appId?: string; appTitle?: string; appVersion?: string; appDevId?: string; state?: AppState; status: EcpStatus; errorMessage?: string; } export interface EcpPerfettoEnableData extends BaseEcpResponse { enabledChannels: string[]; timestamp?: number; timestampEnd?: number; } export interface EcpExitAppData { status: EcpStatus; errorMessage?: string; } export interface EcpHeapSnapshotData extends BaseEcpResponse { timestamp?: number; timestampEnd?: number; } export declare const rokuECP: RokuECP; export {};