@terpjs/contract 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.
package/openapi.json ADDED
@@ -0,0 +1,1807 @@
1
+ {
2
+ "components": {
3
+ "schemas": {
4
+ "AccessToken": {
5
+ "properties": {
6
+ "access_token": {
7
+ "title": "Access Token",
8
+ "type": "string"
9
+ },
10
+ "token_type": {
11
+ "default": "bearer",
12
+ "title": "Token Type",
13
+ "type": "string"
14
+ }
15
+ },
16
+ "required": [
17
+ "access_token"
18
+ ],
19
+ "title": "AccessToken",
20
+ "type": "object"
21
+ },
22
+ "AuditEventRead": {
23
+ "properties": {
24
+ "action": {
25
+ "title": "Action",
26
+ "type": "string"
27
+ },
28
+ "actor_id": {
29
+ "anyOf": [
30
+ {
31
+ "format": "uuid",
32
+ "type": "string"
33
+ },
34
+ {
35
+ "type": "null"
36
+ }
37
+ ],
38
+ "title": "Actor Id"
39
+ },
40
+ "created_at": {
41
+ "format": "date-time",
42
+ "title": "Created At",
43
+ "type": "string"
44
+ },
45
+ "id": {
46
+ "format": "uuid",
47
+ "title": "Id",
48
+ "type": "string"
49
+ },
50
+ "payload": {
51
+ "anyOf": [
52
+ {
53
+ "additionalProperties": true,
54
+ "type": "object"
55
+ },
56
+ {
57
+ "type": "null"
58
+ }
59
+ ],
60
+ "title": "Payload"
61
+ },
62
+ "request_id": {
63
+ "anyOf": [
64
+ {
65
+ "type": "string"
66
+ },
67
+ {
68
+ "type": "null"
69
+ }
70
+ ],
71
+ "title": "Request Id"
72
+ },
73
+ "target_id": {
74
+ "title": "Target Id",
75
+ "type": "string"
76
+ },
77
+ "target_type": {
78
+ "title": "Target Type",
79
+ "type": "string"
80
+ }
81
+ },
82
+ "required": [
83
+ "id",
84
+ "action",
85
+ "target_type",
86
+ "target_id",
87
+ "actor_id",
88
+ "request_id",
89
+ "payload",
90
+ "created_at"
91
+ ],
92
+ "title": "AuditEventRead",
93
+ "type": "object"
94
+ },
95
+ "CurrentUser": {
96
+ "description": "The authenticated caller's own identity \u2014 the ``/me`` (who-am-I) response.\n\nThe frontend's session contract pairs this with :class:`AccessToken`. It is the\nserver-validated current identity (resolved through the wired principal provider \u2014\nthe revocable one in the bundled stack), so it reflects the live store, not just the\ntoken's claims. The caller's role is on the wire as both the numeric ``role_rank``\n(the comparable primitive, ADR 0004 / 0022) and a human-readable ``role_name``.",
97
+ "properties": {
98
+ "email": {
99
+ "title": "Email",
100
+ "type": "string"
101
+ },
102
+ "id": {
103
+ "format": "uuid",
104
+ "title": "Id",
105
+ "type": "string"
106
+ },
107
+ "role_name": {
108
+ "title": "Role Name",
109
+ "type": "string"
110
+ },
111
+ "role_rank": {
112
+ "title": "Role Rank",
113
+ "type": "integer"
114
+ }
115
+ },
116
+ "required": [
117
+ "id",
118
+ "email",
119
+ "role_rank",
120
+ "role_name"
121
+ ],
122
+ "title": "CurrentUser",
123
+ "type": "object"
124
+ },
125
+ "GrantCreate": {
126
+ "properties": {
127
+ "permission": {
128
+ "maxLength": 128,
129
+ "title": "Permission",
130
+ "type": "string"
131
+ },
132
+ "subject_id": {
133
+ "format": "uuid",
134
+ "title": "Subject Id",
135
+ "type": "string"
136
+ }
137
+ },
138
+ "required": [
139
+ "subject_id",
140
+ "permission"
141
+ ],
142
+ "title": "GrantCreate",
143
+ "type": "object"
144
+ },
145
+ "GrantRead": {
146
+ "properties": {
147
+ "created_at": {
148
+ "format": "date-time",
149
+ "title": "Created At",
150
+ "type": "string"
151
+ },
152
+ "id": {
153
+ "format": "uuid",
154
+ "title": "Id",
155
+ "type": "string"
156
+ },
157
+ "permission": {
158
+ "title": "Permission",
159
+ "type": "string"
160
+ },
161
+ "subject_id": {
162
+ "format": "uuid",
163
+ "title": "Subject Id",
164
+ "type": "string"
165
+ },
166
+ "updated_at": {
167
+ "format": "date-time",
168
+ "title": "Updated At",
169
+ "type": "string"
170
+ },
171
+ "version": {
172
+ "title": "Version",
173
+ "type": "integer"
174
+ }
175
+ },
176
+ "required": [
177
+ "id",
178
+ "subject_id",
179
+ "permission",
180
+ "version",
181
+ "created_at",
182
+ "updated_at"
183
+ ],
184
+ "title": "GrantRead",
185
+ "type": "object"
186
+ },
187
+ "GroupCreate": {
188
+ "properties": {
189
+ "description": {
190
+ "default": "",
191
+ "maxLength": 500,
192
+ "title": "Description",
193
+ "type": "string"
194
+ },
195
+ "name": {
196
+ "maxLength": 200,
197
+ "title": "Name",
198
+ "type": "string"
199
+ }
200
+ },
201
+ "required": [
202
+ "name"
203
+ ],
204
+ "title": "GroupCreate",
205
+ "type": "object"
206
+ },
207
+ "GroupMemberAdd": {
208
+ "properties": {
209
+ "user_id": {
210
+ "format": "uuid",
211
+ "title": "User Id",
212
+ "type": "string"
213
+ }
214
+ },
215
+ "required": [
216
+ "user_id"
217
+ ],
218
+ "title": "GroupMemberAdd",
219
+ "type": "object"
220
+ },
221
+ "GroupMemberRead": {
222
+ "properties": {
223
+ "created_at": {
224
+ "format": "date-time",
225
+ "title": "Created At",
226
+ "type": "string"
227
+ },
228
+ "email": {
229
+ "anyOf": [
230
+ {
231
+ "type": "string"
232
+ },
233
+ {
234
+ "type": "null"
235
+ }
236
+ ],
237
+ "title": "Email"
238
+ },
239
+ "group_id": {
240
+ "format": "uuid",
241
+ "title": "Group Id",
242
+ "type": "string"
243
+ },
244
+ "id": {
245
+ "format": "uuid",
246
+ "title": "Id",
247
+ "type": "string"
248
+ },
249
+ "user_id": {
250
+ "format": "uuid",
251
+ "title": "User Id",
252
+ "type": "string"
253
+ }
254
+ },
255
+ "required": [
256
+ "id",
257
+ "group_id",
258
+ "user_id",
259
+ "created_at"
260
+ ],
261
+ "title": "GroupMemberRead",
262
+ "type": "object"
263
+ },
264
+ "GroupRead": {
265
+ "properties": {
266
+ "created_at": {
267
+ "format": "date-time",
268
+ "title": "Created At",
269
+ "type": "string"
270
+ },
271
+ "description": {
272
+ "title": "Description",
273
+ "type": "string"
274
+ },
275
+ "id": {
276
+ "format": "uuid",
277
+ "title": "Id",
278
+ "type": "string"
279
+ },
280
+ "member_count": {
281
+ "title": "Member Count",
282
+ "type": "integer"
283
+ },
284
+ "name": {
285
+ "title": "Name",
286
+ "type": "string"
287
+ },
288
+ "updated_at": {
289
+ "format": "date-time",
290
+ "title": "Updated At",
291
+ "type": "string"
292
+ },
293
+ "version": {
294
+ "title": "Version",
295
+ "type": "integer"
296
+ }
297
+ },
298
+ "required": [
299
+ "id",
300
+ "name",
301
+ "description",
302
+ "member_count",
303
+ "version",
304
+ "created_at",
305
+ "updated_at"
306
+ ],
307
+ "title": "GroupRead",
308
+ "type": "object"
309
+ },
310
+ "GroupUpdate": {
311
+ "additionalProperties": false,
312
+ "properties": {
313
+ "description": {
314
+ "anyOf": [
315
+ {
316
+ "maxLength": 500,
317
+ "type": "string"
318
+ },
319
+ {
320
+ "type": "null"
321
+ }
322
+ ],
323
+ "title": "Description"
324
+ },
325
+ "name": {
326
+ "anyOf": [
327
+ {
328
+ "maxLength": 200,
329
+ "type": "string"
330
+ },
331
+ {
332
+ "type": "null"
333
+ }
334
+ ],
335
+ "title": "Name"
336
+ },
337
+ "version": {
338
+ "description": "Version from the most recent read response, used for optimistic concurrency control. A stale value is rejected with HTTP 409.",
339
+ "title": "Version",
340
+ "type": "integer"
341
+ }
342
+ },
343
+ "required": [
344
+ "version"
345
+ ],
346
+ "title": "GroupUpdate",
347
+ "type": "object"
348
+ },
349
+ "HTTPValidationError": {
350
+ "properties": {
351
+ "detail": {
352
+ "items": {
353
+ "$ref": "#/components/schemas/ValidationError"
354
+ },
355
+ "title": "Detail",
356
+ "type": "array"
357
+ }
358
+ },
359
+ "title": "HTTPValidationError",
360
+ "type": "object"
361
+ },
362
+ "LoginRequest": {
363
+ "properties": {
364
+ "email": {
365
+ "maxLength": 320,
366
+ "title": "Email",
367
+ "type": "string"
368
+ },
369
+ "password": {
370
+ "maxLength": 256,
371
+ "title": "Password",
372
+ "type": "string"
373
+ }
374
+ },
375
+ "required": [
376
+ "email",
377
+ "password"
378
+ ],
379
+ "title": "LoginRequest",
380
+ "type": "object"
381
+ },
382
+ "Page_AuditEventRead_": {
383
+ "properties": {
384
+ "items": {
385
+ "items": {
386
+ "$ref": "#/components/schemas/AuditEventRead"
387
+ },
388
+ "title": "Items",
389
+ "type": "array"
390
+ },
391
+ "limit": {
392
+ "title": "Limit",
393
+ "type": "integer"
394
+ },
395
+ "skip": {
396
+ "title": "Skip",
397
+ "type": "integer"
398
+ },
399
+ "total": {
400
+ "title": "Total",
401
+ "type": "integer"
402
+ }
403
+ },
404
+ "required": [
405
+ "items",
406
+ "total",
407
+ "skip",
408
+ "limit"
409
+ ],
410
+ "title": "Page[AuditEventRead]",
411
+ "type": "object"
412
+ },
413
+ "Page_GrantRead_": {
414
+ "properties": {
415
+ "items": {
416
+ "items": {
417
+ "$ref": "#/components/schemas/GrantRead"
418
+ },
419
+ "title": "Items",
420
+ "type": "array"
421
+ },
422
+ "limit": {
423
+ "title": "Limit",
424
+ "type": "integer"
425
+ },
426
+ "skip": {
427
+ "title": "Skip",
428
+ "type": "integer"
429
+ },
430
+ "total": {
431
+ "title": "Total",
432
+ "type": "integer"
433
+ }
434
+ },
435
+ "required": [
436
+ "items",
437
+ "total",
438
+ "skip",
439
+ "limit"
440
+ ],
441
+ "title": "Page[GrantRead]",
442
+ "type": "object"
443
+ },
444
+ "Page_GroupMemberRead_": {
445
+ "properties": {
446
+ "items": {
447
+ "items": {
448
+ "$ref": "#/components/schemas/GroupMemberRead"
449
+ },
450
+ "title": "Items",
451
+ "type": "array"
452
+ },
453
+ "limit": {
454
+ "title": "Limit",
455
+ "type": "integer"
456
+ },
457
+ "skip": {
458
+ "title": "Skip",
459
+ "type": "integer"
460
+ },
461
+ "total": {
462
+ "title": "Total",
463
+ "type": "integer"
464
+ }
465
+ },
466
+ "required": [
467
+ "items",
468
+ "total",
469
+ "skip",
470
+ "limit"
471
+ ],
472
+ "title": "Page[GroupMemberRead]",
473
+ "type": "object"
474
+ },
475
+ "Page_GroupRead_": {
476
+ "properties": {
477
+ "items": {
478
+ "items": {
479
+ "$ref": "#/components/schemas/GroupRead"
480
+ },
481
+ "title": "Items",
482
+ "type": "array"
483
+ },
484
+ "limit": {
485
+ "title": "Limit",
486
+ "type": "integer"
487
+ },
488
+ "skip": {
489
+ "title": "Skip",
490
+ "type": "integer"
491
+ },
492
+ "total": {
493
+ "title": "Total",
494
+ "type": "integer"
495
+ }
496
+ },
497
+ "required": [
498
+ "items",
499
+ "total",
500
+ "skip",
501
+ "limit"
502
+ ],
503
+ "title": "Page[GroupRead]",
504
+ "type": "object"
505
+ },
506
+ "Page_UserRead_": {
507
+ "properties": {
508
+ "items": {
509
+ "items": {
510
+ "$ref": "#/components/schemas/UserRead"
511
+ },
512
+ "title": "Items",
513
+ "type": "array"
514
+ },
515
+ "limit": {
516
+ "title": "Limit",
517
+ "type": "integer"
518
+ },
519
+ "skip": {
520
+ "title": "Skip",
521
+ "type": "integer"
522
+ },
523
+ "total": {
524
+ "title": "Total",
525
+ "type": "integer"
526
+ }
527
+ },
528
+ "required": [
529
+ "items",
530
+ "total",
531
+ "skip",
532
+ "limit"
533
+ ],
534
+ "title": "Page[UserRead]",
535
+ "type": "object"
536
+ },
537
+ "UserAdminUpdate": {
538
+ "additionalProperties": false,
539
+ "description": "Admin edits a user's email / role rank (OCC ``version`` required).\n\nActivation state is changed through the dedicated ``deactivate`` /\n``reactivate`` actions, not this generic patch.",
540
+ "properties": {
541
+ "email": {
542
+ "anyOf": [
543
+ {
544
+ "maxLength": 320,
545
+ "type": "string"
546
+ },
547
+ {
548
+ "type": "null"
549
+ }
550
+ ],
551
+ "title": "Email"
552
+ },
553
+ "role": {
554
+ "anyOf": [
555
+ {
556
+ "minimum": 0.0,
557
+ "type": "integer"
558
+ },
559
+ {
560
+ "type": "null"
561
+ }
562
+ ],
563
+ "title": "Role"
564
+ },
565
+ "version": {
566
+ "description": "Version from the most recent read response, used for optimistic concurrency control. A stale value is rejected with HTTP 409.",
567
+ "title": "Version",
568
+ "type": "integer"
569
+ }
570
+ },
571
+ "required": [
572
+ "version"
573
+ ],
574
+ "title": "UserAdminUpdate",
575
+ "type": "object"
576
+ },
577
+ "UserPasswordReset": {
578
+ "description": "Admin sets a new password for a user.",
579
+ "properties": {
580
+ "password": {
581
+ "maxLength": 256,
582
+ "title": "Password",
583
+ "type": "string"
584
+ }
585
+ },
586
+ "required": [
587
+ "password"
588
+ ],
589
+ "title": "UserPasswordReset",
590
+ "type": "object"
591
+ },
592
+ "UserProvision": {
593
+ "description": "Admin-provisions a new user with an initial password and a role *rank*.\n\n``role`` is an integer rank resolved against the app's ``PermissionModel`` at\nlogin (ADR 0022), so an admin can provision any role the app's ladder defines \u2014\nnot only the default three tiers; an unmodeled rank simply fails closed at that\nuser's next login. The default is the viewer rank.",
594
+ "properties": {
595
+ "email": {
596
+ "maxLength": 320,
597
+ "title": "Email",
598
+ "type": "string"
599
+ },
600
+ "password": {
601
+ "maxLength": 256,
602
+ "title": "Password",
603
+ "type": "string"
604
+ },
605
+ "role": {
606
+ "default": 10,
607
+ "minimum": 0.0,
608
+ "title": "Role",
609
+ "type": "integer"
610
+ }
611
+ },
612
+ "required": [
613
+ "email",
614
+ "password"
615
+ ],
616
+ "title": "UserProvision",
617
+ "type": "object"
618
+ },
619
+ "UserRead": {
620
+ "properties": {
621
+ "created_at": {
622
+ "format": "date-time",
623
+ "title": "Created At",
624
+ "type": "string"
625
+ },
626
+ "email": {
627
+ "title": "Email",
628
+ "type": "string"
629
+ },
630
+ "id": {
631
+ "format": "uuid",
632
+ "title": "Id",
633
+ "type": "string"
634
+ },
635
+ "is_active": {
636
+ "title": "Is Active",
637
+ "type": "boolean"
638
+ },
639
+ "role": {
640
+ "title": "Role",
641
+ "type": "integer"
642
+ },
643
+ "updated_at": {
644
+ "format": "date-time",
645
+ "title": "Updated At",
646
+ "type": "string"
647
+ },
648
+ "version": {
649
+ "title": "Version",
650
+ "type": "integer"
651
+ }
652
+ },
653
+ "required": [
654
+ "id",
655
+ "email",
656
+ "role",
657
+ "is_active",
658
+ "version",
659
+ "created_at",
660
+ "updated_at"
661
+ ],
662
+ "title": "UserRead",
663
+ "type": "object"
664
+ },
665
+ "ValidationError": {
666
+ "properties": {
667
+ "ctx": {
668
+ "title": "Context",
669
+ "type": "object"
670
+ },
671
+ "input": {
672
+ "title": "Input"
673
+ },
674
+ "loc": {
675
+ "items": {
676
+ "anyOf": [
677
+ {
678
+ "type": "string"
679
+ },
680
+ {
681
+ "type": "integer"
682
+ }
683
+ ]
684
+ },
685
+ "title": "Location",
686
+ "type": "array"
687
+ },
688
+ "msg": {
689
+ "title": "Message",
690
+ "type": "string"
691
+ },
692
+ "type": {
693
+ "title": "Error Type",
694
+ "type": "string"
695
+ }
696
+ },
697
+ "required": [
698
+ "loc",
699
+ "msg",
700
+ "type"
701
+ ],
702
+ "title": "ValidationError",
703
+ "type": "object"
704
+ }
705
+ }
706
+ },
707
+ "info": {
708
+ "title": "Terp base profile",
709
+ "version": "0.1.0"
710
+ },
711
+ "openapi": "3.1.0",
712
+ "paths": {
713
+ "/api/v1/access/grants": {
714
+ "get": {
715
+ "operationId": "list_grants_api_v1_access_grants_get",
716
+ "parameters": [
717
+ {
718
+ "in": "query",
719
+ "name": "subject_id",
720
+ "required": true,
721
+ "schema": {
722
+ "format": "uuid",
723
+ "title": "Subject Id",
724
+ "type": "string"
725
+ }
726
+ },
727
+ {
728
+ "description": "Rows to skip.",
729
+ "in": "query",
730
+ "name": "skip",
731
+ "required": false,
732
+ "schema": {
733
+ "default": 0,
734
+ "description": "Rows to skip.",
735
+ "minimum": 0,
736
+ "title": "Skip",
737
+ "type": "integer"
738
+ }
739
+ },
740
+ {
741
+ "description": "Maximum rows to return.",
742
+ "in": "query",
743
+ "name": "limit",
744
+ "required": false,
745
+ "schema": {
746
+ "default": 50,
747
+ "description": "Maximum rows to return.",
748
+ "maximum": 200,
749
+ "minimum": 1,
750
+ "title": "Limit",
751
+ "type": "integer"
752
+ }
753
+ }
754
+ ],
755
+ "responses": {
756
+ "200": {
757
+ "content": {
758
+ "application/json": {
759
+ "schema": {
760
+ "$ref": "#/components/schemas/Page_GrantRead_"
761
+ }
762
+ }
763
+ },
764
+ "description": "Successful Response"
765
+ },
766
+ "422": {
767
+ "content": {
768
+ "application/json": {
769
+ "schema": {
770
+ "$ref": "#/components/schemas/HTTPValidationError"
771
+ }
772
+ }
773
+ },
774
+ "description": "Validation Error"
775
+ }
776
+ },
777
+ "summary": "List Grants",
778
+ "tags": [
779
+ "access"
780
+ ]
781
+ },
782
+ "post": {
783
+ "operationId": "create_grant_api_v1_access_grants_post",
784
+ "requestBody": {
785
+ "content": {
786
+ "application/json": {
787
+ "schema": {
788
+ "$ref": "#/components/schemas/GrantCreate"
789
+ }
790
+ }
791
+ },
792
+ "required": true
793
+ },
794
+ "responses": {
795
+ "201": {
796
+ "content": {
797
+ "application/json": {
798
+ "schema": {
799
+ "$ref": "#/components/schemas/GrantRead"
800
+ }
801
+ }
802
+ },
803
+ "description": "Successful Response"
804
+ },
805
+ "422": {
806
+ "content": {
807
+ "application/json": {
808
+ "schema": {
809
+ "$ref": "#/components/schemas/HTTPValidationError"
810
+ }
811
+ }
812
+ },
813
+ "description": "Validation Error"
814
+ }
815
+ },
816
+ "summary": "Create Grant",
817
+ "tags": [
818
+ "access"
819
+ ]
820
+ }
821
+ },
822
+ "/api/v1/access/grants/{grant_id}": {
823
+ "delete": {
824
+ "operationId": "delete_grant_api_v1_access_grants__grant_id__delete",
825
+ "parameters": [
826
+ {
827
+ "in": "path",
828
+ "name": "grant_id",
829
+ "required": true,
830
+ "schema": {
831
+ "format": "uuid",
832
+ "title": "Grant Id",
833
+ "type": "string"
834
+ }
835
+ }
836
+ ],
837
+ "responses": {
838
+ "204": {
839
+ "description": "Successful Response"
840
+ },
841
+ "422": {
842
+ "content": {
843
+ "application/json": {
844
+ "schema": {
845
+ "$ref": "#/components/schemas/HTTPValidationError"
846
+ }
847
+ }
848
+ },
849
+ "description": "Validation Error"
850
+ }
851
+ },
852
+ "summary": "Delete Grant",
853
+ "tags": [
854
+ "access"
855
+ ]
856
+ }
857
+ },
858
+ "/api/v1/audit/": {
859
+ "get": {
860
+ "operationId": "list_events_api_v1_audit__get",
861
+ "parameters": [
862
+ {
863
+ "description": "Rows to skip.",
864
+ "in": "query",
865
+ "name": "skip",
866
+ "required": false,
867
+ "schema": {
868
+ "default": 0,
869
+ "description": "Rows to skip.",
870
+ "minimum": 0,
871
+ "title": "Skip",
872
+ "type": "integer"
873
+ }
874
+ },
875
+ {
876
+ "description": "Maximum rows to return.",
877
+ "in": "query",
878
+ "name": "limit",
879
+ "required": false,
880
+ "schema": {
881
+ "default": 50,
882
+ "description": "Maximum rows to return.",
883
+ "maximum": 200,
884
+ "minimum": 1,
885
+ "title": "Limit",
886
+ "type": "integer"
887
+ }
888
+ }
889
+ ],
890
+ "responses": {
891
+ "200": {
892
+ "content": {
893
+ "application/json": {
894
+ "schema": {
895
+ "$ref": "#/components/schemas/Page_AuditEventRead_"
896
+ }
897
+ }
898
+ },
899
+ "description": "Successful Response"
900
+ },
901
+ "422": {
902
+ "content": {
903
+ "application/json": {
904
+ "schema": {
905
+ "$ref": "#/components/schemas/HTTPValidationError"
906
+ }
907
+ }
908
+ },
909
+ "description": "Validation Error"
910
+ }
911
+ },
912
+ "summary": "List Events",
913
+ "tags": [
914
+ "audit"
915
+ ]
916
+ }
917
+ },
918
+ "/api/v1/auth/login": {
919
+ "post": {
920
+ "operationId": "login_api_v1_auth_login_post",
921
+ "requestBody": {
922
+ "content": {
923
+ "application/json": {
924
+ "schema": {
925
+ "$ref": "#/components/schemas/LoginRequest"
926
+ }
927
+ }
928
+ },
929
+ "required": true
930
+ },
931
+ "responses": {
932
+ "200": {
933
+ "content": {
934
+ "application/json": {
935
+ "schema": {
936
+ "$ref": "#/components/schemas/AccessToken"
937
+ }
938
+ }
939
+ },
940
+ "description": "Successful Response"
941
+ },
942
+ "422": {
943
+ "content": {
944
+ "application/json": {
945
+ "schema": {
946
+ "$ref": "#/components/schemas/HTTPValidationError"
947
+ }
948
+ }
949
+ },
950
+ "description": "Validation Error"
951
+ }
952
+ },
953
+ "summary": "Login",
954
+ "tags": [
955
+ "auth"
956
+ ]
957
+ }
958
+ },
959
+ "/api/v1/auth/logout": {
960
+ "post": {
961
+ "operationId": "logout_api_v1_auth_logout_post",
962
+ "responses": {
963
+ "204": {
964
+ "description": "Successful Response"
965
+ }
966
+ },
967
+ "summary": "Logout",
968
+ "tags": [
969
+ "auth"
970
+ ]
971
+ }
972
+ },
973
+ "/api/v1/auth/refresh": {
974
+ "post": {
975
+ "operationId": "refresh_api_v1_auth_refresh_post",
976
+ "responses": {
977
+ "200": {
978
+ "content": {
979
+ "application/json": {
980
+ "schema": {
981
+ "$ref": "#/components/schemas/AccessToken"
982
+ }
983
+ }
984
+ },
985
+ "description": "Successful Response"
986
+ }
987
+ },
988
+ "summary": "Refresh",
989
+ "tags": [
990
+ "auth"
991
+ ]
992
+ }
993
+ },
994
+ "/api/v1/groups/": {
995
+ "get": {
996
+ "operationId": "list_groups_api_v1_groups__get",
997
+ "parameters": [
998
+ {
999
+ "description": "Rows to skip.",
1000
+ "in": "query",
1001
+ "name": "skip",
1002
+ "required": false,
1003
+ "schema": {
1004
+ "default": 0,
1005
+ "description": "Rows to skip.",
1006
+ "minimum": 0,
1007
+ "title": "Skip",
1008
+ "type": "integer"
1009
+ }
1010
+ },
1011
+ {
1012
+ "description": "Maximum rows to return.",
1013
+ "in": "query",
1014
+ "name": "limit",
1015
+ "required": false,
1016
+ "schema": {
1017
+ "default": 50,
1018
+ "description": "Maximum rows to return.",
1019
+ "maximum": 200,
1020
+ "minimum": 1,
1021
+ "title": "Limit",
1022
+ "type": "integer"
1023
+ }
1024
+ }
1025
+ ],
1026
+ "responses": {
1027
+ "200": {
1028
+ "content": {
1029
+ "application/json": {
1030
+ "schema": {
1031
+ "$ref": "#/components/schemas/Page_GroupRead_"
1032
+ }
1033
+ }
1034
+ },
1035
+ "description": "Successful Response"
1036
+ },
1037
+ "422": {
1038
+ "content": {
1039
+ "application/json": {
1040
+ "schema": {
1041
+ "$ref": "#/components/schemas/HTTPValidationError"
1042
+ }
1043
+ }
1044
+ },
1045
+ "description": "Validation Error"
1046
+ }
1047
+ },
1048
+ "summary": "List Groups",
1049
+ "tags": [
1050
+ "groups"
1051
+ ]
1052
+ },
1053
+ "post": {
1054
+ "operationId": "create_group_api_v1_groups__post",
1055
+ "requestBody": {
1056
+ "content": {
1057
+ "application/json": {
1058
+ "schema": {
1059
+ "$ref": "#/components/schemas/GroupCreate"
1060
+ }
1061
+ }
1062
+ },
1063
+ "required": true
1064
+ },
1065
+ "responses": {
1066
+ "201": {
1067
+ "content": {
1068
+ "application/json": {
1069
+ "schema": {
1070
+ "$ref": "#/components/schemas/GroupRead"
1071
+ }
1072
+ }
1073
+ },
1074
+ "description": "Successful Response"
1075
+ },
1076
+ "422": {
1077
+ "content": {
1078
+ "application/json": {
1079
+ "schema": {
1080
+ "$ref": "#/components/schemas/HTTPValidationError"
1081
+ }
1082
+ }
1083
+ },
1084
+ "description": "Validation Error"
1085
+ }
1086
+ },
1087
+ "summary": "Create Group",
1088
+ "tags": [
1089
+ "groups"
1090
+ ]
1091
+ }
1092
+ },
1093
+ "/api/v1/groups/{group_id}": {
1094
+ "delete": {
1095
+ "operationId": "delete_group_api_v1_groups__group_id__delete",
1096
+ "parameters": [
1097
+ {
1098
+ "in": "path",
1099
+ "name": "group_id",
1100
+ "required": true,
1101
+ "schema": {
1102
+ "format": "uuid",
1103
+ "title": "Group Id",
1104
+ "type": "string"
1105
+ }
1106
+ }
1107
+ ],
1108
+ "responses": {
1109
+ "204": {
1110
+ "description": "Successful Response"
1111
+ },
1112
+ "422": {
1113
+ "content": {
1114
+ "application/json": {
1115
+ "schema": {
1116
+ "$ref": "#/components/schemas/HTTPValidationError"
1117
+ }
1118
+ }
1119
+ },
1120
+ "description": "Validation Error"
1121
+ }
1122
+ },
1123
+ "summary": "Delete Group",
1124
+ "tags": [
1125
+ "groups"
1126
+ ]
1127
+ },
1128
+ "get": {
1129
+ "operationId": "get_group_api_v1_groups__group_id__get",
1130
+ "parameters": [
1131
+ {
1132
+ "in": "path",
1133
+ "name": "group_id",
1134
+ "required": true,
1135
+ "schema": {
1136
+ "format": "uuid",
1137
+ "title": "Group Id",
1138
+ "type": "string"
1139
+ }
1140
+ }
1141
+ ],
1142
+ "responses": {
1143
+ "200": {
1144
+ "content": {
1145
+ "application/json": {
1146
+ "schema": {
1147
+ "$ref": "#/components/schemas/GroupRead"
1148
+ }
1149
+ }
1150
+ },
1151
+ "description": "Successful Response"
1152
+ },
1153
+ "422": {
1154
+ "content": {
1155
+ "application/json": {
1156
+ "schema": {
1157
+ "$ref": "#/components/schemas/HTTPValidationError"
1158
+ }
1159
+ }
1160
+ },
1161
+ "description": "Validation Error"
1162
+ }
1163
+ },
1164
+ "summary": "Get Group",
1165
+ "tags": [
1166
+ "groups"
1167
+ ]
1168
+ },
1169
+ "patch": {
1170
+ "operationId": "update_group_api_v1_groups__group_id__patch",
1171
+ "parameters": [
1172
+ {
1173
+ "in": "path",
1174
+ "name": "group_id",
1175
+ "required": true,
1176
+ "schema": {
1177
+ "format": "uuid",
1178
+ "title": "Group Id",
1179
+ "type": "string"
1180
+ }
1181
+ }
1182
+ ],
1183
+ "requestBody": {
1184
+ "content": {
1185
+ "application/json": {
1186
+ "schema": {
1187
+ "$ref": "#/components/schemas/GroupUpdate"
1188
+ }
1189
+ }
1190
+ },
1191
+ "required": true
1192
+ },
1193
+ "responses": {
1194
+ "200": {
1195
+ "content": {
1196
+ "application/json": {
1197
+ "schema": {
1198
+ "$ref": "#/components/schemas/GroupRead"
1199
+ }
1200
+ }
1201
+ },
1202
+ "description": "Successful Response"
1203
+ },
1204
+ "422": {
1205
+ "content": {
1206
+ "application/json": {
1207
+ "schema": {
1208
+ "$ref": "#/components/schemas/HTTPValidationError"
1209
+ }
1210
+ }
1211
+ },
1212
+ "description": "Validation Error"
1213
+ }
1214
+ },
1215
+ "summary": "Update Group",
1216
+ "tags": [
1217
+ "groups"
1218
+ ]
1219
+ }
1220
+ },
1221
+ "/api/v1/groups/{group_id}/members": {
1222
+ "get": {
1223
+ "operationId": "list_members_api_v1_groups__group_id__members_get",
1224
+ "parameters": [
1225
+ {
1226
+ "in": "path",
1227
+ "name": "group_id",
1228
+ "required": true,
1229
+ "schema": {
1230
+ "format": "uuid",
1231
+ "title": "Group Id",
1232
+ "type": "string"
1233
+ }
1234
+ },
1235
+ {
1236
+ "description": "Rows to skip.",
1237
+ "in": "query",
1238
+ "name": "skip",
1239
+ "required": false,
1240
+ "schema": {
1241
+ "default": 0,
1242
+ "description": "Rows to skip.",
1243
+ "minimum": 0,
1244
+ "title": "Skip",
1245
+ "type": "integer"
1246
+ }
1247
+ },
1248
+ {
1249
+ "description": "Maximum rows to return.",
1250
+ "in": "query",
1251
+ "name": "limit",
1252
+ "required": false,
1253
+ "schema": {
1254
+ "default": 50,
1255
+ "description": "Maximum rows to return.",
1256
+ "maximum": 200,
1257
+ "minimum": 1,
1258
+ "title": "Limit",
1259
+ "type": "integer"
1260
+ }
1261
+ }
1262
+ ],
1263
+ "responses": {
1264
+ "200": {
1265
+ "content": {
1266
+ "application/json": {
1267
+ "schema": {
1268
+ "$ref": "#/components/schemas/Page_GroupMemberRead_"
1269
+ }
1270
+ }
1271
+ },
1272
+ "description": "Successful Response"
1273
+ },
1274
+ "422": {
1275
+ "content": {
1276
+ "application/json": {
1277
+ "schema": {
1278
+ "$ref": "#/components/schemas/HTTPValidationError"
1279
+ }
1280
+ }
1281
+ },
1282
+ "description": "Validation Error"
1283
+ }
1284
+ },
1285
+ "summary": "List Members",
1286
+ "tags": [
1287
+ "groups"
1288
+ ]
1289
+ },
1290
+ "post": {
1291
+ "operationId": "add_member_api_v1_groups__group_id__members_post",
1292
+ "parameters": [
1293
+ {
1294
+ "in": "path",
1295
+ "name": "group_id",
1296
+ "required": true,
1297
+ "schema": {
1298
+ "format": "uuid",
1299
+ "title": "Group Id",
1300
+ "type": "string"
1301
+ }
1302
+ }
1303
+ ],
1304
+ "requestBody": {
1305
+ "content": {
1306
+ "application/json": {
1307
+ "schema": {
1308
+ "$ref": "#/components/schemas/GroupMemberAdd"
1309
+ }
1310
+ }
1311
+ },
1312
+ "required": true
1313
+ },
1314
+ "responses": {
1315
+ "201": {
1316
+ "content": {
1317
+ "application/json": {
1318
+ "schema": {
1319
+ "$ref": "#/components/schemas/GroupMemberRead"
1320
+ }
1321
+ }
1322
+ },
1323
+ "description": "Successful Response"
1324
+ },
1325
+ "422": {
1326
+ "content": {
1327
+ "application/json": {
1328
+ "schema": {
1329
+ "$ref": "#/components/schemas/HTTPValidationError"
1330
+ }
1331
+ }
1332
+ },
1333
+ "description": "Validation Error"
1334
+ }
1335
+ },
1336
+ "summary": "Add Member",
1337
+ "tags": [
1338
+ "groups"
1339
+ ]
1340
+ }
1341
+ },
1342
+ "/api/v1/groups/{group_id}/members/{user_id}": {
1343
+ "delete": {
1344
+ "operationId": "remove_member_api_v1_groups__group_id__members__user_id__delete",
1345
+ "parameters": [
1346
+ {
1347
+ "in": "path",
1348
+ "name": "group_id",
1349
+ "required": true,
1350
+ "schema": {
1351
+ "format": "uuid",
1352
+ "title": "Group Id",
1353
+ "type": "string"
1354
+ }
1355
+ },
1356
+ {
1357
+ "in": "path",
1358
+ "name": "user_id",
1359
+ "required": true,
1360
+ "schema": {
1361
+ "format": "uuid",
1362
+ "title": "User Id",
1363
+ "type": "string"
1364
+ }
1365
+ }
1366
+ ],
1367
+ "responses": {
1368
+ "204": {
1369
+ "description": "Successful Response"
1370
+ },
1371
+ "422": {
1372
+ "content": {
1373
+ "application/json": {
1374
+ "schema": {
1375
+ "$ref": "#/components/schemas/HTTPValidationError"
1376
+ }
1377
+ }
1378
+ },
1379
+ "description": "Validation Error"
1380
+ }
1381
+ },
1382
+ "summary": "Remove Member",
1383
+ "tags": [
1384
+ "groups"
1385
+ ]
1386
+ }
1387
+ },
1388
+ "/api/v1/me/": {
1389
+ "get": {
1390
+ "operationId": "me_api_v1_me__get",
1391
+ "responses": {
1392
+ "200": {
1393
+ "content": {
1394
+ "application/json": {
1395
+ "schema": {
1396
+ "$ref": "#/components/schemas/CurrentUser"
1397
+ }
1398
+ }
1399
+ },
1400
+ "description": "Successful Response"
1401
+ }
1402
+ },
1403
+ "summary": "Me",
1404
+ "tags": [
1405
+ "auth"
1406
+ ]
1407
+ }
1408
+ },
1409
+ "/api/v1/users/": {
1410
+ "get": {
1411
+ "operationId": "list_users_api_v1_users__get",
1412
+ "parameters": [
1413
+ {
1414
+ "description": "Filter to users whose email contains this text (case-insensitive).",
1415
+ "in": "query",
1416
+ "name": "email",
1417
+ "required": false,
1418
+ "schema": {
1419
+ "anyOf": [
1420
+ {
1421
+ "maxLength": 254,
1422
+ "type": "string"
1423
+ },
1424
+ {
1425
+ "type": "null"
1426
+ }
1427
+ ],
1428
+ "description": "Filter to users whose email contains this text (case-insensitive).",
1429
+ "title": "Email"
1430
+ }
1431
+ },
1432
+ {
1433
+ "description": "Rows to skip.",
1434
+ "in": "query",
1435
+ "name": "skip",
1436
+ "required": false,
1437
+ "schema": {
1438
+ "default": 0,
1439
+ "description": "Rows to skip.",
1440
+ "minimum": 0,
1441
+ "title": "Skip",
1442
+ "type": "integer"
1443
+ }
1444
+ },
1445
+ {
1446
+ "description": "Maximum rows to return.",
1447
+ "in": "query",
1448
+ "name": "limit",
1449
+ "required": false,
1450
+ "schema": {
1451
+ "default": 50,
1452
+ "description": "Maximum rows to return.",
1453
+ "maximum": 200,
1454
+ "minimum": 1,
1455
+ "title": "Limit",
1456
+ "type": "integer"
1457
+ }
1458
+ }
1459
+ ],
1460
+ "responses": {
1461
+ "200": {
1462
+ "content": {
1463
+ "application/json": {
1464
+ "schema": {
1465
+ "$ref": "#/components/schemas/Page_UserRead_"
1466
+ }
1467
+ }
1468
+ },
1469
+ "description": "Successful Response"
1470
+ },
1471
+ "422": {
1472
+ "content": {
1473
+ "application/json": {
1474
+ "schema": {
1475
+ "$ref": "#/components/schemas/HTTPValidationError"
1476
+ }
1477
+ }
1478
+ },
1479
+ "description": "Validation Error"
1480
+ }
1481
+ },
1482
+ "summary": "List Users",
1483
+ "tags": [
1484
+ "users"
1485
+ ]
1486
+ },
1487
+ "post": {
1488
+ "operationId": "provision_user_api_v1_users__post",
1489
+ "requestBody": {
1490
+ "content": {
1491
+ "application/json": {
1492
+ "schema": {
1493
+ "$ref": "#/components/schemas/UserProvision"
1494
+ }
1495
+ }
1496
+ },
1497
+ "required": true
1498
+ },
1499
+ "responses": {
1500
+ "201": {
1501
+ "content": {
1502
+ "application/json": {
1503
+ "schema": {
1504
+ "$ref": "#/components/schemas/UserRead"
1505
+ }
1506
+ }
1507
+ },
1508
+ "description": "Successful Response"
1509
+ },
1510
+ "422": {
1511
+ "content": {
1512
+ "application/json": {
1513
+ "schema": {
1514
+ "$ref": "#/components/schemas/HTTPValidationError"
1515
+ }
1516
+ }
1517
+ },
1518
+ "description": "Validation Error"
1519
+ }
1520
+ },
1521
+ "summary": "Provision User",
1522
+ "tags": [
1523
+ "users"
1524
+ ]
1525
+ }
1526
+ },
1527
+ "/api/v1/users/{user_id}": {
1528
+ "get": {
1529
+ "operationId": "get_user_api_v1_users__user_id__get",
1530
+ "parameters": [
1531
+ {
1532
+ "in": "path",
1533
+ "name": "user_id",
1534
+ "required": true,
1535
+ "schema": {
1536
+ "format": "uuid",
1537
+ "title": "User Id",
1538
+ "type": "string"
1539
+ }
1540
+ }
1541
+ ],
1542
+ "responses": {
1543
+ "200": {
1544
+ "content": {
1545
+ "application/json": {
1546
+ "schema": {
1547
+ "$ref": "#/components/schemas/UserRead"
1548
+ }
1549
+ }
1550
+ },
1551
+ "description": "Successful Response"
1552
+ },
1553
+ "422": {
1554
+ "content": {
1555
+ "application/json": {
1556
+ "schema": {
1557
+ "$ref": "#/components/schemas/HTTPValidationError"
1558
+ }
1559
+ }
1560
+ },
1561
+ "description": "Validation Error"
1562
+ }
1563
+ },
1564
+ "summary": "Get User",
1565
+ "tags": [
1566
+ "users"
1567
+ ]
1568
+ },
1569
+ "patch": {
1570
+ "operationId": "update_user_api_v1_users__user_id__patch",
1571
+ "parameters": [
1572
+ {
1573
+ "in": "path",
1574
+ "name": "user_id",
1575
+ "required": true,
1576
+ "schema": {
1577
+ "format": "uuid",
1578
+ "title": "User Id",
1579
+ "type": "string"
1580
+ }
1581
+ }
1582
+ ],
1583
+ "requestBody": {
1584
+ "content": {
1585
+ "application/json": {
1586
+ "schema": {
1587
+ "$ref": "#/components/schemas/UserAdminUpdate"
1588
+ }
1589
+ }
1590
+ },
1591
+ "required": true
1592
+ },
1593
+ "responses": {
1594
+ "200": {
1595
+ "content": {
1596
+ "application/json": {
1597
+ "schema": {
1598
+ "$ref": "#/components/schemas/UserRead"
1599
+ }
1600
+ }
1601
+ },
1602
+ "description": "Successful Response"
1603
+ },
1604
+ "422": {
1605
+ "content": {
1606
+ "application/json": {
1607
+ "schema": {
1608
+ "$ref": "#/components/schemas/HTTPValidationError"
1609
+ }
1610
+ }
1611
+ },
1612
+ "description": "Validation Error"
1613
+ }
1614
+ },
1615
+ "summary": "Update User",
1616
+ "tags": [
1617
+ "users"
1618
+ ]
1619
+ }
1620
+ },
1621
+ "/api/v1/users/{user_id}/deactivate": {
1622
+ "post": {
1623
+ "operationId": "deactivate_user_api_v1_users__user_id__deactivate_post",
1624
+ "parameters": [
1625
+ {
1626
+ "in": "path",
1627
+ "name": "user_id",
1628
+ "required": true,
1629
+ "schema": {
1630
+ "format": "uuid",
1631
+ "title": "User Id",
1632
+ "type": "string"
1633
+ }
1634
+ }
1635
+ ],
1636
+ "responses": {
1637
+ "200": {
1638
+ "content": {
1639
+ "application/json": {
1640
+ "schema": {
1641
+ "$ref": "#/components/schemas/UserRead"
1642
+ }
1643
+ }
1644
+ },
1645
+ "description": "Successful Response"
1646
+ },
1647
+ "422": {
1648
+ "content": {
1649
+ "application/json": {
1650
+ "schema": {
1651
+ "$ref": "#/components/schemas/HTTPValidationError"
1652
+ }
1653
+ }
1654
+ },
1655
+ "description": "Validation Error"
1656
+ }
1657
+ },
1658
+ "summary": "Deactivate User",
1659
+ "tags": [
1660
+ "users"
1661
+ ]
1662
+ }
1663
+ },
1664
+ "/api/v1/users/{user_id}/reactivate": {
1665
+ "post": {
1666
+ "operationId": "reactivate_user_api_v1_users__user_id__reactivate_post",
1667
+ "parameters": [
1668
+ {
1669
+ "in": "path",
1670
+ "name": "user_id",
1671
+ "required": true,
1672
+ "schema": {
1673
+ "format": "uuid",
1674
+ "title": "User Id",
1675
+ "type": "string"
1676
+ }
1677
+ }
1678
+ ],
1679
+ "responses": {
1680
+ "200": {
1681
+ "content": {
1682
+ "application/json": {
1683
+ "schema": {
1684
+ "$ref": "#/components/schemas/UserRead"
1685
+ }
1686
+ }
1687
+ },
1688
+ "description": "Successful Response"
1689
+ },
1690
+ "422": {
1691
+ "content": {
1692
+ "application/json": {
1693
+ "schema": {
1694
+ "$ref": "#/components/schemas/HTTPValidationError"
1695
+ }
1696
+ }
1697
+ },
1698
+ "description": "Validation Error"
1699
+ }
1700
+ },
1701
+ "summary": "Reactivate User",
1702
+ "tags": [
1703
+ "users"
1704
+ ]
1705
+ }
1706
+ },
1707
+ "/api/v1/users/{user_id}/reset-password": {
1708
+ "post": {
1709
+ "operationId": "reset_user_password_api_v1_users__user_id__reset_password_post",
1710
+ "parameters": [
1711
+ {
1712
+ "in": "path",
1713
+ "name": "user_id",
1714
+ "required": true,
1715
+ "schema": {
1716
+ "format": "uuid",
1717
+ "title": "User Id",
1718
+ "type": "string"
1719
+ }
1720
+ }
1721
+ ],
1722
+ "requestBody": {
1723
+ "content": {
1724
+ "application/json": {
1725
+ "schema": {
1726
+ "$ref": "#/components/schemas/UserPasswordReset"
1727
+ }
1728
+ }
1729
+ },
1730
+ "required": true
1731
+ },
1732
+ "responses": {
1733
+ "200": {
1734
+ "content": {
1735
+ "application/json": {
1736
+ "schema": {
1737
+ "$ref": "#/components/schemas/UserRead"
1738
+ }
1739
+ }
1740
+ },
1741
+ "description": "Successful Response"
1742
+ },
1743
+ "422": {
1744
+ "content": {
1745
+ "application/json": {
1746
+ "schema": {
1747
+ "$ref": "#/components/schemas/HTTPValidationError"
1748
+ }
1749
+ }
1750
+ },
1751
+ "description": "Validation Error"
1752
+ }
1753
+ },
1754
+ "summary": "Reset User Password",
1755
+ "tags": [
1756
+ "users"
1757
+ ]
1758
+ }
1759
+ },
1760
+ "/health/live": {
1761
+ "get": {
1762
+ "description": "Liveness: the process is up. No dependency is checked.",
1763
+ "operationId": "live_health_live_get",
1764
+ "responses": {
1765
+ "200": {
1766
+ "content": {
1767
+ "application/json": {
1768
+ "schema": {
1769
+ "additionalProperties": {
1770
+ "type": "string"
1771
+ },
1772
+ "title": "Response Live Health Live Get",
1773
+ "type": "object"
1774
+ }
1775
+ }
1776
+ },
1777
+ "description": "Successful Response"
1778
+ }
1779
+ },
1780
+ "summary": "Live",
1781
+ "tags": [
1782
+ "health"
1783
+ ]
1784
+ }
1785
+ },
1786
+ "/health/ready": {
1787
+ "get": {
1788
+ "description": "Readiness: 200 when the database answers ``SELECT 1``, else 503.",
1789
+ "operationId": "ready_health_ready_get",
1790
+ "responses": {
1791
+ "200": {
1792
+ "content": {
1793
+ "application/json": {
1794
+ "schema": {}
1795
+ }
1796
+ },
1797
+ "description": "Successful Response"
1798
+ }
1799
+ },
1800
+ "summary": "Ready",
1801
+ "tags": [
1802
+ "health"
1803
+ ]
1804
+ }
1805
+ }
1806
+ }
1807
+ }