@fi-ts/api 0.0.1-alpha.0

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.
Files changed (40) hide show
  1. package/buf/validate/validate_pb.d.ts +4766 -0
  2. package/buf/validate/validate_pb.js +356 -0
  3. package/buf/validate/validate_pb.ts +4967 -0
  4. package/fits/api/v1/common_pb.d.ts +372 -0
  5. package/fits/api/v1/common_pb.js +276 -0
  6. package/fits/api/v1/common_pb.ts +447 -0
  7. package/fits/api/v1/health_pb.d.ts +190 -0
  8. package/fits/api/v1/health_pb.js +100 -0
  9. package/fits/api/v1/health_pb.ts +229 -0
  10. package/fits/api/v1/ip_pb.d.ts +549 -0
  11. package/fits/api/v1/ip_pb.js +137 -0
  12. package/fits/api/v1/ip_pb.ts +643 -0
  13. package/fits/api/v1/method_pb.d.ts +116 -0
  14. package/fits/api/v1/method_pb.js +38 -0
  15. package/fits/api/v1/method_pb.ts +142 -0
  16. package/fits/api/v1/partition_pb.d.ts +251 -0
  17. package/fits/api/v1/partition_pb.js +62 -0
  18. package/fits/api/v1/partition_pb.ts +300 -0
  19. package/fits/api/v1/predefined_rules_pb.d.ts +90 -0
  20. package/fits/api/v1/predefined_rules_pb.js +93 -0
  21. package/fits/api/v1/predefined_rules_pb.ts +127 -0
  22. package/fits/api/v1/project_pb.d.ts +366 -0
  23. package/fits/api/v1/project_pb.js +73 -0
  24. package/fits/api/v1/project_pb.ts +430 -0
  25. package/fits/api/v1/tenant_pb.d.ts +370 -0
  26. package/fits/api/v1/tenant_pb.js +73 -0
  27. package/fits/api/v1/tenant_pb.ts +435 -0
  28. package/fits/api/v1/token_pb.d.ts +522 -0
  29. package/fits/api/v1/token_pb.js +118 -0
  30. package/fits/api/v1/token_pb.ts +600 -0
  31. package/fits/api/v1/user_pb.d.ts +108 -0
  32. package/fits/api/v1/user_pb.js +34 -0
  33. package/fits/api/v1/user_pb.ts +139 -0
  34. package/fits/api/v1/version_pb.d.ts +88 -0
  35. package/fits/api/v1/version_pb.js +32 -0
  36. package/fits/api/v1/version_pb.ts +114 -0
  37. package/fits/api/v1/vpn_pb.d.ts +55 -0
  38. package/fits/api/v1/vpn_pb.js +14 -0
  39. package/fits/api/v1/vpn_pb.ts +72 -0
  40. package/package.json +25 -0
