@coffre/client 0.4.5 → 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.
@@ -10,9 +10,35 @@ type Api = {
10
10
  };
11
11
  registered: boolean;
12
12
  tampered: boolean;
13
- instanceRole: "owner" | "root-admin" | "user";
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: "owner" | "root-admin" | "user";
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: "owner" | "root-admin" | "user";
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
- owner?: boolean;
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: "owner" | "user";
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: "owner" | "root-admin" | "user";
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;
@@ -901,6 +992,8 @@ type Api = {
901
992
  label: string;
902
993
  value: string;
903
994
  kind?: "mono" | "time";
995
+ note?: string;
996
+ warn?: true;
904
997
  }[];
905
998
  asks: null | {
906
999
  value: {
@@ -909,7 +1002,10 @@ type Api = {
909
1002
  };
910
1003
  };
911
1004
  kind: "change" | "reveal";
1005
+ reveals: boolean;
912
1006
  digest: string;
1007
+ basis: string | null;
1008
+ ready: boolean;
913
1009
  createdAt: string;
914
1010
  expiresAt: string;
915
1011
  outcome: null | {
@@ -926,6 +1022,7 @@ type Api = {
926
1022
  input: {
927
1023
  approve: boolean;
928
1024
  digest: string;
1025
+ basis?: string | null;
929
1026
  value?: string;
930
1027
  };
931
1028
  output: {
@@ -941,9 +1038,91 @@ type Api = {
941
1038
  label: string;
942
1039
  value: string;
943
1040
  kind?: "mono" | "time";
1041
+ note?: string;
1042
+ warn?: true;
1043
+ }[];
1044
+ };
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;
944
1076
  }[];
945
1077
  };
946
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
+ };
947
1126
  };
