@sixb/server 0.1.12 → 0.1.13
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/README.md +5 -4
- package/dist/auth/access-token-boundary.d.ts +13 -9
- package/dist/auth/access-token-boundary.d.ts.map +1 -1
- package/dist/auth/client-address.d.ts +12 -0
- package/dist/auth/client-address.d.ts.map +1 -0
- package/dist/auth/guard.d.ts.map +1 -1
- package/dist/auth/public-routes.d.ts +5 -0
- package/dist/auth/public-routes.d.ts.map +1 -1
- package/dist/auth/rate-limit.d.ts +15 -0
- package/dist/auth/rate-limit.d.ts.map +1 -0
- package/dist/auth/scope.d.ts +8 -3
- package/dist/auth/scope.d.ts.map +1 -1
- package/dist/auth/shared-access.d.ts.map +1 -1
- package/dist/index.js +578 -455
- package/dist/index.js.map +40 -38
- package/dist/openapi/security.d.ts +34 -10
- package/dist/openapi/security.d.ts.map +1 -1
- package/dist/routes/auth.d.ts +64 -17
- package/dist/routes/auth.d.ts.map +1 -1
- package/dist/routes/connectors.d.ts.map +1 -1
- package/dist/routes/events.d.ts +0 -4
- package/dist/routes/events.d.ts.map +1 -1
- package/dist/routes/files.d.ts +15 -2
- package/dist/routes/files.d.ts.map +1 -1
- package/dist/routes/models.d.ts +7 -7
- package/dist/routes/ontology.d.ts +13 -1
- package/dist/routes/ontology.d.ts.map +1 -1
- package/dist/routes/shared-access.d.ts.map +1 -1
- package/dist/routes/workflows.d.ts +30 -30
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/routes/ws/agents.d.ts +2 -3
- package/dist/routes/ws/agents.d.ts.map +1 -1
- package/dist/schemas/auth.d.ts +241 -85
- package/dist/schemas/auth.d.ts.map +1 -1
- package/dist/schemas/common.d.ts +11 -0
- package/dist/schemas/common.d.ts.map +1 -1
- package/dist/schemas/events.d.ts +74 -44
- package/dist/schemas/events.d.ts.map +1 -1
- package/dist/schemas/models.d.ts +38 -38
- package/dist/schemas/ontology.d.ts +160 -0
- package/dist/schemas/ontology.d.ts.map +1 -1
- package/dist/schemas/workflows.d.ts +180 -190
- package/dist/schemas/workflows.d.ts.map +1 -1
- package/dist/server.d.ts +6 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/utils/ws.d.ts +1 -2
- package/dist/utils/ws.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/auth/access-token-boundary.ts +31 -30
- package/src/auth/client-address.ts +67 -0
- package/src/auth/guard.ts +13 -4
- package/src/auth/public-routes.ts +9 -2
- package/src/auth/rate-limit.ts +43 -0
- package/src/auth/scope.ts +13 -3
- package/src/auth/shared-access.ts +0 -3
- package/src/openapi/security.ts +37 -17
- package/src/routes/action-runs.ts +5 -5
- package/src/routes/actions.ts +4 -4
- package/src/routes/agents.ts +9 -9
- package/src/routes/ai-accounting.ts +10 -10
- package/src/routes/auth.ts +331 -432
- package/src/routes/connector-connection-runs.ts +5 -5
- package/src/routes/connector-connections.ts +3 -3
- package/src/routes/connectors.ts +2 -2
- package/src/routes/events.ts +2 -2
- package/src/routes/files.ts +30 -15
- package/src/routes/links.ts +3 -3
- package/src/routes/logs.ts +2 -2
- package/src/routes/objects.ts +12 -12
- package/src/routes/ontology.ts +27 -9
- package/src/routes/pipelines.ts +2 -2
- package/src/routes/project.ts +2 -2
- package/src/routes/share-grants.ts +4 -4
- package/src/routes/shared-access.ts +3 -2
- package/src/routes/syncs.ts +2 -2
- package/src/routes/telemetry.ts +5 -5
- package/src/routes/workflows.ts +18 -19
- package/src/routes/ws/agents.ts +4 -5
- package/src/schemas/auth.ts +27 -8
- package/src/schemas/common.ts +6 -0
- package/src/schemas/events.ts +35 -7
- package/src/schemas/ontology.ts +16 -1
- package/src/schemas/workflows.ts +4 -9
- package/src/server.ts +35 -5
- package/src/utils/ws.ts +2 -3
package/dist/schemas/auth.d.ts
CHANGED
|
@@ -83,17 +83,34 @@ export declare const AuthInvitationGroupOptionSchema: z.ZodObject<{
|
|
|
83
83
|
label?: string | undefined;
|
|
84
84
|
}>;
|
|
85
85
|
export declare const AuthAccessTokenKindSchema: z.ZodEnum<["personal", "serviceAccount"]>;
|
|
86
|
-
export declare const AuthAccessTokenSubjectTypeSchema: z.ZodEnum<["user", "serviceAccount"]>;
|
|
87
86
|
export declare const AuthAccessTokenStatusSchema: z.ZodEnum<["active", "expired", "revoked"]>;
|
|
88
87
|
export declare const AuthServiceAccountStatusSchema: z.ZodEnum<["active", "suspended"]>;
|
|
89
88
|
export declare const AuthUserStatusSchema: z.ZodEnum<["active", "suspended"]>;
|
|
89
|
+
export declare const AuthAccessTokenSubjectSchema: z.ZodObject<{
|
|
90
|
+
type: z.ZodEnum<["user", "serviceAccount"]>;
|
|
91
|
+
id: z.ZodString;
|
|
92
|
+
}, "strip", z.ZodTypeAny, {
|
|
93
|
+
id: string;
|
|
94
|
+
type: "user" | "serviceAccount";
|
|
95
|
+
}, {
|
|
96
|
+
id: string;
|
|
97
|
+
type: "user" | "serviceAccount";
|
|
98
|
+
}>;
|
|
90
99
|
export declare const AuthAccessTokenSchema: z.ZodObject<{
|
|
91
100
|
id: z.ZodString;
|
|
92
101
|
name: z.ZodString;
|
|
93
102
|
kind: z.ZodEnum<["personal", "serviceAccount"]>;
|
|
94
103
|
status: z.ZodEnum<["active", "expired", "revoked"]>;
|
|
95
|
-
|
|
96
|
-
|
|
104
|
+
subject: z.ZodObject<{
|
|
105
|
+
type: z.ZodEnum<["user", "serviceAccount"]>;
|
|
106
|
+
id: z.ZodString;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
id: string;
|
|
109
|
+
type: "user" | "serviceAccount";
|
|
110
|
+
}, {
|
|
111
|
+
id: string;
|
|
112
|
+
type: "user" | "serviceAccount";
|
|
113
|
+
}>;
|
|
97
114
|
subjectLabel: z.ZodOptional<z.ZodString>;
|
|
98
115
|
groupIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
99
116
|
createdAt: z.ZodString;
|
|
@@ -107,10 +124,12 @@ export declare const AuthAccessTokenSchema: z.ZodObject<{
|
|
|
107
124
|
id: string;
|
|
108
125
|
kind: "serviceAccount" | "personal";
|
|
109
126
|
name: string;
|
|
127
|
+
subject: {
|
|
128
|
+
id: string;
|
|
129
|
+
type: "user" | "serviceAccount";
|
|
130
|
+
};
|
|
110
131
|
expiresAt: string;
|
|
111
132
|
createdAt: string;
|
|
112
|
-
subjectType: "user" | "serviceAccount";
|
|
113
|
-
subjectId: string;
|
|
114
133
|
revokedAt?: string | undefined;
|
|
115
134
|
groupIds?: string[] | undefined;
|
|
116
135
|
subjectLabel?: string | undefined;
|
|
@@ -122,10 +141,12 @@ export declare const AuthAccessTokenSchema: z.ZodObject<{
|
|
|
122
141
|
id: string;
|
|
123
142
|
kind: "serviceAccount" | "personal";
|
|
124
143
|
name: string;
|
|
144
|
+
subject: {
|
|
145
|
+
id: string;
|
|
146
|
+
type: "user" | "serviceAccount";
|
|
147
|
+
};
|
|
125
148
|
expiresAt: string;
|
|
126
149
|
createdAt: string;
|
|
127
|
-
subjectType: "user" | "serviceAccount";
|
|
128
|
-
subjectId: string;
|
|
129
150
|
revokedAt?: string | undefined;
|
|
130
151
|
groupIds?: string[] | undefined;
|
|
131
152
|
subjectLabel?: string | undefined;
|
|
@@ -353,8 +374,16 @@ export declare const ListAuthAccessTokensResponseSchema: z.ZodObject<{
|
|
|
353
374
|
name: z.ZodString;
|
|
354
375
|
kind: z.ZodEnum<["personal", "serviceAccount"]>;
|
|
355
376
|
status: z.ZodEnum<["active", "expired", "revoked"]>;
|
|
356
|
-
|
|
357
|
-
|
|
377
|
+
subject: z.ZodObject<{
|
|
378
|
+
type: z.ZodEnum<["user", "serviceAccount"]>;
|
|
379
|
+
id: z.ZodString;
|
|
380
|
+
}, "strip", z.ZodTypeAny, {
|
|
381
|
+
id: string;
|
|
382
|
+
type: "user" | "serviceAccount";
|
|
383
|
+
}, {
|
|
384
|
+
id: string;
|
|
385
|
+
type: "user" | "serviceAccount";
|
|
386
|
+
}>;
|
|
358
387
|
subjectLabel: z.ZodOptional<z.ZodString>;
|
|
359
388
|
groupIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
360
389
|
createdAt: z.ZodString;
|
|
@@ -368,10 +397,12 @@ export declare const ListAuthAccessTokensResponseSchema: z.ZodObject<{
|
|
|
368
397
|
id: string;
|
|
369
398
|
kind: "serviceAccount" | "personal";
|
|
370
399
|
name: string;
|
|
400
|
+
subject: {
|
|
401
|
+
id: string;
|
|
402
|
+
type: "user" | "serviceAccount";
|
|
403
|
+
};
|
|
371
404
|
expiresAt: string;
|
|
372
405
|
createdAt: string;
|
|
373
|
-
subjectType: "user" | "serviceAccount";
|
|
374
|
-
subjectId: string;
|
|
375
406
|
revokedAt?: string | undefined;
|
|
376
407
|
groupIds?: string[] | undefined;
|
|
377
408
|
subjectLabel?: string | undefined;
|
|
@@ -383,10 +414,12 @@ export declare const ListAuthAccessTokensResponseSchema: z.ZodObject<{
|
|
|
383
414
|
id: string;
|
|
384
415
|
kind: "serviceAccount" | "personal";
|
|
385
416
|
name: string;
|
|
417
|
+
subject: {
|
|
418
|
+
id: string;
|
|
419
|
+
type: "user" | "serviceAccount";
|
|
420
|
+
};
|
|
386
421
|
expiresAt: string;
|
|
387
422
|
createdAt: string;
|
|
388
|
-
subjectType: "user" | "serviceAccount";
|
|
389
|
-
subjectId: string;
|
|
390
423
|
revokedAt?: string | undefined;
|
|
391
424
|
groupIds?: string[] | undefined;
|
|
392
425
|
subjectLabel?: string | undefined;
|
|
@@ -400,10 +433,12 @@ export declare const ListAuthAccessTokensResponseSchema: z.ZodObject<{
|
|
|
400
433
|
id: string;
|
|
401
434
|
kind: "serviceAccount" | "personal";
|
|
402
435
|
name: string;
|
|
436
|
+
subject: {
|
|
437
|
+
id: string;
|
|
438
|
+
type: "user" | "serviceAccount";
|
|
439
|
+
};
|
|
403
440
|
expiresAt: string;
|
|
404
441
|
createdAt: string;
|
|
405
|
-
subjectType: "user" | "serviceAccount";
|
|
406
|
-
subjectId: string;
|
|
407
442
|
revokedAt?: string | undefined;
|
|
408
443
|
groupIds?: string[] | undefined;
|
|
409
444
|
subjectLabel?: string | undefined;
|
|
@@ -417,10 +452,12 @@ export declare const ListAuthAccessTokensResponseSchema: z.ZodObject<{
|
|
|
417
452
|
id: string;
|
|
418
453
|
kind: "serviceAccount" | "personal";
|
|
419
454
|
name: string;
|
|
455
|
+
subject: {
|
|
456
|
+
id: string;
|
|
457
|
+
type: "user" | "serviceAccount";
|
|
458
|
+
};
|
|
420
459
|
expiresAt: string;
|
|
421
460
|
createdAt: string;
|
|
422
|
-
subjectType: "user" | "serviceAccount";
|
|
423
|
-
subjectId: string;
|
|
424
461
|
revokedAt?: string | undefined;
|
|
425
462
|
groupIds?: string[] | undefined;
|
|
426
463
|
subjectLabel?: string | undefined;
|
|
@@ -448,8 +485,16 @@ export declare const CreateAuthPersonalAccessTokenResponseSchema: z.ZodObject<{
|
|
|
448
485
|
name: z.ZodString;
|
|
449
486
|
kind: z.ZodEnum<["personal", "serviceAccount"]>;
|
|
450
487
|
status: z.ZodEnum<["active", "expired", "revoked"]>;
|
|
451
|
-
|
|
452
|
-
|
|
488
|
+
subject: z.ZodObject<{
|
|
489
|
+
type: z.ZodEnum<["user", "serviceAccount"]>;
|
|
490
|
+
id: z.ZodString;
|
|
491
|
+
}, "strip", z.ZodTypeAny, {
|
|
492
|
+
id: string;
|
|
493
|
+
type: "user" | "serviceAccount";
|
|
494
|
+
}, {
|
|
495
|
+
id: string;
|
|
496
|
+
type: "user" | "serviceAccount";
|
|
497
|
+
}>;
|
|
453
498
|
subjectLabel: z.ZodOptional<z.ZodString>;
|
|
454
499
|
groupIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
455
500
|
createdAt: z.ZodString;
|
|
@@ -463,10 +508,12 @@ export declare const CreateAuthPersonalAccessTokenResponseSchema: z.ZodObject<{
|
|
|
463
508
|
id: string;
|
|
464
509
|
kind: "serviceAccount" | "personal";
|
|
465
510
|
name: string;
|
|
511
|
+
subject: {
|
|
512
|
+
id: string;
|
|
513
|
+
type: "user" | "serviceAccount";
|
|
514
|
+
};
|
|
466
515
|
expiresAt: string;
|
|
467
516
|
createdAt: string;
|
|
468
|
-
subjectType: "user" | "serviceAccount";
|
|
469
|
-
subjectId: string;
|
|
470
517
|
revokedAt?: string | undefined;
|
|
471
518
|
groupIds?: string[] | undefined;
|
|
472
519
|
subjectLabel?: string | undefined;
|
|
@@ -478,10 +525,12 @@ export declare const CreateAuthPersonalAccessTokenResponseSchema: z.ZodObject<{
|
|
|
478
525
|
id: string;
|
|
479
526
|
kind: "serviceAccount" | "personal";
|
|
480
527
|
name: string;
|
|
528
|
+
subject: {
|
|
529
|
+
id: string;
|
|
530
|
+
type: "user" | "serviceAccount";
|
|
531
|
+
};
|
|
481
532
|
expiresAt: string;
|
|
482
533
|
createdAt: string;
|
|
483
|
-
subjectType: "user" | "serviceAccount";
|
|
484
|
-
subjectId: string;
|
|
485
534
|
revokedAt?: string | undefined;
|
|
486
535
|
groupIds?: string[] | undefined;
|
|
487
536
|
subjectLabel?: string | undefined;
|
|
@@ -496,10 +545,12 @@ export declare const CreateAuthPersonalAccessTokenResponseSchema: z.ZodObject<{
|
|
|
496
545
|
id: string;
|
|
497
546
|
kind: "serviceAccount" | "personal";
|
|
498
547
|
name: string;
|
|
548
|
+
subject: {
|
|
549
|
+
id: string;
|
|
550
|
+
type: "user" | "serviceAccount";
|
|
551
|
+
};
|
|
499
552
|
expiresAt: string;
|
|
500
553
|
createdAt: string;
|
|
501
|
-
subjectType: "user" | "serviceAccount";
|
|
502
|
-
subjectId: string;
|
|
503
554
|
revokedAt?: string | undefined;
|
|
504
555
|
groupIds?: string[] | undefined;
|
|
505
556
|
subjectLabel?: string | undefined;
|
|
@@ -514,10 +565,12 @@ export declare const CreateAuthPersonalAccessTokenResponseSchema: z.ZodObject<{
|
|
|
514
565
|
id: string;
|
|
515
566
|
kind: "serviceAccount" | "personal";
|
|
516
567
|
name: string;
|
|
568
|
+
subject: {
|
|
569
|
+
id: string;
|
|
570
|
+
type: "user" | "serviceAccount";
|
|
571
|
+
};
|
|
517
572
|
expiresAt: string;
|
|
518
573
|
createdAt: string;
|
|
519
|
-
subjectType: "user" | "serviceAccount";
|
|
520
|
-
subjectId: string;
|
|
521
574
|
revokedAt?: string | undefined;
|
|
522
575
|
groupIds?: string[] | undefined;
|
|
523
576
|
subjectLabel?: string | undefined;
|
|
@@ -540,8 +593,16 @@ export declare const RevokeAuthAccessTokenResponseSchema: z.ZodObject<{
|
|
|
540
593
|
name: z.ZodString;
|
|
541
594
|
kind: z.ZodEnum<["personal", "serviceAccount"]>;
|
|
542
595
|
status: z.ZodEnum<["active", "expired", "revoked"]>;
|
|
543
|
-
|
|
544
|
-
|
|
596
|
+
subject: z.ZodObject<{
|
|
597
|
+
type: z.ZodEnum<["user", "serviceAccount"]>;
|
|
598
|
+
id: z.ZodString;
|
|
599
|
+
}, "strip", z.ZodTypeAny, {
|
|
600
|
+
id: string;
|
|
601
|
+
type: "user" | "serviceAccount";
|
|
602
|
+
}, {
|
|
603
|
+
id: string;
|
|
604
|
+
type: "user" | "serviceAccount";
|
|
605
|
+
}>;
|
|
545
606
|
subjectLabel: z.ZodOptional<z.ZodString>;
|
|
546
607
|
groupIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
547
608
|
createdAt: z.ZodString;
|
|
@@ -555,10 +616,12 @@ export declare const RevokeAuthAccessTokenResponseSchema: z.ZodObject<{
|
|
|
555
616
|
id: string;
|
|
556
617
|
kind: "serviceAccount" | "personal";
|
|
557
618
|
name: string;
|
|
619
|
+
subject: {
|
|
620
|
+
id: string;
|
|
621
|
+
type: "user" | "serviceAccount";
|
|
622
|
+
};
|
|
558
623
|
expiresAt: string;
|
|
559
624
|
createdAt: string;
|
|
560
|
-
subjectType: "user" | "serviceAccount";
|
|
561
|
-
subjectId: string;
|
|
562
625
|
revokedAt?: string | undefined;
|
|
563
626
|
groupIds?: string[] | undefined;
|
|
564
627
|
subjectLabel?: string | undefined;
|
|
@@ -570,10 +633,12 @@ export declare const RevokeAuthAccessTokenResponseSchema: z.ZodObject<{
|
|
|
570
633
|
id: string;
|
|
571
634
|
kind: "serviceAccount" | "personal";
|
|
572
635
|
name: string;
|
|
636
|
+
subject: {
|
|
637
|
+
id: string;
|
|
638
|
+
type: "user" | "serviceAccount";
|
|
639
|
+
};
|
|
573
640
|
expiresAt: string;
|
|
574
641
|
createdAt: string;
|
|
575
|
-
subjectType: "user" | "serviceAccount";
|
|
576
|
-
subjectId: string;
|
|
577
642
|
revokedAt?: string | undefined;
|
|
578
643
|
groupIds?: string[] | undefined;
|
|
579
644
|
subjectLabel?: string | undefined;
|
|
@@ -587,10 +652,12 @@ export declare const RevokeAuthAccessTokenResponseSchema: z.ZodObject<{
|
|
|
587
652
|
id: string;
|
|
588
653
|
kind: "serviceAccount" | "personal";
|
|
589
654
|
name: string;
|
|
655
|
+
subject: {
|
|
656
|
+
id: string;
|
|
657
|
+
type: "user" | "serviceAccount";
|
|
658
|
+
};
|
|
590
659
|
expiresAt: string;
|
|
591
660
|
createdAt: string;
|
|
592
|
-
subjectType: "user" | "serviceAccount";
|
|
593
|
-
subjectId: string;
|
|
594
661
|
revokedAt?: string | undefined;
|
|
595
662
|
groupIds?: string[] | undefined;
|
|
596
663
|
subjectLabel?: string | undefined;
|
|
@@ -604,10 +671,12 @@ export declare const RevokeAuthAccessTokenResponseSchema: z.ZodObject<{
|
|
|
604
671
|
id: string;
|
|
605
672
|
kind: "serviceAccount" | "personal";
|
|
606
673
|
name: string;
|
|
674
|
+
subject: {
|
|
675
|
+
id: string;
|
|
676
|
+
type: "user" | "serviceAccount";
|
|
677
|
+
};
|
|
607
678
|
expiresAt: string;
|
|
608
679
|
createdAt: string;
|
|
609
|
-
subjectType: "user" | "serviceAccount";
|
|
610
|
-
subjectId: string;
|
|
611
680
|
revokedAt?: string | undefined;
|
|
612
681
|
groupIds?: string[] | undefined;
|
|
613
682
|
subjectLabel?: string | undefined;
|
|
@@ -786,8 +855,16 @@ export declare const ListAuthServiceAccountAccessTokensResponseSchema: z.ZodObje
|
|
|
786
855
|
name: z.ZodString;
|
|
787
856
|
kind: z.ZodEnum<["personal", "serviceAccount"]>;
|
|
788
857
|
status: z.ZodEnum<["active", "expired", "revoked"]>;
|
|
789
|
-
|
|
790
|
-
|
|
858
|
+
subject: z.ZodObject<{
|
|
859
|
+
type: z.ZodEnum<["user", "serviceAccount"]>;
|
|
860
|
+
id: z.ZodString;
|
|
861
|
+
}, "strip", z.ZodTypeAny, {
|
|
862
|
+
id: string;
|
|
863
|
+
type: "user" | "serviceAccount";
|
|
864
|
+
}, {
|
|
865
|
+
id: string;
|
|
866
|
+
type: "user" | "serviceAccount";
|
|
867
|
+
}>;
|
|
791
868
|
subjectLabel: z.ZodOptional<z.ZodString>;
|
|
792
869
|
groupIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
793
870
|
createdAt: z.ZodString;
|
|
@@ -801,10 +878,12 @@ export declare const ListAuthServiceAccountAccessTokensResponseSchema: z.ZodObje
|
|
|
801
878
|
id: string;
|
|
802
879
|
kind: "serviceAccount" | "personal";
|
|
803
880
|
name: string;
|
|
881
|
+
subject: {
|
|
882
|
+
id: string;
|
|
883
|
+
type: "user" | "serviceAccount";
|
|
884
|
+
};
|
|
804
885
|
expiresAt: string;
|
|
805
886
|
createdAt: string;
|
|
806
|
-
subjectType: "user" | "serviceAccount";
|
|
807
|
-
subjectId: string;
|
|
808
887
|
revokedAt?: string | undefined;
|
|
809
888
|
groupIds?: string[] | undefined;
|
|
810
889
|
subjectLabel?: string | undefined;
|
|
@@ -816,10 +895,12 @@ export declare const ListAuthServiceAccountAccessTokensResponseSchema: z.ZodObje
|
|
|
816
895
|
id: string;
|
|
817
896
|
kind: "serviceAccount" | "personal";
|
|
818
897
|
name: string;
|
|
898
|
+
subject: {
|
|
899
|
+
id: string;
|
|
900
|
+
type: "user" | "serviceAccount";
|
|
901
|
+
};
|
|
819
902
|
expiresAt: string;
|
|
820
903
|
createdAt: string;
|
|
821
|
-
subjectType: "user" | "serviceAccount";
|
|
822
|
-
subjectId: string;
|
|
823
904
|
revokedAt?: string | undefined;
|
|
824
905
|
groupIds?: string[] | undefined;
|
|
825
906
|
subjectLabel?: string | undefined;
|
|
@@ -833,10 +914,12 @@ export declare const ListAuthServiceAccountAccessTokensResponseSchema: z.ZodObje
|
|
|
833
914
|
id: string;
|
|
834
915
|
kind: "serviceAccount" | "personal";
|
|
835
916
|
name: string;
|
|
917
|
+
subject: {
|
|
918
|
+
id: string;
|
|
919
|
+
type: "user" | "serviceAccount";
|
|
920
|
+
};
|
|
836
921
|
expiresAt: string;
|
|
837
922
|
createdAt: string;
|
|
838
|
-
subjectType: "user" | "serviceAccount";
|
|
839
|
-
subjectId: string;
|
|
840
923
|
revokedAt?: string | undefined;
|
|
841
924
|
groupIds?: string[] | undefined;
|
|
842
925
|
subjectLabel?: string | undefined;
|
|
@@ -850,10 +933,12 @@ export declare const ListAuthServiceAccountAccessTokensResponseSchema: z.ZodObje
|
|
|
850
933
|
id: string;
|
|
851
934
|
kind: "serviceAccount" | "personal";
|
|
852
935
|
name: string;
|
|
936
|
+
subject: {
|
|
937
|
+
id: string;
|
|
938
|
+
type: "user" | "serviceAccount";
|
|
939
|
+
};
|
|
853
940
|
expiresAt: string;
|
|
854
941
|
createdAt: string;
|
|
855
|
-
subjectType: "user" | "serviceAccount";
|
|
856
|
-
subjectId: string;
|
|
857
942
|
revokedAt?: string | undefined;
|
|
858
943
|
groupIds?: string[] | undefined;
|
|
859
944
|
subjectLabel?: string | undefined;
|
|
@@ -881,8 +966,16 @@ export declare const CreateAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
881
966
|
name: z.ZodString;
|
|
882
967
|
kind: z.ZodEnum<["personal", "serviceAccount"]>;
|
|
883
968
|
status: z.ZodEnum<["active", "expired", "revoked"]>;
|
|
884
|
-
|
|
885
|
-
|
|
969
|
+
subject: z.ZodObject<{
|
|
970
|
+
type: z.ZodEnum<["user", "serviceAccount"]>;
|
|
971
|
+
id: z.ZodString;
|
|
972
|
+
}, "strip", z.ZodTypeAny, {
|
|
973
|
+
id: string;
|
|
974
|
+
type: "user" | "serviceAccount";
|
|
975
|
+
}, {
|
|
976
|
+
id: string;
|
|
977
|
+
type: "user" | "serviceAccount";
|
|
978
|
+
}>;
|
|
886
979
|
subjectLabel: z.ZodOptional<z.ZodString>;
|
|
887
980
|
groupIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
888
981
|
createdAt: z.ZodString;
|
|
@@ -896,10 +989,12 @@ export declare const CreateAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
896
989
|
id: string;
|
|
897
990
|
kind: "serviceAccount" | "personal";
|
|
898
991
|
name: string;
|
|
992
|
+
subject: {
|
|
993
|
+
id: string;
|
|
994
|
+
type: "user" | "serviceAccount";
|
|
995
|
+
};
|
|
899
996
|
expiresAt: string;
|
|
900
997
|
createdAt: string;
|
|
901
|
-
subjectType: "user" | "serviceAccount";
|
|
902
|
-
subjectId: string;
|
|
903
998
|
revokedAt?: string | undefined;
|
|
904
999
|
groupIds?: string[] | undefined;
|
|
905
1000
|
subjectLabel?: string | undefined;
|
|
@@ -911,10 +1006,12 @@ export declare const CreateAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
911
1006
|
id: string;
|
|
912
1007
|
kind: "serviceAccount" | "personal";
|
|
913
1008
|
name: string;
|
|
1009
|
+
subject: {
|
|
1010
|
+
id: string;
|
|
1011
|
+
type: "user" | "serviceAccount";
|
|
1012
|
+
};
|
|
914
1013
|
expiresAt: string;
|
|
915
1014
|
createdAt: string;
|
|
916
|
-
subjectType: "user" | "serviceAccount";
|
|
917
|
-
subjectId: string;
|
|
918
1015
|
revokedAt?: string | undefined;
|
|
919
1016
|
groupIds?: string[] | undefined;
|
|
920
1017
|
subjectLabel?: string | undefined;
|
|
@@ -929,10 +1026,12 @@ export declare const CreateAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
929
1026
|
id: string;
|
|
930
1027
|
kind: "serviceAccount" | "personal";
|
|
931
1028
|
name: string;
|
|
1029
|
+
subject: {
|
|
1030
|
+
id: string;
|
|
1031
|
+
type: "user" | "serviceAccount";
|
|
1032
|
+
};
|
|
932
1033
|
expiresAt: string;
|
|
933
1034
|
createdAt: string;
|
|
934
|
-
subjectType: "user" | "serviceAccount";
|
|
935
|
-
subjectId: string;
|
|
936
1035
|
revokedAt?: string | undefined;
|
|
937
1036
|
groupIds?: string[] | undefined;
|
|
938
1037
|
subjectLabel?: string | undefined;
|
|
@@ -947,10 +1046,12 @@ export declare const CreateAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
947
1046
|
id: string;
|
|
948
1047
|
kind: "serviceAccount" | "personal";
|
|
949
1048
|
name: string;
|
|
1049
|
+
subject: {
|
|
1050
|
+
id: string;
|
|
1051
|
+
type: "user" | "serviceAccount";
|
|
1052
|
+
};
|
|
950
1053
|
expiresAt: string;
|
|
951
1054
|
createdAt: string;
|
|
952
|
-
subjectType: "user" | "serviceAccount";
|
|
953
|
-
subjectId: string;
|
|
954
1055
|
revokedAt?: string | undefined;
|
|
955
1056
|
groupIds?: string[] | undefined;
|
|
956
1057
|
subjectLabel?: string | undefined;
|
|
@@ -977,8 +1078,16 @@ export declare const RevokeAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
977
1078
|
name: z.ZodString;
|
|
978
1079
|
kind: z.ZodEnum<["personal", "serviceAccount"]>;
|
|
979
1080
|
status: z.ZodEnum<["active", "expired", "revoked"]>;
|
|
980
|
-
|
|
981
|
-
|
|
1081
|
+
subject: z.ZodObject<{
|
|
1082
|
+
type: z.ZodEnum<["user", "serviceAccount"]>;
|
|
1083
|
+
id: z.ZodString;
|
|
1084
|
+
}, "strip", z.ZodTypeAny, {
|
|
1085
|
+
id: string;
|
|
1086
|
+
type: "user" | "serviceAccount";
|
|
1087
|
+
}, {
|
|
1088
|
+
id: string;
|
|
1089
|
+
type: "user" | "serviceAccount";
|
|
1090
|
+
}>;
|
|
982
1091
|
subjectLabel: z.ZodOptional<z.ZodString>;
|
|
983
1092
|
groupIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
984
1093
|
createdAt: z.ZodString;
|
|
@@ -992,10 +1101,12 @@ export declare const RevokeAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
992
1101
|
id: string;
|
|
993
1102
|
kind: "serviceAccount" | "personal";
|
|
994
1103
|
name: string;
|
|
1104
|
+
subject: {
|
|
1105
|
+
id: string;
|
|
1106
|
+
type: "user" | "serviceAccount";
|
|
1107
|
+
};
|
|
995
1108
|
expiresAt: string;
|
|
996
1109
|
createdAt: string;
|
|
997
|
-
subjectType: "user" | "serviceAccount";
|
|
998
|
-
subjectId: string;
|
|
999
1110
|
revokedAt?: string | undefined;
|
|
1000
1111
|
groupIds?: string[] | undefined;
|
|
1001
1112
|
subjectLabel?: string | undefined;
|
|
@@ -1007,10 +1118,12 @@ export declare const RevokeAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
1007
1118
|
id: string;
|
|
1008
1119
|
kind: "serviceAccount" | "personal";
|
|
1009
1120
|
name: string;
|
|
1121
|
+
subject: {
|
|
1122
|
+
id: string;
|
|
1123
|
+
type: "user" | "serviceAccount";
|
|
1124
|
+
};
|
|
1010
1125
|
expiresAt: string;
|
|
1011
1126
|
createdAt: string;
|
|
1012
|
-
subjectType: "user" | "serviceAccount";
|
|
1013
|
-
subjectId: string;
|
|
1014
1127
|
revokedAt?: string | undefined;
|
|
1015
1128
|
groupIds?: string[] | undefined;
|
|
1016
1129
|
subjectLabel?: string | undefined;
|
|
@@ -1024,10 +1137,12 @@ export declare const RevokeAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
1024
1137
|
id: string;
|
|
1025
1138
|
kind: "serviceAccount" | "personal";
|
|
1026
1139
|
name: string;
|
|
1140
|
+
subject: {
|
|
1141
|
+
id: string;
|
|
1142
|
+
type: "user" | "serviceAccount";
|
|
1143
|
+
};
|
|
1027
1144
|
expiresAt: string;
|
|
1028
1145
|
createdAt: string;
|
|
1029
|
-
subjectType: "user" | "serviceAccount";
|
|
1030
|
-
subjectId: string;
|
|
1031
1146
|
revokedAt?: string | undefined;
|
|
1032
1147
|
groupIds?: string[] | undefined;
|
|
1033
1148
|
subjectLabel?: string | undefined;
|
|
@@ -1041,10 +1156,12 @@ export declare const RevokeAuthServiceAccountAccessTokenResponseSchema: z.ZodObj
|
|
|
1041
1156
|
id: string;
|
|
1042
1157
|
kind: "serviceAccount" | "personal";
|
|
1043
1158
|
name: string;
|
|
1159
|
+
subject: {
|
|
1160
|
+
id: string;
|
|
1161
|
+
type: "user" | "serviceAccount";
|
|
1162
|
+
};
|
|
1044
1163
|
expiresAt: string;
|
|
1045
1164
|
createdAt: string;
|
|
1046
|
-
subjectType: "user" | "serviceAccount";
|
|
1047
|
-
subjectId: string;
|
|
1048
1165
|
revokedAt?: string | undefined;
|
|
1049
1166
|
groupIds?: string[] | undefined;
|
|
1050
1167
|
subjectLabel?: string | undefined;
|
|
@@ -1879,7 +1996,9 @@ export declare const AuthSessionResponseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1879
1996
|
authenticated: false;
|
|
1880
1997
|
}>, z.ZodObject<{
|
|
1881
1998
|
authenticated: z.ZodLiteral<true>;
|
|
1882
|
-
|
|
1999
|
+
/** Browser sessions only: send it back in `x-sixb-csrf` on mutations. */
|
|
2000
|
+
csrfToken: z.ZodOptional<z.ZodString>;
|
|
2001
|
+
/** Whether the user may open a web app: the browser session's own, or Atlas for a native client. */
|
|
1883
2002
|
applicationAccess: z.ZodObject<{
|
|
1884
2003
|
allowed: z.ZodBoolean;
|
|
1885
2004
|
audience: z.ZodEnum<["atlas", "app"]>;
|
|
@@ -1924,7 +2043,6 @@ export declare const AuthSessionResponseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1924
2043
|
id: string;
|
|
1925
2044
|
expiresAt: string;
|
|
1926
2045
|
};
|
|
1927
|
-
csrfToken: string;
|
|
1928
2046
|
user: {
|
|
1929
2047
|
id: string;
|
|
1930
2048
|
email: string;
|
|
@@ -1937,12 +2055,12 @@ export declare const AuthSessionResponseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1937
2055
|
audience: "atlas" | "app";
|
|
1938
2056
|
allowed: boolean;
|
|
1939
2057
|
};
|
|
2058
|
+
csrfToken?: string | undefined;
|
|
1940
2059
|
}, {
|
|
1941
2060
|
session: {
|
|
1942
2061
|
id: string;
|
|
1943
2062
|
expiresAt: string;
|
|
1944
2063
|
};
|
|
1945
|
-
csrfToken: string;
|
|
1946
2064
|
user: {
|
|
1947
2065
|
id: string;
|
|
1948
2066
|
email: string;
|
|
@@ -1955,6 +2073,7 @@ export declare const AuthSessionResponseSchema: z.ZodUnion<[z.ZodObject<{
|
|
|
1955
2073
|
audience: "atlas" | "app";
|
|
1956
2074
|
allowed: boolean;
|
|
1957
2075
|
};
|
|
2076
|
+
csrfToken?: string | undefined;
|
|
1958
2077
|
}>]>;
|
|
1959
2078
|
export declare const AuthSignOutResponseSchema: z.ZodObject<{
|
|
1960
2079
|
success: z.ZodBoolean;
|
|
@@ -1964,17 +2083,34 @@ export declare const AuthSignOutResponseSchema: z.ZodObject<{
|
|
|
1964
2083
|
success: boolean;
|
|
1965
2084
|
}>;
|
|
1966
2085
|
export declare const CreateDeviceAuthorizationBodySchema: z.ZodObject<{
|
|
2086
|
+
/** Shown to the approving user and on their sessions list, such as "sixb CLI on alex-mbp". */
|
|
1967
2087
|
clientName: z.ZodString;
|
|
1968
|
-
tokenName: z.ZodString;
|
|
1969
|
-
expiresIn: z.ZodOptional<z.ZodLiteral<"90d">>;
|
|
1970
2088
|
}, "strip", z.ZodTypeAny, {
|
|
1971
2089
|
clientName: string;
|
|
1972
|
-
tokenName: string;
|
|
1973
|
-
expiresIn?: "90d" | undefined;
|
|
1974
2090
|
}, {
|
|
1975
2091
|
clientName: string;
|
|
1976
|
-
|
|
1977
|
-
|
|
2092
|
+
}>;
|
|
2093
|
+
/** A native client's session tokens. Send `accessToken` as a Bearer token until `expiresIn` runs out. */
|
|
2094
|
+
export declare const BearerSessionTokensSchema: z.ZodObject<{
|
|
2095
|
+
accessToken: z.ZodString;
|
|
2096
|
+
refreshToken: z.ZodString;
|
|
2097
|
+
/** Seconds until the access token expires. */
|
|
2098
|
+
expiresIn: z.ZodNumber;
|
|
2099
|
+
}, "strip", z.ZodTypeAny, {
|
|
2100
|
+
accessToken: string;
|
|
2101
|
+
refreshToken: string;
|
|
2102
|
+
expiresIn: number;
|
|
2103
|
+
}, {
|
|
2104
|
+
accessToken: string;
|
|
2105
|
+
refreshToken: string;
|
|
2106
|
+
expiresIn: number;
|
|
2107
|
+
}>;
|
|
2108
|
+
export declare const RefreshAuthSessionBodySchema: z.ZodObject<{
|
|
2109
|
+
refreshToken: z.ZodString;
|
|
2110
|
+
}, "strip", z.ZodTypeAny, {
|
|
2111
|
+
refreshToken: string;
|
|
2112
|
+
}, {
|
|
2113
|
+
refreshToken: string;
|
|
1978
2114
|
}>;
|
|
1979
2115
|
export declare const CreateDeviceAuthorizationResponseSchema: z.ZodObject<{
|
|
1980
2116
|
deviceCode: z.ZodString;
|
|
@@ -2024,14 +2160,22 @@ export declare const ExchangeDeviceAuthorizationResponseSchema: z.ZodUnion<[z.Zo
|
|
|
2024
2160
|
}, {
|
|
2025
2161
|
status: "expired";
|
|
2026
2162
|
}>, z.ZodObject<{
|
|
2027
|
-
status: z.ZodLiteral<"approved">;
|
|
2028
2163
|
accessToken: z.ZodString;
|
|
2164
|
+
refreshToken: z.ZodString;
|
|
2165
|
+
/** Seconds until the access token expires. */
|
|
2166
|
+
expiresIn: z.ZodNumber;
|
|
2167
|
+
} & {
|
|
2168
|
+
status: z.ZodLiteral<"approved">;
|
|
2029
2169
|
}, "strip", z.ZodTypeAny, {
|
|
2030
2170
|
status: "approved";
|
|
2031
2171
|
accessToken: string;
|
|
2172
|
+
refreshToken: string;
|
|
2173
|
+
expiresIn: number;
|
|
2032
2174
|
}, {
|
|
2033
2175
|
status: "approved";
|
|
2034
2176
|
accessToken: string;
|
|
2177
|
+
refreshToken: string;
|
|
2178
|
+
expiresIn: number;
|
|
2035
2179
|
}>]>;
|
|
2036
2180
|
export declare const DeviceAuthorizationDecisionBodySchema: z.ZodObject<{
|
|
2037
2181
|
userCode: z.ZodString;
|
|
@@ -2048,28 +2192,33 @@ export declare const DeviceAuthorizationDecisionBodySchema: z.ZodObject<{
|
|
|
2048
2192
|
}>;
|
|
2049
2193
|
export declare const AuthSessionSummarySchema: z.ZodObject<{
|
|
2050
2194
|
id: z.ZodString;
|
|
2051
|
-
|
|
2195
|
+
/** The web app a browser session belongs to. Native clients' sessions have none. */
|
|
2196
|
+
audience: z.ZodOptional<z.ZodEnum<["atlas", "app"]>>;
|
|
2052
2197
|
current: z.ZodBoolean;
|
|
2053
2198
|
createdAt: z.ZodString;
|
|
2054
2199
|
expiresAt: z.ZodString;
|
|
2055
2200
|
lastSeenAt: z.ZodOptional<z.ZodString>;
|
|
2056
2201
|
userAgent: z.ZodOptional<z.ZodString>;
|
|
2057
2202
|
ipAddress: z.ZodOptional<z.ZodString>;
|
|
2203
|
+
/** Set for native clients, such as the CLI. */
|
|
2204
|
+
clientName: z.ZodOptional<z.ZodString>;
|
|
2058
2205
|
}, "strip", z.ZodTypeAny, {
|
|
2059
|
-
audience: "atlas" | "app";
|
|
2060
2206
|
id: string;
|
|
2061
2207
|
expiresAt: string;
|
|
2062
2208
|
createdAt: string;
|
|
2063
2209
|
current: boolean;
|
|
2210
|
+
audience?: "atlas" | "app" | undefined;
|
|
2211
|
+
clientName?: string | undefined;
|
|
2064
2212
|
lastSeenAt?: string | undefined;
|
|
2065
2213
|
userAgent?: string | undefined;
|
|
2066
2214
|
ipAddress?: string | undefined;
|
|
2067
2215
|
}, {
|
|
2068
|
-
audience: "atlas" | "app";
|
|
2069
2216
|
id: string;
|
|
2070
2217
|
expiresAt: string;
|
|
2071
2218
|
createdAt: string;
|
|
2072
2219
|
current: boolean;
|
|
2220
|
+
audience?: "atlas" | "app" | undefined;
|
|
2221
|
+
clientName?: string | undefined;
|
|
2073
2222
|
lastSeenAt?: string | undefined;
|
|
2074
2223
|
userAgent?: string | undefined;
|
|
2075
2224
|
ipAddress?: string | undefined;
|
|
@@ -2077,50 +2226,57 @@ export declare const AuthSessionSummarySchema: z.ZodObject<{
|
|
|
2077
2226
|
export declare const ListAuthSessionsResponseSchema: z.ZodObject<{
|
|
2078
2227
|
sessions: z.ZodArray<z.ZodObject<{
|
|
2079
2228
|
id: z.ZodString;
|
|
2080
|
-
|
|
2229
|
+
/** The web app a browser session belongs to. Native clients' sessions have none. */
|
|
2230
|
+
audience: z.ZodOptional<z.ZodEnum<["atlas", "app"]>>;
|
|
2081
2231
|
current: z.ZodBoolean;
|
|
2082
2232
|
createdAt: z.ZodString;
|
|
2083
2233
|
expiresAt: z.ZodString;
|
|
2084
2234
|
lastSeenAt: z.ZodOptional<z.ZodString>;
|
|
2085
2235
|
userAgent: z.ZodOptional<z.ZodString>;
|
|
2086
2236
|
ipAddress: z.ZodOptional<z.ZodString>;
|
|
2237
|
+
/** Set for native clients, such as the CLI. */
|
|
2238
|
+
clientName: z.ZodOptional<z.ZodString>;
|
|
2087
2239
|
}, "strip", z.ZodTypeAny, {
|
|
2088
|
-
audience: "atlas" | "app";
|
|
2089
2240
|
id: string;
|
|
2090
2241
|
expiresAt: string;
|
|
2091
2242
|
createdAt: string;
|
|
2092
2243
|
current: boolean;
|
|
2244
|
+
audience?: "atlas" | "app" | undefined;
|
|
2245
|
+
clientName?: string | undefined;
|
|
2093
2246
|
lastSeenAt?: string | undefined;
|
|
2094
2247
|
userAgent?: string | undefined;
|
|
2095
2248
|
ipAddress?: string | undefined;
|
|
2096
2249
|
}, {
|
|
2097
|
-
audience: "atlas" | "app";
|
|
2098
2250
|
id: string;
|
|
2099
2251
|
expiresAt: string;
|
|
2100
2252
|
createdAt: string;
|
|
2101
2253
|
current: boolean;
|
|
2254
|
+
audience?: "atlas" | "app" | undefined;
|
|
2255
|
+
clientName?: string | undefined;
|
|
2102
2256
|
lastSeenAt?: string | undefined;
|
|
2103
2257
|
userAgent?: string | undefined;
|
|
2104
2258
|
ipAddress?: string | undefined;
|
|
2105
2259
|
}>, "many">;
|
|
2106
2260
|
}, "strip", z.ZodTypeAny, {
|
|
2107
2261
|
sessions: {
|
|
2108
|
-
audience: "atlas" | "app";
|
|
2109
2262
|
id: string;
|
|
2110
2263
|
expiresAt: string;
|
|
2111
2264
|
createdAt: string;
|
|
2112
2265
|
current: boolean;
|
|
2266
|
+
audience?: "atlas" | "app" | undefined;
|
|
2267
|
+
clientName?: string | undefined;
|
|
2113
2268
|
lastSeenAt?: string | undefined;
|
|
2114
2269
|
userAgent?: string | undefined;
|
|
2115
2270
|
ipAddress?: string | undefined;
|
|
2116
2271
|
}[];
|
|
2117
2272
|
}, {
|
|
2118
2273
|
sessions: {
|
|
2119
|
-
audience: "atlas" | "app";
|
|
2120
2274
|
id: string;
|
|
2121
2275
|
expiresAt: string;
|
|
2122
2276
|
createdAt: string;
|
|
2123
2277
|
current: boolean;
|
|
2278
|
+
audience?: "atlas" | "app" | undefined;
|
|
2279
|
+
clientName?: string | undefined;
|
|
2124
2280
|
lastSeenAt?: string | undefined;
|
|
2125
2281
|
userAgent?: string | undefined;
|
|
2126
2282
|
ipAddress?: string | undefined;
|