2020-02-04 13:27:46 -06:00
|
|
|
export interface Application {
|
2020-02-13 16:38:05 -06:00
|
|
|
readonly categories?: string[]
|
2020-02-04 13:27:46 -06:00
|
|
|
readonly comment?: string
|
|
|
|
readonly directory?: string
|
|
|
|
readonly exec?: string
|
2020-02-13 16:38:05 -06:00
|
|
|
readonly genericName?: string
|
2020-02-04 13:27:46 -06:00
|
|
|
readonly icon?: string
|
2020-02-13 16:38:05 -06:00
|
|
|
readonly installed?: boolean
|
2020-02-04 13:27:46 -06:00
|
|
|
readonly name: string
|
2020-03-16 12:43:32 -05:00
|
|
|
/**
|
|
|
|
* Path if this is a browser app (like VS Code).
|
|
|
|
*/
|
2020-02-13 16:38:05 -06:00
|
|
|
readonly path?: string
|
2020-03-16 12:43:32 -05:00
|
|
|
/**
|
|
|
|
* PID if this is a process.
|
|
|
|
*/
|
|
|
|
readonly pid?: number
|
2020-02-13 16:38:05 -06:00
|
|
|
readonly version?: string
|
2020-02-04 13:27:46 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface ApplicationsResponse {
|
|
|
|
readonly applications: ReadonlyArray<Application>
|
|
|
|
}
|
|
|
|
|
|
|
|
export enum SessionError {
|
2020-03-16 12:43:32 -05:00
|
|
|
FailedToStart = 4000,
|
|
|
|
Starting = 4001,
|
|
|
|
InvalidState = 4002,
|
|
|
|
Unknown = 4003,
|
2020-02-04 13:27:46 -06:00
|
|
|
}
|
|
|
|
|
2020-02-13 16:38:05 -06:00
|
|
|
export interface SessionResponse {
|
2020-02-05 18:47:00 -06:00
|
|
|
/**
|
2020-03-16 12:43:32 -05:00
|
|
|
* Whether the process was spawned or an existing one was returned.
|
2020-02-05 18:47:00 -06:00
|
|
|
*/
|
2020-02-13 16:38:05 -06:00
|
|
|
created: boolean
|
2020-03-16 12:43:32 -05:00
|
|
|
pid: number
|
2020-02-04 13:27:46 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface RecentResponse {
|
2020-02-18 14:13:22 -06:00
|
|
|
readonly paths: string[]
|
2020-03-02 11:52:39 -06:00
|
|
|
readonly workspaces: string[]
|
2020-02-18 14:13:22 -06:00
|
|
|
}
|
|
|
|
|
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
|
|
|
|
}
|