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