@toshicloud/sdk 0.4.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +102 -19
- package/dist/client.d.ts +40 -4
- package/dist/client.js +35 -4
- package/dist/errors.d.ts +99 -0
- package/dist/errors.js +208 -0
- package/dist/gen/toshi/permission_pb.d.ts +244 -0
- package/dist/gen/toshi/permission_pb.js +94 -0
- package/dist/gen/toshi/workspace/v1/account_pb.d.ts +590 -0
- package/dist/gen/toshi/workspace/v1/account_pb.js +75 -0
- package/dist/gen/toshi/workspace/v1/artifacts_pb.d.ts +14 -8
- package/dist/gen/toshi/workspace/v1/artifacts_pb.js +10 -7
- package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +191 -6
- package/dist/gen/toshi/workspace/v1/audit_events_pb.js +12 -1
- package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +1194 -21
- package/dist/gen/toshi/workspace/v1/channels_pb.js +186 -39
- package/dist/gen/toshi/workspace/v1/connections_pb.d.ts +1481 -0
- package/dist/gen/toshi/workspace/v1/connections_pb.js +208 -0
- package/dist/gen/toshi/workspace/v1/discovery_pb.d.ts +924 -0
- package/dist/gen/toshi/workspace/v1/discovery_pb.js +231 -0
- package/dist/gen/toshi/workspace/v1/display_pb.d.ts +198 -15
- package/dist/gen/toshi/workspace/v1/display_pb.js +53 -2
- package/dist/gen/toshi/workspace/v1/domains_pb.d.ts +864 -0
- package/dist/gen/toshi/workspace/v1/domains_pb.js +152 -0
- package/dist/gen/toshi/workspace/v1/fillers_pb.d.ts +12 -4
- package/dist/gen/toshi/workspace/v1/fillers_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/grants_pb.d.ts +1297 -0
- package/dist/gen/toshi/workspace/v1/grants_pb.js +271 -0
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.d.ts +315 -15
- package/dist/gen/toshi/workspace/v1/hostjobs_pb.js +11 -5
- package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +196 -7
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +13 -7
- package/dist/gen/toshi/workspace/v1/images_pb.d.ts +1463 -0
- package/dist/gen/toshi/workspace/v1/images_pb.js +263 -0
- package/dist/gen/toshi/workspace/v1/products_pb.d.ts +506 -0
- package/dist/gen/toshi/workspace/v1/products_pb.js +60 -0
- package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1474 -99
- package/dist/gen/toshi/workspace/v1/projects_pb.js +151 -33
- package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +181 -14
- package/dist/gen/toshi/workspace/v1/recordings_pb.js +55 -14
- package/dist/gen/toshi/workspace/v1/roles_pb.d.ts +1994 -0
- package/dist/gen/toshi/workspace/v1/roles_pb.js +355 -0
- package/dist/gen/toshi/workspace/v1/secrets_pb.d.ts +314 -8
- package/dist/gen/toshi/workspace/v1/secrets_pb.js +43 -18
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +14 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +2 -1
- package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +434 -5
- package/dist/gen/toshi/workspace/v1/tokens_pb.js +66 -8
- package/dist/gen/toshi/workspace/v1/triggers_pb.d.ts +1099 -0
- package/dist/gen/toshi/workspace/v1/triggers_pb.js +185 -0
- package/dist/gen/toshi/workspace/v1/volumes_pb.d.ts +1052 -33
- package/dist/gen/toshi/workspace/v1/volumes_pb.js +170 -11
- package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +66 -8
- package/dist/gen/toshi/workspace/v1/webhook_pb.js +5 -4
- package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2043 -54
- package/dist/gen/toshi/workspace/v1/workloads_pb.js +205 -54
- package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6292 -939
- package/dist/gen/toshi/workspace/v1/workspace_pb.js +801 -88
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.d.ts +2176 -630
- package/dist/gen/toshi/workspace/v1/workspace_service_pb.js +192 -74
- package/dist/index.d.ts +10 -1
- package/dist/index.js +10 -1
- package/dist/interceptors.d.ts +11 -1
- package/dist/interceptors.js +38 -4
- package/dist/retry.d.ts +18 -0
- package/dist/retry.js +228 -22
- package/dist/test/procedures.js +100 -5
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/wait.d.ts +4 -0
- package/dist/wait.js +24 -1
- package/package.json +3 -2
|
@@ -0,0 +1,1994 @@
|
|
|
1
|
+
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
+
import type { Duration, DurationJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { Message } from "@bufbuild/protobuf";
|
|
4
|
+
/**
|
|
5
|
+
* Describes the file toshi/workspace/v1/roles.proto.
|
|
6
|
+
*/
|
|
7
|
+
export declare const file_toshi_workspace_v1_roles: GenFile;
|
|
8
|
+
/**
|
|
9
|
+
* Role is a named set of permissions.
|
|
10
|
+
*
|
|
11
|
+
* @generated from message toshi.workspace.v1.Role
|
|
12
|
+
*/
|
|
13
|
+
export type Role = Message<"toshi.workspace.v1.Role"> & {
|
|
14
|
+
/**
|
|
15
|
+
* Role id: "owner", "admin", "member", "agent" or "viewer" for a built-in role,
|
|
16
|
+
* such as "role-1a2b3c4d5e6f" for one of the workspace's.
|
|
17
|
+
*
|
|
18
|
+
* @generated from field: string id = 1;
|
|
19
|
+
*/
|
|
20
|
+
id: string;
|
|
21
|
+
/**
|
|
22
|
+
* @generated from field: string name = 2;
|
|
23
|
+
*/
|
|
24
|
+
name: string;
|
|
25
|
+
/**
|
|
26
|
+
* The permissions the role gives, sorted, as this API's methods or a
|
|
27
|
+
* product's calls name them.
|
|
28
|
+
*
|
|
29
|
+
* @generated from field: repeated string permissions = 3;
|
|
30
|
+
*/
|
|
31
|
+
permissions: string[];
|
|
32
|
+
/**
|
|
33
|
+
* Whether the role is built in, and cannot be changed.
|
|
34
|
+
*
|
|
35
|
+
* @generated from field: bool built_in = 4;
|
|
36
|
+
*/
|
|
37
|
+
builtIn: boolean;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Role is a named set of permissions.
|
|
41
|
+
*
|
|
42
|
+
* @generated from message toshi.workspace.v1.Role
|
|
43
|
+
*/
|
|
44
|
+
export type RoleJson = {
|
|
45
|
+
/**
|
|
46
|
+
* Role id: "owner", "admin", "member", "agent" or "viewer" for a built-in role,
|
|
47
|
+
* such as "role-1a2b3c4d5e6f" for one of the workspace's.
|
|
48
|
+
*
|
|
49
|
+
* @generated from field: string id = 1;
|
|
50
|
+
*/
|
|
51
|
+
id?: string;
|
|
52
|
+
/**
|
|
53
|
+
* @generated from field: string name = 2;
|
|
54
|
+
*/
|
|
55
|
+
name?: string;
|
|
56
|
+
/**
|
|
57
|
+
* The permissions the role gives, sorted, as this API's methods or a
|
|
58
|
+
* product's calls name them.
|
|
59
|
+
*
|
|
60
|
+
* @generated from field: repeated string permissions = 3;
|
|
61
|
+
*/
|
|
62
|
+
permissions?: string[];
|
|
63
|
+
/**
|
|
64
|
+
* Whether the role is built in, and cannot be changed.
|
|
65
|
+
*
|
|
66
|
+
* @generated from field: bool built_in = 4;
|
|
67
|
+
*/
|
|
68
|
+
builtIn?: boolean;
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Describes the message toshi.workspace.v1.Role.
|
|
72
|
+
* Use `create(RoleSchema)` to create a new message.
|
|
73
|
+
*/
|
|
74
|
+
export declare const RoleSchema: GenMessage<Role, {
|
|
75
|
+
jsonType: RoleJson;
|
|
76
|
+
}>;
|
|
77
|
+
/**
|
|
78
|
+
* Subject is who a grant is given to, or who made it.
|
|
79
|
+
*
|
|
80
|
+
* @generated from message toshi.workspace.v1.Subject
|
|
81
|
+
*/
|
|
82
|
+
export type Subject = Message<"toshi.workspace.v1.Subject"> & {
|
|
83
|
+
/**
|
|
84
|
+
* @generated from field: toshi.workspace.v1.SubjectKind kind = 1;
|
|
85
|
+
*/
|
|
86
|
+
kind: SubjectKind;
|
|
87
|
+
/**
|
|
88
|
+
* The Toshi user id of a person, such as "usr-0f1e2d3c4b5a69788796a5b4",
|
|
89
|
+
* which a change of login or identity provider keeps; it is opaque, and
|
|
90
|
+
* a person who signed in before user accounts came has their GitHub user
|
|
91
|
+
* id as theirs. The token id of a token, such as "tok-1a2b3c4d5e6f";
|
|
92
|
+
* empty for the system.
|
|
93
|
+
*
|
|
94
|
+
* @generated from field: string id = 2;
|
|
95
|
+
*/
|
|
96
|
+
id: string;
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Subject is who a grant is given to, or who made it.
|
|
100
|
+
*
|
|
101
|
+
* @generated from message toshi.workspace.v1.Subject
|
|
102
|
+
*/
|
|
103
|
+
export type SubjectJson = {
|
|
104
|
+
/**
|
|
105
|
+
* @generated from field: toshi.workspace.v1.SubjectKind kind = 1;
|
|
106
|
+
*/
|
|
107
|
+
kind?: SubjectKindJson;
|
|
108
|
+
/**
|
|
109
|
+
* The Toshi user id of a person, such as "usr-0f1e2d3c4b5a69788796a5b4",
|
|
110
|
+
* which a change of login or identity provider keeps; it is opaque, and
|
|
111
|
+
* a person who signed in before user accounts came has their GitHub user
|
|
112
|
+
* id as theirs. The token id of a token, such as "tok-1a2b3c4d5e6f";
|
|
113
|
+
* empty for the system.
|
|
114
|
+
*
|
|
115
|
+
* @generated from field: string id = 2;
|
|
116
|
+
*/
|
|
117
|
+
id?: string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* Describes the message toshi.workspace.v1.Subject.
|
|
121
|
+
* Use `create(SubjectSchema)` to create a new message.
|
|
122
|
+
*/
|
|
123
|
+
export declare const SubjectSchema: GenMessage<Subject, {
|
|
124
|
+
jsonType: SubjectJson;
|
|
125
|
+
}>;
|
|
126
|
+
/**
|
|
127
|
+
* RoleGrant gives a role to a subject on part of the workspace.
|
|
128
|
+
*
|
|
129
|
+
* @generated from message toshi.workspace.v1.RoleGrant
|
|
130
|
+
*/
|
|
131
|
+
export type RoleGrant = Message<"toshi.workspace.v1.RoleGrant"> & {
|
|
132
|
+
/**
|
|
133
|
+
* Grant id.
|
|
134
|
+
*
|
|
135
|
+
* @generated from field: string id = 1;
|
|
136
|
+
*/
|
|
137
|
+
id: string;
|
|
138
|
+
/**
|
|
139
|
+
* @generated from field: toshi.workspace.v1.Subject subject = 2;
|
|
140
|
+
*/
|
|
141
|
+
subject?: Subject | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* The role's id.
|
|
144
|
+
*
|
|
145
|
+
* @generated from field: string role = 3;
|
|
146
|
+
*/
|
|
147
|
+
role: string;
|
|
148
|
+
/**
|
|
149
|
+
* The project the grant applies to, by name. Empty for a grant on the
|
|
150
|
+
* whole workspace.
|
|
151
|
+
*
|
|
152
|
+
* @generated from field: string project = 4;
|
|
153
|
+
*/
|
|
154
|
+
project: string;
|
|
155
|
+
/**
|
|
156
|
+
* The environment of project the grant applies to, by name. Empty for a
|
|
157
|
+
* grant on every environment of project.
|
|
158
|
+
*
|
|
159
|
+
* @generated from field: string environment = 5;
|
|
160
|
+
*/
|
|
161
|
+
environment: string;
|
|
162
|
+
/**
|
|
163
|
+
* @generated from field: google.protobuf.Timestamp created_at = 6;
|
|
164
|
+
*/
|
|
165
|
+
createdAt?: Timestamp | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* @generated from field: toshi.workspace.v1.Subject created_by = 7;
|
|
168
|
+
*/
|
|
169
|
+
createdBy?: Subject | undefined;
|
|
170
|
+
};
|
|
171
|
+
/**
|
|
172
|
+
* RoleGrant gives a role to a subject on part of the workspace.
|
|
173
|
+
*
|
|
174
|
+
* @generated from message toshi.workspace.v1.RoleGrant
|
|
175
|
+
*/
|
|
176
|
+
export type RoleGrantJson = {
|
|
177
|
+
/**
|
|
178
|
+
* Grant id.
|
|
179
|
+
*
|
|
180
|
+
* @generated from field: string id = 1;
|
|
181
|
+
*/
|
|
182
|
+
id?: string;
|
|
183
|
+
/**
|
|
184
|
+
* @generated from field: toshi.workspace.v1.Subject subject = 2;
|
|
185
|
+
*/
|
|
186
|
+
subject?: SubjectJson;
|
|
187
|
+
/**
|
|
188
|
+
* The role's id.
|
|
189
|
+
*
|
|
190
|
+
* @generated from field: string role = 3;
|
|
191
|
+
*/
|
|
192
|
+
role?: string;
|
|
193
|
+
/**
|
|
194
|
+
* The project the grant applies to, by name. Empty for a grant on the
|
|
195
|
+
* whole workspace.
|
|
196
|
+
*
|
|
197
|
+
* @generated from field: string project = 4;
|
|
198
|
+
*/
|
|
199
|
+
project?: string;
|
|
200
|
+
/**
|
|
201
|
+
* The environment of project the grant applies to, by name. Empty for a
|
|
202
|
+
* grant on every environment of project.
|
|
203
|
+
*
|
|
204
|
+
* @generated from field: string environment = 5;
|
|
205
|
+
*/
|
|
206
|
+
environment?: string;
|
|
207
|
+
/**
|
|
208
|
+
* @generated from field: google.protobuf.Timestamp created_at = 6;
|
|
209
|
+
*/
|
|
210
|
+
createdAt?: TimestampJson;
|
|
211
|
+
/**
|
|
212
|
+
* @generated from field: toshi.workspace.v1.Subject created_by = 7;
|
|
213
|
+
*/
|
|
214
|
+
createdBy?: SubjectJson;
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Describes the message toshi.workspace.v1.RoleGrant.
|
|
218
|
+
* Use `create(RoleGrantSchema)` to create a new message.
|
|
219
|
+
*/
|
|
220
|
+
export declare const RoleGrantSchema: GenMessage<RoleGrant, {
|
|
221
|
+
jsonType: RoleGrantJson;
|
|
222
|
+
}>;
|
|
223
|
+
/**
|
|
224
|
+
* @generated from message toshi.workspace.v1.ListRolesRequest
|
|
225
|
+
*/
|
|
226
|
+
export type ListRolesRequest = Message<"toshi.workspace.v1.ListRolesRequest"> & {
|
|
227
|
+
/**
|
|
228
|
+
* The most roles in one page; zero lets the server choose.
|
|
229
|
+
*
|
|
230
|
+
* @generated from field: int32 page_size = 1;
|
|
231
|
+
*/
|
|
232
|
+
pageSize: number;
|
|
233
|
+
/**
|
|
234
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
235
|
+
*
|
|
236
|
+
* @generated from field: string page_token = 2;
|
|
237
|
+
*/
|
|
238
|
+
pageToken: string;
|
|
239
|
+
};
|
|
240
|
+
/**
|
|
241
|
+
* @generated from message toshi.workspace.v1.ListRolesRequest
|
|
242
|
+
*/
|
|
243
|
+
export type ListRolesRequestJson = {
|
|
244
|
+
/**
|
|
245
|
+
* The most roles in one page; zero lets the server choose.
|
|
246
|
+
*
|
|
247
|
+
* @generated from field: int32 page_size = 1;
|
|
248
|
+
*/
|
|
249
|
+
pageSize?: number;
|
|
250
|
+
/**
|
|
251
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
252
|
+
*
|
|
253
|
+
* @generated from field: string page_token = 2;
|
|
254
|
+
*/
|
|
255
|
+
pageToken?: string;
|
|
256
|
+
};
|
|
257
|
+
/**
|
|
258
|
+
* Describes the message toshi.workspace.v1.ListRolesRequest.
|
|
259
|
+
* Use `create(ListRolesRequestSchema)` to create a new message.
|
|
260
|
+
*/
|
|
261
|
+
export declare const ListRolesRequestSchema: GenMessage<ListRolesRequest, {
|
|
262
|
+
jsonType: ListRolesRequestJson;
|
|
263
|
+
}>;
|
|
264
|
+
/**
|
|
265
|
+
* @generated from message toshi.workspace.v1.ListRolesResponse
|
|
266
|
+
*/
|
|
267
|
+
export type ListRolesResponse = Message<"toshi.workspace.v1.ListRolesResponse"> & {
|
|
268
|
+
/**
|
|
269
|
+
* @generated from field: repeated toshi.workspace.v1.Role roles = 1;
|
|
270
|
+
*/
|
|
271
|
+
roles: Role[];
|
|
272
|
+
/**
|
|
273
|
+
* Empty on the last page.
|
|
274
|
+
*
|
|
275
|
+
* @generated from field: string next_page_token = 2;
|
|
276
|
+
*/
|
|
277
|
+
nextPageToken: string;
|
|
278
|
+
};
|
|
279
|
+
/**
|
|
280
|
+
* @generated from message toshi.workspace.v1.ListRolesResponse
|
|
281
|
+
*/
|
|
282
|
+
export type ListRolesResponseJson = {
|
|
283
|
+
/**
|
|
284
|
+
* @generated from field: repeated toshi.workspace.v1.Role roles = 1;
|
|
285
|
+
*/
|
|
286
|
+
roles?: RoleJson[];
|
|
287
|
+
/**
|
|
288
|
+
* Empty on the last page.
|
|
289
|
+
*
|
|
290
|
+
* @generated from field: string next_page_token = 2;
|
|
291
|
+
*/
|
|
292
|
+
nextPageToken?: string;
|
|
293
|
+
};
|
|
294
|
+
/**
|
|
295
|
+
* Describes the message toshi.workspace.v1.ListRolesResponse.
|
|
296
|
+
* Use `create(ListRolesResponseSchema)` to create a new message.
|
|
297
|
+
*/
|
|
298
|
+
export declare const ListRolesResponseSchema: GenMessage<ListRolesResponse, {
|
|
299
|
+
jsonType: ListRolesResponseJson;
|
|
300
|
+
}>;
|
|
301
|
+
/**
|
|
302
|
+
* CreateRoleRequest names the role and what it gives.
|
|
303
|
+
*
|
|
304
|
+
* @generated from message toshi.workspace.v1.CreateRoleRequest
|
|
305
|
+
*/
|
|
306
|
+
export type CreateRoleRequest = Message<"toshi.workspace.v1.CreateRoleRequest"> & {
|
|
307
|
+
/**
|
|
308
|
+
* @generated from field: string name = 1;
|
|
309
|
+
*/
|
|
310
|
+
name: string;
|
|
311
|
+
/**
|
|
312
|
+
* At least one permission, as this API's methods or a product's calls
|
|
313
|
+
* name it.
|
|
314
|
+
*
|
|
315
|
+
* @generated from field: repeated string permissions = 2;
|
|
316
|
+
*/
|
|
317
|
+
permissions: string[];
|
|
318
|
+
/**
|
|
319
|
+
* @generated from field: string request_key = 3;
|
|
320
|
+
*/
|
|
321
|
+
requestKey: string;
|
|
322
|
+
};
|
|
323
|
+
/**
|
|
324
|
+
* CreateRoleRequest names the role and what it gives.
|
|
325
|
+
*
|
|
326
|
+
* @generated from message toshi.workspace.v1.CreateRoleRequest
|
|
327
|
+
*/
|
|
328
|
+
export type CreateRoleRequestJson = {
|
|
329
|
+
/**
|
|
330
|
+
* @generated from field: string name = 1;
|
|
331
|
+
*/
|
|
332
|
+
name?: string;
|
|
333
|
+
/**
|
|
334
|
+
* At least one permission, as this API's methods or a product's calls
|
|
335
|
+
* name it.
|
|
336
|
+
*
|
|
337
|
+
* @generated from field: repeated string permissions = 2;
|
|
338
|
+
*/
|
|
339
|
+
permissions?: string[];
|
|
340
|
+
/**
|
|
341
|
+
* @generated from field: string request_key = 3;
|
|
342
|
+
*/
|
|
343
|
+
requestKey?: string;
|
|
344
|
+
};
|
|
345
|
+
/**
|
|
346
|
+
* Describes the message toshi.workspace.v1.CreateRoleRequest.
|
|
347
|
+
* Use `create(CreateRoleRequestSchema)` to create a new message.
|
|
348
|
+
*/
|
|
349
|
+
export declare const CreateRoleRequestSchema: GenMessage<CreateRoleRequest, {
|
|
350
|
+
jsonType: CreateRoleRequestJson;
|
|
351
|
+
}>;
|
|
352
|
+
/**
|
|
353
|
+
* @generated from message toshi.workspace.v1.CreateRoleResponse
|
|
354
|
+
*/
|
|
355
|
+
export type CreateRoleResponse = Message<"toshi.workspace.v1.CreateRoleResponse"> & {
|
|
356
|
+
/**
|
|
357
|
+
* @generated from field: toshi.workspace.v1.Role role = 1;
|
|
358
|
+
*/
|
|
359
|
+
role?: Role | undefined;
|
|
360
|
+
};
|
|
361
|
+
/**
|
|
362
|
+
* @generated from message toshi.workspace.v1.CreateRoleResponse
|
|
363
|
+
*/
|
|
364
|
+
export type CreateRoleResponseJson = {
|
|
365
|
+
/**
|
|
366
|
+
* @generated from field: toshi.workspace.v1.Role role = 1;
|
|
367
|
+
*/
|
|
368
|
+
role?: RoleJson;
|
|
369
|
+
};
|
|
370
|
+
/**
|
|
371
|
+
* Describes the message toshi.workspace.v1.CreateRoleResponse.
|
|
372
|
+
* Use `create(CreateRoleResponseSchema)` to create a new message.
|
|
373
|
+
*/
|
|
374
|
+
export declare const CreateRoleResponseSchema: GenMessage<CreateRoleResponse, {
|
|
375
|
+
jsonType: CreateRoleResponseJson;
|
|
376
|
+
}>;
|
|
377
|
+
/**
|
|
378
|
+
* UpdateRoleRequest names the role and its new name and permissions.
|
|
379
|
+
*
|
|
380
|
+
* @generated from message toshi.workspace.v1.UpdateRoleRequest
|
|
381
|
+
*/
|
|
382
|
+
export type UpdateRoleRequest = Message<"toshi.workspace.v1.UpdateRoleRequest"> & {
|
|
383
|
+
/**
|
|
384
|
+
* @generated from field: string id = 1;
|
|
385
|
+
*/
|
|
386
|
+
id: string;
|
|
387
|
+
/**
|
|
388
|
+
* @generated from field: string name = 2;
|
|
389
|
+
*/
|
|
390
|
+
name: string;
|
|
391
|
+
/**
|
|
392
|
+
* At least one permission; they replace the role's.
|
|
393
|
+
*
|
|
394
|
+
* @generated from field: repeated string permissions = 3;
|
|
395
|
+
*/
|
|
396
|
+
permissions: string[];
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* UpdateRoleRequest names the role and its new name and permissions.
|
|
400
|
+
*
|
|
401
|
+
* @generated from message toshi.workspace.v1.UpdateRoleRequest
|
|
402
|
+
*/
|
|
403
|
+
export type UpdateRoleRequestJson = {
|
|
404
|
+
/**
|
|
405
|
+
* @generated from field: string id = 1;
|
|
406
|
+
*/
|
|
407
|
+
id?: string;
|
|
408
|
+
/**
|
|
409
|
+
* @generated from field: string name = 2;
|
|
410
|
+
*/
|
|
411
|
+
name?: string;
|
|
412
|
+
/**
|
|
413
|
+
* At least one permission; they replace the role's.
|
|
414
|
+
*
|
|
415
|
+
* @generated from field: repeated string permissions = 3;
|
|
416
|
+
*/
|
|
417
|
+
permissions?: string[];
|
|
418
|
+
};
|
|
419
|
+
/**
|
|
420
|
+
* Describes the message toshi.workspace.v1.UpdateRoleRequest.
|
|
421
|
+
* Use `create(UpdateRoleRequestSchema)` to create a new message.
|
|
422
|
+
*/
|
|
423
|
+
export declare const UpdateRoleRequestSchema: GenMessage<UpdateRoleRequest, {
|
|
424
|
+
jsonType: UpdateRoleRequestJson;
|
|
425
|
+
}>;
|
|
426
|
+
/**
|
|
427
|
+
* @generated from message toshi.workspace.v1.UpdateRoleResponse
|
|
428
|
+
*/
|
|
429
|
+
export type UpdateRoleResponse = Message<"toshi.workspace.v1.UpdateRoleResponse"> & {
|
|
430
|
+
/**
|
|
431
|
+
* @generated from field: toshi.workspace.v1.Role role = 1;
|
|
432
|
+
*/
|
|
433
|
+
role?: Role | undefined;
|
|
434
|
+
};
|
|
435
|
+
/**
|
|
436
|
+
* @generated from message toshi.workspace.v1.UpdateRoleResponse
|
|
437
|
+
*/
|
|
438
|
+
export type UpdateRoleResponseJson = {
|
|
439
|
+
/**
|
|
440
|
+
* @generated from field: toshi.workspace.v1.Role role = 1;
|
|
441
|
+
*/
|
|
442
|
+
role?: RoleJson;
|
|
443
|
+
};
|
|
444
|
+
/**
|
|
445
|
+
* Describes the message toshi.workspace.v1.UpdateRoleResponse.
|
|
446
|
+
* Use `create(UpdateRoleResponseSchema)` to create a new message.
|
|
447
|
+
*/
|
|
448
|
+
export declare const UpdateRoleResponseSchema: GenMessage<UpdateRoleResponse, {
|
|
449
|
+
jsonType: UpdateRoleResponseJson;
|
|
450
|
+
}>;
|
|
451
|
+
/**
|
|
452
|
+
* @generated from message toshi.workspace.v1.DeleteRoleRequest
|
|
453
|
+
*/
|
|
454
|
+
export type DeleteRoleRequest = Message<"toshi.workspace.v1.DeleteRoleRequest"> & {
|
|
455
|
+
/**
|
|
456
|
+
* @generated from field: string id = 1;
|
|
457
|
+
*/
|
|
458
|
+
id: string;
|
|
459
|
+
};
|
|
460
|
+
/**
|
|
461
|
+
* @generated from message toshi.workspace.v1.DeleteRoleRequest
|
|
462
|
+
*/
|
|
463
|
+
export type DeleteRoleRequestJson = {
|
|
464
|
+
/**
|
|
465
|
+
* @generated from field: string id = 1;
|
|
466
|
+
*/
|
|
467
|
+
id?: string;
|
|
468
|
+
};
|
|
469
|
+
/**
|
|
470
|
+
* Describes the message toshi.workspace.v1.DeleteRoleRequest.
|
|
471
|
+
* Use `create(DeleteRoleRequestSchema)` to create a new message.
|
|
472
|
+
*/
|
|
473
|
+
export declare const DeleteRoleRequestSchema: GenMessage<DeleteRoleRequest, {
|
|
474
|
+
jsonType: DeleteRoleRequestJson;
|
|
475
|
+
}>;
|
|
476
|
+
/**
|
|
477
|
+
* DeleteRoleResponse carries the deleted role.
|
|
478
|
+
*
|
|
479
|
+
* @generated from message toshi.workspace.v1.DeleteRoleResponse
|
|
480
|
+
*/
|
|
481
|
+
export type DeleteRoleResponse = Message<"toshi.workspace.v1.DeleteRoleResponse"> & {
|
|
482
|
+
/**
|
|
483
|
+
* @generated from field: toshi.workspace.v1.Role role = 1;
|
|
484
|
+
*/
|
|
485
|
+
role?: Role | undefined;
|
|
486
|
+
/**
|
|
487
|
+
* How many grants of the role were deleted with it.
|
|
488
|
+
*
|
|
489
|
+
* @generated from field: int32 grants_deleted = 2;
|
|
490
|
+
*/
|
|
491
|
+
grantsDeleted: number;
|
|
492
|
+
};
|
|
493
|
+
/**
|
|
494
|
+
* DeleteRoleResponse carries the deleted role.
|
|
495
|
+
*
|
|
496
|
+
* @generated from message toshi.workspace.v1.DeleteRoleResponse
|
|
497
|
+
*/
|
|
498
|
+
export type DeleteRoleResponseJson = {
|
|
499
|
+
/**
|
|
500
|
+
* @generated from field: toshi.workspace.v1.Role role = 1;
|
|
501
|
+
*/
|
|
502
|
+
role?: RoleJson;
|
|
503
|
+
/**
|
|
504
|
+
* How many grants of the role were deleted with it.
|
|
505
|
+
*
|
|
506
|
+
* @generated from field: int32 grants_deleted = 2;
|
|
507
|
+
*/
|
|
508
|
+
grantsDeleted?: number;
|
|
509
|
+
};
|
|
510
|
+
/**
|
|
511
|
+
* Describes the message toshi.workspace.v1.DeleteRoleResponse.
|
|
512
|
+
* Use `create(DeleteRoleResponseSchema)` to create a new message.
|
|
513
|
+
*/
|
|
514
|
+
export declare const DeleteRoleResponseSchema: GenMessage<DeleteRoleResponse, {
|
|
515
|
+
jsonType: DeleteRoleResponseJson;
|
|
516
|
+
}>;
|
|
517
|
+
/**
|
|
518
|
+
* ListRoleGrantsRequest optionally narrows the list.
|
|
519
|
+
*
|
|
520
|
+
* @generated from message toshi.workspace.v1.ListRoleGrantsRequest
|
|
521
|
+
*/
|
|
522
|
+
export type ListRoleGrantsRequest = Message<"toshi.workspace.v1.ListRoleGrantsRequest"> & {
|
|
523
|
+
/**
|
|
524
|
+
* Only this subject's grants, when set.
|
|
525
|
+
*
|
|
526
|
+
* @generated from field: toshi.workspace.v1.Subject subject = 1;
|
|
527
|
+
*/
|
|
528
|
+
subject?: Subject | undefined;
|
|
529
|
+
/**
|
|
530
|
+
* Only the grants on this project, by name, when set: on the project as
|
|
531
|
+
* a whole, and on each of its environments unless environment is set.
|
|
532
|
+
*
|
|
533
|
+
* @generated from field: string project = 2;
|
|
534
|
+
*/
|
|
535
|
+
project: string;
|
|
536
|
+
/**
|
|
537
|
+
* Only the grants on this environment of project, by name, when set.
|
|
538
|
+
* Needs project.
|
|
539
|
+
*
|
|
540
|
+
* @generated from field: string environment = 3;
|
|
541
|
+
*/
|
|
542
|
+
environment: string;
|
|
543
|
+
/**
|
|
544
|
+
* The most grants in one page; zero lets the server choose.
|
|
545
|
+
*
|
|
546
|
+
* @generated from field: int32 page_size = 4;
|
|
547
|
+
*/
|
|
548
|
+
pageSize: number;
|
|
549
|
+
/**
|
|
550
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
551
|
+
*
|
|
552
|
+
* @generated from field: string page_token = 5;
|
|
553
|
+
*/
|
|
554
|
+
pageToken: string;
|
|
555
|
+
};
|
|
556
|
+
/**
|
|
557
|
+
* ListRoleGrantsRequest optionally narrows the list.
|
|
558
|
+
*
|
|
559
|
+
* @generated from message toshi.workspace.v1.ListRoleGrantsRequest
|
|
560
|
+
*/
|
|
561
|
+
export type ListRoleGrantsRequestJson = {
|
|
562
|
+
/**
|
|
563
|
+
* Only this subject's grants, when set.
|
|
564
|
+
*
|
|
565
|
+
* @generated from field: toshi.workspace.v1.Subject subject = 1;
|
|
566
|
+
*/
|
|
567
|
+
subject?: SubjectJson;
|
|
568
|
+
/**
|
|
569
|
+
* Only the grants on this project, by name, when set: on the project as
|
|
570
|
+
* a whole, and on each of its environments unless environment is set.
|
|
571
|
+
*
|
|
572
|
+
* @generated from field: string project = 2;
|
|
573
|
+
*/
|
|
574
|
+
project?: string;
|
|
575
|
+
/**
|
|
576
|
+
* Only the grants on this environment of project, by name, when set.
|
|
577
|
+
* Needs project.
|
|
578
|
+
*
|
|
579
|
+
* @generated from field: string environment = 3;
|
|
580
|
+
*/
|
|
581
|
+
environment?: string;
|
|
582
|
+
/**
|
|
583
|
+
* The most grants in one page; zero lets the server choose.
|
|
584
|
+
*
|
|
585
|
+
* @generated from field: int32 page_size = 4;
|
|
586
|
+
*/
|
|
587
|
+
pageSize?: number;
|
|
588
|
+
/**
|
|
589
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
590
|
+
*
|
|
591
|
+
* @generated from field: string page_token = 5;
|
|
592
|
+
*/
|
|
593
|
+
pageToken?: string;
|
|
594
|
+
};
|
|
595
|
+
/**
|
|
596
|
+
* Describes the message toshi.workspace.v1.ListRoleGrantsRequest.
|
|
597
|
+
* Use `create(ListRoleGrantsRequestSchema)` to create a new message.
|
|
598
|
+
*/
|
|
599
|
+
export declare const ListRoleGrantsRequestSchema: GenMessage<ListRoleGrantsRequest, {
|
|
600
|
+
jsonType: ListRoleGrantsRequestJson;
|
|
601
|
+
}>;
|
|
602
|
+
/**
|
|
603
|
+
* @generated from message toshi.workspace.v1.ListRoleGrantsResponse
|
|
604
|
+
*/
|
|
605
|
+
export type ListRoleGrantsResponse = Message<"toshi.workspace.v1.ListRoleGrantsResponse"> & {
|
|
606
|
+
/**
|
|
607
|
+
* @generated from field: repeated toshi.workspace.v1.RoleGrant grants = 1;
|
|
608
|
+
*/
|
|
609
|
+
grants: RoleGrant[];
|
|
610
|
+
/**
|
|
611
|
+
* Empty on the last page.
|
|
612
|
+
*
|
|
613
|
+
* @generated from field: string next_page_token = 2;
|
|
614
|
+
*/
|
|
615
|
+
nextPageToken: string;
|
|
616
|
+
};
|
|
617
|
+
/**
|
|
618
|
+
* @generated from message toshi.workspace.v1.ListRoleGrantsResponse
|
|
619
|
+
*/
|
|
620
|
+
export type ListRoleGrantsResponseJson = {
|
|
621
|
+
/**
|
|
622
|
+
* @generated from field: repeated toshi.workspace.v1.RoleGrant grants = 1;
|
|
623
|
+
*/
|
|
624
|
+
grants?: RoleGrantJson[];
|
|
625
|
+
/**
|
|
626
|
+
* Empty on the last page.
|
|
627
|
+
*
|
|
628
|
+
* @generated from field: string next_page_token = 2;
|
|
629
|
+
*/
|
|
630
|
+
nextPageToken?: string;
|
|
631
|
+
};
|
|
632
|
+
/**
|
|
633
|
+
* Describes the message toshi.workspace.v1.ListRoleGrantsResponse.
|
|
634
|
+
* Use `create(ListRoleGrantsResponseSchema)` to create a new message.
|
|
635
|
+
*/
|
|
636
|
+
export declare const ListRoleGrantsResponseSchema: GenMessage<ListRoleGrantsResponse, {
|
|
637
|
+
jsonType: ListRoleGrantsResponseJson;
|
|
638
|
+
}>;
|
|
639
|
+
/**
|
|
640
|
+
* GrantRoleRequest names the subject, the role and where it applies.
|
|
641
|
+
*
|
|
642
|
+
* @generated from message toshi.workspace.v1.GrantRoleRequest
|
|
643
|
+
*/
|
|
644
|
+
export type GrantRoleRequest = Message<"toshi.workspace.v1.GrantRoleRequest"> & {
|
|
645
|
+
/**
|
|
646
|
+
* A person or a token.
|
|
647
|
+
*
|
|
648
|
+
* @generated from field: toshi.workspace.v1.Subject subject = 1;
|
|
649
|
+
*/
|
|
650
|
+
subject?: Subject | undefined;
|
|
651
|
+
/**
|
|
652
|
+
* The role's id.
|
|
653
|
+
*
|
|
654
|
+
* @generated from field: string role = 2;
|
|
655
|
+
*/
|
|
656
|
+
role: string;
|
|
657
|
+
/**
|
|
658
|
+
* Limits the grant to this project of the workspace, by name. Empty
|
|
659
|
+
* gives the role on the whole workspace.
|
|
660
|
+
*
|
|
661
|
+
* @generated from field: string project = 3;
|
|
662
|
+
*/
|
|
663
|
+
project: string;
|
|
664
|
+
/**
|
|
665
|
+
* Limits the grant further to this environment of project, by name.
|
|
666
|
+
* Needs project.
|
|
667
|
+
*
|
|
668
|
+
* @generated from field: string environment = 4;
|
|
669
|
+
*/
|
|
670
|
+
environment: string;
|
|
671
|
+
};
|
|
672
|
+
/**
|
|
673
|
+
* GrantRoleRequest names the subject, the role and where it applies.
|
|
674
|
+
*
|
|
675
|
+
* @generated from message toshi.workspace.v1.GrantRoleRequest
|
|
676
|
+
*/
|
|
677
|
+
export type GrantRoleRequestJson = {
|
|
678
|
+
/**
|
|
679
|
+
* A person or a token.
|
|
680
|
+
*
|
|
681
|
+
* @generated from field: toshi.workspace.v1.Subject subject = 1;
|
|
682
|
+
*/
|
|
683
|
+
subject?: SubjectJson;
|
|
684
|
+
/**
|
|
685
|
+
* The role's id.
|
|
686
|
+
*
|
|
687
|
+
* @generated from field: string role = 2;
|
|
688
|
+
*/
|
|
689
|
+
role?: string;
|
|
690
|
+
/**
|
|
691
|
+
* Limits the grant to this project of the workspace, by name. Empty
|
|
692
|
+
* gives the role on the whole workspace.
|
|
693
|
+
*
|
|
694
|
+
* @generated from field: string project = 3;
|
|
695
|
+
*/
|
|
696
|
+
project?: string;
|
|
697
|
+
/**
|
|
698
|
+
* Limits the grant further to this environment of project, by name.
|
|
699
|
+
* Needs project.
|
|
700
|
+
*
|
|
701
|
+
* @generated from field: string environment = 4;
|
|
702
|
+
*/
|
|
703
|
+
environment?: string;
|
|
704
|
+
};
|
|
705
|
+
/**
|
|
706
|
+
* Describes the message toshi.workspace.v1.GrantRoleRequest.
|
|
707
|
+
* Use `create(GrantRoleRequestSchema)` to create a new message.
|
|
708
|
+
*/
|
|
709
|
+
export declare const GrantRoleRequestSchema: GenMessage<GrantRoleRequest, {
|
|
710
|
+
jsonType: GrantRoleRequestJson;
|
|
711
|
+
}>;
|
|
712
|
+
/**
|
|
713
|
+
* @generated from message toshi.workspace.v1.GrantRoleResponse
|
|
714
|
+
*/
|
|
715
|
+
export type GrantRoleResponse = Message<"toshi.workspace.v1.GrantRoleResponse"> & {
|
|
716
|
+
/**
|
|
717
|
+
* @generated from field: toshi.workspace.v1.RoleGrant grant = 1;
|
|
718
|
+
*/
|
|
719
|
+
grant?: RoleGrant | undefined;
|
|
720
|
+
};
|
|
721
|
+
/**
|
|
722
|
+
* @generated from message toshi.workspace.v1.GrantRoleResponse
|
|
723
|
+
*/
|
|
724
|
+
export type GrantRoleResponseJson = {
|
|
725
|
+
/**
|
|
726
|
+
* @generated from field: toshi.workspace.v1.RoleGrant grant = 1;
|
|
727
|
+
*/
|
|
728
|
+
grant?: RoleGrantJson;
|
|
729
|
+
};
|
|
730
|
+
/**
|
|
731
|
+
* Describes the message toshi.workspace.v1.GrantRoleResponse.
|
|
732
|
+
* Use `create(GrantRoleResponseSchema)` to create a new message.
|
|
733
|
+
*/
|
|
734
|
+
export declare const GrantRoleResponseSchema: GenMessage<GrantRoleResponse, {
|
|
735
|
+
jsonType: GrantRoleResponseJson;
|
|
736
|
+
}>;
|
|
737
|
+
/**
|
|
738
|
+
* @generated from message toshi.workspace.v1.RevokeRoleRequest
|
|
739
|
+
*/
|
|
740
|
+
export type RevokeRoleRequest = Message<"toshi.workspace.v1.RevokeRoleRequest"> & {
|
|
741
|
+
/**
|
|
742
|
+
* The grant's id.
|
|
743
|
+
*
|
|
744
|
+
* @generated from field: string id = 1;
|
|
745
|
+
*/
|
|
746
|
+
id: string;
|
|
747
|
+
};
|
|
748
|
+
/**
|
|
749
|
+
* @generated from message toshi.workspace.v1.RevokeRoleRequest
|
|
750
|
+
*/
|
|
751
|
+
export type RevokeRoleRequestJson = {
|
|
752
|
+
/**
|
|
753
|
+
* The grant's id.
|
|
754
|
+
*
|
|
755
|
+
* @generated from field: string id = 1;
|
|
756
|
+
*/
|
|
757
|
+
id?: string;
|
|
758
|
+
};
|
|
759
|
+
/**
|
|
760
|
+
* Describes the message toshi.workspace.v1.RevokeRoleRequest.
|
|
761
|
+
* Use `create(RevokeRoleRequestSchema)` to create a new message.
|
|
762
|
+
*/
|
|
763
|
+
export declare const RevokeRoleRequestSchema: GenMessage<RevokeRoleRequest, {
|
|
764
|
+
jsonType: RevokeRoleRequestJson;
|
|
765
|
+
}>;
|
|
766
|
+
/**
|
|
767
|
+
* RevokeRoleResponse carries the deleted grant.
|
|
768
|
+
*
|
|
769
|
+
* @generated from message toshi.workspace.v1.RevokeRoleResponse
|
|
770
|
+
*/
|
|
771
|
+
export type RevokeRoleResponse = Message<"toshi.workspace.v1.RevokeRoleResponse"> & {
|
|
772
|
+
/**
|
|
773
|
+
* @generated from field: toshi.workspace.v1.RoleGrant grant = 1;
|
|
774
|
+
*/
|
|
775
|
+
grant?: RoleGrant | undefined;
|
|
776
|
+
};
|
|
777
|
+
/**
|
|
778
|
+
* RevokeRoleResponse carries the deleted grant.
|
|
779
|
+
*
|
|
780
|
+
* @generated from message toshi.workspace.v1.RevokeRoleResponse
|
|
781
|
+
*/
|
|
782
|
+
export type RevokeRoleResponseJson = {
|
|
783
|
+
/**
|
|
784
|
+
* @generated from field: toshi.workspace.v1.RoleGrant grant = 1;
|
|
785
|
+
*/
|
|
786
|
+
grant?: RoleGrantJson;
|
|
787
|
+
};
|
|
788
|
+
/**
|
|
789
|
+
* Describes the message toshi.workspace.v1.RevokeRoleResponse.
|
|
790
|
+
* Use `create(RevokeRoleResponseSchema)` to create a new message.
|
|
791
|
+
*/
|
|
792
|
+
export declare const RevokeRoleResponseSchema: GenMessage<RevokeRoleResponse, {
|
|
793
|
+
jsonType: RevokeRoleResponseJson;
|
|
794
|
+
}>;
|
|
795
|
+
/**
|
|
796
|
+
* @generated from message toshi.workspace.v1.ListMembersRequest
|
|
797
|
+
*/
|
|
798
|
+
export type ListMembersRequest = Message<"toshi.workspace.v1.ListMembersRequest"> & {
|
|
799
|
+
/**
|
|
800
|
+
* The most members in one page; zero lets the server choose.
|
|
801
|
+
*
|
|
802
|
+
* @generated from field: int32 page_size = 1;
|
|
803
|
+
*/
|
|
804
|
+
pageSize: number;
|
|
805
|
+
/**
|
|
806
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
807
|
+
*
|
|
808
|
+
* @generated from field: string page_token = 2;
|
|
809
|
+
*/
|
|
810
|
+
pageToken: string;
|
|
811
|
+
/**
|
|
812
|
+
* MEMBER_STATE_PENDING lists the people waiting for approval; unset or
|
|
813
|
+
* MEMBER_STATE_ACTIVE lists the members.
|
|
814
|
+
*
|
|
815
|
+
* @generated from field: toshi.workspace.v1.MemberState state = 3;
|
|
816
|
+
*/
|
|
817
|
+
state: MemberState;
|
|
818
|
+
};
|
|
819
|
+
/**
|
|
820
|
+
* @generated from message toshi.workspace.v1.ListMembersRequest
|
|
821
|
+
*/
|
|
822
|
+
export type ListMembersRequestJson = {
|
|
823
|
+
/**
|
|
824
|
+
* The most members in one page; zero lets the server choose.
|
|
825
|
+
*
|
|
826
|
+
* @generated from field: int32 page_size = 1;
|
|
827
|
+
*/
|
|
828
|
+
pageSize?: number;
|
|
829
|
+
/**
|
|
830
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
831
|
+
*
|
|
832
|
+
* @generated from field: string page_token = 2;
|
|
833
|
+
*/
|
|
834
|
+
pageToken?: string;
|
|
835
|
+
/**
|
|
836
|
+
* MEMBER_STATE_PENDING lists the people waiting for approval; unset or
|
|
837
|
+
* MEMBER_STATE_ACTIVE lists the members.
|
|
838
|
+
*
|
|
839
|
+
* @generated from field: toshi.workspace.v1.MemberState state = 3;
|
|
840
|
+
*/
|
|
841
|
+
state?: MemberStateJson;
|
|
842
|
+
};
|
|
843
|
+
/**
|
|
844
|
+
* Describes the message toshi.workspace.v1.ListMembersRequest.
|
|
845
|
+
* Use `create(ListMembersRequestSchema)` to create a new message.
|
|
846
|
+
*/
|
|
847
|
+
export declare const ListMembersRequestSchema: GenMessage<ListMembersRequest, {
|
|
848
|
+
jsonType: ListMembersRequestJson;
|
|
849
|
+
}>;
|
|
850
|
+
/**
|
|
851
|
+
* @generated from message toshi.workspace.v1.ListMembersResponse
|
|
852
|
+
*/
|
|
853
|
+
export type ListMembersResponse = Message<"toshi.workspace.v1.ListMembersResponse"> & {
|
|
854
|
+
/**
|
|
855
|
+
* @generated from field: repeated toshi.workspace.v1.Member members = 1;
|
|
856
|
+
*/
|
|
857
|
+
members: Member[];
|
|
858
|
+
/**
|
|
859
|
+
* Empty on the last page.
|
|
860
|
+
*
|
|
861
|
+
* @generated from field: string next_page_token = 2;
|
|
862
|
+
*/
|
|
863
|
+
nextPageToken: string;
|
|
864
|
+
};
|
|
865
|
+
/**
|
|
866
|
+
* @generated from message toshi.workspace.v1.ListMembersResponse
|
|
867
|
+
*/
|
|
868
|
+
export type ListMembersResponseJson = {
|
|
869
|
+
/**
|
|
870
|
+
* @generated from field: repeated toshi.workspace.v1.Member members = 1;
|
|
871
|
+
*/
|
|
872
|
+
members?: MemberJson[];
|
|
873
|
+
/**
|
|
874
|
+
* Empty on the last page.
|
|
875
|
+
*
|
|
876
|
+
* @generated from field: string next_page_token = 2;
|
|
877
|
+
*/
|
|
878
|
+
nextPageToken?: string;
|
|
879
|
+
};
|
|
880
|
+
/**
|
|
881
|
+
* Describes the message toshi.workspace.v1.ListMembersResponse.
|
|
882
|
+
* Use `create(ListMembersResponseSchema)` to create a new message.
|
|
883
|
+
*/
|
|
884
|
+
export declare const ListMembersResponseSchema: GenMessage<ListMembersResponse, {
|
|
885
|
+
jsonType: ListMembersResponseJson;
|
|
886
|
+
}>;
|
|
887
|
+
/**
|
|
888
|
+
* Member is a person a session opens the workspace for.
|
|
889
|
+
*
|
|
890
|
+
* @generated from message toshi.workspace.v1.Member
|
|
891
|
+
*/
|
|
892
|
+
export type Member = Message<"toshi.workspace.v1.Member"> & {
|
|
893
|
+
/**
|
|
894
|
+
* The person's user id, as grants name them.
|
|
895
|
+
*
|
|
896
|
+
* @generated from field: string user_id = 1;
|
|
897
|
+
*/
|
|
898
|
+
userId: string;
|
|
899
|
+
/**
|
|
900
|
+
* The name and email address the person's latest sign-in reported;
|
|
901
|
+
* shown, never matched.
|
|
902
|
+
*
|
|
903
|
+
* @generated from field: string name = 2;
|
|
904
|
+
*/
|
|
905
|
+
name: string;
|
|
906
|
+
/**
|
|
907
|
+
* @generated from field: string email = 3;
|
|
908
|
+
*/
|
|
909
|
+
email: string;
|
|
910
|
+
/**
|
|
911
|
+
* @generated from field: toshi.workspace.v1.MemberVia via = 4;
|
|
912
|
+
*/
|
|
913
|
+
via: MemberVia;
|
|
914
|
+
/**
|
|
915
|
+
* @generated from field: google.protobuf.Timestamp added_at = 5;
|
|
916
|
+
*/
|
|
917
|
+
addedAt?: Timestamp | undefined;
|
|
918
|
+
/**
|
|
919
|
+
* Who made the person a member: the inviter for an invitation, the
|
|
920
|
+
* system for a sign-in, the approver for an approved request.
|
|
921
|
+
*
|
|
922
|
+
* @generated from field: toshi.workspace.v1.Subject added_by = 6;
|
|
923
|
+
*/
|
|
924
|
+
addedBy?: Subject | undefined;
|
|
925
|
+
/**
|
|
926
|
+
* @generated from field: toshi.workspace.v1.MemberState state = 7;
|
|
927
|
+
*/
|
|
928
|
+
state: MemberState;
|
|
929
|
+
/**
|
|
930
|
+
* When a person waiting for approval asked to join; unset for a member.
|
|
931
|
+
*
|
|
932
|
+
* @generated from field: google.protobuf.Timestamp requested_at = 8;
|
|
933
|
+
*/
|
|
934
|
+
requestedAt?: Timestamp | undefined;
|
|
935
|
+
/**
|
|
936
|
+
* The login the person signed in with last, as that sign-in recorded it:
|
|
937
|
+
* the name their audit events carry as the actor. Empty for a person who
|
|
938
|
+
* has not signed in.
|
|
939
|
+
*
|
|
940
|
+
* @generated from field: string login = 9;
|
|
941
|
+
*/
|
|
942
|
+
login: string;
|
|
943
|
+
};
|
|
944
|
+
/**
|
|
945
|
+
* Member is a person a session opens the workspace for.
|
|
946
|
+
*
|
|
947
|
+
* @generated from message toshi.workspace.v1.Member
|
|
948
|
+
*/
|
|
949
|
+
export type MemberJson = {
|
|
950
|
+
/**
|
|
951
|
+
* The person's user id, as grants name them.
|
|
952
|
+
*
|
|
953
|
+
* @generated from field: string user_id = 1;
|
|
954
|
+
*/
|
|
955
|
+
userId?: string;
|
|
956
|
+
/**
|
|
957
|
+
* The name and email address the person's latest sign-in reported;
|
|
958
|
+
* shown, never matched.
|
|
959
|
+
*
|
|
960
|
+
* @generated from field: string name = 2;
|
|
961
|
+
*/
|
|
962
|
+
name?: string;
|
|
963
|
+
/**
|
|
964
|
+
* @generated from field: string email = 3;
|
|
965
|
+
*/
|
|
966
|
+
email?: string;
|
|
967
|
+
/**
|
|
968
|
+
* @generated from field: toshi.workspace.v1.MemberVia via = 4;
|
|
969
|
+
*/
|
|
970
|
+
via?: MemberViaJson;
|
|
971
|
+
/**
|
|
972
|
+
* @generated from field: google.protobuf.Timestamp added_at = 5;
|
|
973
|
+
*/
|
|
974
|
+
addedAt?: TimestampJson;
|
|
975
|
+
/**
|
|
976
|
+
* Who made the person a member: the inviter for an invitation, the
|
|
977
|
+
* system for a sign-in, the approver for an approved request.
|
|
978
|
+
*
|
|
979
|
+
* @generated from field: toshi.workspace.v1.Subject added_by = 6;
|
|
980
|
+
*/
|
|
981
|
+
addedBy?: SubjectJson;
|
|
982
|
+
/**
|
|
983
|
+
* @generated from field: toshi.workspace.v1.MemberState state = 7;
|
|
984
|
+
*/
|
|
985
|
+
state?: MemberStateJson;
|
|
986
|
+
/**
|
|
987
|
+
* When a person waiting for approval asked to join; unset for a member.
|
|
988
|
+
*
|
|
989
|
+
* @generated from field: google.protobuf.Timestamp requested_at = 8;
|
|
990
|
+
*/
|
|
991
|
+
requestedAt?: TimestampJson;
|
|
992
|
+
/**
|
|
993
|
+
* The login the person signed in with last, as that sign-in recorded it:
|
|
994
|
+
* the name their audit events carry as the actor. Empty for a person who
|
|
995
|
+
* has not signed in.
|
|
996
|
+
*
|
|
997
|
+
* @generated from field: string login = 9;
|
|
998
|
+
*/
|
|
999
|
+
login?: string;
|
|
1000
|
+
};
|
|
1001
|
+
/**
|
|
1002
|
+
* Describes the message toshi.workspace.v1.Member.
|
|
1003
|
+
* Use `create(MemberSchema)` to create a new message.
|
|
1004
|
+
*/
|
|
1005
|
+
export declare const MemberSchema: GenMessage<Member, {
|
|
1006
|
+
jsonType: MemberJson;
|
|
1007
|
+
}>;
|
|
1008
|
+
/**
|
|
1009
|
+
* @generated from message toshi.workspace.v1.RemoveMemberRequest
|
|
1010
|
+
*/
|
|
1011
|
+
export type RemoveMemberRequest = Message<"toshi.workspace.v1.RemoveMemberRequest"> & {
|
|
1012
|
+
/**
|
|
1013
|
+
* The person's user id.
|
|
1014
|
+
*
|
|
1015
|
+
* @generated from field: string user_id = 1;
|
|
1016
|
+
*/
|
|
1017
|
+
userId: string;
|
|
1018
|
+
};
|
|
1019
|
+
/**
|
|
1020
|
+
* @generated from message toshi.workspace.v1.RemoveMemberRequest
|
|
1021
|
+
*/
|
|
1022
|
+
export type RemoveMemberRequestJson = {
|
|
1023
|
+
/**
|
|
1024
|
+
* The person's user id.
|
|
1025
|
+
*
|
|
1026
|
+
* @generated from field: string user_id = 1;
|
|
1027
|
+
*/
|
|
1028
|
+
userId?: string;
|
|
1029
|
+
};
|
|
1030
|
+
/**
|
|
1031
|
+
* Describes the message toshi.workspace.v1.RemoveMemberRequest.
|
|
1032
|
+
* Use `create(RemoveMemberRequestSchema)` to create a new message.
|
|
1033
|
+
*/
|
|
1034
|
+
export declare const RemoveMemberRequestSchema: GenMessage<RemoveMemberRequest, {
|
|
1035
|
+
jsonType: RemoveMemberRequestJson;
|
|
1036
|
+
}>;
|
|
1037
|
+
/**
|
|
1038
|
+
* @generated from message toshi.workspace.v1.ApproveMemberRequest
|
|
1039
|
+
*/
|
|
1040
|
+
export type ApproveMemberRequest = Message<"toshi.workspace.v1.ApproveMemberRequest"> & {
|
|
1041
|
+
/**
|
|
1042
|
+
* The person's user id.
|
|
1043
|
+
*
|
|
1044
|
+
* @generated from field: string user_id = 1;
|
|
1045
|
+
*/
|
|
1046
|
+
userId: string;
|
|
1047
|
+
};
|
|
1048
|
+
/**
|
|
1049
|
+
* @generated from message toshi.workspace.v1.ApproveMemberRequest
|
|
1050
|
+
*/
|
|
1051
|
+
export type ApproveMemberRequestJson = {
|
|
1052
|
+
/**
|
|
1053
|
+
* The person's user id.
|
|
1054
|
+
*
|
|
1055
|
+
* @generated from field: string user_id = 1;
|
|
1056
|
+
*/
|
|
1057
|
+
userId?: string;
|
|
1058
|
+
};
|
|
1059
|
+
/**
|
|
1060
|
+
* Describes the message toshi.workspace.v1.ApproveMemberRequest.
|
|
1061
|
+
* Use `create(ApproveMemberRequestSchema)` to create a new message.
|
|
1062
|
+
*/
|
|
1063
|
+
export declare const ApproveMemberRequestSchema: GenMessage<ApproveMemberRequest, {
|
|
1064
|
+
jsonType: ApproveMemberRequestJson;
|
|
1065
|
+
}>;
|
|
1066
|
+
/**
|
|
1067
|
+
* ApproveMemberResponse carries the new member and whether they became an
|
|
1068
|
+
* owner.
|
|
1069
|
+
*
|
|
1070
|
+
* @generated from message toshi.workspace.v1.ApproveMemberResponse
|
|
1071
|
+
*/
|
|
1072
|
+
export type ApproveMemberResponse = Message<"toshi.workspace.v1.ApproveMemberResponse"> & {
|
|
1073
|
+
/**
|
|
1074
|
+
* @generated from field: toshi.workspace.v1.Member member = 1;
|
|
1075
|
+
*/
|
|
1076
|
+
member?: Member | undefined;
|
|
1077
|
+
/**
|
|
1078
|
+
* @generated from field: bool owner = 2;
|
|
1079
|
+
*/
|
|
1080
|
+
owner: boolean;
|
|
1081
|
+
};
|
|
1082
|
+
/**
|
|
1083
|
+
* ApproveMemberResponse carries the new member and whether they became an
|
|
1084
|
+
* owner.
|
|
1085
|
+
*
|
|
1086
|
+
* @generated from message toshi.workspace.v1.ApproveMemberResponse
|
|
1087
|
+
*/
|
|
1088
|
+
export type ApproveMemberResponseJson = {
|
|
1089
|
+
/**
|
|
1090
|
+
* @generated from field: toshi.workspace.v1.Member member = 1;
|
|
1091
|
+
*/
|
|
1092
|
+
member?: MemberJson;
|
|
1093
|
+
/**
|
|
1094
|
+
* @generated from field: bool owner = 2;
|
|
1095
|
+
*/
|
|
1096
|
+
owner?: boolean;
|
|
1097
|
+
};
|
|
1098
|
+
/**
|
|
1099
|
+
* Describes the message toshi.workspace.v1.ApproveMemberResponse.
|
|
1100
|
+
* Use `create(ApproveMemberResponseSchema)` to create a new message.
|
|
1101
|
+
*/
|
|
1102
|
+
export declare const ApproveMemberResponseSchema: GenMessage<ApproveMemberResponse, {
|
|
1103
|
+
jsonType: ApproveMemberResponseJson;
|
|
1104
|
+
}>;
|
|
1105
|
+
/**
|
|
1106
|
+
* @generated from message toshi.workspace.v1.DeclineMemberRequest
|
|
1107
|
+
*/
|
|
1108
|
+
export type DeclineMemberRequest = Message<"toshi.workspace.v1.DeclineMemberRequest"> & {
|
|
1109
|
+
/**
|
|
1110
|
+
* The person's user id.
|
|
1111
|
+
*
|
|
1112
|
+
* @generated from field: string user_id = 1;
|
|
1113
|
+
*/
|
|
1114
|
+
userId: string;
|
|
1115
|
+
};
|
|
1116
|
+
/**
|
|
1117
|
+
* @generated from message toshi.workspace.v1.DeclineMemberRequest
|
|
1118
|
+
*/
|
|
1119
|
+
export type DeclineMemberRequestJson = {
|
|
1120
|
+
/**
|
|
1121
|
+
* The person's user id.
|
|
1122
|
+
*
|
|
1123
|
+
* @generated from field: string user_id = 1;
|
|
1124
|
+
*/
|
|
1125
|
+
userId?: string;
|
|
1126
|
+
};
|
|
1127
|
+
/**
|
|
1128
|
+
* Describes the message toshi.workspace.v1.DeclineMemberRequest.
|
|
1129
|
+
* Use `create(DeclineMemberRequestSchema)` to create a new message.
|
|
1130
|
+
*/
|
|
1131
|
+
export declare const DeclineMemberRequestSchema: GenMessage<DeclineMemberRequest, {
|
|
1132
|
+
jsonType: DeclineMemberRequestJson;
|
|
1133
|
+
}>;
|
|
1134
|
+
/**
|
|
1135
|
+
* @generated from message toshi.workspace.v1.DeclineMemberResponse
|
|
1136
|
+
*/
|
|
1137
|
+
export type DeclineMemberResponse = Message<"toshi.workspace.v1.DeclineMemberResponse"> & {};
|
|
1138
|
+
/**
|
|
1139
|
+
* @generated from message toshi.workspace.v1.DeclineMemberResponse
|
|
1140
|
+
*/
|
|
1141
|
+
export type DeclineMemberResponseJson = {};
|
|
1142
|
+
/**
|
|
1143
|
+
* Describes the message toshi.workspace.v1.DeclineMemberResponse.
|
|
1144
|
+
* Use `create(DeclineMemberResponseSchema)` to create a new message.
|
|
1145
|
+
*/
|
|
1146
|
+
export declare const DeclineMemberResponseSchema: GenMessage<DeclineMemberResponse, {
|
|
1147
|
+
jsonType: DeclineMemberResponseJson;
|
|
1148
|
+
}>;
|
|
1149
|
+
/**
|
|
1150
|
+
* RemoveMemberResponse says how many grants went with the membership.
|
|
1151
|
+
*
|
|
1152
|
+
* @generated from message toshi.workspace.v1.RemoveMemberResponse
|
|
1153
|
+
*/
|
|
1154
|
+
export type RemoveMemberResponse = Message<"toshi.workspace.v1.RemoveMemberResponse"> & {
|
|
1155
|
+
/**
|
|
1156
|
+
* @generated from field: int32 grants_removed = 1;
|
|
1157
|
+
*/
|
|
1158
|
+
grantsRemoved: number;
|
|
1159
|
+
};
|
|
1160
|
+
/**
|
|
1161
|
+
* RemoveMemberResponse says how many grants went with the membership.
|
|
1162
|
+
*
|
|
1163
|
+
* @generated from message toshi.workspace.v1.RemoveMemberResponse
|
|
1164
|
+
*/
|
|
1165
|
+
export type RemoveMemberResponseJson = {
|
|
1166
|
+
/**
|
|
1167
|
+
* @generated from field: int32 grants_removed = 1;
|
|
1168
|
+
*/
|
|
1169
|
+
grantsRemoved?: number;
|
|
1170
|
+
};
|
|
1171
|
+
/**
|
|
1172
|
+
* Describes the message toshi.workspace.v1.RemoveMemberResponse.
|
|
1173
|
+
* Use `create(RemoveMemberResponseSchema)` to create a new message.
|
|
1174
|
+
*/
|
|
1175
|
+
export declare const RemoveMemberResponseSchema: GenMessage<RemoveMemberResponse, {
|
|
1176
|
+
jsonType: RemoveMemberResponseJson;
|
|
1177
|
+
}>;
|
|
1178
|
+
/**
|
|
1179
|
+
* @generated from message toshi.workspace.v1.CreateInvitationRequest
|
|
1180
|
+
*/
|
|
1181
|
+
export type CreateInvitationRequest = Message<"toshi.workspace.v1.CreateInvitationRequest"> & {
|
|
1182
|
+
/**
|
|
1183
|
+
* Free text, such as whom the invitation is for; 200 characters at most.
|
|
1184
|
+
*
|
|
1185
|
+
* @generated from field: string note = 1;
|
|
1186
|
+
*/
|
|
1187
|
+
note: string;
|
|
1188
|
+
/**
|
|
1189
|
+
* How long the code is valid: seven days when unset, 30 days at most.
|
|
1190
|
+
*
|
|
1191
|
+
* @generated from field: google.protobuf.Duration ttl = 2;
|
|
1192
|
+
*/
|
|
1193
|
+
ttl?: Duration | undefined;
|
|
1194
|
+
};
|
|
1195
|
+
/**
|
|
1196
|
+
* @generated from message toshi.workspace.v1.CreateInvitationRequest
|
|
1197
|
+
*/
|
|
1198
|
+
export type CreateInvitationRequestJson = {
|
|
1199
|
+
/**
|
|
1200
|
+
* Free text, such as whom the invitation is for; 200 characters at most.
|
|
1201
|
+
*
|
|
1202
|
+
* @generated from field: string note = 1;
|
|
1203
|
+
*/
|
|
1204
|
+
note?: string;
|
|
1205
|
+
/**
|
|
1206
|
+
* How long the code is valid: seven days when unset, 30 days at most.
|
|
1207
|
+
*
|
|
1208
|
+
* @generated from field: google.protobuf.Duration ttl = 2;
|
|
1209
|
+
*/
|
|
1210
|
+
ttl?: DurationJson;
|
|
1211
|
+
};
|
|
1212
|
+
/**
|
|
1213
|
+
* Describes the message toshi.workspace.v1.CreateInvitationRequest.
|
|
1214
|
+
* Use `create(CreateInvitationRequestSchema)` to create a new message.
|
|
1215
|
+
*/
|
|
1216
|
+
export declare const CreateInvitationRequestSchema: GenMessage<CreateInvitationRequest, {
|
|
1217
|
+
jsonType: CreateInvitationRequestJson;
|
|
1218
|
+
}>;
|
|
1219
|
+
/**
|
|
1220
|
+
* CreateInvitationResponse carries the invitation and its code, shown
|
|
1221
|
+
* once.
|
|
1222
|
+
*
|
|
1223
|
+
* @generated from message toshi.workspace.v1.CreateInvitationResponse
|
|
1224
|
+
*/
|
|
1225
|
+
export type CreateInvitationResponse = Message<"toshi.workspace.v1.CreateInvitationResponse"> & {
|
|
1226
|
+
/**
|
|
1227
|
+
* @generated from field: toshi.workspace.v1.Invitation invitation = 1;
|
|
1228
|
+
*/
|
|
1229
|
+
invitation?: Invitation | undefined;
|
|
1230
|
+
/**
|
|
1231
|
+
* The code the invitee accepts; it is not shown again.
|
|
1232
|
+
*
|
|
1233
|
+
* @generated from field: string code = 2;
|
|
1234
|
+
*/
|
|
1235
|
+
code: string;
|
|
1236
|
+
};
|
|
1237
|
+
/**
|
|
1238
|
+
* CreateInvitationResponse carries the invitation and its code, shown
|
|
1239
|
+
* once.
|
|
1240
|
+
*
|
|
1241
|
+
* @generated from message toshi.workspace.v1.CreateInvitationResponse
|
|
1242
|
+
*/
|
|
1243
|
+
export type CreateInvitationResponseJson = {
|
|
1244
|
+
/**
|
|
1245
|
+
* @generated from field: toshi.workspace.v1.Invitation invitation = 1;
|
|
1246
|
+
*/
|
|
1247
|
+
invitation?: InvitationJson;
|
|
1248
|
+
/**
|
|
1249
|
+
* The code the invitee accepts; it is not shown again.
|
|
1250
|
+
*
|
|
1251
|
+
* @generated from field: string code = 2;
|
|
1252
|
+
*/
|
|
1253
|
+
code?: string;
|
|
1254
|
+
};
|
|
1255
|
+
/**
|
|
1256
|
+
* Describes the message toshi.workspace.v1.CreateInvitationResponse.
|
|
1257
|
+
* Use `create(CreateInvitationResponseSchema)` to create a new message.
|
|
1258
|
+
*/
|
|
1259
|
+
export declare const CreateInvitationResponseSchema: GenMessage<CreateInvitationResponse, {
|
|
1260
|
+
jsonType: CreateInvitationResponseJson;
|
|
1261
|
+
}>;
|
|
1262
|
+
/**
|
|
1263
|
+
* Invitation is an invitation to join the workspace, never with its code.
|
|
1264
|
+
*
|
|
1265
|
+
* @generated from message toshi.workspace.v1.Invitation
|
|
1266
|
+
*/
|
|
1267
|
+
export type Invitation = Message<"toshi.workspace.v1.Invitation"> & {
|
|
1268
|
+
/**
|
|
1269
|
+
* Invitation id, such as "inv-1a2b3c4d5e6f7a8b9c0d1e2f".
|
|
1270
|
+
*
|
|
1271
|
+
* @generated from field: string id = 1;
|
|
1272
|
+
*/
|
|
1273
|
+
id: string;
|
|
1274
|
+
/**
|
|
1275
|
+
* @generated from field: string note = 2;
|
|
1276
|
+
*/
|
|
1277
|
+
note: string;
|
|
1278
|
+
/**
|
|
1279
|
+
* @generated from field: toshi.workspace.v1.InvitationState state = 3;
|
|
1280
|
+
*/
|
|
1281
|
+
state: InvitationState;
|
|
1282
|
+
/**
|
|
1283
|
+
* @generated from field: google.protobuf.Timestamp created_at = 4;
|
|
1284
|
+
*/
|
|
1285
|
+
createdAt?: Timestamp | undefined;
|
|
1286
|
+
/**
|
|
1287
|
+
* @generated from field: toshi.workspace.v1.Subject created_by = 5;
|
|
1288
|
+
*/
|
|
1289
|
+
createdBy?: Subject | undefined;
|
|
1290
|
+
/**
|
|
1291
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 6;
|
|
1292
|
+
*/
|
|
1293
|
+
expiresAt?: Timestamp | undefined;
|
|
1294
|
+
/**
|
|
1295
|
+
* The user id of the person who accepted it, and when; empty until then.
|
|
1296
|
+
*
|
|
1297
|
+
* @generated from field: string accepted_by = 7;
|
|
1298
|
+
*/
|
|
1299
|
+
acceptedBy: string;
|
|
1300
|
+
/**
|
|
1301
|
+
* @generated from field: google.protobuf.Timestamp accepted_at = 8;
|
|
1302
|
+
*/
|
|
1303
|
+
acceptedAt?: Timestamp | undefined;
|
|
1304
|
+
/**
|
|
1305
|
+
* When it was revoked, and by whom; empty unless revoked.
|
|
1306
|
+
*
|
|
1307
|
+
* @generated from field: google.protobuf.Timestamp revoked_at = 9;
|
|
1308
|
+
*/
|
|
1309
|
+
revokedAt?: Timestamp | undefined;
|
|
1310
|
+
/**
|
|
1311
|
+
* @generated from field: toshi.workspace.v1.Subject revoked_by = 10;
|
|
1312
|
+
*/
|
|
1313
|
+
revokedBy?: Subject | undefined;
|
|
1314
|
+
};
|
|
1315
|
+
/**
|
|
1316
|
+
* Invitation is an invitation to join the workspace, never with its code.
|
|
1317
|
+
*
|
|
1318
|
+
* @generated from message toshi.workspace.v1.Invitation
|
|
1319
|
+
*/
|
|
1320
|
+
export type InvitationJson = {
|
|
1321
|
+
/**
|
|
1322
|
+
* Invitation id, such as "inv-1a2b3c4d5e6f7a8b9c0d1e2f".
|
|
1323
|
+
*
|
|
1324
|
+
* @generated from field: string id = 1;
|
|
1325
|
+
*/
|
|
1326
|
+
id?: string;
|
|
1327
|
+
/**
|
|
1328
|
+
* @generated from field: string note = 2;
|
|
1329
|
+
*/
|
|
1330
|
+
note?: string;
|
|
1331
|
+
/**
|
|
1332
|
+
* @generated from field: toshi.workspace.v1.InvitationState state = 3;
|
|
1333
|
+
*/
|
|
1334
|
+
state?: InvitationStateJson;
|
|
1335
|
+
/**
|
|
1336
|
+
* @generated from field: google.protobuf.Timestamp created_at = 4;
|
|
1337
|
+
*/
|
|
1338
|
+
createdAt?: TimestampJson;
|
|
1339
|
+
/**
|
|
1340
|
+
* @generated from field: toshi.workspace.v1.Subject created_by = 5;
|
|
1341
|
+
*/
|
|
1342
|
+
createdBy?: SubjectJson;
|
|
1343
|
+
/**
|
|
1344
|
+
* @generated from field: google.protobuf.Timestamp expires_at = 6;
|
|
1345
|
+
*/
|
|
1346
|
+
expiresAt?: TimestampJson;
|
|
1347
|
+
/**
|
|
1348
|
+
* The user id of the person who accepted it, and when; empty until then.
|
|
1349
|
+
*
|
|
1350
|
+
* @generated from field: string accepted_by = 7;
|
|
1351
|
+
*/
|
|
1352
|
+
acceptedBy?: string;
|
|
1353
|
+
/**
|
|
1354
|
+
* @generated from field: google.protobuf.Timestamp accepted_at = 8;
|
|
1355
|
+
*/
|
|
1356
|
+
acceptedAt?: TimestampJson;
|
|
1357
|
+
/**
|
|
1358
|
+
* When it was revoked, and by whom; empty unless revoked.
|
|
1359
|
+
*
|
|
1360
|
+
* @generated from field: google.protobuf.Timestamp revoked_at = 9;
|
|
1361
|
+
*/
|
|
1362
|
+
revokedAt?: TimestampJson;
|
|
1363
|
+
/**
|
|
1364
|
+
* @generated from field: toshi.workspace.v1.Subject revoked_by = 10;
|
|
1365
|
+
*/
|
|
1366
|
+
revokedBy?: SubjectJson;
|
|
1367
|
+
};
|
|
1368
|
+
/**
|
|
1369
|
+
* Describes the message toshi.workspace.v1.Invitation.
|
|
1370
|
+
* Use `create(InvitationSchema)` to create a new message.
|
|
1371
|
+
*/
|
|
1372
|
+
export declare const InvitationSchema: GenMessage<Invitation, {
|
|
1373
|
+
jsonType: InvitationJson;
|
|
1374
|
+
}>;
|
|
1375
|
+
/**
|
|
1376
|
+
* @generated from message toshi.workspace.v1.ListInvitationsRequest
|
|
1377
|
+
*/
|
|
1378
|
+
export type ListInvitationsRequest = Message<"toshi.workspace.v1.ListInvitationsRequest"> & {
|
|
1379
|
+
/**
|
|
1380
|
+
* The most invitations in one page; zero lets the server choose.
|
|
1381
|
+
*
|
|
1382
|
+
* @generated from field: int32 page_size = 1;
|
|
1383
|
+
*/
|
|
1384
|
+
pageSize: number;
|
|
1385
|
+
/**
|
|
1386
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
1387
|
+
*
|
|
1388
|
+
* @generated from field: string page_token = 2;
|
|
1389
|
+
*/
|
|
1390
|
+
pageToken: string;
|
|
1391
|
+
};
|
|
1392
|
+
/**
|
|
1393
|
+
* @generated from message toshi.workspace.v1.ListInvitationsRequest
|
|
1394
|
+
*/
|
|
1395
|
+
export type ListInvitationsRequestJson = {
|
|
1396
|
+
/**
|
|
1397
|
+
* The most invitations in one page; zero lets the server choose.
|
|
1398
|
+
*
|
|
1399
|
+
* @generated from field: int32 page_size = 1;
|
|
1400
|
+
*/
|
|
1401
|
+
pageSize?: number;
|
|
1402
|
+
/**
|
|
1403
|
+
* From an earlier response's next_page_token; empty for the first page.
|
|
1404
|
+
*
|
|
1405
|
+
* @generated from field: string page_token = 2;
|
|
1406
|
+
*/
|
|
1407
|
+
pageToken?: string;
|
|
1408
|
+
};
|
|
1409
|
+
/**
|
|
1410
|
+
* Describes the message toshi.workspace.v1.ListInvitationsRequest.
|
|
1411
|
+
* Use `create(ListInvitationsRequestSchema)` to create a new message.
|
|
1412
|
+
*/
|
|
1413
|
+
export declare const ListInvitationsRequestSchema: GenMessage<ListInvitationsRequest, {
|
|
1414
|
+
jsonType: ListInvitationsRequestJson;
|
|
1415
|
+
}>;
|
|
1416
|
+
/**
|
|
1417
|
+
* @generated from message toshi.workspace.v1.ListInvitationsResponse
|
|
1418
|
+
*/
|
|
1419
|
+
export type ListInvitationsResponse = Message<"toshi.workspace.v1.ListInvitationsResponse"> & {
|
|
1420
|
+
/**
|
|
1421
|
+
* @generated from field: repeated toshi.workspace.v1.Invitation invitations = 1;
|
|
1422
|
+
*/
|
|
1423
|
+
invitations: Invitation[];
|
|
1424
|
+
/**
|
|
1425
|
+
* Empty on the last page.
|
|
1426
|
+
*
|
|
1427
|
+
* @generated from field: string next_page_token = 2;
|
|
1428
|
+
*/
|
|
1429
|
+
nextPageToken: string;
|
|
1430
|
+
};
|
|
1431
|
+
/**
|
|
1432
|
+
* @generated from message toshi.workspace.v1.ListInvitationsResponse
|
|
1433
|
+
*/
|
|
1434
|
+
export type ListInvitationsResponseJson = {
|
|
1435
|
+
/**
|
|
1436
|
+
* @generated from field: repeated toshi.workspace.v1.Invitation invitations = 1;
|
|
1437
|
+
*/
|
|
1438
|
+
invitations?: InvitationJson[];
|
|
1439
|
+
/**
|
|
1440
|
+
* Empty on the last page.
|
|
1441
|
+
*
|
|
1442
|
+
* @generated from field: string next_page_token = 2;
|
|
1443
|
+
*/
|
|
1444
|
+
nextPageToken?: string;
|
|
1445
|
+
};
|
|
1446
|
+
/**
|
|
1447
|
+
* Describes the message toshi.workspace.v1.ListInvitationsResponse.
|
|
1448
|
+
* Use `create(ListInvitationsResponseSchema)` to create a new message.
|
|
1449
|
+
*/
|
|
1450
|
+
export declare const ListInvitationsResponseSchema: GenMessage<ListInvitationsResponse, {
|
|
1451
|
+
jsonType: ListInvitationsResponseJson;
|
|
1452
|
+
}>;
|
|
1453
|
+
/**
|
|
1454
|
+
* @generated from message toshi.workspace.v1.RevokeInvitationRequest
|
|
1455
|
+
*/
|
|
1456
|
+
export type RevokeInvitationRequest = Message<"toshi.workspace.v1.RevokeInvitationRequest"> & {
|
|
1457
|
+
/**
|
|
1458
|
+
* The invitation's id.
|
|
1459
|
+
*
|
|
1460
|
+
* @generated from field: string id = 1;
|
|
1461
|
+
*/
|
|
1462
|
+
id: string;
|
|
1463
|
+
};
|
|
1464
|
+
/**
|
|
1465
|
+
* @generated from message toshi.workspace.v1.RevokeInvitationRequest
|
|
1466
|
+
*/
|
|
1467
|
+
export type RevokeInvitationRequestJson = {
|
|
1468
|
+
/**
|
|
1469
|
+
* The invitation's id.
|
|
1470
|
+
*
|
|
1471
|
+
* @generated from field: string id = 1;
|
|
1472
|
+
*/
|
|
1473
|
+
id?: string;
|
|
1474
|
+
};
|
|
1475
|
+
/**
|
|
1476
|
+
* Describes the message toshi.workspace.v1.RevokeInvitationRequest.
|
|
1477
|
+
* Use `create(RevokeInvitationRequestSchema)` to create a new message.
|
|
1478
|
+
*/
|
|
1479
|
+
export declare const RevokeInvitationRequestSchema: GenMessage<RevokeInvitationRequest, {
|
|
1480
|
+
jsonType: RevokeInvitationRequestJson;
|
|
1481
|
+
}>;
|
|
1482
|
+
/**
|
|
1483
|
+
* RevokeInvitationResponse carries the revoked invitation.
|
|
1484
|
+
*
|
|
1485
|
+
* @generated from message toshi.workspace.v1.RevokeInvitationResponse
|
|
1486
|
+
*/
|
|
1487
|
+
export type RevokeInvitationResponse = Message<"toshi.workspace.v1.RevokeInvitationResponse"> & {
|
|
1488
|
+
/**
|
|
1489
|
+
* @generated from field: toshi.workspace.v1.Invitation invitation = 1;
|
|
1490
|
+
*/
|
|
1491
|
+
invitation?: Invitation | undefined;
|
|
1492
|
+
};
|
|
1493
|
+
/**
|
|
1494
|
+
* RevokeInvitationResponse carries the revoked invitation.
|
|
1495
|
+
*
|
|
1496
|
+
* @generated from message toshi.workspace.v1.RevokeInvitationResponse
|
|
1497
|
+
*/
|
|
1498
|
+
export type RevokeInvitationResponseJson = {
|
|
1499
|
+
/**
|
|
1500
|
+
* @generated from field: toshi.workspace.v1.Invitation invitation = 1;
|
|
1501
|
+
*/
|
|
1502
|
+
invitation?: InvitationJson;
|
|
1503
|
+
};
|
|
1504
|
+
/**
|
|
1505
|
+
* Describes the message toshi.workspace.v1.RevokeInvitationResponse.
|
|
1506
|
+
* Use `create(RevokeInvitationResponseSchema)` to create a new message.
|
|
1507
|
+
*/
|
|
1508
|
+
export declare const RevokeInvitationResponseSchema: GenMessage<RevokeInvitationResponse, {
|
|
1509
|
+
jsonType: RevokeInvitationResponseJson;
|
|
1510
|
+
}>;
|
|
1511
|
+
/**
|
|
1512
|
+
* @generated from message toshi.workspace.v1.AcceptInvitationRequest
|
|
1513
|
+
*/
|
|
1514
|
+
export type AcceptInvitationRequest = Message<"toshi.workspace.v1.AcceptInvitationRequest"> & {
|
|
1515
|
+
/**
|
|
1516
|
+
* The code CreateInvitation returned.
|
|
1517
|
+
*
|
|
1518
|
+
* @generated from field: string code = 1;
|
|
1519
|
+
*/
|
|
1520
|
+
code: string;
|
|
1521
|
+
};
|
|
1522
|
+
/**
|
|
1523
|
+
* @generated from message toshi.workspace.v1.AcceptInvitationRequest
|
|
1524
|
+
*/
|
|
1525
|
+
export type AcceptInvitationRequestJson = {
|
|
1526
|
+
/**
|
|
1527
|
+
* The code CreateInvitation returned.
|
|
1528
|
+
*
|
|
1529
|
+
* @generated from field: string code = 1;
|
|
1530
|
+
*/
|
|
1531
|
+
code?: string;
|
|
1532
|
+
};
|
|
1533
|
+
/**
|
|
1534
|
+
* Describes the message toshi.workspace.v1.AcceptInvitationRequest.
|
|
1535
|
+
* Use `create(AcceptInvitationRequestSchema)` to create a new message.
|
|
1536
|
+
*/
|
|
1537
|
+
export declare const AcceptInvitationRequestSchema: GenMessage<AcceptInvitationRequest, {
|
|
1538
|
+
jsonType: AcceptInvitationRequestJson;
|
|
1539
|
+
}>;
|
|
1540
|
+
/**
|
|
1541
|
+
* @generated from message toshi.workspace.v1.AcceptInvitationResponse
|
|
1542
|
+
*/
|
|
1543
|
+
export type AcceptInvitationResponse = Message<"toshi.workspace.v1.AcceptInvitationResponse"> & {
|
|
1544
|
+
/**
|
|
1545
|
+
* @generated from field: toshi.workspace.v1.Invitation invitation = 1;
|
|
1546
|
+
*/
|
|
1547
|
+
invitation?: Invitation | undefined;
|
|
1548
|
+
/**
|
|
1549
|
+
* The id of the workspace the caller is now a member of.
|
|
1550
|
+
*
|
|
1551
|
+
* @generated from field: string workspace = 2;
|
|
1552
|
+
*/
|
|
1553
|
+
workspace: string;
|
|
1554
|
+
/**
|
|
1555
|
+
* Whether the caller was made the workspace's owner.
|
|
1556
|
+
*
|
|
1557
|
+
* @generated from field: bool owner = 3;
|
|
1558
|
+
*/
|
|
1559
|
+
owner: boolean;
|
|
1560
|
+
};
|
|
1561
|
+
/**
|
|
1562
|
+
* @generated from message toshi.workspace.v1.AcceptInvitationResponse
|
|
1563
|
+
*/
|
|
1564
|
+
export type AcceptInvitationResponseJson = {
|
|
1565
|
+
/**
|
|
1566
|
+
* @generated from field: toshi.workspace.v1.Invitation invitation = 1;
|
|
1567
|
+
*/
|
|
1568
|
+
invitation?: InvitationJson;
|
|
1569
|
+
/**
|
|
1570
|
+
* The id of the workspace the caller is now a member of.
|
|
1571
|
+
*
|
|
1572
|
+
* @generated from field: string workspace = 2;
|
|
1573
|
+
*/
|
|
1574
|
+
workspace?: string;
|
|
1575
|
+
/**
|
|
1576
|
+
* Whether the caller was made the workspace's owner.
|
|
1577
|
+
*
|
|
1578
|
+
* @generated from field: bool owner = 3;
|
|
1579
|
+
*/
|
|
1580
|
+
owner?: boolean;
|
|
1581
|
+
};
|
|
1582
|
+
/**
|
|
1583
|
+
* Describes the message toshi.workspace.v1.AcceptInvitationResponse.
|
|
1584
|
+
* Use `create(AcceptInvitationResponseSchema)` to create a new message.
|
|
1585
|
+
*/
|
|
1586
|
+
export declare const AcceptInvitationResponseSchema: GenMessage<AcceptInvitationResponse, {
|
|
1587
|
+
jsonType: AcceptInvitationResponseJson;
|
|
1588
|
+
}>;
|
|
1589
|
+
/**
|
|
1590
|
+
* SubjectKind says who a grant is given to, or who made it.
|
|
1591
|
+
*
|
|
1592
|
+
* @generated from enum toshi.workspace.v1.SubjectKind
|
|
1593
|
+
*/
|
|
1594
|
+
export declare enum SubjectKind {
|
|
1595
|
+
/**
|
|
1596
|
+
* @generated from enum value: SUBJECT_KIND_UNSPECIFIED = 0;
|
|
1597
|
+
*/
|
|
1598
|
+
UNSPECIFIED = 0,
|
|
1599
|
+
/**
|
|
1600
|
+
* A person, by Toshi user id.
|
|
1601
|
+
*
|
|
1602
|
+
* @generated from enum value: SUBJECT_KIND_PERSON = 1;
|
|
1603
|
+
*/
|
|
1604
|
+
PERSON = 1,
|
|
1605
|
+
/**
|
|
1606
|
+
* One of the workspace's API tokens, by token id.
|
|
1607
|
+
*
|
|
1608
|
+
* @generated from enum value: SUBJECT_KIND_TOKEN = 2;
|
|
1609
|
+
*/
|
|
1610
|
+
TOKEN = 2,
|
|
1611
|
+
/**
|
|
1612
|
+
* The control plane itself, as the maker of the grants it writes, such
|
|
1613
|
+
* as a workspace's first owner. It is never given a role.
|
|
1614
|
+
*
|
|
1615
|
+
* @generated from enum value: SUBJECT_KIND_SYSTEM = 3;
|
|
1616
|
+
*/
|
|
1617
|
+
SYSTEM = 3
|
|
1618
|
+
}
|
|
1619
|
+
/**
|
|
1620
|
+
* SubjectKind says who a grant is given to, or who made it.
|
|
1621
|
+
*
|
|
1622
|
+
* @generated from enum toshi.workspace.v1.SubjectKind
|
|
1623
|
+
*/
|
|
1624
|
+
export type SubjectKindJson = "SUBJECT_KIND_UNSPECIFIED" | "SUBJECT_KIND_PERSON" | "SUBJECT_KIND_TOKEN" | "SUBJECT_KIND_SYSTEM";
|
|
1625
|
+
/**
|
|
1626
|
+
* Describes the enum toshi.workspace.v1.SubjectKind.
|
|
1627
|
+
*/
|
|
1628
|
+
export declare const SubjectKindSchema: GenEnum<SubjectKind, SubjectKindJson>;
|
|
1629
|
+
/**
|
|
1630
|
+
* MemberVia says how a person became a member.
|
|
1631
|
+
*
|
|
1632
|
+
* @generated from enum toshi.workspace.v1.MemberVia
|
|
1633
|
+
*/
|
|
1634
|
+
export declare enum MemberVia {
|
|
1635
|
+
/**
|
|
1636
|
+
* @generated from enum value: MEMBER_VIA_UNSPECIFIED = 0;
|
|
1637
|
+
*/
|
|
1638
|
+
UNSPECIFIED = 0,
|
|
1639
|
+
/**
|
|
1640
|
+
* Signing in with GitHub as an administrator of one of the workspace's
|
|
1641
|
+
* GitHub App installations.
|
|
1642
|
+
*
|
|
1643
|
+
* @generated from enum value: MEMBER_VIA_GITHUB_ADMIN = 1;
|
|
1644
|
+
*/
|
|
1645
|
+
GITHUB_ADMIN = 1,
|
|
1646
|
+
/**
|
|
1647
|
+
* Accepting an invitation.
|
|
1648
|
+
*
|
|
1649
|
+
* @generated from enum value: MEMBER_VIA_INVITATION = 2;
|
|
1650
|
+
*/
|
|
1651
|
+
INVITATION = 2,
|
|
1652
|
+
/**
|
|
1653
|
+
* Holding a role in the workspace when members came in.
|
|
1654
|
+
*
|
|
1655
|
+
* @generated from enum value: MEMBER_VIA_MIGRATION = 3;
|
|
1656
|
+
*/
|
|
1657
|
+
MIGRATION = 3,
|
|
1658
|
+
/**
|
|
1659
|
+
* Signing in with GitHub as a member of the organisation of one of the
|
|
1660
|
+
* workspace's GitHub App installations, when the workspace lets such
|
|
1661
|
+
* members join.
|
|
1662
|
+
*
|
|
1663
|
+
* @generated from enum value: MEMBER_VIA_GITHUB_MEMBER = 4;
|
|
1664
|
+
*/
|
|
1665
|
+
GITHUB_MEMBER = 4
|
|
1666
|
+
}
|
|
1667
|
+
/**
|
|
1668
|
+
* MemberVia says how a person became a member.
|
|
1669
|
+
*
|
|
1670
|
+
* @generated from enum toshi.workspace.v1.MemberVia
|
|
1671
|
+
*/
|
|
1672
|
+
export type MemberViaJson = "MEMBER_VIA_UNSPECIFIED" | "MEMBER_VIA_GITHUB_ADMIN" | "MEMBER_VIA_INVITATION" | "MEMBER_VIA_MIGRATION" | "MEMBER_VIA_GITHUB_MEMBER";
|
|
1673
|
+
/**
|
|
1674
|
+
* Describes the enum toshi.workspace.v1.MemberVia.
|
|
1675
|
+
*/
|
|
1676
|
+
export declare const MemberViaSchema: GenEnum<MemberVia, MemberViaJson>;
|
|
1677
|
+
/**
|
|
1678
|
+
* MemberState says whether a person is a member or waiting to be one.
|
|
1679
|
+
*
|
|
1680
|
+
* @generated from enum toshi.workspace.v1.MemberState
|
|
1681
|
+
*/
|
|
1682
|
+
export declare enum MemberState {
|
|
1683
|
+
/**
|
|
1684
|
+
* @generated from enum value: MEMBER_STATE_UNSPECIFIED = 0;
|
|
1685
|
+
*/
|
|
1686
|
+
UNSPECIFIED = 0,
|
|
1687
|
+
/**
|
|
1688
|
+
* @generated from enum value: MEMBER_STATE_ACTIVE = 1;
|
|
1689
|
+
*/
|
|
1690
|
+
ACTIVE = 1,
|
|
1691
|
+
/**
|
|
1692
|
+
* Waiting for a workspace admin to approve them.
|
|
1693
|
+
*
|
|
1694
|
+
* @generated from enum value: MEMBER_STATE_PENDING = 2;
|
|
1695
|
+
*/
|
|
1696
|
+
PENDING = 2
|
|
1697
|
+
}
|
|
1698
|
+
/**
|
|
1699
|
+
* MemberState says whether a person is a member or waiting to be one.
|
|
1700
|
+
*
|
|
1701
|
+
* @generated from enum toshi.workspace.v1.MemberState
|
|
1702
|
+
*/
|
|
1703
|
+
export type MemberStateJson = "MEMBER_STATE_UNSPECIFIED" | "MEMBER_STATE_ACTIVE" | "MEMBER_STATE_PENDING";
|
|
1704
|
+
/**
|
|
1705
|
+
* Describes the enum toshi.workspace.v1.MemberState.
|
|
1706
|
+
*/
|
|
1707
|
+
export declare const MemberStateSchema: GenEnum<MemberState, MemberStateJson>;
|
|
1708
|
+
/**
|
|
1709
|
+
* InvitationState says whether an invitation's code still works.
|
|
1710
|
+
*
|
|
1711
|
+
* @generated from enum toshi.workspace.v1.InvitationState
|
|
1712
|
+
*/
|
|
1713
|
+
export declare enum InvitationState {
|
|
1714
|
+
/**
|
|
1715
|
+
* @generated from enum value: INVITATION_STATE_UNSPECIFIED = 0;
|
|
1716
|
+
*/
|
|
1717
|
+
UNSPECIFIED = 0,
|
|
1718
|
+
/**
|
|
1719
|
+
* Its code works until expires_at.
|
|
1720
|
+
*
|
|
1721
|
+
* @generated from enum value: INVITATION_STATE_OPEN = 1;
|
|
1722
|
+
*/
|
|
1723
|
+
OPEN = 1,
|
|
1724
|
+
/**
|
|
1725
|
+
* @generated from enum value: INVITATION_STATE_ACCEPTED = 2;
|
|
1726
|
+
*/
|
|
1727
|
+
ACCEPTED = 2,
|
|
1728
|
+
/**
|
|
1729
|
+
* @generated from enum value: INVITATION_STATE_REVOKED = 3;
|
|
1730
|
+
*/
|
|
1731
|
+
REVOKED = 3,
|
|
1732
|
+
/**
|
|
1733
|
+
* @generated from enum value: INVITATION_STATE_EXPIRED = 4;
|
|
1734
|
+
*/
|
|
1735
|
+
EXPIRED = 4
|
|
1736
|
+
}
|
|
1737
|
+
/**
|
|
1738
|
+
* InvitationState says whether an invitation's code still works.
|
|
1739
|
+
*
|
|
1740
|
+
* @generated from enum toshi.workspace.v1.InvitationState
|
|
1741
|
+
*/
|
|
1742
|
+
export type InvitationStateJson = "INVITATION_STATE_UNSPECIFIED" | "INVITATION_STATE_OPEN" | "INVITATION_STATE_ACCEPTED" | "INVITATION_STATE_REVOKED" | "INVITATION_STATE_EXPIRED";
|
|
1743
|
+
/**
|
|
1744
|
+
* Describes the enum toshi.workspace.v1.InvitationState.
|
|
1745
|
+
*/
|
|
1746
|
+
export declare const InvitationStateSchema: GenEnum<InvitationState, InvitationStateJson>;
|
|
1747
|
+
/**
|
|
1748
|
+
* RoleService manages who may do what in the workspace: its roles, each a
|
|
1749
|
+
* named set of permissions, and the grants that give a role to a person or
|
|
1750
|
+
* a token on the whole workspace, one project or one environment. A
|
|
1751
|
+
* caller's permissions are the union of the roles granted to it; there are
|
|
1752
|
+
* no deny rules.
|
|
1753
|
+
*
|
|
1754
|
+
* Five roles are built in: owner (every permission), admin (every
|
|
1755
|
+
* permission but billing.write, workspace.delete and workspace.signin),
|
|
1756
|
+
* member (reads and
|
|
1757
|
+
* writes of every product and of projects, secrets and tokens, and reads of
|
|
1758
|
+
* the rest), agent (every read, and sandboxes.write, channels.write,
|
|
1759
|
+
* artifacts.write and volumes.write) and viewer (every read). They cannot
|
|
1760
|
+
* be changed. A workspace adds its own from the permissions this API's
|
|
1761
|
+
* methods name in their toshi.permission option and those a product's
|
|
1762
|
+
* calls name.
|
|
1763
|
+
*
|
|
1764
|
+
* Nobody makes, changes, deletes, gives or revokes a role with a
|
|
1765
|
+
* permission they do not hold where the role applies: such a call is
|
|
1766
|
+
* refused with PERMISSION_DENIED, and a google.rpc.ErrorInfo detail with
|
|
1767
|
+
* the reason PERMISSION_MISSING names the permission under the key
|
|
1768
|
+
* "permission". So only an owner gives or revokes owner. A workspace
|
|
1769
|
+
* always keeps a person who is an owner of the whole workspace.
|
|
1770
|
+
*
|
|
1771
|
+
* A token limited to a project or an environment is refused with
|
|
1772
|
+
* PERMISSION_DENIED: these calls act in the whole workspace. A suspended
|
|
1773
|
+
* workspace lists its roles and grants, and every other call is refused
|
|
1774
|
+
* for it with FAILED_PRECONDITION.
|
|
1775
|
+
*
|
|
1776
|
+
* @generated from service toshi.workspace.v1.RoleService
|
|
1777
|
+
*/
|
|
1778
|
+
export declare const RoleService: GenService<{
|
|
1779
|
+
/**
|
|
1780
|
+
* ListRoles returns the built-in roles, highest first, then the
|
|
1781
|
+
* workspace's own, by name, each with its permissions.
|
|
1782
|
+
*
|
|
1783
|
+
* A page holds 100 roles when page_size is zero, and 1000 at most.
|
|
1784
|
+
*
|
|
1785
|
+
* @generated from rpc toshi.workspace.v1.RoleService.ListRoles
|
|
1786
|
+
*/
|
|
1787
|
+
listRoles: {
|
|
1788
|
+
methodKind: "unary";
|
|
1789
|
+
input: typeof ListRolesRequestSchema;
|
|
1790
|
+
output: typeof ListRolesResponseSchema;
|
|
1791
|
+
};
|
|
1792
|
+
/**
|
|
1793
|
+
* CreateRole adds a role of the workspace's own. A name that a role of
|
|
1794
|
+
* the workspace has fails with ALREADY_EXISTS; a built-in role's name,
|
|
1795
|
+
* compared without regard to case, an empty name, no permissions, or a
|
|
1796
|
+
* permission that neither a method of this API nor a product's calls
|
|
1797
|
+
* name, with
|
|
1798
|
+
* INVALID_ARGUMENT.
|
|
1799
|
+
*
|
|
1800
|
+
* @generated from rpc toshi.workspace.v1.RoleService.CreateRole
|
|
1801
|
+
*/
|
|
1802
|
+
createRole: {
|
|
1803
|
+
methodKind: "unary";
|
|
1804
|
+
input: typeof CreateRoleRequestSchema;
|
|
1805
|
+
output: typeof CreateRoleResponseSchema;
|
|
1806
|
+
};
|
|
1807
|
+
/**
|
|
1808
|
+
* UpdateRole sets the name and the permissions of one of the
|
|
1809
|
+
* workspace's roles, checked as CreateRole checks them. Its grants keep
|
|
1810
|
+
* it, and give the new permissions from then on. A built-in role fails
|
|
1811
|
+
* with INVALID_ARGUMENT; an unknown ID with NOT_FOUND.
|
|
1812
|
+
*
|
|
1813
|
+
* @generated from rpc toshi.workspace.v1.RoleService.UpdateRole
|
|
1814
|
+
*/
|
|
1815
|
+
updateRole: {
|
|
1816
|
+
methodKind: "unary";
|
|
1817
|
+
input: typeof UpdateRoleRequestSchema;
|
|
1818
|
+
output: typeof UpdateRoleResponseSchema;
|
|
1819
|
+
};
|
|
1820
|
+
/**
|
|
1821
|
+
* DeleteRole deletes one of the workspace's roles and every grant of
|
|
1822
|
+
* it. A built-in role fails with INVALID_ARGUMENT; an unknown ID with
|
|
1823
|
+
* NOT_FOUND.
|
|
1824
|
+
*
|
|
1825
|
+
* @generated from rpc toshi.workspace.v1.RoleService.DeleteRole
|
|
1826
|
+
*/
|
|
1827
|
+
deleteRole: {
|
|
1828
|
+
methodKind: "unary";
|
|
1829
|
+
input: typeof DeleteRoleRequestSchema;
|
|
1830
|
+
output: typeof DeleteRoleResponseSchema;
|
|
1831
|
+
};
|
|
1832
|
+
/**
|
|
1833
|
+
* ListRoleGrants returns the workspace's grants, ordered by subject,
|
|
1834
|
+
* then role, then scope, optionally only those of one subject, or only
|
|
1835
|
+
* those on one project or environment.
|
|
1836
|
+
*
|
|
1837
|
+
* A page holds 100 grants when page_size is zero, and 1000 at most. An
|
|
1838
|
+
* unknown project or environment fails with NOT_FOUND.
|
|
1839
|
+
*
|
|
1840
|
+
* @generated from rpc toshi.workspace.v1.RoleService.ListRoleGrants
|
|
1841
|
+
*/
|
|
1842
|
+
listRoleGrants: {
|
|
1843
|
+
methodKind: "unary";
|
|
1844
|
+
input: typeof ListRoleGrantsRequestSchema;
|
|
1845
|
+
output: typeof ListRoleGrantsResponseSchema;
|
|
1846
|
+
};
|
|
1847
|
+
/**
|
|
1848
|
+
* GrantRole gives a role to a person or a token, on the whole workspace
|
|
1849
|
+
* or on one project or environment. The role is a built-in role's ID or
|
|
1850
|
+
* one of the workspace's. A grant the subject already has fails with
|
|
1851
|
+
* ALREADY_EXISTS; an unknown role, project or environment, or a token
|
|
1852
|
+
* that is not the workspace's or is revoked, with NOT_FOUND. A person
|
|
1853
|
+
* who is not a member of the workspace fails with FAILED_PRECONDITION
|
|
1854
|
+
* and a google.rpc.ErrorInfo detail with the reason PERSON_NOT_MEMBER,
|
|
1855
|
+
* naming the person under the key "person": roles are given to members.
|
|
1856
|
+
*
|
|
1857
|
+
* @generated from rpc toshi.workspace.v1.RoleService.GrantRole
|
|
1858
|
+
*/
|
|
1859
|
+
grantRole: {
|
|
1860
|
+
methodKind: "unary";
|
|
1861
|
+
input: typeof GrantRoleRequestSchema;
|
|
1862
|
+
output: typeof GrantRoleResponseSchema;
|
|
1863
|
+
};
|
|
1864
|
+
/**
|
|
1865
|
+
* RevokeRole deletes a grant. Revoking the last grant of owner on the
|
|
1866
|
+
* whole workspace to a person fails with FAILED_PRECONDITION, and a
|
|
1867
|
+
* google.rpc.ErrorInfo detail with the reason LAST_OWNER names that
|
|
1868
|
+
* person under the key "person". An unknown ID fails with NOT_FOUND.
|
|
1869
|
+
*
|
|
1870
|
+
* @generated from rpc toshi.workspace.v1.RoleService.RevokeRole
|
|
1871
|
+
*/
|
|
1872
|
+
revokeRole: {
|
|
1873
|
+
methodKind: "unary";
|
|
1874
|
+
input: typeof RevokeRoleRequestSchema;
|
|
1875
|
+
output: typeof RevokeRoleResponseSchema;
|
|
1876
|
+
};
|
|
1877
|
+
/**
|
|
1878
|
+
* ListMembers returns the workspace's members, oldest first: the people
|
|
1879
|
+
* a session opens the workspace for, with how and when each joined. A
|
|
1880
|
+
* removed member is not listed. With state MEMBER_STATE_PENDING it
|
|
1881
|
+
* returns instead the people waiting for a workspace admin's approval to
|
|
1882
|
+
* join, oldest request first.
|
|
1883
|
+
*
|
|
1884
|
+
* A page holds 100 members when page_size is zero, and 1000 at most.
|
|
1885
|
+
*
|
|
1886
|
+
* @generated from rpc toshi.workspace.v1.RoleService.ListMembers
|
|
1887
|
+
*/
|
|
1888
|
+
listMembers: {
|
|
1889
|
+
methodKind: "unary";
|
|
1890
|
+
input: typeof ListMembersRequestSchema;
|
|
1891
|
+
output: typeof ListMembersResponseSchema;
|
|
1892
|
+
};
|
|
1893
|
+
/**
|
|
1894
|
+
* RemoveMember ends a person's membership and deletes every grant they
|
|
1895
|
+
* hold in the workspace, at once; their sessions lose the workspace at
|
|
1896
|
+
* their next call. Removing the workspace's last member fails with
|
|
1897
|
+
* FAILED_PRECONDITION and a google.rpc.ErrorInfo detail with the reason
|
|
1898
|
+
* LAST_MEMBER, and removing its last person who is an owner of the whole
|
|
1899
|
+
* workspace with the reason LAST_OWNER; each names the person under the
|
|
1900
|
+
* key "person". A person who is not a member fails with NOT_FOUND.
|
|
1901
|
+
*
|
|
1902
|
+
* @generated from rpc toshi.workspace.v1.RoleService.RemoveMember
|
|
1903
|
+
*/
|
|
1904
|
+
removeMember: {
|
|
1905
|
+
methodKind: "unary";
|
|
1906
|
+
input: typeof RemoveMemberRequestSchema;
|
|
1907
|
+
output: typeof RemoveMemberResponseSchema;
|
|
1908
|
+
};
|
|
1909
|
+
/**
|
|
1910
|
+
* ApproveMember makes a person waiting for approval a member, as an
|
|
1911
|
+
* accepted invitation does: it grants no role, and makes them an owner
|
|
1912
|
+
* only when the workspace has no person who owns the whole of it. A
|
|
1913
|
+
* person who is not waiting fails with NOT_FOUND.
|
|
1914
|
+
*
|
|
1915
|
+
* @generated from rpc toshi.workspace.v1.RoleService.ApproveMember
|
|
1916
|
+
*/
|
|
1917
|
+
approveMember: {
|
|
1918
|
+
methodKind: "unary";
|
|
1919
|
+
input: typeof ApproveMemberRequestSchema;
|
|
1920
|
+
output: typeof ApproveMemberResponseSchema;
|
|
1921
|
+
};
|
|
1922
|
+
/**
|
|
1923
|
+
* DeclineMember turns down a person waiting for approval. They may ask
|
|
1924
|
+
* again by signing in a day after the decline at the earliest. A person
|
|
1925
|
+
* who is not waiting fails with NOT_FOUND.
|
|
1926
|
+
*
|
|
1927
|
+
* @generated from rpc toshi.workspace.v1.RoleService.DeclineMember
|
|
1928
|
+
*/
|
|
1929
|
+
declineMember: {
|
|
1930
|
+
methodKind: "unary";
|
|
1931
|
+
input: typeof DeclineMemberRequestSchema;
|
|
1932
|
+
output: typeof DeclineMemberResponseSchema;
|
|
1933
|
+
};
|
|
1934
|
+
/**
|
|
1935
|
+
* CreateInvitation makes an invitation to join the workspace and returns
|
|
1936
|
+
* its code, once: the control plane keeps only its hash. It is valid for
|
|
1937
|
+
* ttl, seven days when unset, and 30 days at most. The note is free text,
|
|
1938
|
+
* such as whom it is for, and is never matched against anyone.
|
|
1939
|
+
*
|
|
1940
|
+
* @generated from rpc toshi.workspace.v1.RoleService.CreateInvitation
|
|
1941
|
+
*/
|
|
1942
|
+
createInvitation: {
|
|
1943
|
+
methodKind: "unary";
|
|
1944
|
+
input: typeof CreateInvitationRequestSchema;
|
|
1945
|
+
output: typeof CreateInvitationResponseSchema;
|
|
1946
|
+
};
|
|
1947
|
+
/**
|
|
1948
|
+
* ListInvitations returns the workspace's invitations, newest first,
|
|
1949
|
+
* accepted, revoked and expired ones included, never their codes.
|
|
1950
|
+
*
|
|
1951
|
+
* A page holds 100 invitations when page_size is zero, and 1000 at most.
|
|
1952
|
+
*
|
|
1953
|
+
* @generated from rpc toshi.workspace.v1.RoleService.ListInvitations
|
|
1954
|
+
*/
|
|
1955
|
+
listInvitations: {
|
|
1956
|
+
methodKind: "unary";
|
|
1957
|
+
input: typeof ListInvitationsRequestSchema;
|
|
1958
|
+
output: typeof ListInvitationsResponseSchema;
|
|
1959
|
+
};
|
|
1960
|
+
/**
|
|
1961
|
+
* RevokeInvitation ends an open invitation, so its code no longer works.
|
|
1962
|
+
* An unknown id fails with NOT_FOUND, and one that is accepted, revoked
|
|
1963
|
+
* or expired with FAILED_PRECONDITION.
|
|
1964
|
+
*
|
|
1965
|
+
* @generated from rpc toshi.workspace.v1.RoleService.RevokeInvitation
|
|
1966
|
+
*/
|
|
1967
|
+
revokeInvitation: {
|
|
1968
|
+
methodKind: "unary";
|
|
1969
|
+
input: typeof RevokeInvitationRequestSchema;
|
|
1970
|
+
output: typeof RevokeInvitationResponseSchema;
|
|
1971
|
+
};
|
|
1972
|
+
/**
|
|
1973
|
+
* AcceptInvitation makes the caller a member of the workspace whose
|
|
1974
|
+
* invitation has the code, and an owner of it when the workspace has no
|
|
1975
|
+
* person who owns the whole of it; it grants no other role. It is a
|
|
1976
|
+
* person's call: a dashboard session or a person's access token makes it,
|
|
1977
|
+
* without the Toshi-Workspace header and without any role, since the
|
|
1978
|
+
* caller is not yet a member; a workspace token and the operator cannot.
|
|
1979
|
+
* The permission named here is not checked. A code with no open
|
|
1980
|
+
* invitation fails with NOT_FOUND, whether no invitation has it or it is
|
|
1981
|
+
* accepted, revoked or expired; the workspace's audit log records which
|
|
1982
|
+
* as invitation.accept_refused. A caller who is already a member fails
|
|
1983
|
+
* with ALREADY_EXISTS, leaving the invitation open, and a closed
|
|
1984
|
+
* workspace with FAILED_PRECONDITION: it takes no new member until it is
|
|
1985
|
+
* reopened.
|
|
1986
|
+
*
|
|
1987
|
+
* @generated from rpc toshi.workspace.v1.RoleService.AcceptInvitation
|
|
1988
|
+
*/
|
|
1989
|
+
acceptInvitation: {
|
|
1990
|
+
methodKind: "unary";
|
|
1991
|
+
input: typeof AcceptInvitationRequestSchema;
|
|
1992
|
+
output: typeof AcceptInvitationResponseSchema;
|
|
1993
|
+
};
|
|
1994
|
+
}>;
|