chore: watch workspace endpoint (#4060)

This commit is contained in:
Garrett Delfosse
2022-09-16 18:54:23 +00:00
committed by GitHub
parent b340634aaa
commit 63fd4945a2
14 changed files with 691 additions and 348 deletions
+12 -1
View File
@@ -368,6 +368,13 @@ export interface Role {
readonly display_name: string
}
// From codersdk/sse.go
export interface ServerSentEvent {
readonly type: ServerSentEventType
// eslint-disable-next-line
readonly data: any
}
// From codersdk/templates.go
export interface Template {
readonly id: string
@@ -609,8 +616,9 @@ export interface WorkspaceBuild {
readonly initiator_id: string
readonly initiator_name: string
readonly job: ProvisionerJob
readonly deadline?: string
readonly reason: BuildReason
readonly resources: WorkspaceResource[]
readonly deadline?: string
}
// From codersdk/workspaces.go
@@ -704,6 +712,9 @@ export type ResourceType =
| "user"
| "workspace"
// From codersdk/sse.go
export type ServerSentEventType = "data" | "error" | "ping"
// From codersdk/users.go
export type UserStatus = "active" | "suspended"