@@ -0,0 +1,600 @@
1
+ // @generated by protoc-gen-es v2.14.1 with parameter "target=ts"
2
+ // @generated from file fits/api/v1/token.proto (package fits.api.v1, syntax proto3)
3
+ /* eslint-disable */
4
+
5
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
+ import { enumDesc, fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
+ import { file_buf_validate_validate } from "../../../buf/validate/validate_pb";
8
+ import type { AdminRole, Labels, Meta, ProjectRole, TenantRole, UpdateLabels, UpdateMeta } from "./common_pb";
9
+ import { file_fits_api_v1_common } from "./common_pb";
10
+ import { file_fits_api_v1_predefined_rules } from "./predefined_rules_pb";
11
+ import type { Duration, Timestamp } from "@bufbuild/protobuf/wkt";
12
+ import { file_google_protobuf_duration, file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
13
+ import type { Message } from "@bufbuild/protobuf";
14
+
15
+ /**
16
+ * Describes the file fits/api/v1/token.proto.
17
+ */
18
+ export const file_fits_api_v1_token: GenFile = /*@__PURE__*/
19
+ fileDesc("ChdmaXRzL2FwaS92MS90b2tlbi5wcm90bxILZml0cy5hcGkudjEizQYKBVRva2VuEhYKBHV1aWQYASABKAlCCLpIBXIDsAEBEhgKBHVzZXIYAiABKAlCCrpIB3IFEAIYgAQSHwoEbWV0YRgDIAEoCzIRLmZpdHMuYXBpLnYxLk1ldGESIAoLZGVzY3JpcHRpb24YBCABKAlCC7pICHIGyLOusQIBEj0KC3Blcm1pc3Npb25zGAUgAygLMh0uZml0cy5hcGkudjEuTWV0aG9kUGVybWlzc2lvbkIJukgGkgEDEPQDEisKB2V4cGlyZXMYBiABKAsyGi5nb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EicuZml0cy5hcGkudjEuVG9rZW5TZXJ2aWNlUmVmcmVzaFJlcXVlc3QaKC5maXRzLmFwaS52MS5Ub2tlblNlcnZpY2VSZWZyZXNoUmVzcG9uc2UiCNjzGALg8xgBQpYBCg9jb20uZml0cy5hcGkudjFCClRva2VuUHJvdG9QAVopZ2l0aHViLmNvbS9maS10cy9hcGkvZ28vZml0cy9hcGkvdjE7YXBpdjGiAgNGQViqAgtGaXRzLkFwaS5WMcoCC0ZpdHNcQXBpXFYx4gIXRml0c1xBcGlcVjFcR1BCTWV0YWRhdGHqAg1GaXRzOjpBcGk6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_fits_api_v1_common, file_fits_api_v1_predefined_rules, file_google_protobuf_duration, file_google_protobuf_timestamp]);
20
+
21
+ /**
22
+ * Token generates a jwt authentication token to access the api
23
+ *
24
+ * There are two different types of tokens, api- and user- tokens
25
+ *
26
+ * A user token is used to authenticate end user requests for example from a cli.
27
+ * The configured roles in a user token are expanded in the api server
28
+ * based on the memberships in other projects and tenants based on the role granted there.
29
+ * User tokens will never contain permissions.
30
+ * Permissions are always derived from the tenant and project roles and memberships.
31
+ *
32
+ * The api token should be used to authenticate services.
33
+ * In contrast to a user token, the api token permissions and roles apply as configured during the token create process.
34
+ *
35
+ * @generated from message fits.api.v1.Token
36
+ */
37
+ export type Token = Message<"fits.api.v1.Token"> & {
38
+ /**
39
+ * Uuid of the jwt token, used to reference it by revoke
40
+ *
41
+ * @generated from field: string uuid = 1;
42
+ */
43
+ uuid: string;
44
+
45
+ /**
46
+ * User who created this token
47
+ *
48
+ * @generated from field: string user = 2;
49
+ */
50
+ user: string;
51
+
52
+ /**
53
+ * Meta for this token
54
+ *
55
+ * @generated from field: fits.api.v1.Meta meta = 3;
56
+ */
57
+ meta?: Meta | undefined;
58
+
59
+ /**
60
+ * Description is a user given description of this token.
61
+ *
62
+ * @generated from field: string description = 4;
63
+ */
64
+ description: string;
65
+
66
+ /**
67
+ * Permissions is a list of service methods this token can be used for
68
+ *
69
+ * @generated from field: repeated fits.api.v1.MethodPermission permissions = 5;
70
+ */
71
+ permissions: MethodPermission[];
72
+
73
+ /**
74
+ * Expires gives the date in the future after which this token can not be used anymore
75
+ *
76
+ * @generated from field: google.protobuf.Timestamp expires = 6;
77
+ */
78
+ expires?: Timestamp | undefined;
79
+
80
+ /**
81
+ * IssuedAt gives the date when this token was created
82
+ *
83
+ * @generated from field: google.protobuf.Timestamp issued_at = 7;
84
+ */
85
+ issuedAt?: Timestamp | undefined;
86
+
87
+ /**
88
+ * TokenType describes the type of this token
89
+ *
90
+ * @generated from field: fits.api.v1.TokenType token_type = 8;
91
+ */
92
+ tokenType: TokenType;
93
+
94
+ /**
95
+ * ProjectRoles associates a project id with the corresponding role of the token owner
96
+ *
97
+ * @generated from field: map<string, fits.api.v1.ProjectRole> project_roles = 9;
98
+ */
99
+ projectRoles: { [key: string]: ProjectRole };
100
+
101
+ /**
102
+ * TenantRoles associates a tenant id with the corresponding role of the token owner
103
+ *
104
+ * @generated from field: map<string, fits.api.v1.TenantRole> tenant_roles = 10;
105
+ */
106
+ tenantRoles: { [key: string]: TenantRole };
107
+
108
+ /**
109
+ * AdminRole defines the admin role of the token owner
110
+ *
111
+ * @generated from field: optional fits.api.v1.AdminRole admin_role = 11;
112
+ */
113
+ adminRole?: AdminRole | undefined;
114
+ };
115
+
116
+ /**
117
+ * Describes the message fits.api.v1.Token.
118
+ * Use `create(TokenSchema)` to create a new message.
119
+ */
120
+ export const TokenSchema: GenMessage<Token> = /*@__PURE__*/
121
+ messageDesc(file_fits_api_v1_token, 0);
122
+
123
+ /**
124
+ * TokenServiceCreateRequest is the request payload to create a token
125
+ *
126
+ * @generated from message fits.api.v1.TokenServiceCreateRequest
127
+ */
128
+ export type TokenServiceCreateRequest = Message<"fits.api.v1.TokenServiceCreateRequest"> & {
129
+ /**
130
+ * Description of the token
131
+ *
132
+ * @generated from field: string description = 1;
133
+ */
134
+ description: string;
135
+
136
+ /**
137
+ * Permissions is a list of service methods this token can be used for
138
+ *
139
+ * @generated from field: repeated fits.api.v1.MethodPermission permissions = 2;
140
+ */
141
+ permissions: MethodPermission[];
142
+
143
+ /**
144
+ * Expires gives the duration since now, after which this token can not be used anymore
145
+ *
146
+ * @generated from field: google.protobuf.Duration expires = 3;
147
+ */
148
+ expires?: Duration | undefined;
149
+
150
+ /**
151
+ * ProjectRoles associates a project id with the corresponding role of the token owner
152
+ *
153
+ * @generated from field: map<string, fits.api.v1.ProjectRole> project_roles = 4;
154
+ */
155
+ projectRoles: { [key: string]: ProjectRole };
156
+
157
+ /**
158
+ * TenantRoles_associates a tenant id with the corresponding role of the token owner
159
+ *
160
+ * @generated from field: map<string, fits.api.v1.TenantRole> tenant_roles = 5;
161
+ */
162
+ tenantRoles: { [key: string]: TenantRole };
163
+
164
+ /**
165
+ * AdminRole defines the admin role of the token owner
166
+ *
167
+ * @generated from field: optional fits.api.v1.AdminRole admin_role = 6;
168
+ */
169
+ adminRole?: AdminRole | undefined;
170
+
171
+ /**
172
+ * Labels on this token
173
+ *
174
+ * @generated from field: fits.api.v1.Labels labels = 7;
175
+ */
176
+ labels?: Labels | undefined;
177
+ };
178
+
179
+ /**
180
+ * Describes the message fits.api.v1.TokenServiceCreateRequest.
181
+ * Use `create(TokenServiceCreateRequestSchema)` to create a new message.
182
+ */
183
+ export const TokenServiceCreateRequestSchema: GenMessage<TokenServiceCreateRequest> = /*@__PURE__*/
184
+ messageDesc(file_fits_api_v1_token, 1);
185
+
186
+ /**
187
+ * MethodPermission is a mapping from a subject/project to a service method
188
+ *
189
+ * @generated from message fits.api.v1.MethodPermission
190
+ */
191
+ export type MethodPermission = Message<"fits.api.v1.MethodPermission"> & {
192
+ /**
193
+ * Subject maybe either the project or the tenant
194
+ * for which the methods should be allowed
195
+ *
196
+ * asterisk (*) can be specified to match any subject
197
+ * empty string ("") can be specified for requests that do not require a subject, e.g. partition list
198
+ * otherwise either a projectid or a tenant login should be specified
199
+ *
200
+ * @generated from field: string subject = 1;
201
+ */
202
+ subject: string;
203
+
204
+ /**
205
+ * Methods which should be accessible
206
+ *
207
+ * @generated from field: repeated string methods = 2;
208
+ */
209
+ methods: string[];
210
+ };
211
+
212
+ /**
213
+ * Describes the message fits.api.v1.MethodPermission.
214
+ * Use `create(MethodPermissionSchema)` to create a new message.
215
+ */
216
+ export const MethodPermissionSchema: GenMessage<MethodPermission> = /*@__PURE__*/
217
+ messageDesc(file_fits_api_v1_token, 2);
218
+
219
+ /**
220
+ * TokenServiceCreateResponse is the response payload of a token create request
221
+ *
222
+ * @generated from message fits.api.v1.TokenServiceCreateResponse
223
+ */
224
+ export type TokenServiceCreateResponse = Message<"fits.api.v1.TokenServiceCreateResponse"> & {
225
+ /**
226
+ * Token which was created
227
+ *
228
+ * @generated from field: fits.api.v1.Token token = 1;
229
+ */
230
+ token?: Token | undefined;
231
+
232
+ /**
233
+ * Secret is the body if the jwt token, should be used in api requests as bearer token
234
+ *
235
+ * @generated from field: string secret = 2;
236
+ */
237
+ secret: string;
238
+ };
239
+
240
+ /**
241
+ * Describes the message fits.api.v1.TokenServiceCreateResponse.
242
+ * Use `create(TokenServiceCreateResponseSchema)` to create a new message.
243
+ */
244
+ export const TokenServiceCreateResponseSchema: GenMessage<TokenServiceCreateResponse> = /*@__PURE__*/
245
+ messageDesc(file_fits_api_v1_token, 3);
246
+
247
+ /**
248
+ * TokenServiceListRequest is the request payload to list tokens
249
+ *
250
+ * @generated from message fits.api.v1.TokenServiceListRequest
251
+ */
252
+ export type TokenServiceListRequest = Message<"fits.api.v1.TokenServiceListRequest"> & {
253
+ };
254
+
255
+ /**
256
+ * Describes the message fits.api.v1.TokenServiceListRequest.
257
+ * Use `create(TokenServiceListRequestSchema)` to create a new message.
258
+ */
259
+ export const TokenServiceListRequestSchema: GenMessage<TokenServiceListRequest> = /*@__PURE__*/
260
+ messageDesc(file_fits_api_v1_token, 4);
261
+
262
+ /**
263
+ * TokenServiceListResponse is the response payload of a token list request
264
+ *
265
+ * @generated from message fits.api.v1.TokenServiceListResponse
266
+ */
267
+ export type TokenServiceListResponse = Message<"fits.api.v1.TokenServiceListResponse"> & {
268
+ /**
269
+ * Tokens is a list of tokens without the secrets
270
+ *
271
+ * @generated from field: repeated fits.api.v1.Token tokens = 1;
272
+ */
273
+ tokens: Token[];
274
+ };
275
+
276
+ /**
277
+ * Describes the message fits.api.v1.TokenServiceListResponse.
278
+ * Use `create(TokenServiceListResponseSchema)` to create a new message.
279
+ */
280
+ export const TokenServiceListResponseSchema: GenMessage<TokenServiceListResponse> = /*@__PURE__*/
281
+ messageDesc(file_fits_api_v1_token, 5);
282
+
283
+ /**
284
+ * TokenServiceRevokeRequest is the request payload of a token revoke request
285
+ *
286
+ * @generated from message fits.api.v1.TokenServiceRevokeRequest
287
+ */
288
+ export type TokenServiceRevokeRequest = Message<"fits.api.v1.TokenServiceRevokeRequest"> & {
289
+ /**
290
+ * Uuid of the token to revoke
291
+ *
292
+ * @generated from field: string uuid = 1;
293
+ */
294
+ uuid: string;
295
+ };
296
+
297
+ /**
298
+ * Describes the message fits.api.v1.TokenServiceRevokeRequest.
299
+ * Use `create(TokenServiceRevokeRequestSchema)` to create a new message.
300
+ */
301
+ export const TokenServiceRevokeRequestSchema: GenMessage<TokenServiceRevokeRequest> = /*@__PURE__*/
302
+ messageDesc(file_fits_api_v1_token, 6);
303
+
304
+ /**
305
+ * TokenServiceRevokeResponse is the response payload of a token revoke request
306
+ *
307
+ * @generated from message fits.api.v1.TokenServiceRevokeResponse
308
+ */
309
+ export type TokenServiceRevokeResponse = Message<"fits.api.v1.TokenServiceRevokeResponse"> & {
310
+ };
311
+
312
+ /**
313
+ * Describes the message fits.api.v1.TokenServiceRevokeResponse.
314
+ * Use `create(TokenServiceRevokeResponseSchema)` to create a new message.
315
+ */
316
+ export const TokenServiceRevokeResponseSchema: GenMessage<TokenServiceRevokeResponse> = /*@__PURE__*/
317
+ messageDesc(file_fits_api_v1_token, 7);
318
+
319
+ /**
320
+ * TokenServiceUpdateRequest is the request payload of a token update request
321
+ *
322
+ * @generated from message fits.api.v1.TokenServiceUpdateRequest
323
+ */
324
+ export type TokenServiceUpdateRequest = Message<"fits.api.v1.TokenServiceUpdateRequest"> & {
325
+ /**
326
+ * Uuid of the token to update
327
+ *
328
+ * @generated from field: string uuid = 1;
329
+ */
330
+ uuid: string;
331
+
332
+ /**
333
+ * UpdateMeta contains the timestamp and strategy to be used in this update request
334
+ * TokenUpdate is not guarded with optlock in the backend
335
+ *
336
+ * @generated from field: fits.api.v1.UpdateMeta update_meta = 2;
337
+ */
338
+ updateMeta?: UpdateMeta | undefined;
339
+
340
+ /**
341
+ * Description is a user given description of this token.
342
+ *
343
+ * @generated from field: optional string description = 3;
344
+ */
345
+ description?: string | undefined;
346
+
347
+ /**
348
+ * Permissions is a list of service methods this token can be used for
349
+ *
350
+ * @generated from field: repeated fits.api.v1.MethodPermission permissions = 4;
351
+ */
352
+ permissions: MethodPermission[];
353
+
354
+ /**
355
+ * ProjectRoles associates a project id with the corresponding role of the token owner
356
+ *
357
+ * @generated from field: map<string, fits.api.v1.ProjectRole> project_roles = 5;
358
+ */
359
+ projectRoles: { [key: string]: ProjectRole };
360
+
361
+ /**
362
+ * TenantRoles associates a tenant id with the corresponding role of the token owner
363
+ *
364
+ * @generated from field: map<string, fits.api.v1.TenantRole> tenant_roles = 6;
365
+ */
366
+ tenantRoles: { [key: string]: TenantRole };
367
+
368
+ /**
369
+ * AdminRole defines the admin role of the token owner
370
+ *
371
+ * @generated from field: optional fits.api.v1.AdminRole admin_role = 7;
372
+ */
373
+ adminRole?: AdminRole | undefined;
374
+
375
+ /**
376
+ * Labels on this token
377
+ *
378
+ * @generated from field: fits.api.v1.UpdateLabels labels = 8;
379
+ */
380
+ labels?: UpdateLabels | undefined;
381
+ };
382
+
383
+ /**
384
+ * Describes the message fits.api.v1.TokenServiceUpdateRequest.
385
+ * Use `create(TokenServiceUpdateRequestSchema)` to create a new message.
386
+ */
387
+ export const TokenServiceUpdateRequestSchema: GenMessage<TokenServiceUpdateRequest> = /*@__PURE__*/
388
+ messageDesc(file_fits_api_v1_token, 8);
389
+
390
+ /**
391
+ * TokenServiceUpdateResponse is the response payload of a token update request
392
+ *
393
+ * @generated from message fits.api.v1.TokenServiceUpdateResponse
394
+ */
395
+ export type TokenServiceUpdateResponse = Message<"fits.api.v1.TokenServiceUpdateResponse"> & {
396
+ /**
397
+ * Token is the updated token
398
+ *
399
+ * @generated from field: fits.api.v1.Token token = 1;
400
+ */
401
+ token?: Token | undefined;
402
+ };
403
+
404
+ /**
405
+ * Describes the message fits.api.v1.TokenServiceUpdateResponse.
406
+ * Use `create(TokenServiceUpdateResponseSchema)` to create a new message.
407
+ */
408
+ export const TokenServiceUpdateResponseSchema: GenMessage<TokenServiceUpdateResponse> = /*@__PURE__*/
409
+ messageDesc(file_fits_api_v1_token, 9);
410
+
411
+ /**
412
+ * TokenServiceGetRequest is the request payload of a token get request
413
+ *
414
+ * @generated from message fits.api.v1.TokenServiceGetRequest
415
+ */
416
+ export type TokenServiceGetRequest = Message<"fits.api.v1.TokenServiceGetRequest"> & {
417
+ /**
418
+ * Uuid of the token to get
419
+ *
420
+ * @generated from field: string uuid = 1;
421
+ */
422
+ uuid: string;
423
+ };
424
+
425
+ /**
426
+ * Describes the message fits.api.v1.TokenServiceGetRequest.
427
+ * Use `create(TokenServiceGetRequestSchema)` to create a new message.
428
+ */
429
+ export const TokenServiceGetRequestSchema: GenMessage<TokenServiceGetRequest> = /*@__PURE__*/
430
+ messageDesc(file_fits_api_v1_token, 10);
431
+
432
+ /**
433
+ * TokenServiceGetResponse is the response payload of a token get request
434
+ *
435
+ * @generated from message fits.api.v1.TokenServiceGetResponse
436
+ */
437
+ export type TokenServiceGetResponse = Message<"fits.api.v1.TokenServiceGetResponse"> & {
438
+ /**
439
+ * Token is the token
440
+ *
441
+ * @generated from field: fits.api.v1.Token token = 1;
442
+ */
443
+ token?: Token | undefined;
444
+ };
445
+
446
+ /**
447
+ * Describes the message fits.api.v1.TokenServiceGetResponse.
448
+ * Use `create(TokenServiceGetResponseSchema)` to create a new message.
449
+ */
450
+ export const TokenServiceGetResponseSchema: GenMessage<TokenServiceGetResponse> = /*@__PURE__*/
451
+ messageDesc(file_fits_api_v1_token, 11);
452
+
453
+ /**
454
+ * TokenServiceRefreshRequest is the request payload of a token refresh request
455
+ * Permissions, Roles and Expiration duration and all other properties are inherited from the calling token.
456
+ * The expiration duration will be calculated from the existing token (exp - iat)
457
+ *
458
+ * @generated from message fits.api.v1.TokenServiceRefreshRequest
459
+ */
460
+ export type TokenServiceRefreshRequest = Message<"fits.api.v1.TokenServiceRefreshRequest"> & {
461
+ };
462
+
463
+ /**
464
+ * Describes the message fits.api.v1.TokenServiceRefreshRequest.
465
+ * Use `create(TokenServiceRefreshRequestSchema)` to create a new message.
466
+ */
467
+ export const TokenServiceRefreshRequestSchema: GenMessage<TokenServiceRefreshRequest> = /*@__PURE__*/
468
+ messageDesc(file_fits_api_v1_token, 12);
469
+
470
+ /**
471
+ * TokenServiceRefreshResponse is the response payload of a token refresh request
472
+ *
473
+ * @generated from message fits.api.v1.TokenServiceRefreshResponse
474
+ */
475
+ export type TokenServiceRefreshResponse = Message<"fits.api.v1.TokenServiceRefreshResponse"> & {
476
+ /**
477
+ * Token which was refreshed
478
+ *
479
+ * @generated from field: fits.api.v1.Token token = 1;
480
+ */
481
+ token?: Token | undefined;
482
+
483
+ /**
484
+ * Secret is the body if the jwt token, should be used in api requests as bearer token
485
+ *
486
+ * @generated from field: string secret = 2;
487
+ */
488
+ secret: string;
489
+ };
490
+
491
+ /**
492
+ * Describes the message fits.api.v1.TokenServiceRefreshResponse.
493
+ * Use `create(TokenServiceRefreshResponseSchema)` to create a new message.
494
+ */
495
+ export const TokenServiceRefreshResponseSchema: GenMessage<TokenServiceRefreshResponse> = /*@__PURE__*/
496
+ messageDesc(file_fits_api_v1_token, 13);
497
+
498
+ /**
499
+ * TokenType specifies different use cases of tokens
500
+ *
501
+ * @generated from enum fits.api.v1.TokenType
502
+ */
503
+ export enum TokenType {
504
+ /**
505
+ * TOKEN_TYPE_UNSPECIFIED is not specified
506
+ *
507
+ * @generated from enum value: TOKEN_TYPE_UNSPECIFIED = 0;
508
+ */
509
+ UNSPECIFIED = 0,
510
+
511
+ /**
512
+ * TOKEN_TYPE_API is a token for api usage
513
+ *
514
+ * @generated from enum value: TOKEN_TYPE_API = 1;
515
+ */
516
+ API = 1,
517
+
518
+ /**
519
+ * TOKEN_TYPE_USER is a token to access the api with cli, a web application or other user induced actions.
520
+ *
521
+ * @generated from enum value: TOKEN_TYPE_USER = 2;
522
+ */
523
+ USER = 2,
524
+ }
525
+
526
+ /**
527
+ * Describes the enum fits.api.v1.TokenType.
528
+ */
529
+ export const TokenTypeSchema: GenEnum<TokenType> = /*@__PURE__*/
530
+ enumDesc(file_fits_api_v1_token, 0);
531
+
532
+ /**
533
+ * TokenService provides token management operations.
534
+ *
535
+ * @generated from service fits.api.v1.TokenService
536
+ */
537
+ export const TokenService: GenService<{
538
+ /**
539
+ * Returns the token with the specified UUID.
540
+ *
541
+ * @generated from rpc fits.api.v1.TokenService.Get
542
+ */
543
+ get: {
544
+ methodKind: "unary";
545
+ input: typeof TokenServiceGetRequestSchema;
546
+ output: typeof TokenServiceGetResponseSchema;
547
+ },
548
+ /**
549
+ * Creates a token to authenticate against the platform, the secret will be only visible in the response.
550
+ *
551
+ * @generated from rpc fits.api.v1.TokenService.Create
552
+ */
553
+ create: {
554
+ methodKind: "unary";
555
+ input: typeof TokenServiceCreateRequestSchema;
556
+ output: typeof TokenServiceCreateResponseSchema;
557
+ },
558
+ /**
559
+ * Updates a token.
560
+ *
561
+ * @generated from rpc fits.api.v1.TokenService.Update
562
+ */
563
+ update: {
564
+ methodKind: "unary";
565
+ input: typeof TokenServiceUpdateRequestSchema;
566
+ output: typeof TokenServiceUpdateResponseSchema;
567
+ },
568
+ /**
569
+ * Returns the list of all user tokens.
570
+ *
571
+ * @generated from rpc fits.api.v1.TokenService.List
572
+ */
573
+ list: {
574
+ methodKind: "unary";
575
+ input: typeof TokenServiceListRequestSchema;
576
+ output: typeof TokenServiceListResponseSchema;
577
+ },
578
+ /**
579
+ * Revokes a token, no further usage is possible afterwards.
580
+ *
581
+ * @generated from rpc fits.api.v1.TokenService.Revoke
582
+ */
583
+ revoke: {
584
+ methodKind: "unary";
585
+ input: typeof TokenServiceRevokeRequestSchema;
586
+ output: typeof TokenServiceRevokeResponseSchema;
587
+ },
588
+ /**
589
+ * Refreshes a token, this will create a new token with the exact same permissions as the calling token contains.
590
+ *
591
+ * @generated from rpc fits.api.v1.TokenService.Refresh
592
+ */
593
+ refresh: {
594
+ methodKind: "unary";
595
+ input: typeof TokenServiceRefreshRequestSchema;
596
+ output: typeof TokenServiceRefreshResponseSchema;
597
+ },
598
+ }> = /*@__PURE__*/
599
+ serviceDesc(file_fits_api_v1_token, 0);
600
+