|
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 | | - |
99 | 1 | export interface UserAgent { |
100 | 2 | readonly browser: string |
101 | 3 | readonly device: string |
102 | 4 | readonly ip_address: string |
103 | 5 | readonly os: string |
104 | 6 | } |
105 | 7 |
|
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 | | - |
119 | 8 | export interface ReconnectingPTYRequest { |
120 | 9 | readonly data?: string |
121 | 10 | readonly height?: number |
|
0 commit comments