@polypixel/memoir-sdk 0.1.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.
@@ -0,0 +1,689 @@
1
+ import type { GenEnum, GenFile, GenMessage, GenService } from "@bufbuild/protobuf/codegenv2";
2
+ import type { Timestamp } from "@bufbuild/protobuf/wkt";
3
+ import type { Message } from "@bufbuild/protobuf";
4
+ /**
5
+ * Describes the file memoir/v1/auth.proto.
6
+ */
7
+ export declare const file_memoir_v1_auth: GenFile;
8
+ /**
9
+ * @generated from message memoir.v1.User
10
+ */
11
+ export type User = Message<"memoir.v1.User"> & {
12
+ /**
13
+ * @generated from field: string pid = 1;
14
+ */
15
+ pid: string;
16
+ /**
17
+ * @generated from field: string username = 2;
18
+ */
19
+ username: string;
20
+ /**
21
+ * @generated from field: bool is_admin = 3;
22
+ */
23
+ isAdmin: boolean;
24
+ /**
25
+ * @generated from field: google.protobuf.Timestamp created_at = 4;
26
+ */
27
+ createdAt?: Timestamp;
28
+ /**
29
+ * @generated from field: google.protobuf.Timestamp updated_at = 5;
30
+ */
31
+ updatedAt?: Timestamp;
32
+ };
33
+ /**
34
+ * Describes the message memoir.v1.User.
35
+ * Use `create(UserSchema)` to create a new message.
36
+ */
37
+ export declare const UserSchema: GenMessage<User>;
38
+ /**
39
+ * ApiKey carries everything *except* the secret. The secret is returned only
40
+ * in CreateApiKeyResponse and RotateApiKeyResponse; Get/List never include it.
41
+ *
42
+ * @generated from message memoir.v1.ApiKey
43
+ */
44
+ export type ApiKey = Message<"memoir.v1.ApiKey"> & {
45
+ /**
46
+ * @generated from field: string pid = 1;
47
+ */
48
+ pid: string;
49
+ /**
50
+ * The lookup half of `mk.<key_id>.<secret>`. Non-secret.
51
+ *
52
+ * @generated from field: string key_id = 2;
53
+ */
54
+ keyId: string;
55
+ /**
56
+ * Human-readable label set at creation, e.g. "ci-runner".
57
+ *
58
+ * @generated from field: string name = 3;
59
+ */
60
+ name: string;
61
+ /**
62
+ * @generated from field: memoir.v1.ApiKeyRole role = 4;
63
+ */
64
+ role: ApiKeyRole;
65
+ /**
66
+ * When set, the key is scope-bound to this org.
67
+ *
68
+ * @generated from field: optional string org_id = 5;
69
+ */
70
+ orgId?: string;
71
+ /**
72
+ * @generated from field: memoir.v1.ApiKeyStatus status = 6;
73
+ */
74
+ status: ApiKeyStatus;
75
+ /**
76
+ * @generated from field: google.protobuf.Timestamp created_at = 7;
77
+ */
78
+ createdAt?: Timestamp;
79
+ /**
80
+ * @generated from field: google.protobuf.Timestamp updated_at = 8;
81
+ */
82
+ updatedAt?: Timestamp;
83
+ /**
84
+ * @generated from field: optional google.protobuf.Timestamp last_used_at = 9;
85
+ */
86
+ lastUsedAt?: Timestamp;
87
+ };
88
+ /**
89
+ * Describes the message memoir.v1.ApiKey.
90
+ * Use `create(ApiKeySchema)` to create a new message.
91
+ */
92
+ export declare const ApiKeySchema: GenMessage<ApiKey>;
93
+ /**
94
+ * @generated from message memoir.v1.ConsumeBootstrapTokenRequest
95
+ */
96
+ export type ConsumeBootstrapTokenRequest = Message<"memoir.v1.ConsumeBootstrapTokenRequest"> & {
97
+ /**
98
+ * The plaintext token logged to stdout on first start.
99
+ *
100
+ * @generated from field: string token = 1;
101
+ */
102
+ token: string;
103
+ /**
104
+ * @generated from field: string username = 2;
105
+ */
106
+ username: string;
107
+ /**
108
+ * @generated from field: string password = 3;
109
+ */
110
+ password: string;
111
+ };
112
+ /**
113
+ * Describes the message memoir.v1.ConsumeBootstrapTokenRequest.
114
+ * Use `create(ConsumeBootstrapTokenRequestSchema)` to create a new message.
115
+ */
116
+ export declare const ConsumeBootstrapTokenRequestSchema: GenMessage<ConsumeBootstrapTokenRequest>;
117
+ /**
118
+ * @generated from message memoir.v1.ConsumeBootstrapTokenResponse
119
+ */
120
+ export type ConsumeBootstrapTokenResponse = Message<"memoir.v1.ConsumeBootstrapTokenResponse"> & {
121
+ /**
122
+ * @generated from field: memoir.v1.User user = 1;
123
+ */
124
+ user?: User;
125
+ };
126
+ /**
127
+ * Describes the message memoir.v1.ConsumeBootstrapTokenResponse.
128
+ * Use `create(ConsumeBootstrapTokenResponseSchema)` to create a new message.
129
+ */
130
+ export declare const ConsumeBootstrapTokenResponseSchema: GenMessage<ConsumeBootstrapTokenResponse>;
131
+ /**
132
+ * @generated from message memoir.v1.LoginRequest
133
+ */
134
+ export type LoginRequest = Message<"memoir.v1.LoginRequest"> & {
135
+ /**
136
+ * @generated from field: string username = 1;
137
+ */
138
+ username: string;
139
+ /**
140
+ * @generated from field: string password = 2;
141
+ */
142
+ password: string;
143
+ };
144
+ /**
145
+ * Describes the message memoir.v1.LoginRequest.
146
+ * Use `create(LoginRequestSchema)` to create a new message.
147
+ */
148
+ export declare const LoginRequestSchema: GenMessage<LoginRequest>;
149
+ /**
150
+ * @generated from message memoir.v1.LoginResponse
151
+ */
152
+ export type LoginResponse = Message<"memoir.v1.LoginResponse"> & {
153
+ /**
154
+ * Short-lived JWT presented as `authorization: Bearer <access_token>` on
155
+ * subsequent RPCs. TTL is server-configured (default 15 minutes).
156
+ *
157
+ * @generated from field: string access_token = 1;
158
+ */
159
+ accessToken: string;
160
+ /**
161
+ * Long-lived JWT exchanged via RefreshToken when the access token expires.
162
+ * Audience-bound to refresh use; rejected by the authenticate middleware.
163
+ * TTL is server-configured (default 7 days).
164
+ *
165
+ * @generated from field: string refresh_token = 2;
166
+ */
167
+ refreshToken: string;
168
+ /**
169
+ * Convenience copy of the authenticated user. Saves a follow-up GetUser
170
+ * call on a successful login.
171
+ *
172
+ * @generated from field: memoir.v1.User user = 3;
173
+ */
174
+ user?: User;
175
+ };
176
+ /**
177
+ * Describes the message memoir.v1.LoginResponse.
178
+ * Use `create(LoginResponseSchema)` to create a new message.
179
+ */
180
+ export declare const LoginResponseSchema: GenMessage<LoginResponse>;
181
+ /**
182
+ * @generated from message memoir.v1.RefreshTokenRequest
183
+ */
184
+ export type RefreshTokenRequest = Message<"memoir.v1.RefreshTokenRequest"> & {
185
+ /**
186
+ * @generated from field: string refresh_token = 1;
187
+ */
188
+ refreshToken: string;
189
+ };
190
+ /**
191
+ * Describes the message memoir.v1.RefreshTokenRequest.
192
+ * Use `create(RefreshTokenRequestSchema)` to create a new message.
193
+ */
194
+ export declare const RefreshTokenRequestSchema: GenMessage<RefreshTokenRequest>;
195
+ /**
196
+ * @generated from message memoir.v1.RefreshTokenResponse
197
+ */
198
+ export type RefreshTokenResponse = Message<"memoir.v1.RefreshTokenResponse"> & {
199
+ /**
200
+ * A freshly-minted access JWT. The refresh token is unchanged — clients
201
+ * continue to use the original until it expires.
202
+ *
203
+ * @generated from field: string access_token = 1;
204
+ */
205
+ accessToken: string;
206
+ };
207
+ /**
208
+ * Describes the message memoir.v1.RefreshTokenResponse.
209
+ * Use `create(RefreshTokenResponseSchema)` to create a new message.
210
+ */
211
+ export declare const RefreshTokenResponseSchema: GenMessage<RefreshTokenResponse>;
212
+ /**
213
+ * @generated from message memoir.v1.CreateUserRequest
214
+ */
215
+ export type CreateUserRequest = Message<"memoir.v1.CreateUserRequest"> & {
216
+ /**
217
+ * @generated from field: string username = 1;
218
+ */
219
+ username: string;
220
+ /**
221
+ * @generated from field: string password = 2;
222
+ */
223
+ password: string;
224
+ /**
225
+ * @generated from field: bool is_admin = 3;
226
+ */
227
+ isAdmin: boolean;
228
+ };
229
+ /**
230
+ * Describes the message memoir.v1.CreateUserRequest.
231
+ * Use `create(CreateUserRequestSchema)` to create a new message.
232
+ */
233
+ export declare const CreateUserRequestSchema: GenMessage<CreateUserRequest>;
234
+ /**
235
+ * @generated from message memoir.v1.CreateUserResponse
236
+ */
237
+ export type CreateUserResponse = Message<"memoir.v1.CreateUserResponse"> & {
238
+ /**
239
+ * @generated from field: memoir.v1.User user = 1;
240
+ */
241
+ user?: User;
242
+ };
243
+ /**
244
+ * Describes the message memoir.v1.CreateUserResponse.
245
+ * Use `create(CreateUserResponseSchema)` to create a new message.
246
+ */
247
+ export declare const CreateUserResponseSchema: GenMessage<CreateUserResponse>;
248
+ /**
249
+ * @generated from message memoir.v1.GetUserRequest
250
+ */
251
+ export type GetUserRequest = Message<"memoir.v1.GetUserRequest"> & {
252
+ /**
253
+ * @generated from field: string pid = 1;
254
+ */
255
+ pid: string;
256
+ };
257
+ /**
258
+ * Describes the message memoir.v1.GetUserRequest.
259
+ * Use `create(GetUserRequestSchema)` to create a new message.
260
+ */
261
+ export declare const GetUserRequestSchema: GenMessage<GetUserRequest>;
262
+ /**
263
+ * @generated from message memoir.v1.GetUserResponse
264
+ */
265
+ export type GetUserResponse = Message<"memoir.v1.GetUserResponse"> & {
266
+ /**
267
+ * @generated from field: memoir.v1.User user = 1;
268
+ */
269
+ user?: User;
270
+ };
271
+ /**
272
+ * Describes the message memoir.v1.GetUserResponse.
273
+ * Use `create(GetUserResponseSchema)` to create a new message.
274
+ */
275
+ export declare const GetUserResponseSchema: GenMessage<GetUserResponse>;
276
+ /**
277
+ * @generated from message memoir.v1.ListUsersRequest
278
+ */
279
+ export type ListUsersRequest = Message<"memoir.v1.ListUsersRequest"> & {
280
+ /**
281
+ * @generated from field: int32 limit = 1;
282
+ */
283
+ limit: number;
284
+ /**
285
+ * @generated from field: optional string cursor = 2;
286
+ */
287
+ cursor?: string;
288
+ };
289
+ /**
290
+ * Describes the message memoir.v1.ListUsersRequest.
291
+ * Use `create(ListUsersRequestSchema)` to create a new message.
292
+ */
293
+ export declare const ListUsersRequestSchema: GenMessage<ListUsersRequest>;
294
+ /**
295
+ * @generated from message memoir.v1.ListUsersResponse
296
+ */
297
+ export type ListUsersResponse = Message<"memoir.v1.ListUsersResponse"> & {
298
+ /**
299
+ * @generated from field: repeated memoir.v1.User users = 1;
300
+ */
301
+ users: User[];
302
+ /**
303
+ * @generated from field: optional string next_cursor = 2;
304
+ */
305
+ nextCursor?: string;
306
+ };
307
+ /**
308
+ * Describes the message memoir.v1.ListUsersResponse.
309
+ * Use `create(ListUsersResponseSchema)` to create a new message.
310
+ */
311
+ export declare const ListUsersResponseSchema: GenMessage<ListUsersResponse>;
312
+ /**
313
+ * @generated from message memoir.v1.DeleteUserRequest
314
+ */
315
+ export type DeleteUserRequest = Message<"memoir.v1.DeleteUserRequest"> & {
316
+ /**
317
+ * @generated from field: string pid = 1;
318
+ */
319
+ pid: string;
320
+ };
321
+ /**
322
+ * Describes the message memoir.v1.DeleteUserRequest.
323
+ * Use `create(DeleteUserRequestSchema)` to create a new message.
324
+ */
325
+ export declare const DeleteUserRequestSchema: GenMessage<DeleteUserRequest>;
326
+ /**
327
+ * @generated from message memoir.v1.DeleteUserResponse
328
+ */
329
+ export type DeleteUserResponse = Message<"memoir.v1.DeleteUserResponse"> & {};
330
+ /**
331
+ * Describes the message memoir.v1.DeleteUserResponse.
332
+ * Use `create(DeleteUserResponseSchema)` to create a new message.
333
+ */
334
+ export declare const DeleteUserResponseSchema: GenMessage<DeleteUserResponse>;
335
+ /**
336
+ * @generated from message memoir.v1.CreateApiKeyRequest
337
+ */
338
+ export type CreateApiKeyRequest = Message<"memoir.v1.CreateApiKeyRequest"> & {
339
+ /**
340
+ * @generated from field: string name = 1;
341
+ */
342
+ name: string;
343
+ /**
344
+ * @generated from field: memoir.v1.ApiKeyRole role = 2;
345
+ */
346
+ role: ApiKeyRole;
347
+ /**
348
+ * @generated from field: optional string org_id = 3;
349
+ */
350
+ orgId?: string;
351
+ };
352
+ /**
353
+ * Describes the message memoir.v1.CreateApiKeyRequest.
354
+ * Use `create(CreateApiKeyRequestSchema)` to create a new message.
355
+ */
356
+ export declare const CreateApiKeyRequestSchema: GenMessage<CreateApiKeyRequest>;
357
+ /**
358
+ * @generated from message memoir.v1.CreateApiKeyResponse
359
+ */
360
+ export type CreateApiKeyResponse = Message<"memoir.v1.CreateApiKeyResponse"> & {
361
+ /**
362
+ * @generated from field: memoir.v1.ApiKey key = 1;
363
+ */
364
+ key?: ApiKey;
365
+ /**
366
+ * The full `mk.<key_id>.<secret>` string. Shown ONCE.
367
+ *
368
+ * @generated from field: string plaintext = 2;
369
+ */
370
+ plaintext: string;
371
+ };
372
+ /**
373
+ * Describes the message memoir.v1.CreateApiKeyResponse.
374
+ * Use `create(CreateApiKeyResponseSchema)` to create a new message.
375
+ */
376
+ export declare const CreateApiKeyResponseSchema: GenMessage<CreateApiKeyResponse>;
377
+ /**
378
+ * @generated from message memoir.v1.GetApiKeyRequest
379
+ */
380
+ export type GetApiKeyRequest = Message<"memoir.v1.GetApiKeyRequest"> & {
381
+ /**
382
+ * @generated from field: string pid = 1;
383
+ */
384
+ pid: string;
385
+ };
386
+ /**
387
+ * Describes the message memoir.v1.GetApiKeyRequest.
388
+ * Use `create(GetApiKeyRequestSchema)` to create a new message.
389
+ */
390
+ export declare const GetApiKeyRequestSchema: GenMessage<GetApiKeyRequest>;
391
+ /**
392
+ * @generated from message memoir.v1.GetApiKeyResponse
393
+ */
394
+ export type GetApiKeyResponse = Message<"memoir.v1.GetApiKeyResponse"> & {
395
+ /**
396
+ * @generated from field: memoir.v1.ApiKey key = 1;
397
+ */
398
+ key?: ApiKey;
399
+ };
400
+ /**
401
+ * Describes the message memoir.v1.GetApiKeyResponse.
402
+ * Use `create(GetApiKeyResponseSchema)` to create a new message.
403
+ */
404
+ export declare const GetApiKeyResponseSchema: GenMessage<GetApiKeyResponse>;
405
+ /**
406
+ * @generated from message memoir.v1.ListApiKeysRequest
407
+ */
408
+ export type ListApiKeysRequest = Message<"memoir.v1.ListApiKeysRequest"> & {
409
+ /**
410
+ * @generated from field: int32 limit = 1;
411
+ */
412
+ limit: number;
413
+ /**
414
+ * @generated from field: optional string cursor = 2;
415
+ */
416
+ cursor?: string;
417
+ /**
418
+ * @generated from field: optional memoir.v1.ApiKeyStatus status = 3;
419
+ */
420
+ status?: ApiKeyStatus;
421
+ };
422
+ /**
423
+ * Describes the message memoir.v1.ListApiKeysRequest.
424
+ * Use `create(ListApiKeysRequestSchema)` to create a new message.
425
+ */
426
+ export declare const ListApiKeysRequestSchema: GenMessage<ListApiKeysRequest>;
427
+ /**
428
+ * @generated from message memoir.v1.ListApiKeysResponse
429
+ */
430
+ export type ListApiKeysResponse = Message<"memoir.v1.ListApiKeysResponse"> & {
431
+ /**
432
+ * @generated from field: repeated memoir.v1.ApiKey keys = 1;
433
+ */
434
+ keys: ApiKey[];
435
+ /**
436
+ * @generated from field: optional string next_cursor = 2;
437
+ */
438
+ nextCursor?: string;
439
+ };
440
+ /**
441
+ * Describes the message memoir.v1.ListApiKeysResponse.
442
+ * Use `create(ListApiKeysResponseSchema)` to create a new message.
443
+ */
444
+ export declare const ListApiKeysResponseSchema: GenMessage<ListApiKeysResponse>;
445
+ /**
446
+ * @generated from message memoir.v1.RotateApiKeyRequest
447
+ */
448
+ export type RotateApiKeyRequest = Message<"memoir.v1.RotateApiKeyRequest"> & {
449
+ /**
450
+ * @generated from field: string pid = 1;
451
+ */
452
+ pid: string;
453
+ };
454
+ /**
455
+ * Describes the message memoir.v1.RotateApiKeyRequest.
456
+ * Use `create(RotateApiKeyRequestSchema)` to create a new message.
457
+ */
458
+ export declare const RotateApiKeyRequestSchema: GenMessage<RotateApiKeyRequest>;
459
+ /**
460
+ * @generated from message memoir.v1.RotateApiKeyResponse
461
+ */
462
+ export type RotateApiKeyResponse = Message<"memoir.v1.RotateApiKeyResponse"> & {
463
+ /**
464
+ * @generated from field: memoir.v1.ApiKey key = 1;
465
+ */
466
+ key?: ApiKey;
467
+ /**
468
+ * The new `mk.<key_id>.<secret>` string. Shown ONCE.
469
+ *
470
+ * @generated from field: string plaintext = 2;
471
+ */
472
+ plaintext: string;
473
+ };
474
+ /**
475
+ * Describes the message memoir.v1.RotateApiKeyResponse.
476
+ * Use `create(RotateApiKeyResponseSchema)` to create a new message.
477
+ */
478
+ export declare const RotateApiKeyResponseSchema: GenMessage<RotateApiKeyResponse>;
479
+ /**
480
+ * @generated from message memoir.v1.RevokeApiKeyRequest
481
+ */
482
+ export type RevokeApiKeyRequest = Message<"memoir.v1.RevokeApiKeyRequest"> & {
483
+ /**
484
+ * @generated from field: string pid = 1;
485
+ */
486
+ pid: string;
487
+ };
488
+ /**
489
+ * Describes the message memoir.v1.RevokeApiKeyRequest.
490
+ * Use `create(RevokeApiKeyRequestSchema)` to create a new message.
491
+ */
492
+ export declare const RevokeApiKeyRequestSchema: GenMessage<RevokeApiKeyRequest>;
493
+ /**
494
+ * @generated from message memoir.v1.RevokeApiKeyResponse
495
+ */
496
+ export type RevokeApiKeyResponse = Message<"memoir.v1.RevokeApiKeyResponse"> & {};
497
+ /**
498
+ * Describes the message memoir.v1.RevokeApiKeyResponse.
499
+ * Use `create(RevokeApiKeyResponseSchema)` to create a new message.
500
+ */
501
+ export declare const RevokeApiKeyResponseSchema: GenMessage<RevokeApiKeyResponse>;
502
+ /**
503
+ * @generated from enum memoir.v1.ApiKeyRole
504
+ */
505
+ export declare enum ApiKeyRole {
506
+ /**
507
+ * @generated from enum value: API_KEY_ROLE_UNSPECIFIED = 0;
508
+ */
509
+ UNSPECIFIED = 0,
510
+ /**
511
+ * @generated from enum value: API_KEY_ROLE_ADMIN = 1;
512
+ */
513
+ ADMIN = 1,
514
+ /**
515
+ * @generated from enum value: API_KEY_ROLE_INTEGRATION = 2;
516
+ */
517
+ INTEGRATION = 2
518
+ }
519
+ /**
520
+ * Describes the enum memoir.v1.ApiKeyRole.
521
+ */
522
+ export declare const ApiKeyRoleSchema: GenEnum<ApiKeyRole>;
523
+ /**
524
+ * @generated from enum memoir.v1.ApiKeyStatus
525
+ */
526
+ export declare enum ApiKeyStatus {
527
+ /**
528
+ * @generated from enum value: API_KEY_STATUS_UNSPECIFIED = 0;
529
+ */
530
+ UNSPECIFIED = 0,
531
+ /**
532
+ * @generated from enum value: API_KEY_STATUS_ACTIVE = 1;
533
+ */
534
+ ACTIVE = 1,
535
+ /**
536
+ * @generated from enum value: API_KEY_STATUS_REVOKED = 2;
537
+ */
538
+ REVOKED = 2
539
+ }
540
+ /**
541
+ * Describes the enum memoir.v1.ApiKeyStatus.
542
+ */
543
+ export declare const ApiKeyStatusSchema: GenEnum<ApiKeyStatus>;
544
+ /**
545
+ * AuthService manages the credentials that gate every other Memoir RPC.
546
+ *
547
+ * Two principal credential types:
548
+ * - User: an operator with username + password. Bootstrap creates the first
549
+ * admin; subsequent users are created by existing admins. Users
550
+ * authenticate via Login, which returns a pair of JWTs (access + refresh)
551
+ * that the caller presents as bearer tokens on subsequent RPCs.
552
+ * - ApiKey: a long-lived bearer token (string of shape
553
+ * `mk.<key_id>.<secret>`) for service-to-service / integration callers.
554
+ * Keys have a role (admin | integration) and optionally bind to an
555
+ * org_id scope.
556
+ *
557
+ * The authenticate middleware accepts either credential in the
558
+ * `authorization: Bearer ...` header. JWTs are routed via signature
559
+ * verification; API keys are routed via Argon2 verification of the secret
560
+ * half against the api_keys row.
561
+ *
562
+ * Bootstrap exception:
563
+ * ConsumeBootstrapToken runs pre-auth — it consumes the one-time token that
564
+ * memoir-server logs to stdout on first start when no admin exists. Login
565
+ * and RefreshToken are also pre-auth (they ARE the auth path).
566
+ *
567
+ * ── Bootstrap ────────────────────────────────────────────────────────────
568
+ *
569
+ * @generated from service memoir.v1.AuthService
570
+ */
571
+ export declare const AuthService: GenService<{
572
+ /**
573
+ * Consume a one-time bootstrap token to create the first admin user.
574
+ * The token is single-use and is invalidated once an admin exists.
575
+ *
576
+ * @generated from rpc memoir.v1.AuthService.ConsumeBootstrapToken
577
+ */
578
+ consumeBootstrapToken: {
579
+ methodKind: "unary";
580
+ input: typeof ConsumeBootstrapTokenRequestSchema;
581
+ output: typeof ConsumeBootstrapTokenResponseSchema;
582
+ };
583
+ /**
584
+ * Verify username + password and issue an access/refresh JWT pair. The
585
+ * access token authenticates RPC calls (short TTL); the refresh token is
586
+ * exchanged via RefreshToken when the access token expires.
587
+ *
588
+ * @generated from rpc memoir.v1.AuthService.Login
589
+ */
590
+ login: {
591
+ methodKind: "unary";
592
+ input: typeof LoginRequestSchema;
593
+ output: typeof LoginResponseSchema;
594
+ };
595
+ /**
596
+ * Exchange a valid refresh JWT for a new access JWT. The refresh token
597
+ * itself is unchanged — clients reuse it until it expires, then re-Login.
598
+ *
599
+ * @generated from rpc memoir.v1.AuthService.RefreshToken
600
+ */
601
+ refreshToken: {
602
+ methodKind: "unary";
603
+ input: typeof RefreshTokenRequestSchema;
604
+ output: typeof RefreshTokenResponseSchema;
605
+ };
606
+ /**
607
+ * @generated from rpc memoir.v1.AuthService.CreateUser
608
+ */
609
+ createUser: {
610
+ methodKind: "unary";
611
+ input: typeof CreateUserRequestSchema;
612
+ output: typeof CreateUserResponseSchema;
613
+ };
614
+ /**
615
+ * @generated from rpc memoir.v1.AuthService.GetUser
616
+ */
617
+ getUser: {
618
+ methodKind: "unary";
619
+ input: typeof GetUserRequestSchema;
620
+ output: typeof GetUserResponseSchema;
621
+ };
622
+ /**
623
+ * @generated from rpc memoir.v1.AuthService.ListUsers
624
+ */
625
+ listUsers: {
626
+ methodKind: "unary";
627
+ input: typeof ListUsersRequestSchema;
628
+ output: typeof ListUsersResponseSchema;
629
+ };
630
+ /**
631
+ * @generated from rpc memoir.v1.AuthService.DeleteUser
632
+ */
633
+ deleteUser: {
634
+ methodKind: "unary";
635
+ input: typeof DeleteUserRequestSchema;
636
+ output: typeof DeleteUserResponseSchema;
637
+ };
638
+ /**
639
+ * Create returns the plaintext key exactly once in the response.
640
+ * Subsequent Get/List calls return only metadata.
641
+ *
642
+ * @generated from rpc memoir.v1.AuthService.CreateApiKey
643
+ */
644
+ createApiKey: {
645
+ methodKind: "unary";
646
+ input: typeof CreateApiKeyRequestSchema;
647
+ output: typeof CreateApiKeyResponseSchema;
648
+ };
649
+ /**
650
+ * @generated from rpc memoir.v1.AuthService.GetApiKey
651
+ */
652
+ getApiKey: {
653
+ methodKind: "unary";
654
+ input: typeof GetApiKeyRequestSchema;
655
+ output: typeof GetApiKeyResponseSchema;
656
+ };
657
+ /**
658
+ * @generated from rpc memoir.v1.AuthService.ListApiKeys
659
+ */
660
+ listApiKeys: {
661
+ methodKind: "unary";
662
+ input: typeof ListApiKeysRequestSchema;
663
+ output: typeof ListApiKeysResponseSchema;
664
+ };
665
+ /**
666
+ * Rotate generates a new secret for an existing key, returning the new
667
+ * plaintext exactly once. The old secret is invalidated. The key's role,
668
+ * scope, and key_id are preserved so consumer apps update only the secret.
669
+ *
670
+ * @generated from rpc memoir.v1.AuthService.RotateApiKey
671
+ */
672
+ rotateApiKey: {
673
+ methodKind: "unary";
674
+ input: typeof RotateApiKeyRequestSchema;
675
+ output: typeof RotateApiKeyResponseSchema;
676
+ };
677
+ /**
678
+ * Revoke marks the key inactive. The row is retained for audit; the
679
+ * interceptor rejects calls authenticated with revoked keys.
680
+ *
681
+ * @generated from rpc memoir.v1.AuthService.RevokeApiKey
682
+ */
683
+ revokeApiKey: {
684
+ methodKind: "unary";
685
+ input: typeof RevokeApiKeyRequestSchema;
686
+ output: typeof RevokeApiKeyResponseSchema;
687
+ };
688
+ }>;
689
+ //# sourceMappingURL=auth_pb.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth_pb.d.ts","sourceRoot":"","sources":["../../../src/memoir/v1/auth_pb.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE7F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,mBAAmB,EAAE,OACknI,CAAC;AAErpI;;GAEG;AACH,MAAM,MAAM,IAAI,GAAG,OAAO,CAAC,gBAAgB,CAAC,GAAG;IAC7C;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EA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