@coffre/client 0.4.6 → 0.5.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/dist/{index-D_Fqmy4Z.d.ts → index-D0kM4Gfi.d.ts} +476 -91
- package/dist/index.d.ts +2 -2
- package/dist/index.js +12 -0
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +5 -0
- package/package.json +1 -1
- package/src/api.ts +331 -52
- package/src/index.ts +17 -3
- package/src/routes.ts +5 -0
|
@@ -10,9 +10,35 @@ type Api = {
|
|
|
10
10
|
};
|
|
11
11
|
registered: boolean;
|
|
12
12
|
tampered: boolean;
|
|
13
|
-
instanceRole: "
|
|
13
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
14
|
+
scope: {
|
|
15
|
+
projects: "all" | {
|
|
16
|
+
only: string[];
|
|
17
|
+
} | {
|
|
18
|
+
except: string[];
|
|
19
|
+
};
|
|
20
|
+
environments: "all" | {
|
|
21
|
+
only: string[];
|
|
22
|
+
} | {
|
|
23
|
+
except: string[];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
14
26
|
isRootAdmin: boolean;
|
|
27
|
+
runsInstance: boolean;
|
|
15
28
|
canReadAudit: boolean;
|
|
29
|
+
setsUpServices: boolean;
|
|
30
|
+
serviceSetup: null | {
|
|
31
|
+
projects: "all" | {
|
|
32
|
+
only: string[];
|
|
33
|
+
} | {
|
|
34
|
+
except: string[];
|
|
35
|
+
};
|
|
36
|
+
environments: "all" | {
|
|
37
|
+
only: string[];
|
|
38
|
+
} | {
|
|
39
|
+
except: string[];
|
|
40
|
+
};
|
|
41
|
+
};
|
|
16
42
|
features: {
|
|
17
43
|
mcp: string | null;
|
|
18
44
|
workloads: boolean;
|
|
@@ -44,13 +70,6 @@ type Api = {
|
|
|
44
70
|
}[];
|
|
45
71
|
secretCount: number | null;
|
|
46
72
|
}[];
|
|
47
|
-
everyProject: {
|
|
48
|
-
member: string;
|
|
49
|
-
place: string;
|
|
50
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
51
|
-
roleName: string;
|
|
52
|
-
expiresAt: string | null;
|
|
53
|
-
}[];
|
|
54
73
|
};
|
|
55
74
|
};
|
|
56
75
|
"PUT /projects/:project": {
|
|
@@ -64,13 +83,6 @@ type Api = {
|
|
|
64
83
|
archivedAt: string | null;
|
|
65
84
|
};
|
|
66
85
|
created: boolean;
|
|
67
|
-
inherited: {
|
|
68
|
-
member: string;
|
|
69
|
-
place: string;
|
|
70
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
71
|
-
roleName: string;
|
|
72
|
-
expiresAt: string | null;
|
|
73
|
-
}[];
|
|
74
86
|
};
|
|
75
87
|
};
|
|
76
88
|
"PATCH /projects/:project": {
|
|
@@ -125,13 +137,6 @@ type Api = {
|
|
|
125
137
|
archivedAt: string | null;
|
|
126
138
|
};
|
|
127
139
|
created: boolean;
|
|
128
|
-
inherited: {
|
|
129
|
-
member: string;
|
|
130
|
-
place: string;
|
|
131
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
132
|
-
roleName: string;
|
|
133
|
-
expiresAt: string | null;
|
|
134
|
-
}[];
|
|
135
140
|
forked: null | {
|
|
136
141
|
from: string;
|
|
137
142
|
keys: number;
|
|
@@ -152,13 +157,6 @@ type Api = {
|
|
|
152
157
|
name: string;
|
|
153
158
|
archivedAt: string | null;
|
|
154
159
|
};
|
|
155
|
-
inherited: {
|
|
156
|
-
member: string;
|
|
157
|
-
place: string;
|
|
158
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
159
|
-
roleName: string;
|
|
160
|
-
expiresAt: string | null;
|
|
161
|
-
}[];
|
|
162
160
|
};
|
|
163
161
|
};
|
|
164
162
|
"DELETE /projects/:project/:environment": {
|
|
@@ -386,7 +384,21 @@ type Api = {
|
|
|
386
384
|
member: string;
|
|
387
385
|
principalType: "service" | "user";
|
|
388
386
|
principalId: string;
|
|
389
|
-
instanceRole: "
|
|
387
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
388
|
+
scope: null | {
|
|
389
|
+
projects: "all" | {
|
|
390
|
+
only: string[];
|
|
391
|
+
} | {
|
|
392
|
+
except: string[];
|
|
393
|
+
};
|
|
394
|
+
environments: "all" | {
|
|
395
|
+
only: string[];
|
|
396
|
+
} | {
|
|
397
|
+
except: string[];
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
reachesByRole: boolean;
|
|
401
|
+
managed: boolean;
|
|
390
402
|
isRootAdmin: boolean;
|
|
391
403
|
tampered: boolean;
|
|
392
404
|
grants: {
|
|
@@ -412,7 +424,19 @@ type Api = {
|
|
|
412
424
|
principalType: "service" | "user";
|
|
413
425
|
principalId: string;
|
|
414
426
|
status: "active" | "removed" | "tampered";
|
|
415
|
-
instanceRole: "
|
|
427
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
428
|
+
scope: {
|
|
429
|
+
projects: "all" | {
|
|
430
|
+
only: string[];
|
|
431
|
+
} | {
|
|
432
|
+
except: string[];
|
|
433
|
+
};
|
|
434
|
+
environments: "all" | {
|
|
435
|
+
only: string[];
|
|
436
|
+
} | {
|
|
437
|
+
except: string[];
|
|
438
|
+
};
|
|
439
|
+
};
|
|
416
440
|
isRootAdmin: boolean;
|
|
417
441
|
removedAt: string | null;
|
|
418
442
|
removedBy: string | null;
|
|
@@ -439,6 +463,9 @@ type Api = {
|
|
|
439
463
|
hint: string;
|
|
440
464
|
expiresAt: string;
|
|
441
465
|
lastUsedAt: string | null;
|
|
466
|
+
scope: null | {
|
|
467
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
468
|
+
};
|
|
442
469
|
}[];
|
|
443
470
|
apps: {
|
|
444
471
|
id: string;
|
|
@@ -466,11 +493,35 @@ type Api = {
|
|
|
466
493
|
};
|
|
467
494
|
"PUT /members/:member": {
|
|
468
495
|
input: {
|
|
469
|
-
|
|
496
|
+
role?: "admin" | "auditor" | "developer" | "member" | "owner";
|
|
497
|
+
scope?: {
|
|
498
|
+
projects?: "all" | {
|
|
499
|
+
only: string[];
|
|
500
|
+
} | {
|
|
501
|
+
except: string[];
|
|
502
|
+
};
|
|
503
|
+
environments?: "all" | {
|
|
504
|
+
only: string[];
|
|
505
|
+
} | {
|
|
506
|
+
except: string[];
|
|
507
|
+
};
|
|
508
|
+
};
|
|
470
509
|
};
|
|
471
510
|
output: {
|
|
472
511
|
member: string;
|
|
473
|
-
instanceRole: "
|
|
512
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner";
|
|
513
|
+
scope: {
|
|
514
|
+
projects: "all" | {
|
|
515
|
+
only: string[];
|
|
516
|
+
} | {
|
|
517
|
+
except: string[];
|
|
518
|
+
};
|
|
519
|
+
environments: "all" | {
|
|
520
|
+
only: string[];
|
|
521
|
+
} | {
|
|
522
|
+
except: string[];
|
|
523
|
+
};
|
|
524
|
+
};
|
|
474
525
|
created: boolean;
|
|
475
526
|
};
|
|
476
527
|
};
|
|
@@ -484,11 +535,23 @@ type Api = {
|
|
|
484
535
|
identities: number;
|
|
485
536
|
apps: number;
|
|
486
537
|
};
|
|
487
|
-
report: {
|
|
538
|
+
report: null | {
|
|
488
539
|
principalType: "service" | "user";
|
|
489
540
|
principalId: string;
|
|
490
541
|
status: "active" | "removed" | "tampered";
|
|
491
|
-
instanceRole: "
|
|
542
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
543
|
+
scope: {
|
|
544
|
+
projects: "all" | {
|
|
545
|
+
only: string[];
|
|
546
|
+
} | {
|
|
547
|
+
except: string[];
|
|
548
|
+
};
|
|
549
|
+
environments: "all" | {
|
|
550
|
+
only: string[];
|
|
551
|
+
} | {
|
|
552
|
+
except: string[];
|
|
553
|
+
};
|
|
554
|
+
};
|
|
492
555
|
isRootAdmin: boolean;
|
|
493
556
|
removedAt: string | null;
|
|
494
557
|
removedBy: string | null;
|
|
@@ -515,6 +578,9 @@ type Api = {
|
|
|
515
578
|
hint: string;
|
|
516
579
|
expiresAt: string;
|
|
517
580
|
lastUsedAt: string | null;
|
|
581
|
+
scope: null | {
|
|
582
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
583
|
+
};
|
|
518
584
|
}[];
|
|
519
585
|
apps: {
|
|
520
586
|
id: string;
|
|
@@ -553,6 +619,9 @@ type Api = {
|
|
|
553
619
|
expiresAt: string;
|
|
554
620
|
lastUsedAt: string | null;
|
|
555
621
|
lastUsedIp: string | null;
|
|
622
|
+
scope: null | {
|
|
623
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
624
|
+
};
|
|
556
625
|
}[];
|
|
557
626
|
};
|
|
558
627
|
};
|
|
@@ -560,11 +629,21 @@ type Api = {
|
|
|
560
629
|
input: {
|
|
561
630
|
expiresInDays: number;
|
|
562
631
|
label?: string | null;
|
|
632
|
+
scope?: {
|
|
633
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
634
|
+
};
|
|
563
635
|
};
|
|
564
636
|
output: {
|
|
565
637
|
id: string;
|
|
566
638
|
token: string;
|
|
567
639
|
expiresAt: string;
|
|
640
|
+
scope: {
|
|
641
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
642
|
+
};
|
|
643
|
+
} | {
|
|
644
|
+
scope: {
|
|
645
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
646
|
+
};
|
|
568
647
|
};
|
|
569
648
|
};
|
|
570
649
|
"DELETE /members/:member/tokens/:id": {
|
|
@@ -582,7 +661,10 @@ type Api = {
|
|
|
582
661
|
issuer: string;
|
|
583
662
|
jwksUri: string;
|
|
584
663
|
claims: {
|
|
585
|
-
[key: string]: string;
|
|
664
|
+
[key: string]: string | string[];
|
|
665
|
+
};
|
|
666
|
+
scope: null | {
|
|
667
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
586
668
|
};
|
|
587
669
|
label: string | null;
|
|
588
670
|
createdAt: string;
|
|
@@ -595,9 +677,12 @@ type Api = {
|
|
|
595
677
|
input: {
|
|
596
678
|
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
597
679
|
claims: {
|
|
598
|
-
[key: string]: string;
|
|
680
|
+
[key: string]: string | string[];
|
|
599
681
|
};
|
|
600
682
|
issuer?: string | null;
|
|
683
|
+
scope?: {
|
|
684
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
685
|
+
};
|
|
601
686
|
label?: string | null;
|
|
602
687
|
replaces?: string[];
|
|
603
688
|
};
|
|
@@ -606,7 +691,10 @@ type Api = {
|
|
|
606
691
|
issuer: string;
|
|
607
692
|
jwksUri: string;
|
|
608
693
|
claims: {
|
|
609
|
-
[key: string]: string;
|
|
694
|
+
[key: string]: string | string[];
|
|
695
|
+
};
|
|
696
|
+
scope: {
|
|
697
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
610
698
|
};
|
|
611
699
|
replaces: {
|
|
612
700
|
id: string;
|
|
@@ -619,7 +707,10 @@ type Api = {
|
|
|
619
707
|
issuer: string;
|
|
620
708
|
jwksUri: string;
|
|
621
709
|
claims: {
|
|
622
|
-
[key: string]: string;
|
|
710
|
+
[key: string]: string | string[];
|
|
711
|
+
};
|
|
712
|
+
scope: null | {
|
|
713
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
623
714
|
};
|
|
624
715
|
label: string | null;
|
|
625
716
|
createdAt: string;
|
|
@@ -952,6 +1043,86 @@ type Api = {
|
|
|
952
1043
|
}[];
|
|
953
1044
|
};
|
|
954
1045
|
};
|
|
1046
|
+
"GET /members/:member/access": {
|
|
1047
|
+
input: undefined;
|
|
1048
|
+
output: {
|
|
1049
|
+
member: string;
|
|
1050
|
+
principalType: "service" | "user";
|
|
1051
|
+
principalId: string;
|
|
1052
|
+
status: "active" | "removed" | "tampered";
|
|
1053
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
1054
|
+
scope: null | {
|
|
1055
|
+
projects: "all" | {
|
|
1056
|
+
only: string[];
|
|
1057
|
+
} | {
|
|
1058
|
+
except: string[];
|
|
1059
|
+
};
|
|
1060
|
+
environments: "all" | {
|
|
1061
|
+
only: string[];
|
|
1062
|
+
} | {
|
|
1063
|
+
except: string[];
|
|
1064
|
+
};
|
|
1065
|
+
};
|
|
1066
|
+
isRootAdmin: boolean;
|
|
1067
|
+
managed: boolean;
|
|
1068
|
+
grants: {
|
|
1069
|
+
id: string;
|
|
1070
|
+
project: string;
|
|
1071
|
+
environment: string | null;
|
|
1072
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1073
|
+
roleName: string;
|
|
1074
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
1075
|
+
expiresAt: string | null;
|
|
1076
|
+
}[];
|
|
1077
|
+
};
|
|
1078
|
+
};
|
|
1079
|
+
"PUT /settings": {
|
|
1080
|
+
input: {
|
|
1081
|
+
serviceAccounts: {
|
|
1082
|
+
projects?: "all" | {
|
|
1083
|
+
only: string[];
|
|
1084
|
+
} | {
|
|
1085
|
+
except: string[];
|
|
1086
|
+
};
|
|
1087
|
+
environments?: "all" | {
|
|
1088
|
+
only: string[];
|
|
1089
|
+
} | {
|
|
1090
|
+
except: string[];
|
|
1091
|
+
};
|
|
1092
|
+
};
|
|
1093
|
+
};
|
|
1094
|
+
output: {
|
|
1095
|
+
serviceAccounts: {
|
|
1096
|
+
projects: "all" | {
|
|
1097
|
+
only: string[];
|
|
1098
|
+
} | {
|
|
1099
|
+
except: string[];
|
|
1100
|
+
};
|
|
1101
|
+
environments: "all" | {
|
|
1102
|
+
only: string[];
|
|
1103
|
+
} | {
|
|
1104
|
+
except: string[];
|
|
1105
|
+
};
|
|
1106
|
+
};
|
|
1107
|
+
};
|
|
1108
|
+
};
|
|
1109
|
+
"GET /settings": {
|
|
1110
|
+
input: undefined;
|
|
1111
|
+
output: {
|
|
1112
|
+
serviceAccounts: {
|
|
1113
|
+
projects: "all" | {
|
|
1114
|
+
only: string[];
|
|
1115
|
+
} | {
|
|
1116
|
+
except: string[];
|
|
1117
|
+
};
|
|
1118
|
+
environments: "all" | {
|
|
1119
|
+
only: string[];
|
|
1120
|
+
} | {
|
|
1121
|
+
except: string[];
|
|
1122
|
+
};
|
|
1123
|
+
};
|
|
1124
|
+
};
|
|
1125
|
+
};
|
|
955
1126
|
};
|
|
956
1127
|
type AccessValue = "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer" | null | {
|
|
957
1128
|
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
@@ -1063,7 +1234,10 @@ type BindingPlan = {
|
|
|
1063
1234
|
issuer: string;
|
|
1064
1235
|
jwksUri: string;
|
|
1065
1236
|
claims: {
|
|
1066
|
-
[key: string]: string;
|
|
1237
|
+
[key: string]: string | string[];
|
|
1238
|
+
};
|
|
1239
|
+
scope: {
|
|
1240
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1067
1241
|
};
|
|
1068
1242
|
replaces: {
|
|
1069
1243
|
id: string;
|
|
@@ -1076,7 +1250,10 @@ type BindingView = {
|
|
|
1076
1250
|
issuer: string;
|
|
1077
1251
|
jwksUri: string;
|
|
1078
1252
|
claims: {
|
|
1079
|
-
[key: string]: string;
|
|
1253
|
+
[key: string]: string | string[];
|
|
1254
|
+
};
|
|
1255
|
+
scope: null | {
|
|
1256
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1080
1257
|
};
|
|
1081
1258
|
label: string | null;
|
|
1082
1259
|
createdAt: string;
|
|
@@ -1178,13 +1355,6 @@ type IdentityRow = {
|
|
|
1178
1355
|
createdAt: string;
|
|
1179
1356
|
lastSignInAt: string | null;
|
|
1180
1357
|
};
|
|
1181
|
-
type InheritedGrant = {
|
|
1182
|
-
member: string;
|
|
1183
|
-
place: string;
|
|
1184
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1185
|
-
roleName: string;
|
|
1186
|
-
expiresAt: string | null;
|
|
1187
|
-
};
|
|
1188
1358
|
type Me = {
|
|
1189
1359
|
principal: {
|
|
1190
1360
|
type: "service" | "user";
|
|
@@ -1192,9 +1362,35 @@ type Me = {
|
|
|
1192
1362
|
};
|
|
1193
1363
|
registered: boolean;
|
|
1194
1364
|
tampered: boolean;
|
|
1195
|
-
instanceRole: "
|
|
1365
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
1366
|
+
scope: {
|
|
1367
|
+
projects: "all" | {
|
|
1368
|
+
only: string[];
|
|
1369
|
+
} | {
|
|
1370
|
+
except: string[];
|
|
1371
|
+
};
|
|
1372
|
+
environments: "all" | {
|
|
1373
|
+
only: string[];
|
|
1374
|
+
} | {
|
|
1375
|
+
except: string[];
|
|
1376
|
+
};
|
|
1377
|
+
};
|
|
1196
1378
|
isRootAdmin: boolean;
|
|
1379
|
+
runsInstance: boolean;
|
|
1197
1380
|
canReadAudit: boolean;
|
|
1381
|
+
setsUpServices: boolean;
|
|
1382
|
+
serviceSetup: null | {
|
|
1383
|
+
projects: "all" | {
|
|
1384
|
+
only: string[];
|
|
1385
|
+
} | {
|
|
1386
|
+
except: string[];
|
|
1387
|
+
};
|
|
1388
|
+
environments: "all" | {
|
|
1389
|
+
only: string[];
|
|
1390
|
+
} | {
|
|
1391
|
+
except: string[];
|
|
1392
|
+
};
|
|
1393
|
+
};
|
|
1198
1394
|
features: {
|
|
1199
1395
|
mcp: string | null;
|
|
1200
1396
|
workloads: boolean;
|
|
@@ -1209,7 +1405,21 @@ type Member = {
|
|
|
1209
1405
|
member: string;
|
|
1210
1406
|
principalType: "service" | "user";
|
|
1211
1407
|
principalId: string;
|
|
1212
|
-
instanceRole: "
|
|
1408
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
1409
|
+
scope: null | {
|
|
1410
|
+
projects: "all" | {
|
|
1411
|
+
only: string[];
|
|
1412
|
+
} | {
|
|
1413
|
+
except: string[];
|
|
1414
|
+
};
|
|
1415
|
+
environments: "all" | {
|
|
1416
|
+
only: string[];
|
|
1417
|
+
} | {
|
|
1418
|
+
except: string[];
|
|
1419
|
+
};
|
|
1420
|
+
};
|
|
1421
|
+
reachesByRole: boolean;
|
|
1422
|
+
managed: boolean;
|
|
1213
1423
|
isRootAdmin: boolean;
|
|
1214
1424
|
tampered: boolean;
|
|
1215
1425
|
grants: {
|
|
@@ -1222,6 +1432,36 @@ type Member = {
|
|
|
1222
1432
|
expiresAt: string | null;
|
|
1223
1433
|
}[];
|
|
1224
1434
|
};
|
|
1435
|
+
type MemberAccess = {
|
|
1436
|
+
member: string;
|
|
1437
|
+
principalType: "service" | "user";
|
|
1438
|
+
principalId: string;
|
|
1439
|
+
status: "active" | "removed" | "tampered";
|
|
1440
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
1441
|
+
scope: null | {
|
|
1442
|
+
projects: "all" | {
|
|
1443
|
+
only: string[];
|
|
1444
|
+
} | {
|
|
1445
|
+
except: string[];
|
|
1446
|
+
};
|
|
1447
|
+
environments: "all" | {
|
|
1448
|
+
only: string[];
|
|
1449
|
+
} | {
|
|
1450
|
+
except: string[];
|
|
1451
|
+
};
|
|
1452
|
+
};
|
|
1453
|
+
isRootAdmin: boolean;
|
|
1454
|
+
managed: boolean;
|
|
1455
|
+
grants: {
|
|
1456
|
+
id: string;
|
|
1457
|
+
project: string;
|
|
1458
|
+
environment: string | null;
|
|
1459
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1460
|
+
roleName: string;
|
|
1461
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
1462
|
+
expiresAt: string | null;
|
|
1463
|
+
}[];
|
|
1464
|
+
};
|
|
1225
1465
|
type MissingKey = {
|
|
1226
1466
|
key: string;
|
|
1227
1467
|
in: string[];
|
|
@@ -1231,7 +1471,19 @@ type OffboardingReport = {
|
|
|
1231
1471
|
principalType: "service" | "user";
|
|
1232
1472
|
principalId: string;
|
|
1233
1473
|
status: "active" | "removed" | "tampered";
|
|
1234
|
-
instanceRole: "
|
|
1474
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
1475
|
+
scope: {
|
|
1476
|
+
projects: "all" | {
|
|
1477
|
+
only: string[];
|
|
1478
|
+
} | {
|
|
1479
|
+
except: string[];
|
|
1480
|
+
};
|
|
1481
|
+
environments: "all" | {
|
|
1482
|
+
only: string[];
|
|
1483
|
+
} | {
|
|
1484
|
+
except: string[];
|
|
1485
|
+
};
|
|
1486
|
+
};
|
|
1235
1487
|
isRootAdmin: boolean;
|
|
1236
1488
|
removedAt: string | null;
|
|
1237
1489
|
removedBy: string | null;
|
|
@@ -1258,6 +1510,9 @@ type OffboardingReport = {
|
|
|
1258
1510
|
hint: string;
|
|
1259
1511
|
expiresAt: string;
|
|
1260
1512
|
lastUsedAt: string | null;
|
|
1513
|
+
scope: null | {
|
|
1514
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1515
|
+
};
|
|
1261
1516
|
}[];
|
|
1262
1517
|
apps: {
|
|
1263
1518
|
id: string;
|
|
@@ -1365,6 +1620,9 @@ type ServiceTokenRow = {
|
|
|
1365
1620
|
expiresAt: string;
|
|
1366
1621
|
lastUsedAt: string | null;
|
|
1367
1622
|
lastUsedIp: string | null;
|
|
1623
|
+
scope: null | {
|
|
1624
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1625
|
+
};
|
|
1368
1626
|
};
|
|
1369
1627
|
type SessionRow = {
|
|
1370
1628
|
id: string;
|
|
@@ -1390,6 +1648,11 @@ type SetResult = {
|
|
|
1390
1648
|
};
|
|
1391
1649
|
};
|
|
1392
1650
|
};
|
|
1651
|
+
type TokenPlan = {
|
|
1652
|
+
scope: {
|
|
1653
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1654
|
+
};
|
|
1655
|
+
};
|
|
1393
1656
|
//#endregion
|
|
1394
1657
|
//#region src/folders.d.ts
|
|
1395
1658
|
/**
|
|
@@ -1478,9 +1741,35 @@ declare function createClient(options: ClientOptions): {
|
|
|
1478
1741
|
};
|
|
1479
1742
|
registered: boolean;
|
|
1480
1743
|
tampered: boolean;
|
|
1481
|
-
instanceRole: "
|
|
1744
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
1745
|
+
scope: {
|
|
1746
|
+
projects: "all" | {
|
|
1747
|
+
only: string[];
|
|
1748
|
+
} | {
|
|
1749
|
+
except: string[];
|
|
1750
|
+
};
|
|
1751
|
+
environments: "all" | {
|
|
1752
|
+
only: string[];
|
|
1753
|
+
} | {
|
|
1754
|
+
except: string[];
|
|
1755
|
+
};
|
|
1756
|
+
};
|
|
1482
1757
|
isRootAdmin: boolean;
|
|
1758
|
+
runsInstance: boolean;
|
|
1483
1759
|
canReadAudit: boolean;
|
|
1760
|
+
setsUpServices: boolean;
|
|
1761
|
+
serviceSetup: null | {
|
|
1762
|
+
projects: "all" | {
|
|
1763
|
+
only: string[];
|
|
1764
|
+
} | {
|
|
1765
|
+
except: string[];
|
|
1766
|
+
};
|
|
1767
|
+
environments: "all" | {
|
|
1768
|
+
only: string[];
|
|
1769
|
+
} | {
|
|
1770
|
+
except: string[];
|
|
1771
|
+
};
|
|
1772
|
+
};
|
|
1484
1773
|
features: {
|
|
1485
1774
|
mcp: string | null;
|
|
1486
1775
|
workloads: boolean;
|
|
@@ -1511,13 +1800,6 @@ declare function createClient(options: ClientOptions): {
|
|
|
1511
1800
|
}[];
|
|
1512
1801
|
secretCount: number | null;
|
|
1513
1802
|
}[];
|
|
1514
|
-
everyProject: {
|
|
1515
|
-
member: string;
|
|
1516
|
-
place: string;
|
|
1517
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1518
|
-
roleName: string;
|
|
1519
|
-
expiresAt: string | null;
|
|
1520
|
-
}[];
|
|
1521
1803
|
}>;
|
|
1522
1804
|
create: (project: string, input: RouteInput<"PUT /projects/:project">) => Promise<{
|
|
1523
1805
|
project: {
|
|
@@ -1526,13 +1808,6 @@ declare function createClient(options: ClientOptions): {
|
|
|
1526
1808
|
archivedAt: string | null;
|
|
1527
1809
|
};
|
|
1528
1810
|
created: boolean;
|
|
1529
|
-
inherited: {
|
|
1530
|
-
member: string;
|
|
1531
|
-
place: string;
|
|
1532
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1533
|
-
roleName: string;
|
|
1534
|
-
expiresAt: string | null;
|
|
1535
|
-
}[];
|
|
1536
1811
|
}>;
|
|
1537
1812
|
update: (project: string, patch: RouteInput<"PATCH /projects/:project">) => Promise<{
|
|
1538
1813
|
project: {
|
|
@@ -1574,13 +1849,6 @@ declare function createClient(options: ClientOptions): {
|
|
|
1574
1849
|
archivedAt: string | null;
|
|
1575
1850
|
};
|
|
1576
1851
|
created: boolean;
|
|
1577
|
-
inherited: {
|
|
1578
|
-
member: string;
|
|
1579
|
-
place: string;
|
|
1580
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1581
|
-
roleName: string;
|
|
1582
|
-
expiresAt: string | null;
|
|
1583
|
-
}[];
|
|
1584
1852
|
forked: null | {
|
|
1585
1853
|
from: string;
|
|
1586
1854
|
keys: number;
|
|
@@ -1594,13 +1862,6 @@ declare function createClient(options: ClientOptions): {
|
|
|
1594
1862
|
name: string;
|
|
1595
1863
|
archivedAt: string | null;
|
|
1596
1864
|
};
|
|
1597
|
-
inherited: {
|
|
1598
|
-
member: string;
|
|
1599
|
-
place: string;
|
|
1600
|
-
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1601
|
-
roleName: string;
|
|
1602
|
-
expiresAt: string | null;
|
|
1603
|
-
}[];
|
|
1604
1865
|
}>;
|
|
1605
1866
|
/** What deleting an archived environment would erase and revoke; changes nothing. */
|
|
1606
1867
|
previewDelete: (path: string) => Promise<DeletionResult>;
|
|
@@ -1759,7 +2020,21 @@ declare function createClient(options: ClientOptions): {
|
|
|
1759
2020
|
member: string;
|
|
1760
2021
|
principalType: "service" | "user";
|
|
1761
2022
|
principalId: string;
|
|
1762
|
-
instanceRole: "
|
|
2023
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
2024
|
+
scope: null | {
|
|
2025
|
+
projects: "all" | {
|
|
2026
|
+
only: string[];
|
|
2027
|
+
} | {
|
|
2028
|
+
except: string[];
|
|
2029
|
+
};
|
|
2030
|
+
environments: "all" | {
|
|
2031
|
+
only: string[];
|
|
2032
|
+
} | {
|
|
2033
|
+
except: string[];
|
|
2034
|
+
};
|
|
2035
|
+
};
|
|
2036
|
+
reachesByRole: boolean;
|
|
2037
|
+
managed: boolean;
|
|
1763
2038
|
isRootAdmin: boolean;
|
|
1764
2039
|
tampered: boolean;
|
|
1765
2040
|
grants: {
|
|
@@ -1783,7 +2058,19 @@ declare function createClient(options: ClientOptions): {
|
|
|
1783
2058
|
principalType: "service" | "user";
|
|
1784
2059
|
principalId: string;
|
|
1785
2060
|
status: "active" | "removed" | "tampered";
|
|
1786
|
-
instanceRole: "
|
|
2061
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
2062
|
+
scope: {
|
|
2063
|
+
projects: "all" | {
|
|
2064
|
+
only: string[];
|
|
2065
|
+
} | {
|
|
2066
|
+
except: string[];
|
|
2067
|
+
};
|
|
2068
|
+
environments: "all" | {
|
|
2069
|
+
only: string[];
|
|
2070
|
+
} | {
|
|
2071
|
+
except: string[];
|
|
2072
|
+
};
|
|
2073
|
+
};
|
|
1787
2074
|
isRootAdmin: boolean;
|
|
1788
2075
|
removedAt: string | null;
|
|
1789
2076
|
removedBy: string | null;
|
|
@@ -1810,6 +2097,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
1810
2097
|
hint: string;
|
|
1811
2098
|
expiresAt: string;
|
|
1812
2099
|
lastUsedAt: string | null;
|
|
2100
|
+
scope: null | {
|
|
2101
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
2102
|
+
};
|
|
1813
2103
|
}[];
|
|
1814
2104
|
apps: {
|
|
1815
2105
|
id: string;
|
|
@@ -1834,9 +2124,52 @@ declare function createClient(options: ClientOptions): {
|
|
|
1834
2124
|
endedAt: string | null;
|
|
1835
2125
|
}[];
|
|
1836
2126
|
}>;
|
|
2127
|
+
/** Their instance role and scope, and the grants you manage, in one read. */
|
|
2128
|
+
access: (member: string) => Promise<{
|
|
2129
|
+
member: string;
|
|
2130
|
+
principalType: "service" | "user";
|
|
2131
|
+
principalId: string;
|
|
2132
|
+
status: "active" | "removed" | "tampered";
|
|
2133
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
2134
|
+
scope: null | {
|
|
2135
|
+
projects: "all" | {
|
|
2136
|
+
only: string[];
|
|
2137
|
+
} | {
|
|
2138
|
+
except: string[];
|
|
2139
|
+
};
|
|
2140
|
+
environments: "all" | {
|
|
2141
|
+
only: string[];
|
|
2142
|
+
} | {
|
|
2143
|
+
except: string[];
|
|
2144
|
+
};
|
|
2145
|
+
};
|
|
2146
|
+
isRootAdmin: boolean;
|
|
2147
|
+
managed: boolean;
|
|
2148
|
+
grants: {
|
|
2149
|
+
id: string;
|
|
2150
|
+
project: string;
|
|
2151
|
+
environment: string | null;
|
|
2152
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
2153
|
+
roleName: string;
|
|
2154
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
2155
|
+
expiresAt: string | null;
|
|
2156
|
+
}[];
|
|
2157
|
+
}>;
|
|
1837
2158
|
add: (member: string, input?: RouteInput<"PUT /members/:member">) => Promise<{
|
|
1838
2159
|
member: string;
|
|
1839
|
-
instanceRole: "
|
|
2160
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner";
|
|
2161
|
+
scope: {
|
|
2162
|
+
projects: "all" | {
|
|
2163
|
+
only: string[];
|
|
2164
|
+
} | {
|
|
2165
|
+
except: string[];
|
|
2166
|
+
};
|
|
2167
|
+
environments: "all" | {
|
|
2168
|
+
only: string[];
|
|
2169
|
+
} | {
|
|
2170
|
+
except: string[];
|
|
2171
|
+
};
|
|
2172
|
+
};
|
|
1840
2173
|
created: boolean;
|
|
1841
2174
|
}>;
|
|
1842
2175
|
/** Offboards; returns what to rotate. */
|
|
@@ -1848,11 +2181,23 @@ declare function createClient(options: ClientOptions): {
|
|
|
1848
2181
|
identities: number;
|
|
1849
2182
|
apps: number;
|
|
1850
2183
|
};
|
|
1851
|
-
report: {
|
|
2184
|
+
report: null | {
|
|
1852
2185
|
principalType: "service" | "user";
|
|
1853
2186
|
principalId: string;
|
|
1854
2187
|
status: "active" | "removed" | "tampered";
|
|
1855
|
-
instanceRole: "
|
|
2188
|
+
instanceRole: "admin" | "auditor" | "developer" | "member" | "owner" | "root-admin";
|
|
2189
|
+
scope: {
|
|
2190
|
+
projects: "all" | {
|
|
2191
|
+
only: string[];
|
|
2192
|
+
} | {
|
|
2193
|
+
except: string[];
|
|
2194
|
+
};
|
|
2195
|
+
environments: "all" | {
|
|
2196
|
+
only: string[];
|
|
2197
|
+
} | {
|
|
2198
|
+
except: string[];
|
|
2199
|
+
};
|
|
2200
|
+
};
|
|
1856
2201
|
isRootAdmin: boolean;
|
|
1857
2202
|
removedAt: string | null;
|
|
1858
2203
|
removedBy: string | null;
|
|
@@ -1879,6 +2224,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
1879
2224
|
hint: string;
|
|
1880
2225
|
expiresAt: string;
|
|
1881
2226
|
lastUsedAt: string | null;
|
|
2227
|
+
scope: null | {
|
|
2228
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
2229
|
+
};
|
|
1882
2230
|
}[];
|
|
1883
2231
|
apps: {
|
|
1884
2232
|
id: string;
|
|
@@ -1916,14 +2264,17 @@ declare function createClient(options: ClientOptions): {
|
|
|
1916
2264
|
expiresAt: string;
|
|
1917
2265
|
lastUsedAt: string | null;
|
|
1918
2266
|
lastUsedIp: string | null;
|
|
2267
|
+
scope: null | {
|
|
2268
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
2269
|
+
};
|
|
1919
2270
|
}[];
|
|
1920
2271
|
}>;
|
|
2272
|
+
/** What the token would reach, as the server would issue it now; issues nothing. */
|
|
2273
|
+
preview: (member: string, input: RouteInput<"POST /members/:member/tokens">) => Promise<TokenPlan>;
|
|
1921
2274
|
/** The value is in the answer, and only there. */
|
|
1922
|
-
issue: (member: string, input: RouteInput<"POST /members/:member/tokens">) => Promise<{
|
|
1923
|
-
id: string;
|
|
2275
|
+
issue: (member: string, input: RouteInput<"POST /members/:member/tokens">) => Promise<Extract<RouteOutput<"POST /members/:member/tokens">, {
|
|
1924
2276
|
token: string;
|
|
1925
|
-
|
|
1926
|
-
}>;
|
|
2277
|
+
}>>;
|
|
1927
2278
|
revoke: (member: string, id: string) => Promise<{
|
|
1928
2279
|
revoked: true;
|
|
1929
2280
|
}>;
|
|
@@ -1937,7 +2288,10 @@ declare function createClient(options: ClientOptions): {
|
|
|
1937
2288
|
issuer: string;
|
|
1938
2289
|
jwksUri: string;
|
|
1939
2290
|
claims: {
|
|
1940
|
-
[key: string]: string;
|
|
2291
|
+
[key: string]: string | string[];
|
|
2292
|
+
};
|
|
2293
|
+
scope: null | {
|
|
2294
|
+
[key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1941
2295
|
};
|
|
1942
2296
|
label: string | null;
|
|
1943
2297
|
createdAt: string;
|
|
@@ -2162,6 +2516,37 @@ declare function createClient(options: ClientOptions): {
|
|
|
2162
2516
|
disconnected: true;
|
|
2163
2517
|
}>;
|
|
2164
2518
|
};
|
|
2519
|
+
/** The instance's settings, for those who run it: where people set up service accounts themselves. */
|
|
2520
|
+
settings: {
|
|
2521
|
+
get: () => Promise<{
|
|
2522
|
+
serviceAccounts: {
|
|
2523
|
+
projects: "all" | {
|
|
2524
|
+
only: string[];
|
|
2525
|
+
} | {
|
|
2526
|
+
except: string[];
|
|
2527
|
+
};
|
|
2528
|
+
environments: "all" | {
|
|
2529
|
+
only: string[];
|
|
2530
|
+
} | {
|
|
2531
|
+
except: string[];
|
|
2532
|
+
};
|
|
2533
|
+
};
|
|
2534
|
+
}>;
|
|
2535
|
+
set: (input: RouteInput<"PUT /settings">) => Promise<{
|
|
2536
|
+
serviceAccounts: {
|
|
2537
|
+
projects: "all" | {
|
|
2538
|
+
only: string[];
|
|
2539
|
+
} | {
|
|
2540
|
+
except: string[];
|
|
2541
|
+
};
|
|
2542
|
+
environments: "all" | {
|
|
2543
|
+
only: string[];
|
|
2544
|
+
} | {
|
|
2545
|
+
except: string[];
|
|
2546
|
+
};
|
|
2547
|
+
};
|
|
2548
|
+
}>;
|
|
2549
|
+
};
|
|
2165
2550
|
audit: {
|
|
2166
2551
|
list: (query?: RouteInput<"GET /audit">) => Promise<{
|
|
2167
2552
|
entries: {
|
|
@@ -2255,4 +2640,4 @@ declare function planImport(coffre: CoffreClient, path: string, entries: readonl
|
|
|
2255
2640
|
changes: Record<string, string>;
|
|
2256
2641
|
}>;
|
|
2257
2642
|
//#endregion
|
|
2258
|
-
export { DeletionResult as A, OffboardingReport as B, AuthInfo as C, ConnectedApp as D, BindingView as E,
|
|
2643
|
+
export { DeletionResult as A, OffboardingReport as B, AuthInfo as C, ConnectedApp as D, BindingView as E, ListedReference as F, SecretVersion as G, ReferenceView as H, Me as I, SetResult as J, ServiceTokenRow as K, Member as L, DryRunOutcome as M, DryRunResult as N, Decision as O, IdentityRow as P, MemberAccess as R, AuditEntryView as S, BindingPlan as T, RemovedMember as U, ProjectSummary as V, SecretKey as W, WorkloadIds as X, TokenPlan as Y, byFolder as _, Params as a, Api as b, RouteOutput as c, planImport as d, Unreachable as f, shownMember as g, serviceName as h, ImportAction as i, DismissedKey as j, Deletion as k, Transport as l, apiMember as m, CoffreClient as n, RouteInput as o, unreachable as p, SessionRow as q, CoffreError as r, RouteKey as s, ClientOptions as t, createClient as u, foldersOf as v, AuthorizationView as w, ApprovalView as x, AccessValue as y, MissingKey as z };
|