@coffre/client 0.9.0 → 0.10.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/credential.d.ts +1 -1
- package/dist/{index-hImoxb74.d.ts → index-PXC2jUur.d.ts} +456 -58
- package/dist/index.d.ts +2 -2
- package/dist/index.js +44 -1
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +6 -0
- package/package.json +1 -1
- package/src/api.ts +351 -41
- package/src/credential.ts +1 -1
- package/src/index.ts +55 -2
- package/src/routes.ts +6 -0
|
@@ -47,14 +47,14 @@ type Api = {
|
|
|
47
47
|
label: string;
|
|
48
48
|
expiresAt: string;
|
|
49
49
|
scope: {
|
|
50
|
-
[key: string]:
|
|
50
|
+
[key: string]: string;
|
|
51
51
|
};
|
|
52
52
|
};
|
|
53
53
|
credentialExpiresAt: string | null;
|
|
54
54
|
environments: {
|
|
55
55
|
project: string;
|
|
56
56
|
environment: string;
|
|
57
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
57
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
58
58
|
}[];
|
|
59
59
|
};
|
|
60
60
|
};
|
|
@@ -66,12 +66,13 @@ type Api = {
|
|
|
66
66
|
name: string;
|
|
67
67
|
archivedAt: string | null;
|
|
68
68
|
folder: string | null;
|
|
69
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
69
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
70
70
|
environments: {
|
|
71
71
|
slug: string;
|
|
72
72
|
name: string;
|
|
73
73
|
accessible: boolean;
|
|
74
74
|
parent: string | null;
|
|
75
|
+
protected: boolean;
|
|
75
76
|
personal: boolean;
|
|
76
77
|
details: null | {
|
|
77
78
|
archivedAt: string | null;
|
|
@@ -146,6 +147,7 @@ type Api = {
|
|
|
146
147
|
slug: string;
|
|
147
148
|
name: string;
|
|
148
149
|
archivedAt: string | null;
|
|
150
|
+
protected: boolean;
|
|
149
151
|
};
|
|
150
152
|
created: boolean;
|
|
151
153
|
forked: null | {
|
|
@@ -162,12 +164,14 @@ type Api = {
|
|
|
162
164
|
name?: string;
|
|
163
165
|
archived?: boolean;
|
|
164
166
|
slug?: string;
|
|
167
|
+
protected?: boolean;
|
|
165
168
|
};
|
|
166
169
|
output: {
|
|
167
170
|
environment: {
|
|
168
171
|
slug: string;
|
|
169
172
|
name: string;
|
|
170
173
|
archivedAt: string | null;
|
|
174
|
+
protected: boolean;
|
|
171
175
|
};
|
|
172
176
|
};
|
|
173
177
|
};
|
|
@@ -225,7 +229,7 @@ type Api = {
|
|
|
225
229
|
"GET /secrets/:project/:environment": {
|
|
226
230
|
input: undefined;
|
|
227
231
|
output: {
|
|
228
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
232
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
229
233
|
keys: {
|
|
230
234
|
key: string;
|
|
231
235
|
reference: null | {
|
|
@@ -254,6 +258,8 @@ type Api = {
|
|
|
254
258
|
};
|
|
255
259
|
};
|
|
256
260
|
value: string | null;
|
|
261
|
+
sensitivity: "plain" | "secret" | "sensitive" | null;
|
|
262
|
+
readable: boolean;
|
|
257
263
|
parent: null | {
|
|
258
264
|
from: string;
|
|
259
265
|
state: "inherited" | "overridden" | "removed";
|
|
@@ -267,6 +273,7 @@ type Api = {
|
|
|
267
273
|
of: string;
|
|
268
274
|
fallback: boolean;
|
|
269
275
|
};
|
|
276
|
+
protected: boolean;
|
|
270
277
|
rotateAfterDays: number | null;
|
|
271
278
|
};
|
|
272
279
|
};
|
|
@@ -282,10 +289,17 @@ type Api = {
|
|
|
282
289
|
};
|
|
283
290
|
};
|
|
284
291
|
replaces?: string;
|
|
292
|
+
sensitivity?: "secret" | "sensitive";
|
|
285
293
|
} | {
|
|
286
294
|
value: string;
|
|
287
295
|
plain: true;
|
|
288
296
|
replaces?: string;
|
|
297
|
+
} | {
|
|
298
|
+
value: string;
|
|
299
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
300
|
+
replaces?: string;
|
|
301
|
+
} | {
|
|
302
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
289
303
|
} | {
|
|
290
304
|
ref: string;
|
|
291
305
|
};
|
|
@@ -295,6 +309,7 @@ type Api = {
|
|
|
295
309
|
keys: {
|
|
296
310
|
[key: string]: {
|
|
297
311
|
version: number;
|
|
312
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
298
313
|
} | {
|
|
299
314
|
archived: true;
|
|
300
315
|
} | {
|
|
@@ -334,6 +349,7 @@ type Api = {
|
|
|
334
349
|
kek: string;
|
|
335
350
|
recipe: string | null;
|
|
336
351
|
plain: boolean;
|
|
352
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
337
353
|
}[];
|
|
338
354
|
};
|
|
339
355
|
};
|
|
@@ -424,6 +440,7 @@ type Api = {
|
|
|
424
440
|
values: {
|
|
425
441
|
[key: string]: string;
|
|
426
442
|
};
|
|
443
|
+
sensitive: string[];
|
|
427
444
|
version: string | null;
|
|
428
445
|
};
|
|
429
446
|
};
|
|
@@ -457,9 +474,9 @@ type Api = {
|
|
|
457
474
|
id: string;
|
|
458
475
|
project: string;
|
|
459
476
|
environment: string | null;
|
|
460
|
-
role:
|
|
477
|
+
role: string;
|
|
461
478
|
roleName: string;
|
|
462
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
479
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
463
480
|
expiresAt: string | null;
|
|
464
481
|
}[];
|
|
465
482
|
}[];
|
|
@@ -516,7 +533,7 @@ type Api = {
|
|
|
516
533
|
expiresAt: string;
|
|
517
534
|
lastUsedAt: string | null;
|
|
518
535
|
scope: null | {
|
|
519
|
-
[key: string]:
|
|
536
|
+
[key: string]: string;
|
|
520
537
|
};
|
|
521
538
|
}[];
|
|
522
539
|
apps: {
|
|
@@ -540,7 +557,7 @@ type Api = {
|
|
|
540
557
|
lastUsedAt: string | null;
|
|
541
558
|
lastUsedIp: string | null;
|
|
542
559
|
scope: null | {
|
|
543
|
-
[key: string]:
|
|
560
|
+
[key: string]: string;
|
|
544
561
|
};
|
|
545
562
|
}[];
|
|
546
563
|
references: {
|
|
@@ -577,8 +594,8 @@ type Api = {
|
|
|
577
594
|
};
|
|
578
595
|
};
|
|
579
596
|
access?: {
|
|
580
|
-
[key: string]:
|
|
581
|
-
role:
|
|
597
|
+
[key: string]: string | null | {
|
|
598
|
+
role: string;
|
|
582
599
|
until: string | null;
|
|
583
600
|
};
|
|
584
601
|
};
|
|
@@ -658,7 +675,7 @@ type Api = {
|
|
|
658
675
|
expiresAt: string;
|
|
659
676
|
lastUsedAt: string | null;
|
|
660
677
|
scope: null | {
|
|
661
|
-
[key: string]:
|
|
678
|
+
[key: string]: string;
|
|
662
679
|
};
|
|
663
680
|
}[];
|
|
664
681
|
apps: {
|
|
@@ -682,7 +699,7 @@ type Api = {
|
|
|
682
699
|
lastUsedAt: string | null;
|
|
683
700
|
lastUsedIp: string | null;
|
|
684
701
|
scope: null | {
|
|
685
|
-
[key: string]:
|
|
702
|
+
[key: string]: string;
|
|
686
703
|
};
|
|
687
704
|
}[];
|
|
688
705
|
references: {
|
|
@@ -717,7 +734,7 @@ type Api = {
|
|
|
717
734
|
lastUsedAt: string | null;
|
|
718
735
|
lastUsedIp: string | null;
|
|
719
736
|
scope: null | {
|
|
720
|
-
[key: string]:
|
|
737
|
+
[key: string]: string;
|
|
721
738
|
};
|
|
722
739
|
}[];
|
|
723
740
|
};
|
|
@@ -728,7 +745,7 @@ type Api = {
|
|
|
728
745
|
expiresInDays?: number;
|
|
729
746
|
expiresInMinutes?: number;
|
|
730
747
|
scope?: {
|
|
731
|
-
[key: string]:
|
|
748
|
+
[key: string]: string;
|
|
732
749
|
};
|
|
733
750
|
};
|
|
734
751
|
output: {
|
|
@@ -736,11 +753,11 @@ type Api = {
|
|
|
736
753
|
token: string;
|
|
737
754
|
expiresAt: string;
|
|
738
755
|
scope: {
|
|
739
|
-
[key: string]:
|
|
756
|
+
[key: string]: string;
|
|
740
757
|
};
|
|
741
758
|
} | {
|
|
742
759
|
scope: {
|
|
743
|
-
[key: string]:
|
|
760
|
+
[key: string]: string;
|
|
744
761
|
};
|
|
745
762
|
};
|
|
746
763
|
};
|
|
@@ -767,7 +784,7 @@ type Api = {
|
|
|
767
784
|
[key: string]: string | string[];
|
|
768
785
|
};
|
|
769
786
|
scope: null | {
|
|
770
|
-
[key: string]:
|
|
787
|
+
[key: string]: string;
|
|
771
788
|
};
|
|
772
789
|
label: string | null;
|
|
773
790
|
createdAt: string;
|
|
@@ -784,7 +801,7 @@ type Api = {
|
|
|
784
801
|
};
|
|
785
802
|
issuer?: string | null;
|
|
786
803
|
scope?: {
|
|
787
|
-
[key: string]:
|
|
804
|
+
[key: string]: string;
|
|
788
805
|
};
|
|
789
806
|
label?: string | null;
|
|
790
807
|
replaces?: string[];
|
|
@@ -807,7 +824,7 @@ type Api = {
|
|
|
807
824
|
[key: string]: string | string[];
|
|
808
825
|
};
|
|
809
826
|
scope: {
|
|
810
|
-
[key: string]:
|
|
827
|
+
[key: string]: string;
|
|
811
828
|
};
|
|
812
829
|
replaces: {
|
|
813
830
|
id: string;
|
|
@@ -828,7 +845,7 @@ type Api = {
|
|
|
828
845
|
[key: string]: string | string[];
|
|
829
846
|
};
|
|
830
847
|
scope: null | {
|
|
831
|
-
[key: string]:
|
|
848
|
+
[key: string]: string;
|
|
832
849
|
};
|
|
833
850
|
label: string | null;
|
|
834
851
|
createdAt: string;
|
|
@@ -865,8 +882,8 @@ type Api = {
|
|
|
865
882
|
};
|
|
866
883
|
"PATCH /access/:member": {
|
|
867
884
|
input: {
|
|
868
|
-
[key: string]:
|
|
869
|
-
role:
|
|
885
|
+
[key: string]: string | null | {
|
|
886
|
+
role: string;
|
|
870
887
|
until: string | null;
|
|
871
888
|
};
|
|
872
889
|
};
|
|
@@ -1215,9 +1232,9 @@ type Api = {
|
|
|
1215
1232
|
id: string;
|
|
1216
1233
|
project: string;
|
|
1217
1234
|
environment: string | null;
|
|
1218
|
-
role:
|
|
1235
|
+
role: string;
|
|
1219
1236
|
roleName: string;
|
|
1220
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
1237
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1221
1238
|
expiresAt: string | null;
|
|
1222
1239
|
}[];
|
|
1223
1240
|
};
|
|
@@ -1327,7 +1344,7 @@ type Api = {
|
|
|
1327
1344
|
[key: string]: string | string[];
|
|
1328
1345
|
};
|
|
1329
1346
|
scope: null | {
|
|
1330
|
-
[key: string]:
|
|
1347
|
+
[key: string]: string;
|
|
1331
1348
|
};
|
|
1332
1349
|
label: string | null;
|
|
1333
1350
|
createdAt: string;
|
|
@@ -1361,13 +1378,209 @@ type Api = {
|
|
|
1361
1378
|
token: string;
|
|
1362
1379
|
expiresAt: string;
|
|
1363
1380
|
scope: {
|
|
1364
|
-
[key: string]:
|
|
1381
|
+
[key: string]: string;
|
|
1382
|
+
};
|
|
1383
|
+
};
|
|
1384
|
+
};
|
|
1385
|
+
"GET /roles": {
|
|
1386
|
+
input: undefined;
|
|
1387
|
+
output: {
|
|
1388
|
+
roles: {
|
|
1389
|
+
name: string;
|
|
1390
|
+
description: string;
|
|
1391
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1392
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1393
|
+
id: string;
|
|
1394
|
+
builtin: boolean;
|
|
1395
|
+
edited: boolean;
|
|
1396
|
+
fixed: boolean;
|
|
1397
|
+
default: null | {
|
|
1398
|
+
name: string;
|
|
1399
|
+
description: string;
|
|
1400
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1401
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1402
|
+
};
|
|
1403
|
+
assignableToEnvironment: boolean;
|
|
1404
|
+
grants: number;
|
|
1405
|
+
}[];
|
|
1406
|
+
instanceRoles: {
|
|
1407
|
+
name: string;
|
|
1408
|
+
description: string;
|
|
1409
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1410
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1411
|
+
id: string;
|
|
1412
|
+
builtin: boolean;
|
|
1413
|
+
edited: boolean;
|
|
1414
|
+
fixed: boolean;
|
|
1415
|
+
default: null | {
|
|
1416
|
+
name: string;
|
|
1417
|
+
description: string;
|
|
1418
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1419
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1420
|
+
};
|
|
1421
|
+
assignableToEnvironment: boolean;
|
|
1422
|
+
grants: number;
|
|
1423
|
+
}[];
|
|
1424
|
+
editable: boolean;
|
|
1425
|
+
};
|
|
1426
|
+
};
|
|
1427
|
+
"PUT /roles/:role": {
|
|
1428
|
+
input: {
|
|
1429
|
+
name: string;
|
|
1430
|
+
description: string;
|
|
1431
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1432
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1433
|
+
};
|
|
1434
|
+
output: {
|
|
1435
|
+
impact: {
|
|
1436
|
+
change: "narrows" | "widens";
|
|
1437
|
+
permission: "audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write";
|
|
1438
|
+
protected: boolean;
|
|
1439
|
+
people: number;
|
|
1440
|
+
services: number;
|
|
1441
|
+
environments: number;
|
|
1442
|
+
projects: number;
|
|
1443
|
+
examples: string[];
|
|
1444
|
+
}[];
|
|
1445
|
+
sentence: string;
|
|
1446
|
+
revision: string;
|
|
1447
|
+
} | {
|
|
1448
|
+
role: null | {
|
|
1449
|
+
name: string;
|
|
1450
|
+
description: string;
|
|
1451
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1452
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1453
|
+
id: string;
|
|
1454
|
+
builtin: boolean;
|
|
1455
|
+
edited: boolean;
|
|
1456
|
+
fixed: boolean;
|
|
1457
|
+
default: null | {
|
|
1458
|
+
name: string;
|
|
1459
|
+
description: string;
|
|
1460
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1461
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1462
|
+
};
|
|
1463
|
+
assignableToEnvironment: boolean;
|
|
1464
|
+
grants: number;
|
|
1465
|
+
};
|
|
1466
|
+
};
|
|
1467
|
+
};
|
|
1468
|
+
"DELETE /roles/:role": {
|
|
1469
|
+
input: undefined;
|
|
1470
|
+
output: {
|
|
1471
|
+
impact: {
|
|
1472
|
+
change: "narrows" | "widens";
|
|
1473
|
+
permission: "audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write";
|
|
1474
|
+
protected: boolean;
|
|
1475
|
+
people: number;
|
|
1476
|
+
services: number;
|
|
1477
|
+
environments: number;
|
|
1478
|
+
projects: number;
|
|
1479
|
+
examples: string[];
|
|
1480
|
+
}[];
|
|
1481
|
+
sentence: string;
|
|
1482
|
+
revision: string;
|
|
1483
|
+
} | {
|
|
1484
|
+
role: null | {
|
|
1485
|
+
name: string;
|
|
1486
|
+
description: string;
|
|
1487
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1488
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1489
|
+
id: string;
|
|
1490
|
+
builtin: boolean;
|
|
1491
|
+
edited: boolean;
|
|
1492
|
+
fixed: boolean;
|
|
1493
|
+
default: null | {
|
|
1494
|
+
name: string;
|
|
1495
|
+
description: string;
|
|
1496
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1497
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1498
|
+
};
|
|
1499
|
+
assignableToEnvironment: boolean;
|
|
1500
|
+
grants: number;
|
|
1501
|
+
};
|
|
1502
|
+
};
|
|
1503
|
+
};
|
|
1504
|
+
"PUT /instance-roles/:role": {
|
|
1505
|
+
input: {
|
|
1506
|
+
name: string;
|
|
1507
|
+
description: string;
|
|
1508
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1509
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1510
|
+
};
|
|
1511
|
+
output: {
|
|
1512
|
+
impact: {
|
|
1513
|
+
change: "narrows" | "widens";
|
|
1514
|
+
permission: "audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write";
|
|
1515
|
+
protected: boolean;
|
|
1516
|
+
people: number;
|
|
1517
|
+
services: number;
|
|
1518
|
+
environments: number;
|
|
1519
|
+
projects: number;
|
|
1520
|
+
examples: string[];
|
|
1521
|
+
}[];
|
|
1522
|
+
sentence: string;
|
|
1523
|
+
revision: string;
|
|
1524
|
+
} | {
|
|
1525
|
+
role: null | {
|
|
1526
|
+
name: string;
|
|
1527
|
+
description: string;
|
|
1528
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1529
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1530
|
+
id: string;
|
|
1531
|
+
builtin: boolean;
|
|
1532
|
+
edited: boolean;
|
|
1533
|
+
fixed: boolean;
|
|
1534
|
+
default: null | {
|
|
1535
|
+
name: string;
|
|
1536
|
+
description: string;
|
|
1537
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1538
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1539
|
+
};
|
|
1540
|
+
assignableToEnvironment: boolean;
|
|
1541
|
+
grants: number;
|
|
1542
|
+
};
|
|
1543
|
+
};
|
|
1544
|
+
};
|
|
1545
|
+
"DELETE /instance-roles/:role": {
|
|
1546
|
+
input: undefined;
|
|
1547
|
+
output: {
|
|
1548
|
+
impact: {
|
|
1549
|
+
change: "narrows" | "widens";
|
|
1550
|
+
permission: "audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write";
|
|
1551
|
+
protected: boolean;
|
|
1552
|
+
people: number;
|
|
1553
|
+
services: number;
|
|
1554
|
+
environments: number;
|
|
1555
|
+
projects: number;
|
|
1556
|
+
examples: string[];
|
|
1557
|
+
}[];
|
|
1558
|
+
sentence: string;
|
|
1559
|
+
revision: string;
|
|
1560
|
+
} | {
|
|
1561
|
+
role: null | {
|
|
1562
|
+
name: string;
|
|
1563
|
+
description: string;
|
|
1564
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1565
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1566
|
+
id: string;
|
|
1567
|
+
builtin: boolean;
|
|
1568
|
+
edited: boolean;
|
|
1569
|
+
fixed: boolean;
|
|
1570
|
+
default: null | {
|
|
1571
|
+
name: string;
|
|
1572
|
+
description: string;
|
|
1573
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1574
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1575
|
+
};
|
|
1576
|
+
assignableToEnvironment: boolean;
|
|
1577
|
+
grants: number;
|
|
1365
1578
|
};
|
|
1366
1579
|
};
|
|
1367
1580
|
};
|
|
1368
1581
|
};
|
|
1369
|
-
type AccessValue =
|
|
1370
|
-
role:
|
|
1582
|
+
type AccessValue = string | null | {
|
|
1583
|
+
role: string;
|
|
1371
1584
|
until: string | null;
|
|
1372
1585
|
};
|
|
1373
1586
|
type ApprovalView = {
|
|
@@ -1492,7 +1705,7 @@ type BindingPlan = {
|
|
|
1492
1705
|
[key: string]: string | string[];
|
|
1493
1706
|
};
|
|
1494
1707
|
scope: {
|
|
1495
|
-
[key: string]:
|
|
1708
|
+
[key: string]: string;
|
|
1496
1709
|
};
|
|
1497
1710
|
replaces: {
|
|
1498
1711
|
id: string;
|
|
@@ -1513,7 +1726,7 @@ type BindingView = {
|
|
|
1513
1726
|
[key: string]: string | string[];
|
|
1514
1727
|
};
|
|
1515
1728
|
scope: null | {
|
|
1516
|
-
[key: string]:
|
|
1729
|
+
[key: string]: string;
|
|
1517
1730
|
};
|
|
1518
1731
|
label: string | null;
|
|
1519
1732
|
createdAt: string;
|
|
@@ -1678,14 +1891,14 @@ type Me = {
|
|
|
1678
1891
|
label: string;
|
|
1679
1892
|
expiresAt: string;
|
|
1680
1893
|
scope: {
|
|
1681
|
-
[key: string]:
|
|
1894
|
+
[key: string]: string;
|
|
1682
1895
|
};
|
|
1683
1896
|
};
|
|
1684
1897
|
credentialExpiresAt: string | null;
|
|
1685
1898
|
environments: {
|
|
1686
1899
|
project: string;
|
|
1687
1900
|
environment: string;
|
|
1688
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
1901
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1689
1902
|
}[];
|
|
1690
1903
|
};
|
|
1691
1904
|
type Member = {
|
|
@@ -1713,9 +1926,9 @@ type Member = {
|
|
|
1713
1926
|
id: string;
|
|
1714
1927
|
project: string;
|
|
1715
1928
|
environment: string | null;
|
|
1716
|
-
role:
|
|
1929
|
+
role: string;
|
|
1717
1930
|
roleName: string;
|
|
1718
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
1931
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1719
1932
|
expiresAt: string | null;
|
|
1720
1933
|
}[];
|
|
1721
1934
|
};
|
|
@@ -1742,9 +1955,9 @@ type MemberAccess = {
|
|
|
1742
1955
|
id: string;
|
|
1743
1956
|
project: string;
|
|
1744
1957
|
environment: string | null;
|
|
1745
|
-
role:
|
|
1958
|
+
role: string;
|
|
1746
1959
|
roleName: string;
|
|
1747
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
1960
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1748
1961
|
expiresAt: string | null;
|
|
1749
1962
|
}[];
|
|
1750
1963
|
};
|
|
@@ -1797,7 +2010,7 @@ type OffboardingReport = {
|
|
|
1797
2010
|
expiresAt: string;
|
|
1798
2011
|
lastUsedAt: string | null;
|
|
1799
2012
|
scope: null | {
|
|
1800
|
-
[key: string]:
|
|
2013
|
+
[key: string]: string;
|
|
1801
2014
|
};
|
|
1802
2015
|
}[];
|
|
1803
2016
|
apps: {
|
|
@@ -1821,7 +2034,7 @@ type OffboardingReport = {
|
|
|
1821
2034
|
lastUsedAt: string | null;
|
|
1822
2035
|
lastUsedIp: string | null;
|
|
1823
2036
|
scope: null | {
|
|
1824
|
-
[key: string]:
|
|
2037
|
+
[key: string]: string;
|
|
1825
2038
|
};
|
|
1826
2039
|
}[];
|
|
1827
2040
|
references: {
|
|
@@ -1868,12 +2081,13 @@ type ProjectSummary = {
|
|
|
1868
2081
|
name: string;
|
|
1869
2082
|
archivedAt: string | null;
|
|
1870
2083
|
folder: string | null;
|
|
1871
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
2084
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
1872
2085
|
environments: {
|
|
1873
2086
|
slug: string;
|
|
1874
2087
|
name: string;
|
|
1875
2088
|
accessible: boolean;
|
|
1876
2089
|
parent: string | null;
|
|
2090
|
+
protected: boolean;
|
|
1877
2091
|
personal: boolean;
|
|
1878
2092
|
details: null | {
|
|
1879
2093
|
archivedAt: string | null;
|
|
@@ -1898,6 +2112,93 @@ type RemovedMember = {
|
|
|
1898
2112
|
principalId: string;
|
|
1899
2113
|
toRotate: number;
|
|
1900
2114
|
};
|
|
2115
|
+
type ImpactLine = {
|
|
2116
|
+
change: "narrows" | "widens";
|
|
2117
|
+
permission: "audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write";
|
|
2118
|
+
protected: boolean;
|
|
2119
|
+
people: number;
|
|
2120
|
+
services: number;
|
|
2121
|
+
environments: number;
|
|
2122
|
+
projects: number;
|
|
2123
|
+
examples: string[];
|
|
2124
|
+
};
|
|
2125
|
+
type RoleImpact = {
|
|
2126
|
+
impact: {
|
|
2127
|
+
change: "narrows" | "widens";
|
|
2128
|
+
permission: "audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write";
|
|
2129
|
+
protected: boolean;
|
|
2130
|
+
people: number;
|
|
2131
|
+
services: number;
|
|
2132
|
+
environments: number;
|
|
2133
|
+
projects: number;
|
|
2134
|
+
examples: string[];
|
|
2135
|
+
}[];
|
|
2136
|
+
sentence: string;
|
|
2137
|
+
revision: string;
|
|
2138
|
+
};
|
|
2139
|
+
type RoleView = {
|
|
2140
|
+
name: string;
|
|
2141
|
+
description: string;
|
|
2142
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2143
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2144
|
+
id: string;
|
|
2145
|
+
builtin: boolean;
|
|
2146
|
+
edited: boolean;
|
|
2147
|
+
fixed: boolean;
|
|
2148
|
+
default: null | {
|
|
2149
|
+
name: string;
|
|
2150
|
+
description: string;
|
|
2151
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2152
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2153
|
+
};
|
|
2154
|
+
assignableToEnvironment: boolean;
|
|
2155
|
+
grants: number;
|
|
2156
|
+
};
|
|
2157
|
+
type RolesView = {
|
|
2158
|
+
roles: {
|
|
2159
|
+
name: string;
|
|
2160
|
+
description: string;
|
|
2161
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2162
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2163
|
+
id: string;
|
|
2164
|
+
builtin: boolean;
|
|
2165
|
+
edited: boolean;
|
|
2166
|
+
fixed: boolean;
|
|
2167
|
+
default: null | {
|
|
2168
|
+
name: string;
|
|
2169
|
+
description: string;
|
|
2170
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2171
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2172
|
+
};
|
|
2173
|
+
assignableToEnvironment: boolean;
|
|
2174
|
+
grants: number;
|
|
2175
|
+
}[];
|
|
2176
|
+
instanceRoles: {
|
|
2177
|
+
name: string;
|
|
2178
|
+
description: string;
|
|
2179
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2180
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2181
|
+
id: string;
|
|
2182
|
+
builtin: boolean;
|
|
2183
|
+
edited: boolean;
|
|
2184
|
+
fixed: boolean;
|
|
2185
|
+
default: null | {
|
|
2186
|
+
name: string;
|
|
2187
|
+
description: string;
|
|
2188
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2189
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2190
|
+
};
|
|
2191
|
+
assignableToEnvironment: boolean;
|
|
2192
|
+
grants: number;
|
|
2193
|
+
}[];
|
|
2194
|
+
editable: boolean;
|
|
2195
|
+
};
|
|
2196
|
+
type EnvironmentView = {
|
|
2197
|
+
slug: string;
|
|
2198
|
+
name: string;
|
|
2199
|
+
archivedAt: string | null;
|
|
2200
|
+
protected: boolean;
|
|
2201
|
+
};
|
|
1901
2202
|
type SecretKey = {
|
|
1902
2203
|
key: string;
|
|
1903
2204
|
reference: null | {
|
|
@@ -1926,6 +2227,8 @@ type SecretKey = {
|
|
|
1926
2227
|
};
|
|
1927
2228
|
};
|
|
1928
2229
|
value: string | null;
|
|
2230
|
+
sensitivity: "plain" | "secret" | "sensitive" | null;
|
|
2231
|
+
readable: boolean;
|
|
1929
2232
|
parent: null | {
|
|
1930
2233
|
from: string;
|
|
1931
2234
|
state: "inherited" | "overridden" | "removed";
|
|
@@ -1942,6 +2245,7 @@ type SecretVersion = {
|
|
|
1942
2245
|
kek: string;
|
|
1943
2246
|
recipe: string | null;
|
|
1944
2247
|
plain: boolean;
|
|
2248
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
1945
2249
|
};
|
|
1946
2250
|
type SessionRow = {
|
|
1947
2251
|
id: string;
|
|
@@ -1960,6 +2264,7 @@ type SetResult = {
|
|
|
1960
2264
|
keys: {
|
|
1961
2265
|
[key: string]: {
|
|
1962
2266
|
version: number;
|
|
2267
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
1963
2268
|
} | {
|
|
1964
2269
|
archived: true;
|
|
1965
2270
|
} | {
|
|
@@ -1969,7 +2274,7 @@ type SetResult = {
|
|
|
1969
2274
|
};
|
|
1970
2275
|
type TokenPlan = {
|
|
1971
2276
|
scope: {
|
|
1972
|
-
[key: string]:
|
|
2277
|
+
[key: string]: string;
|
|
1973
2278
|
};
|
|
1974
2279
|
};
|
|
1975
2280
|
type TokenRow = {
|
|
@@ -1982,7 +2287,7 @@ type TokenRow = {
|
|
|
1982
2287
|
lastUsedAt: string | null;
|
|
1983
2288
|
lastUsedIp: string | null;
|
|
1984
2289
|
scope: null | {
|
|
1985
|
-
[key: string]:
|
|
2290
|
+
[key: string]: string;
|
|
1986
2291
|
};
|
|
1987
2292
|
};
|
|
1988
2293
|
//#endregion
|
|
@@ -2074,6 +2379,11 @@ declare class CoffreError extends Error {
|
|
|
2074
2379
|
constructor(status: number, code: string, message: string, reason?: string);
|
|
2075
2380
|
}
|
|
2076
2381
|
type Args<K extends RouteKey> = RouteInput<K> extends undefined ? [params: Params<K>, input?: undefined] : Partial<RouteInput<K>> extends RouteInput<K> ? [params: Params<K>, input?: RouteInput<K>] : [params: Params<K>, input: RouteInput<K>];
|
|
2382
|
+
/** A role's change confirmed: an instance role's, and the `revision` of the policy its preview answered with. */
|
|
2383
|
+
type Confirmed = {
|
|
2384
|
+
instance?: boolean;
|
|
2385
|
+
revision?: string;
|
|
2386
|
+
};
|
|
2077
2387
|
declare function createClient(options: ClientOptions): {
|
|
2078
2388
|
call: <K extends RouteKey>(key: K, ...[params, input]: Args<K>) => Promise<RouteOutput<K>>;
|
|
2079
2389
|
/** How this instance signs people in. Answers anyone, signed in or not. */
|
|
@@ -2123,14 +2433,14 @@ declare function createClient(options: ClientOptions): {
|
|
|
2123
2433
|
label: string;
|
|
2124
2434
|
expiresAt: string;
|
|
2125
2435
|
scope: {
|
|
2126
|
-
[key: string]:
|
|
2436
|
+
[key: string]: string;
|
|
2127
2437
|
};
|
|
2128
2438
|
};
|
|
2129
2439
|
credentialExpiresAt: string | null;
|
|
2130
2440
|
environments: {
|
|
2131
2441
|
project: string;
|
|
2132
2442
|
environment: string;
|
|
2133
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
2443
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2134
2444
|
}[];
|
|
2135
2445
|
}>;
|
|
2136
2446
|
projects: {
|
|
@@ -2141,12 +2451,13 @@ declare function createClient(options: ClientOptions): {
|
|
|
2141
2451
|
name: string;
|
|
2142
2452
|
archivedAt: string | null;
|
|
2143
2453
|
folder: string | null;
|
|
2144
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
2454
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2145
2455
|
environments: {
|
|
2146
2456
|
slug: string;
|
|
2147
2457
|
name: string;
|
|
2148
2458
|
accessible: boolean;
|
|
2149
2459
|
parent: string | null;
|
|
2460
|
+
protected: boolean;
|
|
2150
2461
|
personal: boolean;
|
|
2151
2462
|
details: null | {
|
|
2152
2463
|
archivedAt: string | null;
|
|
@@ -2204,6 +2515,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2204
2515
|
slug: string;
|
|
2205
2516
|
name: string;
|
|
2206
2517
|
archivedAt: string | null;
|
|
2518
|
+
protected: boolean;
|
|
2207
2519
|
};
|
|
2208
2520
|
created: boolean;
|
|
2209
2521
|
forked: null | {
|
|
@@ -2219,6 +2531,20 @@ declare function createClient(options: ClientOptions): {
|
|
|
2219
2531
|
slug: string;
|
|
2220
2532
|
name: string;
|
|
2221
2533
|
archivedAt: string | null;
|
|
2534
|
+
protected: boolean;
|
|
2535
|
+
};
|
|
2536
|
+
}>;
|
|
2537
|
+
/**
|
|
2538
|
+
* Protected, a person holds their role's protected column there
|
|
2539
|
+
* (docs/design/roles.md); whoever manages the project's environments
|
|
2540
|
+
* protects one, and only an Owner of the whole instance unprotects it.
|
|
2541
|
+
*/
|
|
2542
|
+
protect: (path: string, on?: boolean) => Promise<{
|
|
2543
|
+
environment: {
|
|
2544
|
+
slug: string;
|
|
2545
|
+
name: string;
|
|
2546
|
+
archivedAt: string | null;
|
|
2547
|
+
protected: boolean;
|
|
2222
2548
|
};
|
|
2223
2549
|
}>;
|
|
2224
2550
|
/** What deleting an archived environment would erase and revoke; changes nothing. */
|
|
@@ -2289,7 +2615,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2289
2615
|
secrets: {
|
|
2290
2616
|
/** Keys, versions and who changed what; never values. */
|
|
2291
2617
|
list: (path: string) => Promise<{
|
|
2292
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
2618
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2293
2619
|
keys: {
|
|
2294
2620
|
key: string;
|
|
2295
2621
|
reference: null | {
|
|
@@ -2318,6 +2644,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
2318
2644
|
};
|
|
2319
2645
|
};
|
|
2320
2646
|
value: string | null;
|
|
2647
|
+
sensitivity: "plain" | "secret" | "sensitive" | null;
|
|
2648
|
+
readable: boolean;
|
|
2321
2649
|
parent: null | {
|
|
2322
2650
|
from: string;
|
|
2323
2651
|
state: "inherited" | "overridden" | "removed";
|
|
@@ -2331,6 +2659,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2331
2659
|
of: string;
|
|
2332
2660
|
fallback: boolean;
|
|
2333
2661
|
};
|
|
2662
|
+
protected: boolean;
|
|
2334
2663
|
rotateAfterDays: number | null;
|
|
2335
2664
|
}>;
|
|
2336
2665
|
/** Decrypts one secret, or every secret in an environment. Logged in your name. */
|
|
@@ -2339,6 +2668,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2339
2668
|
values: {
|
|
2340
2669
|
[key: string]: string;
|
|
2341
2670
|
};
|
|
2671
|
+
sensitive: string[];
|
|
2342
2672
|
version: string | null;
|
|
2343
2673
|
}>;
|
|
2344
2674
|
/** One transaction, a version and an audit entry per key; `null` archives. */
|
|
@@ -2360,6 +2690,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2360
2690
|
kek: string;
|
|
2361
2691
|
recipe: string | null;
|
|
2362
2692
|
plain: boolean;
|
|
2693
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
2363
2694
|
}[];
|
|
2364
2695
|
}>;
|
|
2365
2696
|
/** A new version holding the old one's value. */
|
|
@@ -2448,9 +2779,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2448
2779
|
id: string;
|
|
2449
2780
|
project: string;
|
|
2450
2781
|
environment: string | null;
|
|
2451
|
-
role:
|
|
2782
|
+
role: string;
|
|
2452
2783
|
roleName: string;
|
|
2453
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
2784
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2454
2785
|
expiresAt: string | null;
|
|
2455
2786
|
}[];
|
|
2456
2787
|
}[];
|
|
@@ -2505,7 +2836,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2505
2836
|
expiresAt: string;
|
|
2506
2837
|
lastUsedAt: string | null;
|
|
2507
2838
|
scope: null | {
|
|
2508
|
-
[key: string]:
|
|
2839
|
+
[key: string]: string;
|
|
2509
2840
|
};
|
|
2510
2841
|
}[];
|
|
2511
2842
|
apps: {
|
|
@@ -2529,7 +2860,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2529
2860
|
lastUsedAt: string | null;
|
|
2530
2861
|
lastUsedIp: string | null;
|
|
2531
2862
|
scope: null | {
|
|
2532
|
-
[key: string]:
|
|
2863
|
+
[key: string]: string;
|
|
2533
2864
|
};
|
|
2534
2865
|
}[];
|
|
2535
2866
|
references: {
|
|
@@ -2573,9 +2904,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2573
2904
|
id: string;
|
|
2574
2905
|
project: string;
|
|
2575
2906
|
environment: string | null;
|
|
2576
|
-
role:
|
|
2907
|
+
role: string;
|
|
2577
2908
|
roleName: string;
|
|
2578
|
-
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
2909
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
2579
2910
|
expiresAt: string | null;
|
|
2580
2911
|
}[];
|
|
2581
2912
|
}>;
|
|
@@ -2652,7 +2983,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2652
2983
|
expiresAt: string;
|
|
2653
2984
|
lastUsedAt: string | null;
|
|
2654
2985
|
scope: null | {
|
|
2655
|
-
[key: string]:
|
|
2986
|
+
[key: string]: string;
|
|
2656
2987
|
};
|
|
2657
2988
|
}[];
|
|
2658
2989
|
apps: {
|
|
@@ -2676,7 +3007,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2676
3007
|
lastUsedAt: string | null;
|
|
2677
3008
|
lastUsedIp: string | null;
|
|
2678
3009
|
scope: null | {
|
|
2679
|
-
[key: string]:
|
|
3010
|
+
[key: string]: string;
|
|
2680
3011
|
};
|
|
2681
3012
|
}[];
|
|
2682
3013
|
references: {
|
|
@@ -2714,7 +3045,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2714
3045
|
lastUsedAt: string | null;
|
|
2715
3046
|
lastUsedIp: string | null;
|
|
2716
3047
|
scope: null | {
|
|
2717
|
-
[key: string]:
|
|
3048
|
+
[key: string]: string;
|
|
2718
3049
|
};
|
|
2719
3050
|
}[];
|
|
2720
3051
|
}>;
|
|
@@ -2729,7 +3060,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2729
3060
|
}>;
|
|
2730
3061
|
};
|
|
2731
3062
|
/**
|
|
2732
|
-
* Handles:
|
|
3063
|
+
* Handles: placeholders a person's app holds in place of an environment's
|
|
2733
3064
|
* values, which only the credential proxy (`/use`) takes. The value is
|
|
2734
3065
|
* in the answer, and only there; it is revoked as a token is.
|
|
2735
3066
|
*/
|
|
@@ -2739,7 +3070,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2739
3070
|
token: string;
|
|
2740
3071
|
expiresAt: string;
|
|
2741
3072
|
scope: {
|
|
2742
|
-
[key: string]:
|
|
3073
|
+
[key: string]: string;
|
|
2743
3074
|
};
|
|
2744
3075
|
}>;
|
|
2745
3076
|
};
|
|
@@ -2760,7 +3091,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2760
3091
|
[key: string]: string | string[];
|
|
2761
3092
|
};
|
|
2762
3093
|
scope: null | {
|
|
2763
|
-
[key: string]:
|
|
3094
|
+
[key: string]: string;
|
|
2764
3095
|
};
|
|
2765
3096
|
label: string | null;
|
|
2766
3097
|
createdAt: string;
|
|
@@ -3029,6 +3360,73 @@ declare function createClient(options: ClientOptions): {
|
|
|
3029
3360
|
disconnected: true;
|
|
3030
3361
|
}>;
|
|
3031
3362
|
};
|
|
3363
|
+
/**
|
|
3364
|
+
* The instance's roles, in two columns, an environment's that is not
|
|
3365
|
+
* protected and one's that is (docs/design/roles.md). Any member lists
|
|
3366
|
+
* them; an Owner of the whole instance edits them. `instance` is about
|
|
3367
|
+
* instance roles, a person's across every project in their scope.
|
|
3368
|
+
*/
|
|
3369
|
+
roles: {
|
|
3370
|
+
list: () => Promise<{
|
|
3371
|
+
roles: {
|
|
3372
|
+
name: string;
|
|
3373
|
+
description: string;
|
|
3374
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
3375
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
3376
|
+
id: string;
|
|
3377
|
+
builtin: boolean;
|
|
3378
|
+
edited: boolean;
|
|
3379
|
+
fixed: boolean;
|
|
3380
|
+
default: null | {
|
|
3381
|
+
name: string;
|
|
3382
|
+
description: string;
|
|
3383
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
3384
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
3385
|
+
};
|
|
3386
|
+
assignableToEnvironment: boolean;
|
|
3387
|
+
grants: number;
|
|
3388
|
+
}[];
|
|
3389
|
+
instanceRoles: {
|
|
3390
|
+
name: string;
|
|
3391
|
+
description: string;
|
|
3392
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
3393
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
3394
|
+
id: string;
|
|
3395
|
+
builtin: boolean;
|
|
3396
|
+
edited: boolean;
|
|
3397
|
+
fixed: boolean;
|
|
3398
|
+
default: null | {
|
|
3399
|
+
name: string;
|
|
3400
|
+
description: string;
|
|
3401
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
3402
|
+
protected: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.use" | "secret.write")[];
|
|
3403
|
+
};
|
|
3404
|
+
assignableToEnvironment: boolean;
|
|
3405
|
+
grants: number;
|
|
3406
|
+
}[];
|
|
3407
|
+
editable: boolean;
|
|
3408
|
+
}>;
|
|
3409
|
+
/** What defining the role so would do to everyone it reaches; changes nothing. */
|
|
3410
|
+
preview: (role: string, definition: RouteInput<"PUT /roles/:role">, { instance }?: {
|
|
3411
|
+
instance?: boolean | undefined;
|
|
3412
|
+
}) => Promise<RoleImpact>;
|
|
3413
|
+
/**
|
|
3414
|
+
* A built-in role edited, or one an Owner makes. With its preview's
|
|
3415
|
+
* `revision`, made as previewed, or refused (409 `policy_changed`)
|
|
3416
|
+
* if the policy changed since: preview it again.
|
|
3417
|
+
*/
|
|
3418
|
+
set: (role: string, definition: RouteInput<"PUT /roles/:role">, { instance, revision }?: Confirmed) => Promise<{
|
|
3419
|
+
role: RouteOutput<"GET /roles">["roles"][number] | null;
|
|
3420
|
+
}>;
|
|
3421
|
+
/** What putting it back as it ships, or deleting one an Owner made, would do; changes nothing. */
|
|
3422
|
+
previewReset: (role: string, { instance }?: {
|
|
3423
|
+
instance?: boolean | undefined;
|
|
3424
|
+
}) => Promise<RoleImpact>;
|
|
3425
|
+
/** A built-in role back as it ships; one an Owner made, deleted, while no grant names it. With its preview's `revision`, as `set`. */
|
|
3426
|
+
reset: (role: string, { instance, revision }?: Confirmed) => Promise<{
|
|
3427
|
+
role: RouteOutput<"GET /roles">["roles"][number] | null;
|
|
3428
|
+
}>;
|
|
3429
|
+
};
|
|
3032
3430
|
/** The instance's settings, for those who run it: where people set up service accounts themselves. */
|
|
3033
3431
|
settings: {
|
|
3034
3432
|
get: () => Promise<{
|
|
@@ -3162,4 +3560,4 @@ declare function planImport(coffre: CoffreClient, path: string, entries: readonl
|
|
|
3162
3560
|
changes: Record<string, string>;
|
|
3163
3561
|
}>;
|
|
3164
3562
|
//#endregion
|
|
3165
|
-
export {
|
|
3563
|
+
export { RolesView as $, Decision as A, KeysPlan as B, ApprovalView as C, BindingPlan as D, AuthorizationView as E, DryRunResult as F, MissingKey as G, Me as H, EnvironmentView as I, ProjectSummary as J, OffboardingReport as K, IdentityRow as L, DeletionResult as M, DismissedKey as N, BindingView as O, DryRunOutcome as P, RoleView as Q, ImpactLine as R, Api as S, AuthInfo as T, Member as U, ListedReference as V, MemberAccess as W, RemovedMember as X, ReferenceView as Y, RoleImpact as Z, byFolder as _, Params as a, TokenRow as at, olderThan as b, RouteOutput as c, planImport as d, SecretKey as et, Unreachable as f, shownMember as g, serviceName as h, ImportAction as i, TokenPlan as it, Deletion as j, ConnectedApp as k, Transport as l, apiMember as m, CoffreClient as n, SessionRow as nt, RouteInput as o, WorkloadIds as ot, unreachable as p, PersonalConfig as q, CoffreError as r, SetResult as rt, RouteKey as s, ClientOptions as t, SecretVersion as tt, createClient as u, foldersOf as v, AuditEntryView as w, AccessValue as x, ageInDays as y, InheritResult as z };
|