import { CallSnapshot } from "./CallSnapshotSchema"; import { ConsumableJobType } from "./ConsumableJobMap"; export declare const protocolMeta: Readonly<{ name: "dashboard-client-protocol"; version: 1; dataStreams: { callSnapshotResourceId: string; clientSnapshotResourceId: string; reportsResourceId: string; }; }>; export type SummaryStats = { createdAt: number; exportedAt: number; callsPerClientLt2: string[]; callsPerClientLt5: string[]; callsPerClientLt20: string[]; callsPerClientLt200: string[]; callsPerClientLt1000: string[]; callsPerClientGt1000: string[]; callsDurationLt5Mins: string[]; callsDurationLt45Mins: string[]; callsDurationLt90Mins: string[]; callsDurationLt4Hours: string[]; callsDurationGt4Hours: string[]; callIds: string[]; callIdsWithIssues: string[]; clientIds: string[]; rttLt50: number; rttLt150: number; rttLt300: number; rttGt300: number; regionRtts: { [region: string]: { rttLt50: number; rttLt150: number; rttLt300: number; rttGt300: number; }; }; browsers: { [browser: string]: number; }; operationSystems: { [os: string]: number; }; issues: { [issue: string]: number; }; }; export type ObserverWorkerState = { peerId: string; version: string; env?: string; leader?: boolean; uptimeInSec: number; observedCalls: { callId: string; clientIds: string[]; }[]; jobRouter: { createdAt: number; maxParallelJobs: number; ongoingJobs: Record[]; consumers: Record[]; description?: string; }; streamRouter: { emitter: { numberOfSubscriptions: number; numberOfSentEventInvocations: number; numberOfReceivedEventInvocations: number; }; sinks: { sinkId: string; streamId: string; state: string; streamProviderPeerId?: string; }[]; streamProviders: { streamType: string; bytesHighWaterMark: number; bytesLowWaterMark: number; totalBytes: number; collectors: { createdAt: number; streamId: string; numberOfFilesUploaded: number; numberOfSinks: number; collectedBytes: number; }[]; sources: { createdAt: number; streamId: string; numberOfFilesDownloaded: number; numberOfSinks: number; activeClosingTimer: boolean; collectedBytes: number; }[]; }[]; }; stats: { consumedSamples: number; numberOfClientSamplesCollector: number; numberOfCallSnapshotsCollector: number; numberOfClientSnapshotsCollector: number; }; }; export type ObserverServerState = { peerId: string; version: string; env?: string; leader?: boolean; uptimeInSec: number; activeObservedClientIds: string[]; activeDashboardClientIds: string[]; stats: { dashboardClientConnections: number; observedClientConnections: number; producedSamples: number; }; }; export type DashboardClientConnectionContext = { role: 'admin' | 'customer'; serviceIds?: string[]; clientId: string; }; type UnionizeMethod = { [k in keyof T]: { method: k; parameters: T[k]; }; }[keyof T]; type UnionizeEvent = { [k in keyof T]: { type: k; payload: T[k]; }; }[keyof T]; export type FindCallsResponsePayload = { roomId: string; callId: string; started?: number; ended?: number; numberOfClients: number; numberOfIssues: number; }[]; export type OngoingCallsResponsePayload = CallSnapshot[]; export type GetSummaryResponsePayload = SummaryStats[]; export type GetWorkerStatesResponsePayload = ObserverWorkerState[]; export type GetServerStatesResponsePayload = ObserverServerState[]; export type GetTurnStatsResponsePayload = { [K in string]: { totalBytesSent: number; totalBytesReceived: number; totalPacketsSent: number; totalPacketsReceived: number; inboundBitrate: number; outboundBitrate: number; }; }; export type DashboardQueryOperations = { findCalls: { roomId?: string; callId?: string; clientId?: string; trackId?: string; userId?: string; transportId?: string; producerId?: string; consumerId?: string; }; ongoingCals: undefined; ongoingCalls: undefined; getTurnStats: { startDate: number; endDate?: number; }; getSummaryStats: { startDate: number; endDate?: number; }; getWorkerStates: undefined; getServerStates: undefined; }; export declare class DashboardQueryRequest { readonly requestId: string; readonly operation: UnionizeMethod; readonly type = "DashboardQueryRequest"; constructor(requestId: string, operation: UnionizeMethod); } export type DashboardDataStreamCreateOperationResponse = { dataStreamId: string; }; export type DashboardDataStreamFilterField = number | string | boolean | string[] | number[] | boolean[] | undefined; export type DashboardDataStreamOperations = { create: { dataStreamId?: string; resourceId: string; parameters?: Record; }; update: { dataStreamId: string; }; stream: { dataStreamId: string; }; }; export declare class DashboardDataStreamRequest { readonly requestId: string; readonly operation: UnionizeMethod; readonly type = "DashboardDataStreamRequest"; constructor(requestId: string, operation: UnionizeMethod); } export type DashboardDataStreamNotificationEvents = { data: unknown; streamerror: string; close: undefined; }; export declare class DashboardDataStreamNotification { readonly dataStreamId: string; readonly event: UnionizeEvent; readonly type = "DashboardDataStreamNotification"; requestId?: string; constructor(dataStreamId: string, event: UnionizeEvent); } export type DashboardConsumableJobStateResponse = { state: 'running'; progress?: unknown; } | { state: 'completed'; result?: unknown; message?: string; } | { state: 'failed'; error: string; }; export type DashboardListConsumableJobsResponsePayload = { pendingJobs: { jobId: string; jobType: ConsumableJobType; createdAt: number; parameters?: unknown; }[]; runningJobs: { jobId: string; jobType: ConsumableJobType; createdAt: number; startedAt: number; parameters?: unknown; progress?: unknown; }[]; failedJobs: { jobId: string; jobType: ConsumableJobType; timestamp: number; error: string; parameters?: unknown; }[]; completedJobs: { jobId: string; jobType: ConsumableJobType; createdAt: number; startedAt: number; completedAt: number; parameters?: unknown; result?: unknown; message?: string; }[]; }; export type DashboardConsumableJobsOperations = { listJobs: undefined; cleanFailedJobs: { all?: boolean; jobIds?: string[]; }; cleanCompletedJobs: { all?: boolean; jobIds?: string[]; }; startJob: { jobType: ConsumableJobType; parameters: unknown; }; cancelJob: { jobType: ConsumableJobType; jobId: string; }; }; export declare class DashboardConsumableJobRequest { readonly requestId: string; readonly operation: UnionizeMethod; readonly type = "DashboardConsumableJobRequest"; constructor(requestId: string, operation: UnionizeMethod); } export declare class DashboardResponse { readonly requestId: string; readonly payload?: unknown; readonly error?: string | undefined; readonly type = "DashboardResponse"; constructor(requestId: string, payload?: unknown, error?: string | undefined); } export type DashboardNotification = DashboardDataStreamNotification; export type DashboardRequest = DashboardDataStreamRequest | DashboardQueryRequest | DashboardConsumableJobRequest; export type DashboardMessage = DashboardRequest | DashboardResponse | DashboardNotification; export {}; //# sourceMappingURL=DashboardMessageProtocol.d.ts.map