Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 609e6a2

Browse files
committed
Delete handwritten types
Except for UserAgent which seems to be purely frontend and ReconnectingPTYRequest which is not in codersdk so I am just leaving it for now.
1 parent 60323d8 commit 609e6a2

File tree

1 file changed

+0
-111
lines changed

1 file changed

+0
-111
lines changed

site/src/api/types.ts

Lines changed: 0 additions & 111 deletions
Original file line numberDiff line numberDiff line change
@@ -1,121 +1,10 @@
1-
/**
2-
* `BuildInfoResponse` must be kept in sync with the go struct in buildinfo.go.
3-
*/
4-
export interface BuildInfoResponse {
5-
external_url: string
6-
version: string
7-
}
8-
9-
export interface LoginResponse {
10-
session_token: string
11-
}
12-
13-
export interface CreateUserRequest {
14-
username: string
15-
email: string
16-
password: string
17-
organization_id: string
18-
}
19-
20-
export interface UserResponse {
21-
readonly id: string
22-
readonly username: string
23-
readonly email: string
24-
readonly created_at: string
25-
readonly status: "active" | "suspended"
26-
readonly organization_ids: string[]
27-
readonly roles: { name: string; display_name: string }[]
28-
}
29-
30-
/**
31-
* `Organization` must be kept in sync with the go struct in organizations.go
32-
*/
33-
export interface Organization {
34-
id: string
35-
name: string
36-
created_at: string
37-
updated_at: string
38-
}
39-
40-
export interface Provisioner {
41-
id: string
42-
name: string
43-
}
44-
45-
// This must be kept in sync with the `Template` struct in the back-end
46-
export interface Template {
47-
id: string
48-
created_at: string
49-
updated_at: string
50-
organization_id: string
51-
name: string
52-
provisioner: string
53-
active_version_id: string
54-
}
55-
56-
export interface CreateTemplateRequest {
57-
name: string
58-
organizationId: string
59-
provisioner: string
60-
}
61-
62-
export interface CreateWorkspaceRequest {
63-
name: string
64-
template_id: string
65-
organization_id: string
66-
}
67-
68-
export interface WorkspaceBuild {
69-
id: string
70-
}
71-
72-
export interface Workspace {
73-
id: string
74-
created_at: string
75-
updated_at: string
76-
owner_id: string
77-
template_id: string
78-
name: string
79-
autostart_schedule: string
80-
autostop_schedule: string
81-
latest_build: WorkspaceBuild
82-
}
83-
84-
export interface WorkspaceResource {
85-
id: string
86-
agents?: WorkspaceAgent[]
87-
}
88-
89-
export interface WorkspaceAgent {
90-
id: string
91-
name: string
92-
operating_system: string
93-
}
94-
95-
export interface APIKeyResponse {
96-
key: string
97-
}
98-
991
export interface UserAgent {
1002
readonly browser: string
1013
readonly device: string
1024
readonly ip_address: string
1035
readonly os: string
1046
}
1057

106-
export interface WorkspaceAutostartRequest {
107-
schedule: string
108-
}
109-
110-
export interface WorkspaceAutostopRequest {
111-
schedule: string
112-
}
113-
114-
export interface UpdateProfileRequest {
115-
readonly username: string
116-
readonly email: string
117-
}
118-
1198
export interface ReconnectingPTYRequest {
1209
readonly data?: string
12110
readonly height?: number

0 commit comments

Comments
 (0)