@fi-ts/api 0.0.0-pr.46.8e8dcf01 → 0.0.0-pr.47.7ce1a10c

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.
@@ -1,414 +0,0 @@
1
- // @generated by protoc-gen-es v2.14.1 with parameter "target=ts,import_extension=js"
2
- // @generated from file fits/api/v1/apikey.proto (package fits.api.v1, syntax proto3)
3
- /* eslint-disable */
4
-
5
- import type { GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
6
- import { fileDesc, messageDesc, serviceDesc } from "@bufbuild/protobuf/codegenv2";
7
- import { file_buf_validate_validate } from "../../../buf/validate/validate_pb.js";
8
- import { file_fits_api_v1_common } from "./common_pb.js";
9
- import { file_fits_api_v1_predefined_rules } from "./predefined_rules_pb.js";
10
- import type { PermissionsByVisibility } from "./token_pb.js";
11
- import { file_fits_api_v1_token } from "./token_pb.js";
12
- import type { Timestamp } from "@bufbuild/protobuf/wkt";
13
- import { file_google_protobuf_timestamp } from "@bufbuild/protobuf/wkt";
14
- import type { Message } from "@bufbuild/protobuf";
15
-
16
- /**
17
- * Describes the file fits/api/v1/apikey.proto.
18
- */
19
- export const file_fits_api_v1_apikey: GenFile = /*@__PURE__*/
20
- fileDesc("ChhmaXRzL2FwaS92MS9hcGlrZXkucHJvdG8SC2ZpdHMuYXBpLnYxIuoDCgZBcGlLZXkSFAoCaWQYASABKAlCCLpIBXIDsAEBEhkKB3VzZXJfaWQYAiABKAlCCLpIBXIDsAEBEhoKBXJlYWxtGAMgASgJQgu6SAhyBsCzrrECARIZCgRuYW1lGAQgASgJQgu6SAhyBsCzrrECARIjCgRoYXNoGAUgASgJQhW6SBJyEDIOXlswLTlhLWZdezY0fSQSGAoGcHJlZml4GAYgASgJQgi6SAVyA5gBDBIuCgpjcmVhdGVkX2F0GAcgASgLMhouZ29vZ2xlLnByb3RvYnVmLlRpbWVzdGFtcBIzCgpleHBpcmVzX2F0GAggASgLMhouZ29vZ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lLZXlTZXJ2aWNlRGVsZXRlUmVxdWVzdBIUCgJpZBgBIAEoCUIIukgFcgOwAQEiHQobQXBpS2V5U2VydmljZURlbGV0ZVJlc3BvbnNlMoMECg1BcGlLZXlTZXJ2aWNlEmUKBkNyZWF0ZRInLmZpdHMuYXBpLnYxLkFwaUtleVNlcnZpY2VDcmVhdGVSZXF1ZXN0GiguZml0cy5hcGkudjEuQXBpS2V5U2VydmljZUNyZWF0ZVJlc3BvbnNlIgjY8xgC4PMYARJfCgRMaXN0EiUuZml0cy5hcGkudjEuQXBpS2V5U2VydmljZUxpc3RSZXF1ZXN0GiYuZml0cy5hcGkudjEuQXBpS2V5U2VydmljZUxpc3RSZXNwb25zZSII2PMYAuDzGAESXAoDR2V0EiQuZml0cy5hcGkudjEuQXBpS2V5U2VydmljZUdldFJlcXVlc3QaJS5maXRzLmFwaS52MS5BcGlLZXlTZXJ2aWNlR2V0UmVzcG9uc2UiCNjzGALg8xgBEmUKBlJldm9rZRInLmZpdHMuYXBpLnYxLkFwaUtleVNlcnZpY2VSZXZva2VSZXF1ZXN0GiguZml0cy5hcGkudjEuQXBpS2V5U2VydmljZVJldm9rZVJlc3BvbnNlIgjY8xgC4PMYARJlCgZEZWxldGUSJy5maXRzLmFwaS52MS5BcGlLZXlTZXJ2aWNlRGVsZXRlUmVxdWVzdBooLmZpdHMuYXBpLnYxLkFwaUtleVNlcnZpY2VEZWxldGVSZXNwb25zZSII2PMYAuDzGAFClwEKD2NvbS5maXRzLmFwaS52MUILQXBpa2V5UHJvdG9QAVopZ2l0aHViLmNvbS9maS10cy9hcGkvZ28vZml0cy9hcGkvdjE7YXBpdjGiAgNGQViqAgtGaXRzLkFwaS5WMcoCC0ZpdHNcQXBpXFYx4gIXRml0c1xBcGlcVjFcR1BCTWV0YWRhdGHqAg1GaXRzOjpBcGk6OlYxYgZwcm90bzM", [file_buf_validate_validate, file_fits_api_v1_common, file_fits_api_v1_predefined_rules, file_fits_api_v1_token, file_google_protobuf_timestamp]);
21
-
22
- /**
23
- * ApiKey is a personal access token which authenticates api requests on behalf of a user.
24
- *
25
- * Secrets have the format fco_v1_<random>, the version selects the generation and
26
- * hash scheme of the secret, v1 is hashed with sha-256.
27
- * The plaintext secret is only known at creation time and is returned exactly once,
28
- * only the sha-256 hash of the secret is persisted, never the secret itself.
29
- *
30
- * @generated from message fits.api.v1.ApiKey
31
- */
32
- export type ApiKey = Message<"fits.api.v1.ApiKey"> & {
33
- /**
34
- * Id is the unique identifier of this api key
35
- *
36
- * @generated from field: string id = 1;
37
- */
38
- id: string;
39
-
40
- /**
41
- * UserId is the id of the user this api key belongs to
42
- *
43
- * @generated from field: string user_id = 2;
44
- */
45
- userId: string;
46
-
47
- /**
48
- * Realm is the identity realm of the user this api key belongs to
49
- *
50
- * @generated from field: string realm = 3;
51
- */
52
- realm: string;
53
-
54
- /**
55
- * Name is a user given display name of this api key
56
- *
57
- * @generated from field: string name = 4;
58
- */
59
- name: string;
60
-
61
- /**
62
- * Hash is the sha-256 hash of the api key secret, the secret itself is never stored.
63
- * The api server leaves this field unset in api responses, it is only persisted internally.
64
- *
65
- * @generated from field: string hash = 5;
66
- */
67
- hash: string;
68
-
69
- /**
70
- * Prefix is the first 12 bytes of the api key secret, used to display and identify
71
- * the api key in the ui, e.g. fco_v1_abc12...
72
- *
73
- * @generated from field: string prefix = 6;
74
- */
75
- prefix: string;
76
-
77
- /**
78
- * CreatedAt is the date when this api key was created
79
- *
80
- * @generated from field: google.protobuf.Timestamp created_at = 7;
81
- */
82
- createdAt?: Timestamp | undefined;
83
-
84
- /**
85
- * ExpiresAt is the date after which this api key can not be used anymore.
86
- * If unset the api key does not expire.
87
- *
88
- * @generated from field: optional google.protobuf.Timestamp expires_at = 8;
89
- */
90
- expiresAt?: Timestamp | undefined;
91
-
92
- /**
93
- * RevokedAt is the date when this api key was revoked.
94
- * If unset the api key is not revoked.
95
- *
96
- * @generated from field: optional google.protobuf.Timestamp revoked_at = 9;
97
- */
98
- revokedAt?: Timestamp | undefined;
99
-
100
- /**
101
- * LastUsedAt is the date when this api key was last successfully used for authentication.
102
- * If unset the api key was never used.
103
- *
104
- * @generated from field: optional google.protobuf.Timestamp last_used_at = 10;
105
- */
106
- lastUsedAt?: Timestamp | undefined;
107
-
108
- /**
109
- * Permissions limit the methods this api key can call.
110
- * If unset the api key inherits the full permissions of the user it belongs to.
111
- * If set, the api key can only call the intersection of these permissions and
112
- * the permissions of the user it belongs to, see ApiKeyServiceCreateRequest.permissions.
113
- *
114
- * @generated from field: repeated fits.api.v1.PermissionsByVisibility permissions = 11;
115
- */
116
- permissions: PermissionsByVisibility[];
117
- };
118
-
119
- /**
120
- * Describes the message fits.api.v1.ApiKey.
121
- * Use `create(ApiKeySchema)` to create a new message.
122
- */
123
- export const ApiKeySchema: GenMessage<ApiKey> = /*@__PURE__*/
124
- messageDesc(file_fits_api_v1_apikey, 0);
125
-
126
- /**
127
- * ApiKeyServiceCreateRequest is the request payload to create an api key
128
- *
129
- * @generated from message fits.api.v1.ApiKeyServiceCreateRequest
130
- */
131
- export type ApiKeyServiceCreateRequest = Message<"fits.api.v1.ApiKeyServiceCreateRequest"> & {
132
- /**
133
- * Name is a user given display name of this api key
134
- *
135
- * @generated from field: string name = 1;
136
- */
137
- name: string;
138
-
139
- /**
140
- * ExpiresAt is the date after which this api key can not be used anymore.
141
- * If unset the api key does not expire.
142
- *
143
- * @generated from field: optional google.protobuf.Timestamp expires_at = 2;
144
- */
145
- expiresAt?: Timestamp | undefined;
146
-
147
- /**
148
- * Permissions limit the methods this api key can call.
149
- * If unset the api key inherits the full permissions of the user it belongs to.
150
- * If set, the api key can only call the intersection of these permissions and
151
- * the permissions of the user it belongs to. Operator permissions are rejected,
152
- * a user can never obtain them.
153
- *
154
- * @generated from field: repeated fits.api.v1.PermissionsByVisibility permissions = 3;
155
- */
156
- permissions: PermissionsByVisibility[];
157
- };
158
-
159
- /**
160
- * Describes the message fits.api.v1.ApiKeyServiceCreateRequest.
161
- * Use `create(ApiKeyServiceCreateRequestSchema)` to create a new message.
162
- */
163
- export const ApiKeyServiceCreateRequestSchema: GenMessage<ApiKeyServiceCreateRequest> = /*@__PURE__*/
164
- messageDesc(file_fits_api_v1_apikey, 1);
165
-
166
- /**
167
- * ApiKeyServiceCreateResponse is the response payload of an api key create request
168
- *
169
- * @generated from message fits.api.v1.ApiKeyServiceCreateResponse
170
- */
171
- export type ApiKeyServiceCreateResponse = Message<"fits.api.v1.ApiKeyServiceCreateResponse"> & {
172
- /**
173
- * Secret is the plaintext api key secret with format fco_v1_<random>, it is
174
- * returned exactly once and never stored by the api server.
175
- *
176
- * @generated from field: string secret = 1;
177
- */
178
- secret: string;
179
-
180
- /**
181
- * ApiKey is the created api key
182
- *
183
- * @generated from field: fits.api.v1.ApiKey api_key = 2;
184
- */
185
- apiKey?: ApiKey | undefined;
186
- };
187
-
188
- /**
189
- * Describes the message fits.api.v1.ApiKeyServiceCreateResponse.
190
- * Use `create(ApiKeyServiceCreateResponseSchema)` to create a new message.
191
- */
192
- export const ApiKeyServiceCreateResponseSchema: GenMessage<ApiKeyServiceCreateResponse> = /*@__PURE__*/
193
- messageDesc(file_fits_api_v1_apikey, 2);
194
-
195
- /**
196
- * ApiKeyServiceListRequest is the request payload to list api keys
197
- *
198
- * @generated from message fits.api.v1.ApiKeyServiceListRequest
199
- */
200
- export type ApiKeyServiceListRequest = Message<"fits.api.v1.ApiKeyServiceListRequest"> & {
201
- };
202
-
203
- /**
204
- * Describes the message fits.api.v1.ApiKeyServiceListRequest.
205
- * Use `create(ApiKeyServiceListRequestSchema)` to create a new message.
206
- */
207
- export const ApiKeyServiceListRequestSchema: GenMessage<ApiKeyServiceListRequest> = /*@__PURE__*/
208
- messageDesc(file_fits_api_v1_apikey, 3);
209
-
210
- /**
211
- * ApiKeyServiceListResponse is the response payload of an api key list request
212
- *
213
- * @generated from message fits.api.v1.ApiKeyServiceListResponse
214
- */
215
- export type ApiKeyServiceListResponse = Message<"fits.api.v1.ApiKeyServiceListResponse"> & {
216
- /**
217
- * ApiKeys is a list of api keys without the secrets
218
- *
219
- * @generated from field: repeated fits.api.v1.ApiKey api_keys = 1;
220
- */
221
- apiKeys: ApiKey[];
222
- };
223
-
224
- /**
225
- * Describes the message fits.api.v1.ApiKeyServiceListResponse.
226
- * Use `create(ApiKeyServiceListResponseSchema)` to create a new message.
227
- */
228
- export const ApiKeyServiceListResponseSchema: GenMessage<ApiKeyServiceListResponse> = /*@__PURE__*/
229
- messageDesc(file_fits_api_v1_apikey, 4);
230
-
231
- /**
232
- * ApiKeyServiceGetRequest is the request payload of an api key get request
233
- *
234
- * @generated from message fits.api.v1.ApiKeyServiceGetRequest
235
- */
236
- export type ApiKeyServiceGetRequest = Message<"fits.api.v1.ApiKeyServiceGetRequest"> & {
237
- /**
238
- * Id of the api key to get
239
- *
240
- * @generated from field: string id = 1;
241
- */
242
- id: string;
243
- };
244
-
245
- /**
246
- * Describes the message fits.api.v1.ApiKeyServiceGetRequest.
247
- * Use `create(ApiKeyServiceGetRequestSchema)` to create a new message.
248
- */
249
- export const ApiKeyServiceGetRequestSchema: GenMessage<ApiKeyServiceGetRequest> = /*@__PURE__*/
250
- messageDesc(file_fits_api_v1_apikey, 5);
251
-
252
- /**
253
- * ApiKeyServiceGetResponse is the response payload of an api key get request
254
- *
255
- * @generated from message fits.api.v1.ApiKeyServiceGetResponse
256
- */
257
- export type ApiKeyServiceGetResponse = Message<"fits.api.v1.ApiKeyServiceGetResponse"> & {
258
- /**
259
- * ApiKey is the api key
260
- *
261
- * @generated from field: fits.api.v1.ApiKey api_key = 1;
262
- */
263
- apiKey?: ApiKey | undefined;
264
- };
265
-
266
- /**
267
- * Describes the message fits.api.v1.ApiKeyServiceGetResponse.
268
- * Use `create(ApiKeyServiceGetResponseSchema)` to create a new message.
269
- */
270
- export const ApiKeyServiceGetResponseSchema: GenMessage<ApiKeyServiceGetResponse> = /*@__PURE__*/
271
- messageDesc(file_fits_api_v1_apikey, 6);
272
-
273
- /**
274
- * ApiKeyServiceRevokeRequest is the request payload of an api key revoke request
275
- *
276
- * @generated from message fits.api.v1.ApiKeyServiceRevokeRequest
277
- */
278
- export type ApiKeyServiceRevokeRequest = Message<"fits.api.v1.ApiKeyServiceRevokeRequest"> & {
279
- /**
280
- * Id of the api key to revoke
281
- *
282
- * @generated from field: string id = 1;
283
- */
284
- id: string;
285
- };
286
-
287
- /**
288
- * Describes the message fits.api.v1.ApiKeyServiceRevokeRequest.
289
- * Use `create(ApiKeyServiceRevokeRequestSchema)` to create a new message.
290
- */
291
- export const ApiKeyServiceRevokeRequestSchema: GenMessage<ApiKeyServiceRevokeRequest> = /*@__PURE__*/
292
- messageDesc(file_fits_api_v1_apikey, 7);
293
-
294
- /**
295
- * ApiKeyServiceRevokeResponse is the response payload of an api key revoke request
296
- *
297
- * @generated from message fits.api.v1.ApiKeyServiceRevokeResponse
298
- */
299
- export type ApiKeyServiceRevokeResponse = Message<"fits.api.v1.ApiKeyServiceRevokeResponse"> & {
300
- };
301
-
302
- /**
303
- * Describes the message fits.api.v1.ApiKeyServiceRevokeResponse.
304
- * Use `create(ApiKeyServiceRevokeResponseSchema)` to create a new message.
305
- */
306
- export const ApiKeyServiceRevokeResponseSchema: GenMessage<ApiKeyServiceRevokeResponse> = /*@__PURE__*/
307
- messageDesc(file_fits_api_v1_apikey, 8);
308
-
309
- /**
310
- * ApiKeyServiceDeleteRequest is the request payload of an api key delete request
311
- *
312
- * @generated from message fits.api.v1.ApiKeyServiceDeleteRequest
313
- */
314
- export type ApiKeyServiceDeleteRequest = Message<"fits.api.v1.ApiKeyServiceDeleteRequest"> & {
315
- /**
316
- * Id of the api key to delete
317
- *
318
- * @generated from field: string id = 1;
319
- */
320
- id: string;
321
- };
322
-
323
- /**
324
- * Describes the message fits.api.v1.ApiKeyServiceDeleteRequest.
325
- * Use `create(ApiKeyServiceDeleteRequestSchema)` to create a new message.
326
- */
327
- export const ApiKeyServiceDeleteRequestSchema: GenMessage<ApiKeyServiceDeleteRequest> = /*@__PURE__*/
328
- messageDesc(file_fits_api_v1_apikey, 9);
329
-
330
- /**
331
- * ApiKeyServiceDeleteResponse is the response payload of an api key delete request
332
- *
333
- * @generated from message fits.api.v1.ApiKeyServiceDeleteResponse
334
- */
335
- export type ApiKeyServiceDeleteResponse = Message<"fits.api.v1.ApiKeyServiceDeleteResponse"> & {
336
- };
337
-
338
- /**
339
- * Describes the message fits.api.v1.ApiKeyServiceDeleteResponse.
340
- * Use `create(ApiKeyServiceDeleteResponseSchema)` to create a new message.
341
- */
342
- export const ApiKeyServiceDeleteResponseSchema: GenMessage<ApiKeyServiceDeleteResponse> = /*@__PURE__*/
343
- messageDesc(file_fits_api_v1_apikey, 10);
344
-
345
- /**
346
- * ApiKeyService provides api key (personal access token) management operations.
347
- *
348
- * An api key authenticates requests on behalf of the user it belongs to.
349
- * Clients send the secret of the api key in the authorization header:
350
- *
351
- * Authorization: Bearer fco_v1_abcd12...
352
- *
353
- * The api server resolves the secret to the user stored with the api key
354
- * and acquires a jwt for this user from the identity provider
355
- * (jwt authorization grant). The jwt is cached until it expires and is
356
- * reused for subsequent requests authenticated with the same api key.
357
- * Revoking or deleting an api key immediately invalidates its cached jwt.
358
- *
359
- * @generated from service fits.api.v1.ApiKeyService
360
- */
361
- export const ApiKeyService: GenService<{
362
- /**
363
- * Creates a new api key, the plaintext secret is returned exactly once and never stored.
364
- *
365
- * @generated from rpc fits.api.v1.ApiKeyService.Create
366
- */
367
- create: {
368
- methodKind: "unary";
369
- input: typeof ApiKeyServiceCreateRequestSchema;
370
- output: typeof ApiKeyServiceCreateResponseSchema;
371
- },
372
- /**
373
- * Returns the list of all api keys of the authenticated user.
374
- *
375
- * @generated from rpc fits.api.v1.ApiKeyService.List
376
- */
377
- list: {
378
- methodKind: "unary";
379
- input: typeof ApiKeyServiceListRequestSchema;
380
- output: typeof ApiKeyServiceListResponseSchema;
381
- },
382
- /**
383
- * Returns the api key with the specified id.
384
- *
385
- * @generated from rpc fits.api.v1.ApiKeyService.Get
386
- */
387
- get: {
388
- methodKind: "unary";
389
- input: typeof ApiKeyServiceGetRequestSchema;
390
- output: typeof ApiKeyServiceGetResponseSchema;
391
- },
392
- /**
393
- * Revokes an api key, no further usage is possible afterwards.
394
- *
395
- * @generated from rpc fits.api.v1.ApiKeyService.Revoke
396
- */
397
- revoke: {
398
- methodKind: "unary";
399
- input: typeof ApiKeyServiceRevokeRequestSchema;
400
- output: typeof ApiKeyServiceRevokeResponseSchema;
401
- },
402
- /**
403
- * Deletes an api key irreversibly.
404
- *
405
- * @generated from rpc fits.api.v1.ApiKeyService.Delete
406
- */
407
- delete: {
408
- methodKind: "unary";
409
- input: typeof ApiKeyServiceDeleteRequestSchema;
410
- output: typeof ApiKeyServiceDeleteResponseSchema;
411
- },
412
- }> = /*@__PURE__*/
413
- serviceDesc(file_fits_api_v1_apikey, 0);
414
-