948
1127
  type AccessValue = "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer" | null | {
949
1128
  role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
@@ -963,6 +1142,8 @@ type ApprovalView = {
963
1142
  label: string;
964
1143
  value: string;
965
1144
  kind?: "mono" | "time";
1145
+ note?: string;
1146
+ warn?: true;
966
1147
  }[];
967
1148
  asks: null | {
968
1149
  value: {
@@ -971,7 +1152,10 @@ type ApprovalView = {
971
1152
  };
972
1153
  };
973
1154
  kind: "change" | "reveal";
1155
+ reveals: boolean;
974
1156
  digest: string;
1157
+ basis: string | null;
1158
+ ready: boolean;
975
1159
  createdAt: string;
976
1160
  expiresAt: string;
977
1161
  outcome: null | {
@@ -1050,7 +1234,10 @@ type BindingPlan = {
1050
1234
  issuer: string;
1051
1235
  jwksUri: string;
1052
1236
  claims: {
1053
- [key: string]: string;
1237
+ [key: string]: string | string[];
1238
+ };
1239
+ scope: {
1240
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1054
1241
  };
1055
1242
  replaces: {
1056
1243
  id: string;
@@ -1063,7 +1250,10 @@ type BindingView = {
1063
1250
  issuer: string;
1064
1251
  jwksUri: string;
1065
1252
  claims: {
1066
- [key: string]: string;
1253
+ [key: string]: string | string[];
1254
+ };
1255
+ scope: null | {
1256
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1067
1257
  };
1068
1258
  label: string | null;
1069
1259
  createdAt: string;
@@ -1111,6 +1301,8 @@ type Decision = {
1111
1301
  label: string;
1112
1302
  value: string;
1113
1303
  kind?: "mono" | "time";
1304
+ note?: string;
1305
+ warn?: true;
1114
1306
  }[];
1115
1307
  };
1116
1308
  type DeletionResult = {
@@ -1163,13 +1355,6 @@ type IdentityRow = {
1163
1355
  createdAt: string;
1164
1356
  lastSignInAt: string | null;
1165
1357
  };
1166
- type InheritedGrant = {
1167
- member: string;
1168
- place: string;
1169
- role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1170
- roleName: string;
1171
- expiresAt: string | null;
1172
- };
1173
1358
  type Me = {
1174
1359
  principal: {
1175
1360
  type: "service" | "user";
@@ -1177,9 +1362,35 @@ type Me = {
1177
1362
  };
1178
1363
  registered: boolean;
1179
1364
  tampered: boolean;
1180
- instanceRole: "owner" | "root-admin" | "user";
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
+ };
1181
1378
  isRootAdmin: boolean;
1379
+ runsInstance: boolean;
1182
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
+ };
1183
1394
  features: {
1184
1395
  mcp: string | null;
1185
1396
  workloads: boolean;
@@ -1194,7 +1405,21 @@ type Member = {
1194
1405
  member: string;
1195
1406
  principalType: "service" | "user";
1196
1407
  principalId: string;
1197
- instanceRole: "owner" | "root-admin" | "user";
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;
1198
1423
  isRootAdmin: boolean;
1199
1424
  tampered: boolean;
1200
1425
  grants: {
@@ -1207,6 +1432,36 @@ type Member = {
1207
1432
  expiresAt: string | null;
1208
1433
  }[];
1209
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
+ };
1210
1465
  type MissingKey = {
1211
1466
  key: string;
1212
1467
  in: string[];
@@ -1216,7 +1471,19 @@ type OffboardingReport = {
1216
1471
  principalType: "service" | "user";
1217
1472
  principalId: string;
1218
1473
  status: "active" | "removed" | "tampered";
1219
- instanceRole: "owner" | "root-admin" | "user";
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
+ };
1220
1487
  isRootAdmin: boolean;
1221
1488
  removedAt: string | null;
1222
1489
  removedBy: string | null;
@@ -1243,6 +1510,9 @@ type OffboardingReport = {
1243
1510
  hint: string;
1244
1511
  expiresAt: string;
1245
1512
  lastUsedAt: string | null;
1513
+ scope: null | {
1514
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1515
+ };
1246
1516
  }[];
1247
1517
  apps: {
1248
1518
  id: string;
@@ -1350,6 +1620,9 @@ type ServiceTokenRow = {
1350
1620
  expiresAt: string;
1351
1621
  lastUsedAt: string | null;
1352
1622
  lastUsedIp: string | null;
1623
+ scope: null | {
1624
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1625
+ };
1353
1626
  };
1354
1627
  type SessionRow = {
1355
1628
  id: string;
@@ -1375,6 +1648,11 @@ type SetResult = {
1375
1648
  };
1376
1649
  };
1377
1650
  };
1651
+ type TokenPlan = {
1652
+ scope: {
1653
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1654
+ };
1655
+ };
1378
1656
  //#endregion
1379
1657
  //#region src/folders.d.ts
1380
1658
  /**
@@ -1463,9 +1741,35 @@ declare function createClient(options: ClientOptions): {
1463
1741
  };
1464
1742
  registered: boolean;
1465
1743
  tampered: boolean;
1466
- instanceRole: "owner" | "root-admin" | "user";
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
+ };
1467
1757
  isRootAdmin: boolean;
1758
+ runsInstance: boolean;
1468
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
+ };
1469
1773
  features: {
1470
1774
  mcp: string | null;
1471
1775
  workloads: boolean;
@@ -1496,13 +1800,6 @@ declare function createClient(options: ClientOptions): {
1496
1800
  }[];
1497
1801
  secretCount: number | null;
1498
1802
  }[];
1499
- everyProject: {
1500
- member: string;
1501
- place: string;
1502
- role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1503
- roleName: string;
1504
- expiresAt: string | null;
1505
- }[];
1506
1803
  }>;
1507
1804
  create: (project: string, input: RouteInput<"PUT /projects/:project">) => Promise<{
1508
1805
  project: {
@@ -1511,13 +1808,6 @@ declare function createClient(options: ClientOptions): {
1511
1808
  archivedAt: string | null;
1512
1809
  };
1513
1810
  created: boolean;
1514
- inherited: {
1515
- member: string;
1516
- place: string;
1517
- role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1518
- roleName: string;
1519
- expiresAt: string | null;
1520
- }[];
1521
1811
  }>;
1522
1812
  update: (project: string, patch: RouteInput<"PATCH /projects/:project">) => Promise<{
1523
1813
  project: {
@@ -1559,13 +1849,6 @@ declare function createClient(options: ClientOptions): {
1559
1849
  archivedAt: string | null;
1560
1850
  };
1561
1851
  created: boolean;
1562
- inherited: {
1563
- member: string;
1564
- place: string;
1565
- role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1566
- roleName: string;
1567
- expiresAt: string | null;
1568
- }[];
1569
1852
  forked: null | {
1570
1853
  from: string;
1571
1854
  keys: number;
@@ -1579,13 +1862,6 @@ declare function createClient(options: ClientOptions): {
1579
1862
  name: string;
1580
1863
  archivedAt: string | null;
1581
1864
  };
1582
- inherited: {
1583
- member: string;
1584
- place: string;
1585
- role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1586
- roleName: string;
1587
- expiresAt: string | null;
1588
- }[];
1589
1865
  }>;
1590
1866
  /** What deleting an archived environment would erase and revoke; changes nothing. */
1591
1867
  previewDelete: (path: string) => Promise<DeletionResult>;
@@ -1744,7 +2020,21 @@ declare function createClient(options: ClientOptions): {
1744
2020
  member: string;
1745
2021
  principalType: "service" | "user";
1746
2022
  principalId: string;
1747
- instanceRole: "owner" | "root-admin" | "user";
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;
1748
2038
  isRootAdmin: boolean;
1749
2039
  tampered: boolean;
1750
2040
  grants: {
@@ -1768,7 +2058,19 @@ declare function createClient(options: ClientOptions): {
1768
2058
  principalType: "service" | "user";
1769
2059
  principalId: string;
1770
2060
  status: "active" | "removed" | "tampered";
1771
- instanceRole: "owner" | "root-admin" | "user";
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
+ };
1772
2074
  isRootAdmin: boolean;
1773
2075
  removedAt: string | null;
1774
2076
  removedBy: string | null;
@@ -1795,6 +2097,9 @@ declare function createClient(options: ClientOptions): {
1795
2097
  hint: string;
1796
2098
  expiresAt: string;
1797
2099
  lastUsedAt: string | null;
2100
+ scope: null | {
2101
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
2102
+ };
1798
2103
  }[];
1799
2104
  apps: {
1800
2105
  id: string;
@@ -1819,9 +2124,52 @@ declare function createClient(options: ClientOptions): {
1819
2124
  endedAt: string | null;
1820
2125
  }[];
1821
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
+ }>;
1822
2158
  add: (member: string, input?: RouteInput<"PUT /members/:member">) => Promise<{
1823
2159
  member: string;
1824
- instanceRole: "owner" | "user";
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
+ };
1825
2173
  created: boolean;
1826
2174
  }>;
1827
2175
  /** Offboards; returns what to rotate. */
@@ -1833,11 +2181,23 @@ declare function createClient(options: ClientOptions): {
1833
2181
  identities: number;
1834
2182
  apps: number;
1835
2183
  };
1836
- report: {
2184
+ report: null | {
1837
2185
  principalType: "service" | "user";
1838
2186
  principalId: string;
1839
2187
  status: "active" | "removed" | "tampered";
1840
- instanceRole: "owner" | "root-admin" | "user";
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
+ };
1841
2201
  isRootAdmin: boolean;
1842
2202
  removedAt: string | null;
1843
2203
  removedBy: string | null;
@@ -1864,6 +2224,9 @@ declare function createClient(options: ClientOptions): {
1864
2224
  hint: string;
1865
2225
  expiresAt: string;
1866
2226
  lastUsedAt: string | null;
2227
+ scope: null | {
2228
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
2229
+ };
1867
2230
  }[];
1868
2231
  apps: {
1869
2232
  id: string;
@@ -1901,14 +2264,17 @@ declare function createClient(options: ClientOptions): {
1901
2264
  expiresAt: string;
1902
2265
  lastUsedAt: string | null;
1903
2266
  lastUsedIp: string | null;
2267
+ scope: null | {
2268
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
2269
+ };
1904
2270
  }[];
1905
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>;
1906
2274
  /** The value is in the answer, and only there. */
1907
- issue: (member: string, input: RouteInput<"POST /members/:member/tokens">) => Promise<{
1908
- id: string;
2275
+ issue: (member: string, input: RouteInput<"POST /members/:member/tokens">) => Promise<Extract<RouteOutput<"POST /members/:member/tokens">, {
1909
2276
  token: string;
1910
- expiresAt: string;
1911
- }>;
2277
+ }>>;
1912
2278
  revoke: (member: string, id: string) => Promise<{
1913
2279
  revoked: true;
1914
2280
  }>;
@@ -1922,7 +2288,10 @@ declare function createClient(options: ClientOptions): {
1922
2288
  issuer: string;
1923
2289
  jwksUri: string;
1924
2290
  claims: {
1925
- [key: string]: string;
2291
+ [key: string]: string | string[];
2292
+ };
2293
+ scope: null | {
2294
+ [key: string]: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
1926
2295
  };
1927
2296
  label: string | null;
1928
2297
  createdAt: string;
@@ -2086,6 +2455,8 @@ declare function createClient(options: ClientOptions): {
2086
2455
  label: string;
2087
2456
  value: string;
2088
2457
  kind?: "mono" | "time";
2458
+ note?: string;
2459
+ warn?: true;
2089
2460
  }[];
2090
2461
  asks: null | {
2091
2462
  value: {
@@ -2094,7 +2465,10 @@ declare function createClient(options: ClientOptions): {
2094
2465
  };
2095
2466
  };
2096
2467
  kind: "change" | "reveal";
2468
+ reveals: boolean;
2097
2469
  digest: string;
2470
+ basis: string | null;
2471
+ ready: boolean;
2098
2472
  createdAt: string;
2099
2473
  expiresAt: string;
2100
2474
  outcome: null | {
@@ -2119,6 +2493,8 @@ declare function createClient(options: ClientOptions): {
2119
2493
  label: string;
2120
2494
  value: string;
2121
2495
  kind?: "mono" | "time";
2496
+ note?: string;
2497
+ warn?: true;
2122
2498
  }[];
2123
2499
  }>;
2124
2500
  };
@@ -2140,6 +2516,37 @@ declare function createClient(options: ClientOptions): {
2140
2516
  disconnected: true;
2141
2517
  }>;
2142
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
+ };
2143
2550
  audit: {
2144
2551
  list: (query?: RouteInput<"GET /audit">) => Promise<{
2145
2552
  entries: {
@@ -2233,4 +2640,4 @@ declare function planImport(coffre: CoffreClient, path: string, entries: readonl
2233
2640
  changes: Record<string, string>;
2234
2641
  }>;
2235
2642
  //#endregion
2236
- export { DeletionResult as A, OffboardingReport as B, AuthInfo as C, ConnectedApp as D, BindingView as E, InheritedGrant as F, SecretVersion as G, ReferenceView as H, ListedReference as I, SetResult as J, ServiceTokenRow as K, Me as L, DryRunOutcome as M, DryRunResult as N, Decision as O, IdentityRow as P, Member as R, AuditEntryView as S, BindingPlan as T, RemovedMember as U, ProjectSummary as V, SecretKey as W, WorkloadIds 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 };
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 };