Archived
1
0
This repository has been archived on 2024-09-09. You can view files and clone it, but cannot push or open issues or pull requests.

56 lines
1.1 KiB
TypeScript
Raw Normal View History

2020-02-04 13:27:46 -06:00
export interface Application {
readonly categories?: string[]
2020-02-04 13:27:46 -06:00
readonly comment?: string
readonly directory?: string
readonly exec?: string
readonly genericName?: string
2020-02-04 13:27:46 -06:00
readonly icon?: string
readonly installed?: boolean
2020-02-04 13:27:46 -06:00
readonly name: string
readonly path?: string
2020-02-04 13:27:46 -06:00
readonly sessionId?: string
readonly version?: string
2020-02-04 13:27:46 -06:00
}
export interface ApplicationsResponse {
readonly applications: ReadonlyArray<Application>
}
export enum SessionError {
NotFound = 4000,
FailedToStart,
Starting,
InvalidState,
Unknown,
}
export interface SessionResponse {
2020-02-05 18:47:00 -06:00
/**
* Whether the session was created or an existing one was returned.
2020-02-05 18:47:00 -06:00
*/
created: boolean
2020-02-04 13:27:46 -06:00
sessionId: string
}
export interface RecentResponse {
readonly recent: ReadonlyArray<Application>
readonly running: ReadonlyArray<Application>
2020-02-04 13:27:46 -06:00
}
export interface HealthRequest {
readonly event: "health"
}
export type ClientMessage = HealthRequest
export interface HealthResponse {
readonly event: "health"
readonly connections: number
}
export type ServerMessage = HealthResponse
export interface ReadyMessage {
protocol: string
}