@hasna/tenants 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,819 @@
1
+ export declare function buildOpenApiDocument(version: string): {
2
+ openapi: string;
3
+ info: {
4
+ title: string;
5
+ version: string;
6
+ description: string;
7
+ };
8
+ servers: {
9
+ url: string;
10
+ }[];
11
+ components: {
12
+ securitySchemes: {
13
+ ApiKeyAuth: {
14
+ type: string;
15
+ in: string;
16
+ name: string;
17
+ };
18
+ };
19
+ schemas: {
20
+ ErrorResponse: {
21
+ type: string;
22
+ properties: {
23
+ error: {
24
+ type: string;
25
+ };
26
+ reason: {
27
+ type: string;
28
+ };
29
+ };
30
+ required: string[];
31
+ };
32
+ SignupInput: {
33
+ type: string;
34
+ additionalProperties: boolean;
35
+ properties: {
36
+ email: {
37
+ type: string;
38
+ };
39
+ name: {
40
+ type: string;
41
+ };
42
+ kind: {
43
+ type: string;
44
+ enum: string[];
45
+ };
46
+ org_name: {
47
+ type: string;
48
+ };
49
+ password: {
50
+ type: string;
51
+ };
52
+ };
53
+ required: string[];
54
+ };
55
+ LoginInput: {
56
+ type: string;
57
+ additionalProperties: boolean;
58
+ properties: {
59
+ email: {
60
+ type: string;
61
+ };
62
+ password: {
63
+ type: string;
64
+ };
65
+ };
66
+ required: string[];
67
+ };
68
+ VerifyInput: {
69
+ type: string;
70
+ properties: {
71
+ email: {
72
+ type: string;
73
+ };
74
+ code: {
75
+ type: string;
76
+ };
77
+ };
78
+ required: string[];
79
+ };
80
+ ResendInput: {
81
+ type: string;
82
+ properties: {
83
+ email: {
84
+ type: string;
85
+ };
86
+ };
87
+ required: string[];
88
+ };
89
+ TokenInput: {
90
+ type: string;
91
+ additionalProperties: boolean;
92
+ properties: {
93
+ app: {
94
+ type: string;
95
+ };
96
+ scopes: {
97
+ type: string;
98
+ items: {
99
+ type: string;
100
+ };
101
+ };
102
+ tenant_id: {
103
+ type: string;
104
+ };
105
+ ttlSeconds: {
106
+ type: string;
107
+ };
108
+ };
109
+ required: string[];
110
+ };
111
+ AuthResponse: {
112
+ type: string;
113
+ additionalProperties: boolean;
114
+ properties: {
115
+ session: {
116
+ type: string;
117
+ };
118
+ session_expires_in: {
119
+ type: string;
120
+ };
121
+ challenge: {
122
+ type: string;
123
+ };
124
+ purpose: {
125
+ type: string;
126
+ };
127
+ expires_in: {
128
+ type: string;
129
+ };
130
+ confirmation_required: {
131
+ type: string;
132
+ };
133
+ email_sent: {
134
+ type: string;
135
+ };
136
+ email_message_id: {
137
+ type: string;
138
+ };
139
+ principal: {
140
+ type: string;
141
+ additionalProperties: boolean;
142
+ };
143
+ tenants: {
144
+ type: string;
145
+ items: {
146
+ type: string;
147
+ additionalProperties: boolean;
148
+ };
149
+ };
150
+ apps: {
151
+ type: string;
152
+ items: {
153
+ type: string;
154
+ };
155
+ };
156
+ };
157
+ };
158
+ TokenResponse: {
159
+ type: string;
160
+ additionalProperties: boolean;
161
+ properties: {
162
+ access_token: {
163
+ type: string;
164
+ };
165
+ token_type: {
166
+ type: string;
167
+ };
168
+ alg: {
169
+ type: string;
170
+ };
171
+ kid: {
172
+ type: string;
173
+ };
174
+ aud: {
175
+ type: string;
176
+ };
177
+ tid: {
178
+ type: string;
179
+ };
180
+ uid: {
181
+ type: string;
182
+ };
183
+ pt: {
184
+ type: string;
185
+ };
186
+ scope: {
187
+ type: string;
188
+ items: {
189
+ type: string;
190
+ };
191
+ };
192
+ expires_in: {
193
+ type: string;
194
+ };
195
+ api_key: {
196
+ type: string;
197
+ };
198
+ };
199
+ };
200
+ WhoamiResponse: {
201
+ type: string;
202
+ additionalProperties: boolean;
203
+ properties: {
204
+ principal: {
205
+ type: string;
206
+ additionalProperties: boolean;
207
+ };
208
+ tenants: {
209
+ type: string;
210
+ items: {
211
+ type: string;
212
+ additionalProperties: boolean;
213
+ };
214
+ };
215
+ apps: {
216
+ type: string;
217
+ items: {
218
+ type: string;
219
+ };
220
+ };
221
+ };
222
+ };
223
+ IntrospectResponse: {
224
+ type: string;
225
+ additionalProperties: boolean;
226
+ properties: {
227
+ active: {
228
+ type: string;
229
+ };
230
+ kid: {
231
+ type: string;
232
+ };
233
+ tenant_id: {
234
+ type: string;
235
+ };
236
+ user_id: {
237
+ type: string;
238
+ };
239
+ principal_type: {
240
+ type: string;
241
+ };
242
+ };
243
+ };
244
+ Jwks: {
245
+ type: string;
246
+ properties: {
247
+ keys: {
248
+ type: string;
249
+ items: {
250
+ type: string;
251
+ additionalProperties: boolean;
252
+ };
253
+ };
254
+ };
255
+ required: string[];
256
+ };
257
+ };
258
+ };
259
+ security: {
260
+ ApiKeyAuth: never[];
261
+ }[];
262
+ paths: {
263
+ "/v1/.well-known/jwks.json": {
264
+ get: {
265
+ operationId: string;
266
+ summary: string;
267
+ security: never[];
268
+ responses: {
269
+ "200": {
270
+ description: string;
271
+ content: {
272
+ "application/json": {
273
+ schema: {
274
+ $ref: string;
275
+ };
276
+ };
277
+ };
278
+ };
279
+ };
280
+ };
281
+ };
282
+ "/v1/auth/signup": {
283
+ post: {
284
+ operationId: string;
285
+ summary: string;
286
+ security: never[];
287
+ requestBody: {
288
+ required: boolean;
289
+ content: {
290
+ "application/json": {
291
+ schema: {
292
+ $ref: string;
293
+ };
294
+ };
295
+ };
296
+ };
297
+ responses: {
298
+ [status]: {
299
+ description: string;
300
+ content: {
301
+ "application/json": {
302
+ schema: {
303
+ $ref: string;
304
+ };
305
+ };
306
+ };
307
+ };
308
+ "400": {
309
+ description: string;
310
+ content: {
311
+ "application/json": {
312
+ schema: {
313
+ $ref: string;
314
+ };
315
+ };
316
+ };
317
+ };
318
+ "401": {
319
+ description: string;
320
+ content: {
321
+ "application/json": {
322
+ schema: {
323
+ $ref: string;
324
+ };
325
+ };
326
+ };
327
+ };
328
+ "403": {
329
+ description: string;
330
+ content: {
331
+ "application/json": {
332
+ schema: {
333
+ $ref: string;
334
+ };
335
+ };
336
+ };
337
+ };
338
+ "404": {
339
+ description: string;
340
+ content: {
341
+ "application/json": {
342
+ schema: {
343
+ $ref: string;
344
+ };
345
+ };
346
+ };
347
+ };
348
+ };
349
+ };
350
+ };
351
+ "/v1/auth/login": {
352
+ post: {
353
+ operationId: string;
354
+ summary: string;
355
+ security: never[];
356
+ requestBody: {
357
+ required: boolean;
358
+ content: {
359
+ "application/json": {
360
+ schema: {
361
+ $ref: string;
362
+ };
363
+ };
364
+ };
365
+ };
366
+ responses: {
367
+ [status]: {
368
+ description: string;
369
+ content: {
370
+ "application/json": {
371
+ schema: {
372
+ $ref: string;
373
+ };
374
+ };
375
+ };
376
+ };
377
+ "400": {
378
+ description: string;
379
+ content: {
380
+ "application/json": {
381
+ schema: {
382
+ $ref: string;
383
+ };
384
+ };
385
+ };
386
+ };
387
+ "401": {
388
+ description: string;
389
+ content: {
390
+ "application/json": {
391
+ schema: {
392
+ $ref: string;
393
+ };
394
+ };
395
+ };
396
+ };
397
+ "403": {
398
+ description: string;
399
+ content: {
400
+ "application/json": {
401
+ schema: {
402
+ $ref: string;
403
+ };
404
+ };
405
+ };
406
+ };
407
+ "404": {
408
+ description: string;
409
+ content: {
410
+ "application/json": {
411
+ schema: {
412
+ $ref: string;
413
+ };
414
+ };
415
+ };
416
+ };
417
+ };
418
+ };
419
+ };
420
+ "/v1/auth/verify": {
421
+ post: {
422
+ operationId: string;
423
+ summary: string;
424
+ security: never[];
425
+ requestBody: {
426
+ required: boolean;
427
+ content: {
428
+ "application/json": {
429
+ schema: {
430
+ $ref: string;
431
+ };
432
+ };
433
+ };
434
+ };
435
+ responses: {
436
+ [status]: {
437
+ description: string;
438
+ content: {
439
+ "application/json": {
440
+ schema: {
441
+ $ref: string;
442
+ };
443
+ };
444
+ };
445
+ };
446
+ "400": {
447
+ description: string;
448
+ content: {
449
+ "application/json": {
450
+ schema: {
451
+ $ref: string;
452
+ };
453
+ };
454
+ };
455
+ };
456
+ "401": {
457
+ description: string;
458
+ content: {
459
+ "application/json": {
460
+ schema: {
461
+ $ref: string;
462
+ };
463
+ };
464
+ };
465
+ };
466
+ "403": {
467
+ description: string;
468
+ content: {
469
+ "application/json": {
470
+ schema: {
471
+ $ref: string;
472
+ };
473
+ };
474
+ };
475
+ };
476
+ "404": {
477
+ description: string;
478
+ content: {
479
+ "application/json": {
480
+ schema: {
481
+ $ref: string;
482
+ };
483
+ };
484
+ };
485
+ };
486
+ };
487
+ };
488
+ };
489
+ "/v1/auth/confirm": {
490
+ get: {
491
+ operationId: string;
492
+ summary: string;
493
+ security: never[];
494
+ parameters: {
495
+ name: string;
496
+ in: string;
497
+ required: boolean;
498
+ schema: {
499
+ type: string;
500
+ };
501
+ }[];
502
+ responses: {
503
+ [status]: {
504
+ description: string;
505
+ content: {
506
+ "application/json": {
507
+ schema: {
508
+ $ref: string;
509
+ };
510
+ };
511
+ };
512
+ };
513
+ "400": {
514
+ description: string;
515
+ content: {
516
+ "application/json": {
517
+ schema: {
518
+ $ref: string;
519
+ };
520
+ };
521
+ };
522
+ };
523
+ "401": {
524
+ description: string;
525
+ content: {
526
+ "application/json": {
527
+ schema: {
528
+ $ref: string;
529
+ };
530
+ };
531
+ };
532
+ };
533
+ "403": {
534
+ description: string;
535
+ content: {
536
+ "application/json": {
537
+ schema: {
538
+ $ref: string;
539
+ };
540
+ };
541
+ };
542
+ };
543
+ "404": {
544
+ description: string;
545
+ content: {
546
+ "application/json": {
547
+ schema: {
548
+ $ref: string;
549
+ };
550
+ };
551
+ };
552
+ };
553
+ };
554
+ };
555
+ };
556
+ "/v1/auth/resend": {
557
+ post: {
558
+ operationId: string;
559
+ summary: string;
560
+ security: never[];
561
+ requestBody: {
562
+ required: boolean;
563
+ content: {
564
+ "application/json": {
565
+ schema: {
566
+ $ref: string;
567
+ };
568
+ };
569
+ };
570
+ };
571
+ responses: {
572
+ [status]: {
573
+ description: string;
574
+ content: {
575
+ "application/json": {
576
+ schema: {
577
+ $ref: string;
578
+ };
579
+ };
580
+ };
581
+ };
582
+ "400": {
583
+ description: string;
584
+ content: {
585
+ "application/json": {
586
+ schema: {
587
+ $ref: string;
588
+ };
589
+ };
590
+ };
591
+ };
592
+ "401": {
593
+ description: string;
594
+ content: {
595
+ "application/json": {
596
+ schema: {
597
+ $ref: string;
598
+ };
599
+ };
600
+ };
601
+ };
602
+ "403": {
603
+ description: string;
604
+ content: {
605
+ "application/json": {
606
+ schema: {
607
+ $ref: string;
608
+ };
609
+ };
610
+ };
611
+ };
612
+ "404": {
613
+ description: string;
614
+ content: {
615
+ "application/json": {
616
+ schema: {
617
+ $ref: string;
618
+ };
619
+ };
620
+ };
621
+ };
622
+ };
623
+ };
624
+ };
625
+ "/v1/auth/token": {
626
+ post: {
627
+ operationId: string;
628
+ summary: string;
629
+ requestBody: {
630
+ required: boolean;
631
+ content: {
632
+ "application/json": {
633
+ schema: {
634
+ $ref: string;
635
+ };
636
+ };
637
+ };
638
+ };
639
+ responses: {
640
+ [status]: {
641
+ description: string;
642
+ content: {
643
+ "application/json": {
644
+ schema: {
645
+ $ref: string;
646
+ };
647
+ };
648
+ };
649
+ };
650
+ "400": {
651
+ description: string;
652
+ content: {
653
+ "application/json": {
654
+ schema: {
655
+ $ref: string;
656
+ };
657
+ };
658
+ };
659
+ };
660
+ "401": {
661
+ description: string;
662
+ content: {
663
+ "application/json": {
664
+ schema: {
665
+ $ref: string;
666
+ };
667
+ };
668
+ };
669
+ };
670
+ "403": {
671
+ description: string;
672
+ content: {
673
+ "application/json": {
674
+ schema: {
675
+ $ref: string;
676
+ };
677
+ };
678
+ };
679
+ };
680
+ "404": {
681
+ description: string;
682
+ content: {
683
+ "application/json": {
684
+ schema: {
685
+ $ref: string;
686
+ };
687
+ };
688
+ };
689
+ };
690
+ };
691
+ };
692
+ };
693
+ "/v1/auth/whoami": {
694
+ get: {
695
+ operationId: string;
696
+ summary: string;
697
+ responses: {
698
+ [status]: {
699
+ description: string;
700
+ content: {
701
+ "application/json": {
702
+ schema: {
703
+ $ref: string;
704
+ };
705
+ };
706
+ };
707
+ };
708
+ "400": {
709
+ description: string;
710
+ content: {
711
+ "application/json": {
712
+ schema: {
713
+ $ref: string;
714
+ };
715
+ };
716
+ };
717
+ };
718
+ "401": {
719
+ description: string;
720
+ content: {
721
+ "application/json": {
722
+ schema: {
723
+ $ref: string;
724
+ };
725
+ };
726
+ };
727
+ };
728
+ "403": {
729
+ description: string;
730
+ content: {
731
+ "application/json": {
732
+ schema: {
733
+ $ref: string;
734
+ };
735
+ };
736
+ };
737
+ };
738
+ "404": {
739
+ description: string;
740
+ content: {
741
+ "application/json": {
742
+ schema: {
743
+ $ref: string;
744
+ };
745
+ };
746
+ };
747
+ };
748
+ };
749
+ };
750
+ };
751
+ "/v1/introspect": {
752
+ get: {
753
+ operationId: string;
754
+ summary: string;
755
+ parameters: {
756
+ name: string;
757
+ in: string;
758
+ required: boolean;
759
+ schema: {
760
+ type: string;
761
+ };
762
+ }[];
763
+ responses: {
764
+ [status]: {
765
+ description: string;
766
+ content: {
767
+ "application/json": {
768
+ schema: {
769
+ $ref: string;
770
+ };
771
+ };
772
+ };
773
+ };
774
+ "400": {
775
+ description: string;
776
+ content: {
777
+ "application/json": {
778
+ schema: {
779
+ $ref: string;
780
+ };
781
+ };
782
+ };
783
+ };
784
+ "401": {
785
+ description: string;
786
+ content: {
787
+ "application/json": {
788
+ schema: {
789
+ $ref: string;
790
+ };
791
+ };
792
+ };
793
+ };
794
+ "403": {
795
+ description: string;
796
+ content: {
797
+ "application/json": {
798
+ schema: {
799
+ $ref: string;
800
+ };
801
+ };
802
+ };
803
+ };
804
+ "404": {
805
+ description: string;
806
+ content: {
807
+ "application/json": {
808
+ schema: {
809
+ $ref: string;
810
+ };
811
+ };
812
+ };
813
+ };
814
+ };
815
+ };
816
+ };
817
+ };
818
+ };
819
+ export type TenantsOpenApiDocument = ReturnType<typeof buildOpenApiDocument>;