mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
chore: watch workspace endpoint (#4060)
This commit is contained in:
@@ -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"
|
||||
|
||||
|
||||
@@ -211,6 +211,7 @@ export const MockWorkspaceBuild: TypesGen.WorkspaceBuild = {
|
||||
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
|
||||
deadline: "2022-05-17T23:39:00.00Z",
|
||||
reason: "initiator",
|
||||
resources: [],
|
||||
}
|
||||
|
||||
export const MockFailedWorkspaceBuild = (
|
||||
@@ -231,6 +232,7 @@ export const MockFailedWorkspaceBuild = (
|
||||
workspace_id: "759f1d46-3174-453d-aa60-980a9c1442f3",
|
||||
deadline: "2022-05-17T23:39:00.00Z",
|
||||
reason: "initiator",
|
||||
resources: [],
|
||||
})
|
||||
|
||||
export const MockWorkspaceBuildStop: TypesGen.WorkspaceBuild = {
|
||||
|
||||
Reference in New Issue
Block a user