@coffre/client 0.8.2 → 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 +10 -3
- package/dist/credential.js +31 -13
- package/dist/{index-DgII_R1y.d.ts → index-PXC2jUur.d.ts} +466 -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 +359 -41
- package/src/credential.ts +28 -10
- 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 | {
|
|
@@ -253,6 +257,9 @@ type Api = {
|
|
|
253
257
|
public: string;
|
|
254
258
|
};
|
|
255
259
|
};
|
|
260
|
+
value: string | null;
|
|
261
|
+
sensitivity: "plain" | "secret" | "sensitive" | null;
|
|
262
|
+
readable: boolean;
|
|
256
263
|
parent: null | {
|
|
257
264
|
from: string;
|
|
258
265
|
state: "inherited" | "overridden" | "removed";
|
|
@@ -266,6 +273,7 @@ type Api = {
|
|
|
266
273
|
of: string;
|
|
267
274
|
fallback: boolean;
|
|
268
275
|
};
|
|
276
|
+
protected: boolean;
|
|
269
277
|
rotateAfterDays: number | null;
|
|
270
278
|
};
|
|
271
279
|
};
|
|
@@ -281,6 +289,17 @@ type Api = {
|
|
|
281
289
|
};
|
|
282
290
|
};
|
|
283
291
|
replaces?: string;
|
|
292
|
+
sensitivity?: "secret" | "sensitive";
|
|
293
|
+
} | {
|
|
294
|
+
value: string;
|
|
295
|
+
plain: true;
|
|
296
|
+
replaces?: string;
|
|
297
|
+
} | {
|
|
298
|
+
value: string;
|
|
299
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
300
|
+
replaces?: string;
|
|
301
|
+
} | {
|
|
302
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
284
303
|
} | {
|
|
285
304
|
ref: string;
|
|
286
305
|
};
|
|
@@ -290,6 +309,7 @@ type Api = {
|
|
|
290
309
|
keys: {
|
|
291
310
|
[key: string]: {
|
|
292
311
|
version: number;
|
|
312
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
293
313
|
} | {
|
|
294
314
|
archived: true;
|
|
295
315
|
} | {
|
|
@@ -328,6 +348,8 @@ type Api = {
|
|
|
328
348
|
current: boolean;
|
|
329
349
|
kek: string;
|
|
330
350
|
recipe: string | null;
|
|
351
|
+
plain: boolean;
|
|
352
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
331
353
|
}[];
|
|
332
354
|
};
|
|
333
355
|
};
|
|
@@ -418,6 +440,7 @@ type Api = {
|
|
|
418
440
|
values: {
|
|
419
441
|
[key: string]: string;
|
|
420
442
|
};
|
|
443
|
+
sensitive: string[];
|
|
421
444
|
version: string | null;
|
|
422
445
|
};
|
|
423
446
|
};
|
|
@@ -451,9 +474,9 @@ type Api = {
|
|
|
451
474
|
id: string;
|
|
452
475
|
project: string;
|
|
453
476
|
environment: string | null;
|
|
454
|
-
role:
|
|
477
|
+
role: string;
|
|
455
478
|
roleName: string;
|
|
456
|
-
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")[];
|
|
457
480
|
expiresAt: string | null;
|
|
458
481
|
}[];
|
|
459
482
|
}[];
|
|
@@ -510,7 +533,7 @@ type Api = {
|
|
|
510
533
|
expiresAt: string;
|
|
511
534
|
lastUsedAt: string | null;
|
|
512
535
|
scope: null | {
|
|
513
|
-
[key: string]:
|
|
536
|
+
[key: string]: string;
|
|
514
537
|
};
|
|
515
538
|
}[];
|
|
516
539
|
apps: {
|
|
@@ -534,7 +557,7 @@ type Api = {
|
|
|
534
557
|
lastUsedAt: string | null;
|
|
535
558
|
lastUsedIp: string | null;
|
|
536
559
|
scope: null | {
|
|
537
|
-
[key: string]:
|
|
560
|
+
[key: string]: string;
|
|
538
561
|
};
|
|
539
562
|
}[];
|
|
540
563
|
references: {
|
|
@@ -571,8 +594,8 @@ type Api = {
|
|
|
571
594
|
};
|
|
572
595
|
};
|
|
573
596
|
access?: {
|
|
574
|
-
[key: string]:
|
|
575
|
-
role:
|
|
597
|
+
[key: string]: string | null | {
|
|
598
|
+
role: string;
|
|
576
599
|
until: string | null;
|
|
577
600
|
};
|
|
578
601
|
};
|
|
@@ -652,7 +675,7 @@ type Api = {
|
|
|
652
675
|
expiresAt: string;
|
|
653
676
|
lastUsedAt: string | null;
|
|
654
677
|
scope: null | {
|
|
655
|
-
[key: string]:
|
|
678
|
+
[key: string]: string;
|
|
656
679
|
};
|
|
657
680
|
}[];
|
|
658
681
|
apps: {
|
|
@@ -676,7 +699,7 @@ type Api = {
|
|
|
676
699
|
lastUsedAt: string | null;
|
|
677
700
|
lastUsedIp: string | null;
|
|
678
701
|
scope: null | {
|
|
679
|
-
[key: string]:
|
|
702
|
+
[key: string]: string;
|
|
680
703
|
};
|
|
681
704
|
}[];
|
|
682
705
|
references: {
|
|
@@ -711,7 +734,7 @@ type Api = {
|
|
|
711
734
|
lastUsedAt: string | null;
|
|
712
735
|
lastUsedIp: string | null;
|
|
713
736
|
scope: null | {
|
|
714
|
-
[key: string]:
|
|
737
|
+
[key: string]: string;
|
|
715
738
|
};
|
|
716
739
|
}[];
|
|
717
740
|
};
|
|
@@ -722,7 +745,7 @@ type Api = {
|
|
|
722
745
|
expiresInDays?: number;
|
|
723
746
|
expiresInMinutes?: number;
|
|
724
747
|
scope?: {
|
|
725
|
-
[key: string]:
|
|
748
|
+
[key: string]: string;
|
|
726
749
|
};
|
|
727
750
|
};
|
|
728
751
|
output: {
|
|
@@ -730,11 +753,11 @@ type Api = {
|
|
|
730
753
|
token: string;
|
|
731
754
|
expiresAt: string;
|
|
732
755
|
scope: {
|
|
733
|
-
[key: string]:
|
|
756
|
+
[key: string]: string;
|
|
734
757
|
};
|
|
735
758
|
} | {
|
|
736
759
|
scope: {
|
|
737
|
-
[key: string]:
|
|
760
|
+
[key: string]: string;
|
|
738
761
|
};
|
|
739
762
|
};
|
|
740
763
|
};
|
|
@@ -761,7 +784,7 @@ type Api = {
|
|
|
761
784
|
[key: string]: string | string[];
|
|
762
785
|
};
|
|
763
786
|
scope: null | {
|
|
764
|
-
[key: string]:
|
|
787
|
+
[key: string]: string;
|
|
765
788
|
};
|
|
766
789
|
label: string | null;
|
|
767
790
|
createdAt: string;
|
|
@@ -778,7 +801,7 @@ type Api = {
|
|
|
778
801
|
};
|
|
779
802
|
issuer?: string | null;
|
|
780
803
|
scope?: {
|
|
781
|
-
[key: string]:
|
|
804
|
+
[key: string]: string;
|
|
782
805
|
};
|
|
783
806
|
label?: string | null;
|
|
784
807
|
replaces?: string[];
|
|
@@ -801,7 +824,7 @@ type Api = {
|
|
|
801
824
|
[key: string]: string | string[];
|
|
802
825
|
};
|
|
803
826
|
scope: {
|
|
804
|
-
[key: string]:
|
|
827
|
+
[key: string]: string;
|
|
805
828
|
};
|
|
806
829
|
replaces: {
|
|
807
830
|
id: string;
|
|
@@ -822,7 +845,7 @@ type Api = {
|
|
|
822
845
|
[key: string]: string | string[];
|
|
823
846
|
};
|
|
824
847
|
scope: null | {
|
|
825
|
-
[key: string]:
|
|
848
|
+
[key: string]: string;
|
|
826
849
|
};
|
|
827
850
|
label: string | null;
|
|
828
851
|
createdAt: string;
|
|
@@ -859,8 +882,8 @@ type Api = {
|
|
|
859
882
|
};
|
|
860
883
|
"PATCH /access/:member": {
|
|
861
884
|
input: {
|
|
862
|
-
[key: string]:
|
|
863
|
-
role:
|
|
885
|
+
[key: string]: string | null | {
|
|
886
|
+
role: string;
|
|
864
887
|
until: string | null;
|
|
865
888
|
};
|
|
866
889
|
};
|
|
@@ -1209,9 +1232,9 @@ type Api = {
|
|
|
1209
1232
|
id: string;
|
|
1210
1233
|
project: string;
|
|
1211
1234
|
environment: string | null;
|
|
1212
|
-
role:
|
|
1235
|
+
role: string;
|
|
1213
1236
|
roleName: string;
|
|
1214
|
-
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")[];
|
|
1215
1238
|
expiresAt: string | null;
|
|
1216
1239
|
}[];
|
|
1217
1240
|
};
|
|
@@ -1321,7 +1344,7 @@ type Api = {
|
|
|
1321
1344
|
[key: string]: string | string[];
|
|
1322
1345
|
};
|
|
1323
1346
|
scope: null | {
|
|
1324
|
-
[key: string]:
|
|
1347
|
+
[key: string]: string;
|
|
1325
1348
|
};
|
|
1326
1349
|
label: string | null;
|
|
1327
1350
|
createdAt: string;
|
|
@@ -1355,13 +1378,209 @@ type Api = {
|
|
|
1355
1378
|
token: string;
|
|
1356
1379
|
expiresAt: string;
|
|
1357
1380
|
scope: {
|
|
1358
|
-
[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;
|
|
1359
1578
|
};
|
|
1360
1579
|
};
|
|
1361
1580
|
};
|
|
1362
1581
|
};
|
|
1363
|
-
type AccessValue =
|
|
1364
|
-
role:
|
|
1582
|
+
type AccessValue = string | null | {
|
|
1583
|
+
role: string;
|
|
1365
1584
|
until: string | null;
|
|
1366
1585
|
};
|
|
1367
1586
|
type ApprovalView = {
|
|
@@ -1486,7 +1705,7 @@ type BindingPlan = {
|
|
|
1486
1705
|
[key: string]: string | string[];
|
|
1487
1706
|
};
|
|
1488
1707
|
scope: {
|
|
1489
|
-
[key: string]:
|
|
1708
|
+
[key: string]: string;
|
|
1490
1709
|
};
|
|
1491
1710
|
replaces: {
|
|
1492
1711
|
id: string;
|
|
@@ -1507,7 +1726,7 @@ type BindingView = {
|
|
|
1507
1726
|
[key: string]: string | string[];
|
|
1508
1727
|
};
|
|
1509
1728
|
scope: null | {
|
|
1510
|
-
[key: string]:
|
|
1729
|
+
[key: string]: string;
|
|
1511
1730
|
};
|
|
1512
1731
|
label: string | null;
|
|
1513
1732
|
createdAt: string;
|
|
@@ -1672,14 +1891,14 @@ type Me = {
|
|
|
1672
1891
|
label: string;
|
|
1673
1892
|
expiresAt: string;
|
|
1674
1893
|
scope: {
|
|
1675
|
-
[key: string]:
|
|
1894
|
+
[key: string]: string;
|
|
1676
1895
|
};
|
|
1677
1896
|
};
|
|
1678
1897
|
credentialExpiresAt: string | null;
|
|
1679
1898
|
environments: {
|
|
1680
1899
|
project: string;
|
|
1681
1900
|
environment: string;
|
|
1682
|
-
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")[];
|
|
1683
1902
|
}[];
|
|
1684
1903
|
};
|
|
1685
1904
|
type Member = {
|
|
@@ -1707,9 +1926,9 @@ type Member = {
|
|
|
1707
1926
|
id: string;
|
|
1708
1927
|
project: string;
|
|
1709
1928
|
environment: string | null;
|
|
1710
|
-
role:
|
|
1929
|
+
role: string;
|
|
1711
1930
|
roleName: string;
|
|
1712
|
-
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")[];
|
|
1713
1932
|
expiresAt: string | null;
|
|
1714
1933
|
}[];
|
|
1715
1934
|
};
|
|
@@ -1736,9 +1955,9 @@ type MemberAccess = {
|
|
|
1736
1955
|
id: string;
|
|
1737
1956
|
project: string;
|
|
1738
1957
|
environment: string | null;
|
|
1739
|
-
role:
|
|
1958
|
+
role: string;
|
|
1740
1959
|
roleName: string;
|
|
1741
|
-
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")[];
|
|
1742
1961
|
expiresAt: string | null;
|
|
1743
1962
|
}[];
|
|
1744
1963
|
};
|
|
@@ -1791,7 +2010,7 @@ type OffboardingReport = {
|
|
|
1791
2010
|
expiresAt: string;
|
|
1792
2011
|
lastUsedAt: string | null;
|
|
1793
2012
|
scope: null | {
|
|
1794
|
-
[key: string]:
|
|
2013
|
+
[key: string]: string;
|
|
1795
2014
|
};
|
|
1796
2015
|
}[];
|
|
1797
2016
|
apps: {
|
|
@@ -1815,7 +2034,7 @@ type OffboardingReport = {
|
|
|
1815
2034
|
lastUsedAt: string | null;
|
|
1816
2035
|
lastUsedIp: string | null;
|
|
1817
2036
|
scope: null | {
|
|
1818
|
-
[key: string]:
|
|
2037
|
+
[key: string]: string;
|
|
1819
2038
|
};
|
|
1820
2039
|
}[];
|
|
1821
2040
|
references: {
|
|
@@ -1862,12 +2081,13 @@ type ProjectSummary = {
|
|
|
1862
2081
|
name: string;
|
|
1863
2082
|
archivedAt: string | null;
|
|
1864
2083
|
folder: string | null;
|
|
1865
|
-
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")[];
|
|
1866
2085
|
environments: {
|
|
1867
2086
|
slug: string;
|
|
1868
2087
|
name: string;
|
|
1869
2088
|
accessible: boolean;
|
|
1870
2089
|
parent: string | null;
|
|
2090
|
+
protected: boolean;
|
|
1871
2091
|
personal: boolean;
|
|
1872
2092
|
details: null | {
|
|
1873
2093
|
archivedAt: string | null;
|
|
@@ -1892,6 +2112,93 @@ type RemovedMember = {
|
|
|
1892
2112
|
principalId: string;
|
|
1893
2113
|
toRotate: number;
|
|
1894
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
|
+
};
|
|
1895
2202
|
type SecretKey = {
|
|
1896
2203
|
key: string;
|
|
1897
2204
|
reference: null | {
|
|
@@ -1919,6 +2226,9 @@ type SecretKey = {
|
|
|
1919
2226
|
public: string;
|
|
1920
2227
|
};
|
|
1921
2228
|
};
|
|
2229
|
+
value: string | null;
|
|
2230
|
+
sensitivity: "plain" | "secret" | "sensitive" | null;
|
|
2231
|
+
readable: boolean;
|
|
1922
2232
|
parent: null | {
|
|
1923
2233
|
from: string;
|
|
1924
2234
|
state: "inherited" | "overridden" | "removed";
|
|
@@ -1934,6 +2244,8 @@ type SecretVersion = {
|
|
|
1934
2244
|
current: boolean;
|
|
1935
2245
|
kek: string;
|
|
1936
2246
|
recipe: string | null;
|
|
2247
|
+
plain: boolean;
|
|
2248
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
1937
2249
|
};
|
|
1938
2250
|
type SessionRow = {
|
|
1939
2251
|
id: string;
|
|
@@ -1952,6 +2264,7 @@ type SetResult = {
|
|
|
1952
2264
|
keys: {
|
|
1953
2265
|
[key: string]: {
|
|
1954
2266
|
version: number;
|
|
2267
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
1955
2268
|
} | {
|
|
1956
2269
|
archived: true;
|
|
1957
2270
|
} | {
|
|
@@ -1961,7 +2274,7 @@ type SetResult = {
|
|
|
1961
2274
|
};
|
|
1962
2275
|
type TokenPlan = {
|
|
1963
2276
|
scope: {
|
|
1964
|
-
[key: string]:
|
|
2277
|
+
[key: string]: string;
|
|
1965
2278
|
};
|
|
1966
2279
|
};
|
|
1967
2280
|
type TokenRow = {
|
|
@@ -1974,7 +2287,7 @@ type TokenRow = {
|
|
|
1974
2287
|
lastUsedAt: string | null;
|
|
1975
2288
|
lastUsedIp: string | null;
|
|
1976
2289
|
scope: null | {
|
|
1977
|
-
[key: string]:
|
|
2290
|
+
[key: string]: string;
|
|
1978
2291
|
};
|
|
1979
2292
|
};
|
|
1980
2293
|
//#endregion
|
|
@@ -2066,6 +2379,11 @@ declare class CoffreError extends Error {
|
|
|
2066
2379
|
constructor(status: number, code: string, message: string, reason?: string);
|
|
2067
2380
|
}
|
|
2068
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
|
+
};
|
|
2069
2387
|
declare function createClient(options: ClientOptions): {
|
|
2070
2388
|
call: <K extends RouteKey>(key: K, ...[params, input]: Args<K>) => Promise<RouteOutput<K>>;
|
|
2071
2389
|
/** How this instance signs people in. Answers anyone, signed in or not. */
|
|
@@ -2115,14 +2433,14 @@ declare function createClient(options: ClientOptions): {
|
|
|
2115
2433
|
label: string;
|
|
2116
2434
|
expiresAt: string;
|
|
2117
2435
|
scope: {
|
|
2118
|
-
[key: string]:
|
|
2436
|
+
[key: string]: string;
|
|
2119
2437
|
};
|
|
2120
2438
|
};
|
|
2121
2439
|
credentialExpiresAt: string | null;
|
|
2122
2440
|
environments: {
|
|
2123
2441
|
project: string;
|
|
2124
2442
|
environment: string;
|
|
2125
|
-
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")[];
|
|
2126
2444
|
}[];
|
|
2127
2445
|
}>;
|
|
2128
2446
|
projects: {
|
|
@@ -2133,12 +2451,13 @@ declare function createClient(options: ClientOptions): {
|
|
|
2133
2451
|
name: string;
|
|
2134
2452
|
archivedAt: string | null;
|
|
2135
2453
|
folder: string | null;
|
|
2136
|
-
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")[];
|
|
2137
2455
|
environments: {
|
|
2138
2456
|
slug: string;
|
|
2139
2457
|
name: string;
|
|
2140
2458
|
accessible: boolean;
|
|
2141
2459
|
parent: string | null;
|
|
2460
|
+
protected: boolean;
|
|
2142
2461
|
personal: boolean;
|
|
2143
2462
|
details: null | {
|
|
2144
2463
|
archivedAt: string | null;
|
|
@@ -2196,6 +2515,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2196
2515
|
slug: string;
|
|
2197
2516
|
name: string;
|
|
2198
2517
|
archivedAt: string | null;
|
|
2518
|
+
protected: boolean;
|
|
2199
2519
|
};
|
|
2200
2520
|
created: boolean;
|
|
2201
2521
|
forked: null | {
|
|
@@ -2211,6 +2531,20 @@ declare function createClient(options: ClientOptions): {
|
|
|
2211
2531
|
slug: string;
|
|
2212
2532
|
name: string;
|
|
2213
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;
|
|
2214
2548
|
};
|
|
2215
2549
|
}>;
|
|
2216
2550
|
/** What deleting an archived environment would erase and revoke; changes nothing. */
|
|
@@ -2281,7 +2615,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2281
2615
|
secrets: {
|
|
2282
2616
|
/** Keys, versions and who changed what; never values. */
|
|
2283
2617
|
list: (path: string) => Promise<{
|
|
2284
|
-
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")[];
|
|
2285
2619
|
keys: {
|
|
2286
2620
|
key: string;
|
|
2287
2621
|
reference: null | {
|
|
@@ -2309,6 +2643,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2309
2643
|
public: string;
|
|
2310
2644
|
};
|
|
2311
2645
|
};
|
|
2646
|
+
value: string | null;
|
|
2647
|
+
sensitivity: "plain" | "secret" | "sensitive" | null;
|
|
2648
|
+
readable: boolean;
|
|
2312
2649
|
parent: null | {
|
|
2313
2650
|
from: string;
|
|
2314
2651
|
state: "inherited" | "overridden" | "removed";
|
|
@@ -2322,6 +2659,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2322
2659
|
of: string;
|
|
2323
2660
|
fallback: boolean;
|
|
2324
2661
|
};
|
|
2662
|
+
protected: boolean;
|
|
2325
2663
|
rotateAfterDays: number | null;
|
|
2326
2664
|
}>;
|
|
2327
2665
|
/** Decrypts one secret, or every secret in an environment. Logged in your name. */
|
|
@@ -2330,6 +2668,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2330
2668
|
values: {
|
|
2331
2669
|
[key: string]: string;
|
|
2332
2670
|
};
|
|
2671
|
+
sensitive: string[];
|
|
2333
2672
|
version: string | null;
|
|
2334
2673
|
}>;
|
|
2335
2674
|
/** One transaction, a version and an audit entry per key; `null` archives. */
|
|
@@ -2350,6 +2689,8 @@ declare function createClient(options: ClientOptions): {
|
|
|
2350
2689
|
current: boolean;
|
|
2351
2690
|
kek: string;
|
|
2352
2691
|
recipe: string | null;
|
|
2692
|
+
plain: boolean;
|
|
2693
|
+
sensitivity: "plain" | "secret" | "sensitive";
|
|
2353
2694
|
}[];
|
|
2354
2695
|
}>;
|
|
2355
2696
|
/** A new version holding the old one's value. */
|
|
@@ -2438,9 +2779,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2438
2779
|
id: string;
|
|
2439
2780
|
project: string;
|
|
2440
2781
|
environment: string | null;
|
|
2441
|
-
role:
|
|
2782
|
+
role: string;
|
|
2442
2783
|
roleName: string;
|
|
2443
|
-
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")[];
|
|
2444
2785
|
expiresAt: string | null;
|
|
2445
2786
|
}[];
|
|
2446
2787
|
}[];
|
|
@@ -2495,7 +2836,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2495
2836
|
expiresAt: string;
|
|
2496
2837
|
lastUsedAt: string | null;
|
|
2497
2838
|
scope: null | {
|
|
2498
|
-
[key: string]:
|
|
2839
|
+
[key: string]: string;
|
|
2499
2840
|
};
|
|
2500
2841
|
}[];
|
|
2501
2842
|
apps: {
|
|
@@ -2519,7 +2860,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2519
2860
|
lastUsedAt: string | null;
|
|
2520
2861
|
lastUsedIp: string | null;
|
|
2521
2862
|
scope: null | {
|
|
2522
|
-
[key: string]:
|
|
2863
|
+
[key: string]: string;
|
|
2523
2864
|
};
|
|
2524
2865
|
}[];
|
|
2525
2866
|
references: {
|
|
@@ -2563,9 +2904,9 @@ declare function createClient(options: ClientOptions): {
|
|
|
2563
2904
|
id: string;
|
|
2564
2905
|
project: string;
|
|
2565
2906
|
environment: string | null;
|
|
2566
|
-
role:
|
|
2907
|
+
role: string;
|
|
2567
2908
|
roleName: string;
|
|
2568
|
-
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")[];
|
|
2569
2910
|
expiresAt: string | null;
|
|
2570
2911
|
}[];
|
|
2571
2912
|
}>;
|
|
@@ -2642,7 +2983,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2642
2983
|
expiresAt: string;
|
|
2643
2984
|
lastUsedAt: string | null;
|
|
2644
2985
|
scope: null | {
|
|
2645
|
-
[key: string]:
|
|
2986
|
+
[key: string]: string;
|
|
2646
2987
|
};
|
|
2647
2988
|
}[];
|
|
2648
2989
|
apps: {
|
|
@@ -2666,7 +3007,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2666
3007
|
lastUsedAt: string | null;
|
|
2667
3008
|
lastUsedIp: string | null;
|
|
2668
3009
|
scope: null | {
|
|
2669
|
-
[key: string]:
|
|
3010
|
+
[key: string]: string;
|
|
2670
3011
|
};
|
|
2671
3012
|
}[];
|
|
2672
3013
|
references: {
|
|
@@ -2704,7 +3045,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2704
3045
|
lastUsedAt: string | null;
|
|
2705
3046
|
lastUsedIp: string | null;
|
|
2706
3047
|
scope: null | {
|
|
2707
|
-
[key: string]:
|
|
3048
|
+
[key: string]: string;
|
|
2708
3049
|
};
|
|
2709
3050
|
}[];
|
|
2710
3051
|
}>;
|
|
@@ -2719,7 +3060,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2719
3060
|
}>;
|
|
2720
3061
|
};
|
|
2721
3062
|
/**
|
|
2722
|
-
* Handles:
|
|
3063
|
+
* Handles: placeholders a person's app holds in place of an environment's
|
|
2723
3064
|
* values, which only the credential proxy (`/use`) takes. The value is
|
|
2724
3065
|
* in the answer, and only there; it is revoked as a token is.
|
|
2725
3066
|
*/
|
|
@@ -2729,7 +3070,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2729
3070
|
token: string;
|
|
2730
3071
|
expiresAt: string;
|
|
2731
3072
|
scope: {
|
|
2732
|
-
[key: string]:
|
|
3073
|
+
[key: string]: string;
|
|
2733
3074
|
};
|
|
2734
3075
|
}>;
|
|
2735
3076
|
};
|
|
@@ -2750,7 +3091,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
2750
3091
|
[key: string]: string | string[];
|
|
2751
3092
|
};
|
|
2752
3093
|
scope: null | {
|
|
2753
|
-
[key: string]:
|
|
3094
|
+
[key: string]: string;
|
|
2754
3095
|
};
|
|
2755
3096
|
label: string | null;
|
|
2756
3097
|
createdAt: string;
|
|
@@ -3019,6 +3360,73 @@ declare function createClient(options: ClientOptions): {
|
|
|
3019
3360
|
disconnected: true;
|
|
3020
3361
|
}>;
|
|
3021
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
|
+
};
|
|
3022
3430
|
/** The instance's settings, for those who run it: where people set up service accounts themselves. */
|
|
3023
3431
|
settings: {
|
|
3024
3432
|
get: () => Promise<{
|
|
@@ -3152,4 +3560,4 @@ declare function planImport(coffre: CoffreClient, path: string, entries: readonl
|
|
|
3152
3560
|
changes: Record<string, string>;
|
|
3153
3561
|
}>;
|
|
3154
3562
|
//#endregion
|
|
3155
|
-
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 };
|