@toshicloud/sdk 0.5.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 +82 -40
- package/dist/client.d.ts +33 -2
- package/dist/client.js +28 -3
- package/dist/errors.d.ts +74 -22
- package/dist/errors.js +99 -27
- package/dist/gen/toshi/permission_pb.d.ts +207 -2
- package/dist/gen/toshi/permission_pb.js +54 -2
- 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 +9 -7
- package/dist/gen/toshi/workspace/v1/audit_events_pb.d.ts +191 -6
- package/dist/gen/toshi/workspace/v1/audit_events_pb.js +11 -1
- package/dist/gen/toshi/workspace/v1/channels_pb.d.ts +1194 -21
- package/dist/gen/toshi/workspace/v1/channels_pb.js +185 -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 +291 -43
- package/dist/gen/toshi/workspace/v1/discovery_pb.js +79 -30
- package/dist/gen/toshi/workspace/v1/display_pb.d.ts +198 -15
- package/dist/gen/toshi/workspace/v1/display_pb.js +52 -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 +1 -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 +10 -5
- package/dist/gen/toshi/workspace/v1/hosts_pb.d.ts +196 -7
- package/dist/gen/toshi/workspace/v1/hosts_pb.js +12 -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 +99 -296
- package/dist/gen/toshi/workspace/v1/products_pb.js +7 -53
- package/dist/gen/toshi/workspace/v1/projects_pb.d.ts +1474 -99
- package/dist/gen/toshi/workspace/v1/projects_pb.js +150 -33
- package/dist/gen/toshi/workspace/v1/recordings_pb.d.ts +181 -14
- package/dist/gen/toshi/workspace/v1/recordings_pb.js +54 -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 +42 -18
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.d.ts +14 -0
- package/dist/gen/toshi/workspace/v1/storage_providers_pb.js +1 -1
- package/dist/gen/toshi/workspace/v1/tokens_pb.d.ts +434 -5
- package/dist/gen/toshi/workspace/v1/tokens_pb.js +65 -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 +169 -11
- package/dist/gen/toshi/workspace/v1/webhook_pb.d.ts +66 -8
- package/dist/gen/toshi/workspace/v1/webhook_pb.js +4 -4
- package/dist/gen/toshi/workspace/v1/workloads_pb.d.ts +2043 -54
- package/dist/gen/toshi/workspace/v1/workloads_pb.js +204 -54
- package/dist/gen/toshi/workspace/v1/workspace_pb.d.ts +6290 -937
- 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 +191 -74
- package/dist/index.d.ts +8 -1
- package/dist/index.js +8 -1
- package/dist/interceptors.d.ts +6 -2
- package/dist/interceptors.js +13 -8
- package/dist/retry.d.ts +18 -0
- package/dist/retry.js +225 -23
- 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
|
@@ -7,7 +7,7 @@ import { file_toshi_permission } from "../../permission_pb.js";
|
|
|
7
7
|
/**
|
|
8
8
|
* Describes the file toshi/workspace/v1/storage_providers.proto.
|
|
9
9
|
*/
|
|
10
|
-
export const file_toshi_workspace_v1_storage_providers = /*@__PURE__*/ fileDesc("
|
|
10
|
+
export const file_toshi_workspace_v1_storage_providers = /*@__PURE__*/ fileDesc("Cip0b3NoaS93b3Jrc3BhY2UvdjEvc3RvcmFnZV9wcm92aWRlcnMucHJvdG8SEnRvc2hpLndvcmtzcGFjZS52MSLUAwoPU3RvcmFnZVByb3ZpZGVyEgoKAmlkGAEgASgJEgwKBG5hbWUYAiABKAkSDAoEbW9kZRgDIAEoCRIQCghlbmRwb2ludBgEIAEoCRIOCgZyZWdpb24YBSABKAkSDgoGYnVja2V0GAYgASgJEhMKC3Jvb3RfcHJlZml4GAcgASgJEhIKCnBhdGhfc3R5bGUYCCABKAgSFQoNY2FwX2xpZmVjeWNsZRgJIAEoCBIZChFjYXBfZ3Vlc3RfcHJlc2lnbhgKIAEoCBIeChZjYXBfZ2xvYmFsX3JlcGxpY2F0aW9uGAsgASgIEiIKGmVncmVzc19wcmljZV9taWNyb3NfcGVyX2diGAwgASgDEhsKE2NyZWRlbnRpYWxzX3dyYXBwZWQYDSABKAgSMQoNbGFzdF9jaGVja19hdBgOIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASGAoQbGFzdF9jaGVja19lcnJvchgPIAEoCRIuCgpjcmVhdGVkX2F0GBAgASgLMhouZ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WNrU3RvcmFnZVByb3ZpZGVyUmVzcG9uc2UiEcLzGA1zdG9yYWdlLndyaXRlEo8BChVEZWxldGVTdG9yYWdlUHJvdmlkZXISMC50b3NoaS53b3Jrc3BhY2UudjEuRGVsZXRlU3RvcmFnZVByb3ZpZGVyUmVxdWVzdBoxLnRvc2hpLndvcmtzcGFjZS52MS5EZWxldGVTdG9yYWdlUHJvdmlkZXJSZXNwb25zZSIRwvMYDXN0b3JhZ2Uud3JpdGVCIlogZ28udG9zaGljbG91ZC5pby9hcGkvd29ya3NwYWNldjFiBnByb3RvMw", [file_google_protobuf_timestamp, file_toshi_permission]);
|
|
11
11
|
/**
|
|
12
12
|
* Describes the message toshi.workspace.v1.StorageProvider.
|
|
13
13
|
* Use `create(StorageProviderSchema)` to create a new message.
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
|
|
2
|
-
import type { Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
|
|
2
|
+
import type { FieldMask, FieldMaskJson, Timestamp, TimestampJson } from "@bufbuild/protobuf/wkt";
|
|
3
|
+
import type { Subject, SubjectJson } from "./roles_pb.js";
|
|
3
4
|
import type { Message } from "@bufbuild/protobuf";
|
|
4
5
|
/**
|
|
5
6
|
* Describes the file toshi/workspace/v1/tokens.proto.
|
|
@@ -32,7 +33,9 @@ export type Token = Message<"toshi.workspace.v1.Token"> & {
|
|
|
32
33
|
*/
|
|
33
34
|
createdAt?: Timestamp | undefined;
|
|
34
35
|
/**
|
|
35
|
-
*
|
|
36
|
+
* When the token stops working: the expiry it was given, or 30 days
|
|
37
|
+
* after creator_left_at when that is sooner (expiry_reason). Unset when
|
|
38
|
+
* the token does not expire.
|
|
36
39
|
*
|
|
37
40
|
* @generated from field: google.protobuf.Timestamp expires_at = 5;
|
|
38
41
|
*/
|
|
@@ -70,6 +73,48 @@ export type Token = Message<"toshi.workspace.v1.Token"> & {
|
|
|
70
73
|
* @generated from field: string environment = 10;
|
|
71
74
|
*/
|
|
72
75
|
environment: string;
|
|
76
|
+
/**
|
|
77
|
+
* When an API token starts working; unset when it works from its
|
|
78
|
+
* creation.
|
|
79
|
+
*
|
|
80
|
+
* @generated from field: google.protobuf.Timestamp not_before = 11;
|
|
81
|
+
*/
|
|
82
|
+
notBefore?: Timestamp | undefined;
|
|
83
|
+
/**
|
|
84
|
+
* The client addresses an API token is accepted from; unset when every
|
|
85
|
+
* address is.
|
|
86
|
+
*
|
|
87
|
+
* @generated from field: toshi.workspace.v1.ClientRanges client_ranges = 12;
|
|
88
|
+
*/
|
|
89
|
+
clientRanges?: ClientRanges | undefined;
|
|
90
|
+
/**
|
|
91
|
+
* Who made the token: a person, a token, or the system for one the
|
|
92
|
+
* control plane made. Unset when that was not recorded.
|
|
93
|
+
*
|
|
94
|
+
* @generated from field: toshi.workspace.v1.Subject created_by = 13;
|
|
95
|
+
*/
|
|
96
|
+
createdBy?: Subject | undefined;
|
|
97
|
+
/**
|
|
98
|
+
* When the token was last accepted for a call, at most a minute out of
|
|
99
|
+
* date; unset when it never was.
|
|
100
|
+
*
|
|
101
|
+
* @generated from field: google.protobuf.Timestamp last_used = 14;
|
|
102
|
+
*/
|
|
103
|
+
lastUsed?: Timestamp | undefined;
|
|
104
|
+
/**
|
|
105
|
+
* When the person who made the token, or made the token that made it,
|
|
106
|
+
* stopped being a member of the workspace; unset while they are one, and
|
|
107
|
+
* once an Owner re-owns the token (UpdateToken).
|
|
108
|
+
*
|
|
109
|
+
* @generated from field: google.protobuf.Timestamp creator_left_at = 15;
|
|
110
|
+
*/
|
|
111
|
+
creatorLeftAt?: Timestamp | undefined;
|
|
112
|
+
/**
|
|
113
|
+
* Why expires_at is what it is.
|
|
114
|
+
*
|
|
115
|
+
* @generated from field: toshi.workspace.v1.TokenExpiryReason expiry_reason = 16;
|
|
116
|
+
*/
|
|
117
|
+
expiryReason: TokenExpiryReason;
|
|
73
118
|
};
|
|
74
119
|
/**
|
|
75
120
|
* Token is one of the workspace's tokens, without its value.
|
|
@@ -98,7 +143,9 @@ export type TokenJson = {
|
|
|
98
143
|
*/
|
|
99
144
|
createdAt?: TimestampJson;
|
|
100
145
|
/**
|
|
101
|
-
*
|
|
146
|
+
* When the token stops working: the expiry it was given, or 30 days
|
|
147
|
+
* after creator_left_at when that is sooner (expiry_reason). Unset when
|
|
148
|
+
* the token does not expire.
|
|
102
149
|
*
|
|
103
150
|
* @generated from field: google.protobuf.Timestamp expires_at = 5;
|
|
104
151
|
*/
|
|
@@ -136,6 +183,48 @@ export type TokenJson = {
|
|
|
136
183
|
* @generated from field: string environment = 10;
|
|
137
184
|
*/
|
|
138
185
|
environment?: string;
|
|
186
|
+
/**
|
|
187
|
+
* When an API token starts working; unset when it works from its
|
|
188
|
+
* creation.
|
|
189
|
+
*
|
|
190
|
+
* @generated from field: google.protobuf.Timestamp not_before = 11;
|
|
191
|
+
*/
|
|
192
|
+
notBefore?: TimestampJson;
|
|
193
|
+
/**
|
|
194
|
+
* The client addresses an API token is accepted from; unset when every
|
|
195
|
+
* address is.
|
|
196
|
+
*
|
|
197
|
+
* @generated from field: toshi.workspace.v1.ClientRanges client_ranges = 12;
|
|
198
|
+
*/
|
|
199
|
+
clientRanges?: ClientRangesJson;
|
|
200
|
+
/**
|
|
201
|
+
* Who made the token: a person, a token, or the system for one the
|
|
202
|
+
* control plane made. Unset when that was not recorded.
|
|
203
|
+
*
|
|
204
|
+
* @generated from field: toshi.workspace.v1.Subject created_by = 13;
|
|
205
|
+
*/
|
|
206
|
+
createdBy?: SubjectJson;
|
|
207
|
+
/**
|
|
208
|
+
* When the token was last accepted for a call, at most a minute out of
|
|
209
|
+
* date; unset when it never was.
|
|
210
|
+
*
|
|
211
|
+
* @generated from field: google.protobuf.Timestamp last_used = 14;
|
|
212
|
+
*/
|
|
213
|
+
lastUsed?: TimestampJson;
|
|
214
|
+
/**
|
|
215
|
+
* When the person who made the token, or made the token that made it,
|
|
216
|
+
* stopped being a member of the workspace; unset while they are one, and
|
|
217
|
+
* once an Owner re-owns the token (UpdateToken).
|
|
218
|
+
*
|
|
219
|
+
* @generated from field: google.protobuf.Timestamp creator_left_at = 15;
|
|
220
|
+
*/
|
|
221
|
+
creatorLeftAt?: TimestampJson;
|
|
222
|
+
/**
|
|
223
|
+
* Why expires_at is what it is.
|
|
224
|
+
*
|
|
225
|
+
* @generated from field: toshi.workspace.v1.TokenExpiryReason expiry_reason = 16;
|
|
226
|
+
*/
|
|
227
|
+
expiryReason?: TokenExpiryReasonJson;
|
|
139
228
|
};
|
|
140
229
|
/**
|
|
141
230
|
* Describes the message toshi.workspace.v1.Token.
|
|
@@ -144,6 +233,65 @@ export type TokenJson = {
|
|
|
144
233
|
export declare const TokenSchema: GenMessage<Token, {
|
|
145
234
|
jsonType: TokenJson;
|
|
146
235
|
}>;
|
|
236
|
+
/**
|
|
237
|
+
* ClientRanges are the client addresses an API token is accepted from,
|
|
238
|
+
* each an IP address or a CIDR range, such as "203.0.113.0/24" or
|
|
239
|
+
* "2001:db8::/32". A call from another address, or before the token's
|
|
240
|
+
* not_before, is refused with UNAUTHENTICATED, as an expired token's is,
|
|
241
|
+
* with a google.rpc.ErrorInfo of domain "toshi.run" and reason
|
|
242
|
+
* TOKEN_OUTSIDE_RANGES or TOKEN_OUTSIDE_WINDOW, and the refusal is
|
|
243
|
+
* recorded in the audit log.
|
|
244
|
+
*
|
|
245
|
+
* @generated from message toshi.workspace.v1.ClientRanges
|
|
246
|
+
*/
|
|
247
|
+
export type ClientRanges = Message<"toshi.workspace.v1.ClientRanges"> & {
|
|
248
|
+
/**
|
|
249
|
+
* The token is accepted only from an address in one of these; empty
|
|
250
|
+
* accepts every address.
|
|
251
|
+
*
|
|
252
|
+
* @generated from field: repeated string in = 1;
|
|
253
|
+
*/
|
|
254
|
+
in: string[];
|
|
255
|
+
/**
|
|
256
|
+
* The token is refused from an address in any of these, one in in too.
|
|
257
|
+
*
|
|
258
|
+
* @generated from field: repeated string not_in = 2;
|
|
259
|
+
*/
|
|
260
|
+
notIn: string[];
|
|
261
|
+
};
|
|
262
|
+
/**
|
|
263
|
+
* ClientRanges are the client addresses an API token is accepted from,
|
|
264
|
+
* each an IP address or a CIDR range, such as "203.0.113.0/24" or
|
|
265
|
+
* "2001:db8::/32". A call from another address, or before the token's
|
|
266
|
+
* not_before, is refused with UNAUTHENTICATED, as an expired token's is,
|
|
267
|
+
* with a google.rpc.ErrorInfo of domain "toshi.run" and reason
|
|
268
|
+
* TOKEN_OUTSIDE_RANGES or TOKEN_OUTSIDE_WINDOW, and the refusal is
|
|
269
|
+
* recorded in the audit log.
|
|
270
|
+
*
|
|
271
|
+
* @generated from message toshi.workspace.v1.ClientRanges
|
|
272
|
+
*/
|
|
273
|
+
export type ClientRangesJson = {
|
|
274
|
+
/**
|
|
275
|
+
* The token is accepted only from an address in one of these; empty
|
|
276
|
+
* accepts every address.
|
|
277
|
+
*
|
|
278
|
+
* @generated from field: repeated string in = 1;
|
|
279
|
+
*/
|
|
280
|
+
in?: string[];
|
|
281
|
+
/**
|
|
282
|
+
* The token is refused from an address in any of these, one in in too.
|
|
283
|
+
*
|
|
284
|
+
* @generated from field: repeated string not_in = 2;
|
|
285
|
+
*/
|
|
286
|
+
notIn?: string[];
|
|
287
|
+
};
|
|
288
|
+
/**
|
|
289
|
+
* Describes the message toshi.workspace.v1.ClientRanges.
|
|
290
|
+
* Use `create(ClientRangesSchema)` to create a new message.
|
|
291
|
+
*/
|
|
292
|
+
export declare const ClientRangesSchema: GenMessage<ClientRanges, {
|
|
293
|
+
jsonType: ClientRangesJson;
|
|
294
|
+
}>;
|
|
147
295
|
/**
|
|
148
296
|
* ListTokensRequest optionally narrows the list to one kind.
|
|
149
297
|
*
|
|
@@ -255,7 +403,7 @@ export type CreateWorkspaceTokenRequest = Message<"toshi.workspace.v1.CreateWork
|
|
|
255
403
|
*/
|
|
256
404
|
name: string;
|
|
257
405
|
/**
|
|
258
|
-
* Unset means the
|
|
406
|
+
* Unset means the longest lifetime allowed, 90 days by default.
|
|
259
407
|
*
|
|
260
408
|
* @generated from field: google.protobuf.Timestamp expires_at = 2;
|
|
261
409
|
*/
|
|
@@ -274,6 +422,28 @@ export type CreateWorkspaceTokenRequest = Message<"toshi.workspace.v1.CreateWork
|
|
|
274
422
|
* @generated from field: string environment = 4;
|
|
275
423
|
*/
|
|
276
424
|
environment: string;
|
|
425
|
+
/**
|
|
426
|
+
* When the token starts working; unset means at once.
|
|
427
|
+
*
|
|
428
|
+
* @generated from field: google.protobuf.Timestamp not_before = 5;
|
|
429
|
+
*/
|
|
430
|
+
notBefore?: Timestamp | undefined;
|
|
431
|
+
/**
|
|
432
|
+
* The client addresses the token is accepted from; unset means every
|
|
433
|
+
* address.
|
|
434
|
+
*
|
|
435
|
+
* @generated from field: toshi.workspace.v1.ClientRanges client_ranges = 6;
|
|
436
|
+
*/
|
|
437
|
+
clientRanges?: ClientRanges | undefined;
|
|
438
|
+
/**
|
|
439
|
+
* The token's role, by id: a built-in role or one of the workspace's
|
|
440
|
+
* own, which the caller must hold everything of where the token acts.
|
|
441
|
+
* Empty gives Admin to a whole-workspace token and Member to a limited
|
|
442
|
+
* one.
|
|
443
|
+
*
|
|
444
|
+
* @generated from field: string role = 7;
|
|
445
|
+
*/
|
|
446
|
+
role: string;
|
|
277
447
|
};
|
|
278
448
|
/**
|
|
279
449
|
* CreateWorkspaceTokenRequest names the token and what it may reach.
|
|
@@ -288,7 +458,7 @@ export type CreateWorkspaceTokenRequestJson = {
|
|
|
288
458
|
*/
|
|
289
459
|
name?: string;
|
|
290
460
|
/**
|
|
291
|
-
* Unset means the
|
|
461
|
+
* Unset means the longest lifetime allowed, 90 days by default.
|
|
292
462
|
*
|
|
293
463
|
* @generated from field: google.protobuf.Timestamp expires_at = 2;
|
|
294
464
|
*/
|
|
@@ -307,6 +477,28 @@ export type CreateWorkspaceTokenRequestJson = {
|
|
|
307
477
|
* @generated from field: string environment = 4;
|
|
308
478
|
*/
|
|
309
479
|
environment?: string;
|
|
480
|
+
/**
|
|
481
|
+
* When the token starts working; unset means at once.
|
|
482
|
+
*
|
|
483
|
+
* @generated from field: google.protobuf.Timestamp not_before = 5;
|
|
484
|
+
*/
|
|
485
|
+
notBefore?: TimestampJson;
|
|
486
|
+
/**
|
|
487
|
+
* The client addresses the token is accepted from; unset means every
|
|
488
|
+
* address.
|
|
489
|
+
*
|
|
490
|
+
* @generated from field: toshi.workspace.v1.ClientRanges client_ranges = 6;
|
|
491
|
+
*/
|
|
492
|
+
clientRanges?: ClientRangesJson;
|
|
493
|
+
/**
|
|
494
|
+
* The token's role, by id: a built-in role or one of the workspace's
|
|
495
|
+
* own, which the caller must hold everything of where the token acts.
|
|
496
|
+
* Empty gives Admin to a whole-workspace token and Member to a limited
|
|
497
|
+
* one.
|
|
498
|
+
*
|
|
499
|
+
* @generated from field: string role = 7;
|
|
500
|
+
*/
|
|
501
|
+
role?: string;
|
|
310
502
|
};
|
|
311
503
|
/**
|
|
312
504
|
* Describes the message toshi.workspace.v1.CreateWorkspaceTokenRequest.
|
|
@@ -426,6 +618,162 @@ export type RevokeTokenResponseJson = {
|
|
|
426
618
|
export declare const RevokeTokenResponseSchema: GenMessage<RevokeTokenResponse, {
|
|
427
619
|
jsonType: RevokeTokenResponseJson;
|
|
428
620
|
}>;
|
|
621
|
+
/**
|
|
622
|
+
* RollWorkspaceTokenRequest names the token to roll.
|
|
623
|
+
*
|
|
624
|
+
* @generated from message toshi.workspace.v1.RollWorkspaceTokenRequest
|
|
625
|
+
*/
|
|
626
|
+
export type RollWorkspaceTokenRequest = Message<"toshi.workspace.v1.RollWorkspaceTokenRequest"> & {
|
|
627
|
+
/**
|
|
628
|
+
* @generated from field: string id = 1;
|
|
629
|
+
*/
|
|
630
|
+
id: string;
|
|
631
|
+
};
|
|
632
|
+
/**
|
|
633
|
+
* RollWorkspaceTokenRequest names the token to roll.
|
|
634
|
+
*
|
|
635
|
+
* @generated from message toshi.workspace.v1.RollWorkspaceTokenRequest
|
|
636
|
+
*/
|
|
637
|
+
export type RollWorkspaceTokenRequestJson = {
|
|
638
|
+
/**
|
|
639
|
+
* @generated from field: string id = 1;
|
|
640
|
+
*/
|
|
641
|
+
id?: string;
|
|
642
|
+
};
|
|
643
|
+
/**
|
|
644
|
+
* Describes the message toshi.workspace.v1.RollWorkspaceTokenRequest.
|
|
645
|
+
* Use `create(RollWorkspaceTokenRequestSchema)` to create a new message.
|
|
646
|
+
*/
|
|
647
|
+
export declare const RollWorkspaceTokenRequestSchema: GenMessage<RollWorkspaceTokenRequest, {
|
|
648
|
+
jsonType: RollWorkspaceTokenRequestJson;
|
|
649
|
+
}>;
|
|
650
|
+
/**
|
|
651
|
+
* RollWorkspaceTokenResponse carries the token and its new value.
|
|
652
|
+
*
|
|
653
|
+
* @generated from message toshi.workspace.v1.RollWorkspaceTokenResponse
|
|
654
|
+
*/
|
|
655
|
+
export type RollWorkspaceTokenResponse = Message<"toshi.workspace.v1.RollWorkspaceTokenResponse"> & {
|
|
656
|
+
/**
|
|
657
|
+
* @generated from field: toshi.workspace.v1.Token token = 1;
|
|
658
|
+
*/
|
|
659
|
+
token?: Token | undefined;
|
|
660
|
+
/**
|
|
661
|
+
* The new value. It is returned only here.
|
|
662
|
+
*
|
|
663
|
+
* @generated from field: string value = 2;
|
|
664
|
+
*/
|
|
665
|
+
value: string;
|
|
666
|
+
};
|
|
667
|
+
/**
|
|
668
|
+
* RollWorkspaceTokenResponse carries the token and its new value.
|
|
669
|
+
*
|
|
670
|
+
* @generated from message toshi.workspace.v1.RollWorkspaceTokenResponse
|
|
671
|
+
*/
|
|
672
|
+
export type RollWorkspaceTokenResponseJson = {
|
|
673
|
+
/**
|
|
674
|
+
* @generated from field: toshi.workspace.v1.Token token = 1;
|
|
675
|
+
*/
|
|
676
|
+
token?: TokenJson;
|
|
677
|
+
/**
|
|
678
|
+
* The new value. It is returned only here.
|
|
679
|
+
*
|
|
680
|
+
* @generated from field: string value = 2;
|
|
681
|
+
*/
|
|
682
|
+
value?: string;
|
|
683
|
+
};
|
|
684
|
+
/**
|
|
685
|
+
* Describes the message toshi.workspace.v1.RollWorkspaceTokenResponse.
|
|
686
|
+
* Use `create(RollWorkspaceTokenResponseSchema)` to create a new message.
|
|
687
|
+
*/
|
|
688
|
+
export declare const RollWorkspaceTokenResponseSchema: GenMessage<RollWorkspaceTokenResponse, {
|
|
689
|
+
jsonType: RollWorkspaceTokenResponseJson;
|
|
690
|
+
}>;
|
|
691
|
+
/**
|
|
692
|
+
* UpdateTokenRequest names an API token and the fields to change.
|
|
693
|
+
*
|
|
694
|
+
* @generated from message toshi.workspace.v1.UpdateTokenRequest
|
|
695
|
+
*/
|
|
696
|
+
export type UpdateTokenRequest = Message<"toshi.workspace.v1.UpdateTokenRequest"> & {
|
|
697
|
+
/**
|
|
698
|
+
* @generated from field: string id = 1;
|
|
699
|
+
*/
|
|
700
|
+
id: string;
|
|
701
|
+
/**
|
|
702
|
+
* Carries the new values of the fields update_mask names. An unset
|
|
703
|
+
* not_before or client_ranges clears it; expires_at must be set.
|
|
704
|
+
*
|
|
705
|
+
* @generated from field: toshi.workspace.v1.Token token = 2;
|
|
706
|
+
*/
|
|
707
|
+
token?: Token | undefined;
|
|
708
|
+
/**
|
|
709
|
+
* One or more of name, expires_at, not_before, client_ranges and
|
|
710
|
+
* created_by.
|
|
711
|
+
*
|
|
712
|
+
* @generated from field: google.protobuf.FieldMask update_mask = 3;
|
|
713
|
+
*/
|
|
714
|
+
updateMask?: FieldMask | undefined;
|
|
715
|
+
};
|
|
716
|
+
/**
|
|
717
|
+
* UpdateTokenRequest names an API token and the fields to change.
|
|
718
|
+
*
|
|
719
|
+
* @generated from message toshi.workspace.v1.UpdateTokenRequest
|
|
720
|
+
*/
|
|
721
|
+
export type UpdateTokenRequestJson = {
|
|
722
|
+
/**
|
|
723
|
+
* @generated from field: string id = 1;
|
|
724
|
+
*/
|
|
725
|
+
id?: string;
|
|
726
|
+
/**
|
|
727
|
+
* Carries the new values of the fields update_mask names. An unset
|
|
728
|
+
* not_before or client_ranges clears it; expires_at must be set.
|
|
729
|
+
*
|
|
730
|
+
* @generated from field: toshi.workspace.v1.Token token = 2;
|
|
731
|
+
*/
|
|
732
|
+
token?: TokenJson;
|
|
733
|
+
/**
|
|
734
|
+
* One or more of name, expires_at, not_before, client_ranges and
|
|
735
|
+
* created_by.
|
|
736
|
+
*
|
|
737
|
+
* @generated from field: google.protobuf.FieldMask update_mask = 3;
|
|
738
|
+
*/
|
|
739
|
+
updateMask?: FieldMaskJson;
|
|
740
|
+
};
|
|
741
|
+
/**
|
|
742
|
+
* Describes the message toshi.workspace.v1.UpdateTokenRequest.
|
|
743
|
+
* Use `create(UpdateTokenRequestSchema)` to create a new message.
|
|
744
|
+
*/
|
|
745
|
+
export declare const UpdateTokenRequestSchema: GenMessage<UpdateTokenRequest, {
|
|
746
|
+
jsonType: UpdateTokenRequestJson;
|
|
747
|
+
}>;
|
|
748
|
+
/**
|
|
749
|
+
* UpdateTokenResponse carries the token as it now is.
|
|
750
|
+
*
|
|
751
|
+
* @generated from message toshi.workspace.v1.UpdateTokenResponse
|
|
752
|
+
*/
|
|
753
|
+
export type UpdateTokenResponse = Message<"toshi.workspace.v1.UpdateTokenResponse"> & {
|
|
754
|
+
/**
|
|
755
|
+
* @generated from field: toshi.workspace.v1.Token token = 1;
|
|
756
|
+
*/
|
|
757
|
+
token?: Token | undefined;
|
|
758
|
+
};
|
|
759
|
+
/**
|
|
760
|
+
* UpdateTokenResponse carries the token as it now is.
|
|
761
|
+
*
|
|
762
|
+
* @generated from message toshi.workspace.v1.UpdateTokenResponse
|
|
763
|
+
*/
|
|
764
|
+
export type UpdateTokenResponseJson = {
|
|
765
|
+
/**
|
|
766
|
+
* @generated from field: toshi.workspace.v1.Token token = 1;
|
|
767
|
+
*/
|
|
768
|
+
token?: TokenJson;
|
|
769
|
+
};
|
|
770
|
+
/**
|
|
771
|
+
* Describes the message toshi.workspace.v1.UpdateTokenResponse.
|
|
772
|
+
* Use `create(UpdateTokenResponseSchema)` to create a new message.
|
|
773
|
+
*/
|
|
774
|
+
export declare const UpdateTokenResponseSchema: GenMessage<UpdateTokenResponse, {
|
|
775
|
+
jsonType: UpdateTokenResponseJson;
|
|
776
|
+
}>;
|
|
429
777
|
/**
|
|
430
778
|
* TokenKind says what a token grants.
|
|
431
779
|
*
|
|
@@ -459,6 +807,42 @@ export type TokenKindJson = "TOKEN_KIND_UNSPECIFIED" | "TOKEN_KIND_ENROLLMENT" |
|
|
|
459
807
|
* Describes the enum toshi.workspace.v1.TokenKind.
|
|
460
808
|
*/
|
|
461
809
|
export declare const TokenKindSchema: GenEnum<TokenKind, TokenKindJson>;
|
|
810
|
+
/**
|
|
811
|
+
* TokenExpiryReason says why a token expires when it does.
|
|
812
|
+
*
|
|
813
|
+
* @generated from enum toshi.workspace.v1.TokenExpiryReason
|
|
814
|
+
*/
|
|
815
|
+
export declare enum TokenExpiryReason {
|
|
816
|
+
/**
|
|
817
|
+
* The token does not expire.
|
|
818
|
+
*
|
|
819
|
+
* @generated from enum value: TOKEN_EXPIRY_REASON_UNSPECIFIED = 0;
|
|
820
|
+
*/
|
|
821
|
+
UNSPECIFIED = 0,
|
|
822
|
+
/**
|
|
823
|
+
* The token expires when it was made, rolled or updated to.
|
|
824
|
+
*
|
|
825
|
+
* @generated from enum value: TOKEN_EXPIRY_REASON_SET = 1;
|
|
826
|
+
*/
|
|
827
|
+
SET = 1,
|
|
828
|
+
/**
|
|
829
|
+
* The token expires 30 days after its creator left the workspace, sooner
|
|
830
|
+
* than the expiry it was given.
|
|
831
|
+
*
|
|
832
|
+
* @generated from enum value: TOKEN_EXPIRY_REASON_CREATOR_LEFT = 2;
|
|
833
|
+
*/
|
|
834
|
+
CREATOR_LEFT = 2
|
|
835
|
+
}
|
|
836
|
+
/**
|
|
837
|
+
* TokenExpiryReason says why a token expires when it does.
|
|
838
|
+
*
|
|
839
|
+
* @generated from enum toshi.workspace.v1.TokenExpiryReason
|
|
840
|
+
*/
|
|
841
|
+
export type TokenExpiryReasonJson = "TOKEN_EXPIRY_REASON_UNSPECIFIED" | "TOKEN_EXPIRY_REASON_SET" | "TOKEN_EXPIRY_REASON_CREATOR_LEFT";
|
|
842
|
+
/**
|
|
843
|
+
* Describes the enum toshi.workspace.v1.TokenExpiryReason.
|
|
844
|
+
*/
|
|
845
|
+
export declare const TokenExpiryReasonSchema: GenEnum<TokenExpiryReason, TokenExpiryReasonJson>;
|
|
462
846
|
/**
|
|
463
847
|
* TokenService manages the workspace's tokens: its API tokens, which call
|
|
464
848
|
* the Workspace API as the workspace, and its enrollment tokens, with which
|
|
@@ -515,4 +899,49 @@ export declare const TokenService: GenService<{
|
|
|
515
899
|
input: typeof RevokeTokenRequestSchema;
|
|
516
900
|
output: typeof RevokeTokenResponseSchema;
|
|
517
901
|
};
|
|
902
|
+
/**
|
|
903
|
+
* RollWorkspaceToken gives one of the workspace's tokens a new value and
|
|
904
|
+
* returns it; the old value stops working at once. The token keeps its
|
|
905
|
+
* ID, name, roles, limit, client address ranges, start, expiry and
|
|
906
|
+
* creator, so what was granted to it stays granted. An API or enrollment
|
|
907
|
+
* token rolls.
|
|
908
|
+
*
|
|
909
|
+
* Only a signed-in session may call it, as for CreateWorkspaceToken. A
|
|
910
|
+
* token someone else made needs members.write as well, and is refused
|
|
911
|
+
* without it with PERMISSION_DENIED. A token of another workspace, and an
|
|
912
|
+
* unknown ID, fail with NOT_FOUND; a revoked or expired token with
|
|
913
|
+
* FAILED_PRECONDITION.
|
|
914
|
+
*
|
|
915
|
+
* @generated from rpc toshi.workspace.v1.TokenService.RollWorkspaceToken
|
|
916
|
+
*/
|
|
917
|
+
rollWorkspaceToken: {
|
|
918
|
+
methodKind: "unary";
|
|
919
|
+
input: typeof RollWorkspaceTokenRequestSchema;
|
|
920
|
+
output: typeof RollWorkspaceTokenResponseSchema;
|
|
921
|
+
};
|
|
922
|
+
/**
|
|
923
|
+
* UpdateToken changes an API token's name, expiry, start and client
|
|
924
|
+
* address ranges: the fields update_mask names. The expiry stays within
|
|
925
|
+
* the longest lifetime allowed from now. Only a signed-in session may
|
|
926
|
+
* call it, but a person's access token may make the call whose mask is
|
|
927
|
+
* created_by alone; and a token someone else made needs members.write as
|
|
928
|
+
* well, as for RollWorkspaceToken. An enrollment token fails with
|
|
929
|
+
* INVALID_ARGUMENT; a token of another workspace, and an unknown ID,
|
|
930
|
+
* with NOT_FOUND; a revoked token with FAILED_PRECONDITION.
|
|
931
|
+
*
|
|
932
|
+
* created_by re-owns the token: the caller becomes its creator, and the
|
|
933
|
+
* token, with the tokens it made, no longer runs out because its
|
|
934
|
+
* creator left (creator_left_at). The new creator must be the caller,
|
|
935
|
+
* or the call fails with INVALID_ARGUMENT; the caller needs the Owner
|
|
936
|
+
* role, and must hold every permission of the token's role where the
|
|
937
|
+
* token acts, or it fails with PERMISSION_DENIED; an expired token
|
|
938
|
+
* fails with FAILED_PRECONDITION.
|
|
939
|
+
*
|
|
940
|
+
* @generated from rpc toshi.workspace.v1.TokenService.UpdateToken
|
|
941
|
+
*/
|
|
942
|
+
updateToken: {
|
|
943
|
+
methodKind: "unary";
|
|
944
|
+
input: typeof UpdateTokenRequestSchema;
|
|
945
|
+
output: typeof UpdateTokenResponseSchema;
|
|
946
|
+
};
|
|
518
947
|
}>;
|
|
@@ -2,47 +2,73 @@
|
|
|
2
2
|
// @generated from file toshi/workspace/v1/tokens.proto (package toshi.workspace.v1, syntax proto3)
|
|
3
3
|
/* eslint-disable */
|
|
4
4
|
import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
|
|
5
|
-
import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
5
|
+
import { file_google_protobuf_field_mask, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
|
|
6
6
|
import { file_toshi_permission } from "../../permission_pb.js";
|
|
7
|
+
import { file_toshi_workspace_v1_roles } from "./roles_pb.js";
|
|
7
8
|
/**
|
|
8
9
|
* Describes the file toshi/workspace/v1/tokens.proto.
|
|
9
10
|
*/
|
|
10
|
-
export const file_toshi_workspace_v1_tokens = /*@__PURE__*/ fileDesc("
|
|
11
|
+
export const file_toshi_workspace_v1_tokens = /*@__PURE__*/ fileDesc("Ch90b3NoaS93b3Jrc3BhY2UvdjEvdG9rZW5zLnByb3RvEhJ0b3NoaS53b3Jrc3BhY2UudjEi4AQKBVRva2VuEgoKAmlkGAEgASgJEisKBGtpbmQYAiABKA4yHS50b3NoaS53b3Jrc3BhY2UudjEuVG9rZW5LaW5kEg4KBnNvdXJjZRgDIAEoCRIuCgpjcmVhdGVkX2F0GAQgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgpleHBpcmVzX2F0GAUgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIuCgpyZXZva2VkX2F0GAYgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIOCgZhY3RpdmUYByABKAgSDAoEbmFtZRgIIAEoCRIPCgdwcm9qZWN0GAkgASgJEhMKC2Vudmlyb25tZW50GAogASgJEi4KCm5vdF9iZWZvcmUYCyABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEjcKDWNsaWVudF9yYW5nZXMYDCABKAsyIC50b3NoaS53b3Jrc3BhY2UudjEuQ2xpZW50UmFuZ2VzEi8KCmNyZWF0ZWRfYnkYDSABKAsyGy50b3NoaS53b3Jrc3BhY2UudjEuU3ViamVjdBItCglsYXN0X3VzZWQYDiABKAsyGi5nb29nbGUucHJvdG9idWYuVGltZXN0YW1wEjMKD2NyZWF0b3JfbGVmdF9hdBgPIAEoCzIaLmdvb2dsZS5wcm90b2J1Zi5UaW1lc3RhbXASPAoNZXhwaXJ5X3JlYXNvbhgQIAEoDjIlLnRvc2hpLndvcmtzcGFjZS52MS5Ub2tlbkV4cGlyeVJlYXNvbiIqCgxDbGllbnRSYW5nZXMSCgoCaW4YASADKAkSDgoGbm90X2luGAIgAygJ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m9sbFdvcmtzcGFjZVRva2VuEi0udG9zaGkud29ya3NwYWNlLnYxLlJvbGxXb3Jrc3BhY2VUb2tlblJlcXVlc3QaLi50b3NoaS53b3Jrc3BhY2UudjEuUm9sbFdvcmtzcGFjZVRva2VuUmVzcG9uc2UiIsLzGAx0b2tlbnMud3JpdGXS8xgOCgx0b2tlbi5yb2xsZWQScAoLVXBkYXRlVG9rZW4SJi50b3NoaS53b3Jrc3BhY2UudjEuVXBkYXRlVG9rZW5SZXF1ZXN0GicudG9zaGkud29ya3NwYWNlLnYxLlVwZGF0ZVRva2VuUmVzcG9uc2UiEMLzGAx0b2tlbnMud3JpdGVCIlogZ28udG9zaGljbG91ZC5pby9hcGkvd29ya3NwYWNldjFiBnByb3RvMw", [file_google_protobuf_field_mask, file_google_protobuf_timestamp, file_toshi_permission, file_toshi_workspace_v1_roles]);
|
|
11
12
|
/**
|
|
12
13
|
* Describes the message toshi.workspace.v1.Token.
|
|
13
14
|
* Use `create(TokenSchema)` to create a new message.
|
|
14
15
|
*/
|
|
15
16
|
export const TokenSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 0);
|
|
17
|
+
/**
|
|
18
|
+
* Describes the message toshi.workspace.v1.ClientRanges.
|
|
19
|
+
* Use `create(ClientRangesSchema)` to create a new message.
|
|
20
|
+
*/
|
|
21
|
+
export const ClientRangesSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 1);
|
|
16
22
|
/**
|
|
17
23
|
* Describes the message toshi.workspace.v1.ListTokensRequest.
|
|
18
24
|
* Use `create(ListTokensRequestSchema)` to create a new message.
|
|
19
25
|
*/
|
|
20
|
-
export const ListTokensRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens,
|
|
26
|
+
export const ListTokensRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 2);
|
|
21
27
|
/**
|
|
22
28
|
* Describes the message toshi.workspace.v1.ListTokensResponse.
|
|
23
29
|
* Use `create(ListTokensResponseSchema)` to create a new message.
|
|
24
30
|
*/
|
|
25
|
-
export const ListTokensResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens,
|
|
31
|
+
export const ListTokensResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 3);
|
|
26
32
|
/**
|
|
27
33
|
* Describes the message toshi.workspace.v1.CreateWorkspaceTokenRequest.
|
|
28
34
|
* Use `create(CreateWorkspaceTokenRequestSchema)` to create a new message.
|
|
29
35
|
*/
|
|
30
|
-
export const CreateWorkspaceTokenRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens,
|
|
36
|
+
export const CreateWorkspaceTokenRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 4);
|
|
31
37
|
/**
|
|
32
38
|
* Describes the message toshi.workspace.v1.CreateWorkspaceTokenResponse.
|
|
33
39
|
* Use `create(CreateWorkspaceTokenResponseSchema)` to create a new message.
|
|
34
40
|
*/
|
|
35
|
-
export const CreateWorkspaceTokenResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens,
|
|
41
|
+
export const CreateWorkspaceTokenResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 5);
|
|
36
42
|
/**
|
|
37
43
|
* Describes the message toshi.workspace.v1.RevokeTokenRequest.
|
|
38
44
|
* Use `create(RevokeTokenRequestSchema)` to create a new message.
|
|
39
45
|
*/
|
|
40
|
-
export const RevokeTokenRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens,
|
|
46
|
+
export const RevokeTokenRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 6);
|
|
41
47
|
/**
|
|
42
48
|
* Describes the message toshi.workspace.v1.RevokeTokenResponse.
|
|
43
49
|
* Use `create(RevokeTokenResponseSchema)` to create a new message.
|
|
44
50
|
*/
|
|
45
|
-
export const RevokeTokenResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens,
|
|
51
|
+
export const RevokeTokenResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 7);
|
|
52
|
+
/**
|
|
53
|
+
* Describes the message toshi.workspace.v1.RollWorkspaceTokenRequest.
|
|
54
|
+
* Use `create(RollWorkspaceTokenRequestSchema)` to create a new message.
|
|
55
|
+
*/
|
|
56
|
+
export const RollWorkspaceTokenRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 8);
|
|
57
|
+
/**
|
|
58
|
+
* Describes the message toshi.workspace.v1.RollWorkspaceTokenResponse.
|
|
59
|
+
* Use `create(RollWorkspaceTokenResponseSchema)` to create a new message.
|
|
60
|
+
*/
|
|
61
|
+
export const RollWorkspaceTokenResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 9);
|
|
62
|
+
/**
|
|
63
|
+
* Describes the message toshi.workspace.v1.UpdateTokenRequest.
|
|
64
|
+
* Use `create(UpdateTokenRequestSchema)` to create a new message.
|
|
65
|
+
*/
|
|
66
|
+
export const UpdateTokenRequestSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 10);
|
|
67
|
+
/**
|
|
68
|
+
* Describes the message toshi.workspace.v1.UpdateTokenResponse.
|
|
69
|
+
* Use `create(UpdateTokenResponseSchema)` to create a new message.
|
|
70
|
+
*/
|
|
71
|
+
export const UpdateTokenResponseSchema = /*@__PURE__*/ messageDesc(file_toshi_workspace_v1_tokens, 11);
|
|
46
72
|
/**
|
|
47
73
|
* TokenKind says what a token grants.
|
|
48
74
|
*
|
|
@@ -71,6 +97,37 @@ export var TokenKind;
|
|
|
71
97
|
* Describes the enum toshi.workspace.v1.TokenKind.
|
|
72
98
|
*/
|
|
73
99
|
export const TokenKindSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_tokens, 0);
|
|
100
|
+
/**
|
|
101
|
+
* TokenExpiryReason says why a token expires when it does.
|
|
102
|
+
*
|
|
103
|
+
* @generated from enum toshi.workspace.v1.TokenExpiryReason
|
|
104
|
+
*/
|
|
105
|
+
export var TokenExpiryReason;
|
|
106
|
+
(function (TokenExpiryReason) {
|
|
107
|
+
/**
|
|
108
|
+
* The token does not expire.
|
|
109
|
+
*
|
|
110
|
+
* @generated from enum value: TOKEN_EXPIRY_REASON_UNSPECIFIED = 0;
|
|
111
|
+
*/
|
|
112
|
+
TokenExpiryReason[TokenExpiryReason["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
113
|
+
/**
|
|
114
|
+
* The token expires when it was made, rolled or updated to.
|
|
115
|
+
*
|
|
116
|
+
* @generated from enum value: TOKEN_EXPIRY_REASON_SET = 1;
|
|
117
|
+
*/
|
|
118
|
+
TokenExpiryReason[TokenExpiryReason["SET"] = 1] = "SET";
|
|
119
|
+
/**
|
|
120
|
+
* The token expires 30 days after its creator left the workspace, sooner
|
|
121
|
+
* than the expiry it was given.
|
|
122
|
+
*
|
|
123
|
+
* @generated from enum value: TOKEN_EXPIRY_REASON_CREATOR_LEFT = 2;
|
|
124
|
+
*/
|
|
125
|
+
TokenExpiryReason[TokenExpiryReason["CREATOR_LEFT"] = 2] = "CREATOR_LEFT";
|
|
126
|
+
})(TokenExpiryReason || (TokenExpiryReason = {}));
|
|
127
|
+
/**
|
|
128
|
+
* Describes the enum toshi.workspace.v1.TokenExpiryReason.
|
|
129
|
+
*/
|
|
130
|
+
export const TokenExpiryReasonSchema = /*@__PURE__*/ enumDesc(file_toshi_workspace_v1_tokens, 1);
|
|
74
131
|
/**
|
|
75
132
|
* TokenService manages the workspace's tokens: its API tokens, which call
|
|
76
133
|
* the Workspace API as the workspace, and its enrollment tokens, with which
|