@coffre/client 0.3.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BuMxAzSu.d.ts → index-B3rPquWt.d.ts} +960 -30
- package/dist/index.d.ts +2 -2
- package/dist/index.js +119 -3
- package/dist/routes.d.ts +1 -1
- package/dist/routes.js +33 -0
- package/package.json +1 -1
- package/src/api.ts +601 -22
- package/src/folders.ts +16 -0
- package/src/index.ts +90 -2
- package/src/members.ts +23 -0
- package/src/routes.ts +23 -0
|
@@ -13,18 +13,15 @@ type Api = {
|
|
|
13
13
|
instanceRole: "owner" | "root-admin" | "user";
|
|
14
14
|
isRootAdmin: boolean;
|
|
15
15
|
canReadAudit: boolean;
|
|
16
|
+
features: {
|
|
17
|
+
mcp: boolean;
|
|
18
|
+
workloads: boolean;
|
|
19
|
+
};
|
|
16
20
|
environments: {
|
|
17
21
|
project: string;
|
|
18
22
|
environment: string;
|
|
19
23
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
20
24
|
}[];
|
|
21
|
-
instance: null | {
|
|
22
|
-
version: string;
|
|
23
|
-
migrations: {
|
|
24
|
-
applied: number;
|
|
25
|
-
known: string[];
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
25
|
};
|
|
29
26
|
};
|
|
30
27
|
"GET /projects": {
|
|
@@ -34,6 +31,7 @@ type Api = {
|
|
|
34
31
|
slug: string;
|
|
35
32
|
name: string;
|
|
36
33
|
archivedAt: string | null;
|
|
34
|
+
folder: string | null;
|
|
37
35
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
38
36
|
environments: {
|
|
39
37
|
slug: string;
|
|
@@ -46,6 +44,13 @@ type Api = {
|
|
|
46
44
|
}[];
|
|
47
45
|
secretCount: number | null;
|
|
48
46
|
}[];
|
|
47
|
+
everyProject: {
|
|
48
|
+
member: string;
|
|
49
|
+
place: string;
|
|
50
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
51
|
+
roleName: string;
|
|
52
|
+
expiresAt: string | null;
|
|
53
|
+
}[];
|
|
49
54
|
};
|
|
50
55
|
};
|
|
51
56
|
"PUT /projects/:project": {
|
|
@@ -59,6 +64,13 @@ type Api = {
|
|
|
59
64
|
archivedAt: string | null;
|
|
60
65
|
};
|
|
61
66
|
created: boolean;
|
|
67
|
+
inherited: {
|
|
68
|
+
member: string;
|
|
69
|
+
place: string;
|
|
70
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
71
|
+
roleName: string;
|
|
72
|
+
expiresAt: string | null;
|
|
73
|
+
}[];
|
|
62
74
|
};
|
|
63
75
|
};
|
|
64
76
|
"PATCH /projects/:project": {
|
|
@@ -66,18 +78,45 @@ type Api = {
|
|
|
66
78
|
name?: string;
|
|
67
79
|
slug?: string;
|
|
68
80
|
archived?: boolean;
|
|
81
|
+
folder?: string | null;
|
|
69
82
|
};
|
|
70
83
|
output: {
|
|
71
84
|
project: {
|
|
72
85
|
slug: string;
|
|
73
86
|
name: string;
|
|
74
87
|
archivedAt: string | null;
|
|
88
|
+
folder: string | null;
|
|
89
|
+
};
|
|
90
|
+
};
|
|
91
|
+
};
|
|
92
|
+
"DELETE /projects/:project": {
|
|
93
|
+
input: undefined;
|
|
94
|
+
output: {
|
|
95
|
+
dryRun: boolean;
|
|
96
|
+
deletion: {
|
|
97
|
+
path: string;
|
|
98
|
+
tombstone: string;
|
|
99
|
+
environments: string[];
|
|
100
|
+
keys: number;
|
|
101
|
+
versions: number;
|
|
102
|
+
grants: {
|
|
103
|
+
member: string;
|
|
104
|
+
place: string;
|
|
105
|
+
role: string;
|
|
106
|
+
}[];
|
|
107
|
+
references: {
|
|
108
|
+
holder: string;
|
|
109
|
+
source: string;
|
|
110
|
+
}[];
|
|
111
|
+
stranded: string[];
|
|
75
112
|
};
|
|
76
113
|
};
|
|
77
114
|
};
|
|
78
115
|
"PUT /projects/:project/:environment": {
|
|
79
116
|
input: {
|
|
80
117
|
name: string;
|
|
118
|
+
from?: string;
|
|
119
|
+
references?: boolean;
|
|
81
120
|
};
|
|
82
121
|
output: {
|
|
83
122
|
environment: {
|
|
@@ -86,13 +125,26 @@ type Api = {
|
|
|
86
125
|
archivedAt: string | null;
|
|
87
126
|
};
|
|
88
127
|
created: boolean;
|
|
128
|
+
inherited: {
|
|
129
|
+
member: string;
|
|
130
|
+
place: string;
|
|
131
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
132
|
+
roleName: string;
|
|
133
|
+
expiresAt: string | null;
|
|
134
|
+
}[];
|
|
135
|
+
forked: null | {
|
|
136
|
+
from: string;
|
|
137
|
+
keys: number;
|
|
138
|
+
references: number;
|
|
139
|
+
copied: string[];
|
|
140
|
+
};
|
|
89
141
|
};
|
|
90
142
|
};
|
|
91
143
|
"PATCH /projects/:project/:environment": {
|
|
92
144
|
input: {
|
|
93
145
|
name?: string;
|
|
94
|
-
slug?: string;
|
|
95
146
|
archived?: boolean;
|
|
147
|
+
slug?: string;
|
|
96
148
|
};
|
|
97
149
|
output: {
|
|
98
150
|
environment: {
|
|
@@ -100,6 +152,64 @@ type Api = {
|
|
|
100
152
|
name: string;
|
|
101
153
|
archivedAt: string | null;
|
|
102
154
|
};
|
|
155
|
+
inherited: {
|
|
156
|
+
member: string;
|
|
157
|
+
place: string;
|
|
158
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
159
|
+
roleName: string;
|
|
160
|
+
expiresAt: string | null;
|
|
161
|
+
}[];
|
|
162
|
+
};
|
|
163
|
+
};
|
|
164
|
+
"DELETE /projects/:project/:environment": {
|
|
165
|
+
input: undefined;
|
|
166
|
+
output: {
|
|
167
|
+
dryRun: boolean;
|
|
168
|
+
deletion: {
|
|
169
|
+
path: string;
|
|
170
|
+
tombstone: string;
|
|
171
|
+
environments: string[];
|
|
172
|
+
keys: number;
|
|
173
|
+
versions: number;
|
|
174
|
+
grants: {
|
|
175
|
+
member: string;
|
|
176
|
+
place: string;
|
|
177
|
+
role: string;
|
|
178
|
+
}[];
|
|
179
|
+
references: {
|
|
180
|
+
holder: string;
|
|
181
|
+
source: string;
|
|
182
|
+
}[];
|
|
183
|
+
stranded: string[];
|
|
184
|
+
};
|
|
185
|
+
};
|
|
186
|
+
};
|
|
187
|
+
"GET /projects/:project/:environment/missing": {
|
|
188
|
+
input: undefined;
|
|
189
|
+
output: {
|
|
190
|
+
missing: {
|
|
191
|
+
key: string;
|
|
192
|
+
in: string[];
|
|
193
|
+
folder: string | null;
|
|
194
|
+
}[];
|
|
195
|
+
dismissed: {
|
|
196
|
+
key: string;
|
|
197
|
+
in: string[];
|
|
198
|
+
folder: string | null;
|
|
199
|
+
dismissedBy: string;
|
|
200
|
+
dismissedAt: string;
|
|
201
|
+
}[];
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
"PATCH /projects/:project/:environment/dismissals": {
|
|
205
|
+
input: {
|
|
206
|
+
[key: string]: null | true;
|
|
207
|
+
};
|
|
208
|
+
output: {
|
|
209
|
+
operationId: string;
|
|
210
|
+
keys: {
|
|
211
|
+
[key: string]: "dismissed" | "restored" | "unchanged";
|
|
212
|
+
};
|
|
103
213
|
};
|
|
104
214
|
};
|
|
105
215
|
"GET /secrets/:project/:environment": {
|
|
@@ -108,6 +218,19 @@ type Api = {
|
|
|
108
218
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
109
219
|
keys: {
|
|
110
220
|
key: string;
|
|
221
|
+
reference: null | {
|
|
222
|
+
id: string;
|
|
223
|
+
holder: string;
|
|
224
|
+
source: string;
|
|
225
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
226
|
+
version: number | null;
|
|
227
|
+
createdBy: string;
|
|
228
|
+
createdAt: string;
|
|
229
|
+
endedBy: string | null;
|
|
230
|
+
endedAt: string | null;
|
|
231
|
+
canOpenSource: boolean;
|
|
232
|
+
};
|
|
233
|
+
folder: string | null;
|
|
111
234
|
archived: boolean;
|
|
112
235
|
version: number | null;
|
|
113
236
|
updatedAt: string | null;
|
|
@@ -117,7 +240,9 @@ type Api = {
|
|
|
117
240
|
};
|
|
118
241
|
"PATCH /secrets/:project/:environment": {
|
|
119
242
|
input: {
|
|
120
|
-
[key: string]: string | null
|
|
243
|
+
[key: string]: string | null | {
|
|
244
|
+
ref: string;
|
|
245
|
+
};
|
|
121
246
|
};
|
|
122
247
|
output: {
|
|
123
248
|
operationId: string;
|
|
@@ -126,6 +251,8 @@ type Api = {
|
|
|
126
251
|
version: number;
|
|
127
252
|
} | {
|
|
128
253
|
archived: true;
|
|
254
|
+
} | {
|
|
255
|
+
reference: string;
|
|
129
256
|
};
|
|
130
257
|
};
|
|
131
258
|
} | {
|
|
@@ -139,10 +266,12 @@ type Api = {
|
|
|
139
266
|
input: {
|
|
140
267
|
key?: string;
|
|
141
268
|
archived?: boolean;
|
|
269
|
+
folder?: string | null;
|
|
142
270
|
};
|
|
143
271
|
output: {
|
|
144
272
|
key: string;
|
|
145
273
|
archived: boolean;
|
|
274
|
+
folder: string | null;
|
|
146
275
|
};
|
|
147
276
|
};
|
|
148
277
|
"GET /secrets/:project/:environment/:key/versions": {
|
|
@@ -168,6 +297,75 @@ type Api = {
|
|
|
168
297
|
version: number;
|
|
169
298
|
};
|
|
170
299
|
};
|
|
300
|
+
"DELETE /secrets/:project/:environment/:key/reference": {
|
|
301
|
+
input: undefined;
|
|
302
|
+
output: {
|
|
303
|
+
reference: {
|
|
304
|
+
id: string;
|
|
305
|
+
holder: string;
|
|
306
|
+
source: string;
|
|
307
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
308
|
+
version: number | null;
|
|
309
|
+
createdBy: string;
|
|
310
|
+
createdAt: string;
|
|
311
|
+
endedBy: string | null;
|
|
312
|
+
endedAt: string | null;
|
|
313
|
+
};
|
|
314
|
+
};
|
|
315
|
+
};
|
|
316
|
+
"PATCH /folders/:folder": {
|
|
317
|
+
input: {
|
|
318
|
+
name: string;
|
|
319
|
+
};
|
|
320
|
+
output: {
|
|
321
|
+
folder: string | null;
|
|
322
|
+
moved: string[];
|
|
323
|
+
};
|
|
324
|
+
};
|
|
325
|
+
"DELETE /folders/:folder": {
|
|
326
|
+
input: undefined;
|
|
327
|
+
output: {
|
|
328
|
+
folder: string | null;
|
|
329
|
+
moved: string[];
|
|
330
|
+
};
|
|
331
|
+
};
|
|
332
|
+
"PATCH /folders/:project/:environment/:folder": {
|
|
333
|
+
input: {
|
|
334
|
+
name: string;
|
|
335
|
+
};
|
|
336
|
+
output: {
|
|
337
|
+
folder: string | null;
|
|
338
|
+
moved: string[];
|
|
339
|
+
};
|
|
340
|
+
};
|
|
341
|
+
"DELETE /folders/:project/:environment/:folder": {
|
|
342
|
+
input: undefined;
|
|
343
|
+
output: {
|
|
344
|
+
folder: string | null;
|
|
345
|
+
moved: string[];
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
"GET /references": {
|
|
349
|
+
input: {
|
|
350
|
+
path: string;
|
|
351
|
+
};
|
|
352
|
+
output: {
|
|
353
|
+
references: {
|
|
354
|
+
id: string;
|
|
355
|
+
holder: string;
|
|
356
|
+
source: string;
|
|
357
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
358
|
+
version: number | null;
|
|
359
|
+
createdBy: string;
|
|
360
|
+
createdAt: string;
|
|
361
|
+
endedBy: string | null;
|
|
362
|
+
endedAt: string | null;
|
|
363
|
+
readers: null | string[];
|
|
364
|
+
canBreak: boolean;
|
|
365
|
+
holderArchived: boolean;
|
|
366
|
+
}[];
|
|
367
|
+
};
|
|
368
|
+
};
|
|
171
369
|
"POST /reveals": {
|
|
172
370
|
input: {
|
|
173
371
|
path: string;
|
|
@@ -223,6 +421,7 @@ type Api = {
|
|
|
223
421
|
sessions: number;
|
|
224
422
|
tokens: number;
|
|
225
423
|
identities: number;
|
|
424
|
+
apps: number;
|
|
226
425
|
};
|
|
227
426
|
exposed: {
|
|
228
427
|
project: string;
|
|
@@ -241,6 +440,28 @@ type Api = {
|
|
|
241
440
|
expiresAt: string;
|
|
242
441
|
lastUsedAt: string | null;
|
|
243
442
|
}[];
|
|
443
|
+
apps: {
|
|
444
|
+
id: string;
|
|
445
|
+
name: string;
|
|
446
|
+
host: string | null;
|
|
447
|
+
registration: "cimd" | "dcr";
|
|
448
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
449
|
+
createdAt: string;
|
|
450
|
+
lastUsedAt: string | null;
|
|
451
|
+
lastUsedIp: string | null;
|
|
452
|
+
expiresAt: string;
|
|
453
|
+
}[];
|
|
454
|
+
references: {
|
|
455
|
+
id: string;
|
|
456
|
+
holder: string;
|
|
457
|
+
source: string;
|
|
458
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
459
|
+
version: number | null;
|
|
460
|
+
createdBy: string;
|
|
461
|
+
createdAt: string;
|
|
462
|
+
endedBy: string | null;
|
|
463
|
+
endedAt: string | null;
|
|
464
|
+
}[];
|
|
244
465
|
};
|
|
245
466
|
};
|
|
246
467
|
"PUT /members/:member": {
|
|
@@ -261,6 +482,7 @@ type Api = {
|
|
|
261
482
|
sessions: number;
|
|
262
483
|
tokens: number;
|
|
263
484
|
identities: number;
|
|
485
|
+
apps: number;
|
|
264
486
|
};
|
|
265
487
|
report: {
|
|
266
488
|
principalType: "service" | "user";
|
|
@@ -275,6 +497,7 @@ type Api = {
|
|
|
275
497
|
sessions: number;
|
|
276
498
|
tokens: number;
|
|
277
499
|
identities: number;
|
|
500
|
+
apps: number;
|
|
278
501
|
};
|
|
279
502
|
exposed: {
|
|
280
503
|
project: string;
|
|
@@ -293,6 +516,28 @@ type Api = {
|
|
|
293
516
|
expiresAt: string;
|
|
294
517
|
lastUsedAt: string | null;
|
|
295
518
|
}[];
|
|
519
|
+
apps: {
|
|
520
|
+
id: string;
|
|
521
|
+
name: string;
|
|
522
|
+
host: string | null;
|
|
523
|
+
registration: "cimd" | "dcr";
|
|
524
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
525
|
+
createdAt: string;
|
|
526
|
+
lastUsedAt: string | null;
|
|
527
|
+
lastUsedIp: string | null;
|
|
528
|
+
expiresAt: string;
|
|
529
|
+
}[];
|
|
530
|
+
references: {
|
|
531
|
+
id: string;
|
|
532
|
+
holder: string;
|
|
533
|
+
source: string;
|
|
534
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
535
|
+
version: number | null;
|
|
536
|
+
createdBy: string;
|
|
537
|
+
createdAt: string;
|
|
538
|
+
endedBy: string | null;
|
|
539
|
+
endedAt: string | null;
|
|
540
|
+
}[];
|
|
296
541
|
};
|
|
297
542
|
};
|
|
298
543
|
};
|
|
@@ -481,6 +726,80 @@ type Api = {
|
|
|
481
726
|
decided: true;
|
|
482
727
|
};
|
|
483
728
|
};
|
|
729
|
+
"GET /oauth/authorizations": {
|
|
730
|
+
input: {
|
|
731
|
+
client_id?: string;
|
|
732
|
+
redirect_uri?: string;
|
|
733
|
+
response_type?: string;
|
|
734
|
+
code_challenge?: string;
|
|
735
|
+
code_challenge_method?: string;
|
|
736
|
+
state?: string;
|
|
737
|
+
scope?: string;
|
|
738
|
+
resource?: string;
|
|
739
|
+
};
|
|
740
|
+
output: {
|
|
741
|
+
status: "invalid";
|
|
742
|
+
message: string;
|
|
743
|
+
} | {
|
|
744
|
+
status: "refused";
|
|
745
|
+
message: string;
|
|
746
|
+
redirect: string;
|
|
747
|
+
} | {
|
|
748
|
+
status: "ready";
|
|
749
|
+
client: {
|
|
750
|
+
id: string;
|
|
751
|
+
name: string;
|
|
752
|
+
host: string | null;
|
|
753
|
+
registration: "cimd" | "dcr";
|
|
754
|
+
};
|
|
755
|
+
redirectHost: string;
|
|
756
|
+
loopbackOnly: boolean;
|
|
757
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
758
|
+
connections: ("browse" | "manage-access" | "read-values" | "write")[][];
|
|
759
|
+
days: number;
|
|
760
|
+
};
|
|
761
|
+
};
|
|
762
|
+
"POST /oauth/authorizations": {
|
|
763
|
+
input: {
|
|
764
|
+
request: {
|
|
765
|
+
client_id?: string;
|
|
766
|
+
redirect_uri?: string;
|
|
767
|
+
response_type?: string;
|
|
768
|
+
code_challenge?: string;
|
|
769
|
+
code_challenge_method?: string;
|
|
770
|
+
state?: string;
|
|
771
|
+
scope?: string;
|
|
772
|
+
resource?: string;
|
|
773
|
+
};
|
|
774
|
+
approve: boolean;
|
|
775
|
+
scopes?: string[];
|
|
776
|
+
};
|
|
777
|
+
output: {
|
|
778
|
+
redirect: string;
|
|
779
|
+
};
|
|
780
|
+
};
|
|
781
|
+
"GET /apps": {
|
|
782
|
+
input: undefined;
|
|
783
|
+
output: {
|
|
784
|
+
apps: {
|
|
785
|
+
id: string;
|
|
786
|
+
name: string;
|
|
787
|
+
host: string | null;
|
|
788
|
+
registration: "cimd" | "dcr";
|
|
789
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
790
|
+
createdAt: string;
|
|
791
|
+
lastUsedAt: string | null;
|
|
792
|
+
lastUsedIp: string | null;
|
|
793
|
+
expiresAt: string;
|
|
794
|
+
}[];
|
|
795
|
+
};
|
|
796
|
+
};
|
|
797
|
+
"DELETE /apps/:id": {
|
|
798
|
+
input: undefined;
|
|
799
|
+
output: {
|
|
800
|
+
disconnected: true;
|
|
801
|
+
};
|
|
802
|
+
};
|
|
484
803
|
"GET /audit": {
|
|
485
804
|
input: {
|
|
486
805
|
path?: string;
|
|
@@ -565,11 +884,104 @@ type Api = {
|
|
|
565
884
|
};
|
|
566
885
|
};
|
|
567
886
|
};
|
|
887
|
+
"GET /approvals/:id": {
|
|
888
|
+
input: undefined;
|
|
889
|
+
output: {
|
|
890
|
+
approval: {
|
|
891
|
+
id: string;
|
|
892
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
893
|
+
client: {
|
|
894
|
+
name: string;
|
|
895
|
+
host: string | null;
|
|
896
|
+
registration: "cimd" | "dcr";
|
|
897
|
+
};
|
|
898
|
+
tool: string;
|
|
899
|
+
summary: string;
|
|
900
|
+
details: {
|
|
901
|
+
label: string;
|
|
902
|
+
value: string;
|
|
903
|
+
kind?: "mono" | "time";
|
|
904
|
+
}[];
|
|
905
|
+
asks: null | {
|
|
906
|
+
value: {
|
|
907
|
+
label: string;
|
|
908
|
+
note: string;
|
|
909
|
+
};
|
|
910
|
+
};
|
|
911
|
+
kind: "change" | "reveal";
|
|
912
|
+
digest: string;
|
|
913
|
+
createdAt: string;
|
|
914
|
+
expiresAt: string;
|
|
915
|
+
outcome: null | {
|
|
916
|
+
text: string;
|
|
917
|
+
result?: {
|
|
918
|
+
[key: string]: unknown;
|
|
919
|
+
};
|
|
920
|
+
error?: string;
|
|
921
|
+
};
|
|
922
|
+
};
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
"POST /approvals/:id": {
|
|
926
|
+
input: {
|
|
927
|
+
approve: boolean;
|
|
928
|
+
digest: string;
|
|
929
|
+
value?: string;
|
|
930
|
+
};
|
|
931
|
+
output: {
|
|
932
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
933
|
+
outcome: {
|
|
934
|
+
text: string;
|
|
935
|
+
result?: {
|
|
936
|
+
[key: string]: unknown;
|
|
937
|
+
};
|
|
938
|
+
error?: string;
|
|
939
|
+
};
|
|
940
|
+
shown: {
|
|
941
|
+
label: string;
|
|
942
|
+
value: string;
|
|
943
|
+
kind?: "mono" | "time";
|
|
944
|
+
}[];
|
|
945
|
+
};
|
|
946
|
+
};
|
|
568
947
|
};
|
|
569
948
|
type AccessValue = "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer" | null | {
|
|
570
949
|
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
571
950
|
until: string | null;
|
|
572
951
|
};
|
|
952
|
+
type ApprovalView = {
|
|
953
|
+
id: string;
|
|
954
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
955
|
+
client: {
|
|
956
|
+
name: string;
|
|
957
|
+
host: string | null;
|
|
958
|
+
registration: "cimd" | "dcr";
|
|
959
|
+
};
|
|
960
|
+
tool: string;
|
|
961
|
+
summary: string;
|
|
962
|
+
details: {
|
|
963
|
+
label: string;
|
|
964
|
+
value: string;
|
|
965
|
+
kind?: "mono" | "time";
|
|
966
|
+
}[];
|
|
967
|
+
asks: null | {
|
|
968
|
+
value: {
|
|
969
|
+
label: string;
|
|
970
|
+
note: string;
|
|
971
|
+
};
|
|
972
|
+
};
|
|
973
|
+
kind: "change" | "reveal";
|
|
974
|
+
digest: string;
|
|
975
|
+
createdAt: string;
|
|
976
|
+
expiresAt: string;
|
|
977
|
+
outcome: null | {
|
|
978
|
+
text: string;
|
|
979
|
+
result?: {
|
|
980
|
+
[key: string]: unknown;
|
|
981
|
+
};
|
|
982
|
+
error?: string;
|
|
983
|
+
};
|
|
984
|
+
};
|
|
573
985
|
type AuditEntryView = {
|
|
574
986
|
seq: number;
|
|
575
987
|
author: "app" | "vault";
|
|
@@ -612,6 +1024,27 @@ type AuthInfo = {
|
|
|
612
1024
|
assertion: boolean;
|
|
613
1025
|
};
|
|
614
1026
|
};
|
|
1027
|
+
type AuthorizationView = {
|
|
1028
|
+
status: "invalid";
|
|
1029
|
+
message: string;
|
|
1030
|
+
} | {
|
|
1031
|
+
status: "refused";
|
|
1032
|
+
message: string;
|
|
1033
|
+
redirect: string;
|
|
1034
|
+
} | {
|
|
1035
|
+
status: "ready";
|
|
1036
|
+
client: {
|
|
1037
|
+
id: string;
|
|
1038
|
+
name: string;
|
|
1039
|
+
host: string | null;
|
|
1040
|
+
registration: "cimd" | "dcr";
|
|
1041
|
+
};
|
|
1042
|
+
redirectHost: string;
|
|
1043
|
+
loopbackOnly: boolean;
|
|
1044
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
1045
|
+
connections: ("browse" | "manage-access" | "read-values" | "write")[][];
|
|
1046
|
+
days: number;
|
|
1047
|
+
};
|
|
615
1048
|
type BindingPlan = {
|
|
616
1049
|
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
617
1050
|
issuer: string;
|
|
@@ -637,6 +1070,69 @@ type BindingView = {
|
|
|
637
1070
|
createdBy: string;
|
|
638
1071
|
lastUsedAt: string | null;
|
|
639
1072
|
};
|
|
1073
|
+
type ConnectedApp = {
|
|
1074
|
+
id: string;
|
|
1075
|
+
name: string;
|
|
1076
|
+
host: string | null;
|
|
1077
|
+
registration: "cimd" | "dcr";
|
|
1078
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
1079
|
+
createdAt: string;
|
|
1080
|
+
lastUsedAt: string | null;
|
|
1081
|
+
lastUsedIp: string | null;
|
|
1082
|
+
expiresAt: string;
|
|
1083
|
+
};
|
|
1084
|
+
type Deletion = {
|
|
1085
|
+
path: string;
|
|
1086
|
+
tombstone: string;
|
|
1087
|
+
environments: string[];
|
|
1088
|
+
keys: number;
|
|
1089
|
+
versions: number;
|
|
1090
|
+
grants: {
|
|
1091
|
+
member: string;
|
|
1092
|
+
place: string;
|
|
1093
|
+
role: string;
|
|
1094
|
+
}[];
|
|
1095
|
+
references: {
|
|
1096
|
+
holder: string;
|
|
1097
|
+
source: string;
|
|
1098
|
+
}[];
|
|
1099
|
+
stranded: string[];
|
|
1100
|
+
};
|
|
1101
|
+
type Decision = {
|
|
1102
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
1103
|
+
outcome: {
|
|
1104
|
+
text: string;
|
|
1105
|
+
result?: {
|
|
1106
|
+
[key: string]: unknown;
|
|
1107
|
+
};
|
|
1108
|
+
error?: string;
|
|
1109
|
+
};
|
|
1110
|
+
shown: {
|
|
1111
|
+
label: string;
|
|
1112
|
+
value: string;
|
|
1113
|
+
kind?: "mono" | "time";
|
|
1114
|
+
}[];
|
|
1115
|
+
};
|
|
1116
|
+
type DeletionResult = {
|
|
1117
|
+
dryRun: boolean;
|
|
1118
|
+
deletion: {
|
|
1119
|
+
path: string;
|
|
1120
|
+
tombstone: string;
|
|
1121
|
+
environments: string[];
|
|
1122
|
+
keys: number;
|
|
1123
|
+
versions: number;
|
|
1124
|
+
grants: {
|
|
1125
|
+
member: string;
|
|
1126
|
+
place: string;
|
|
1127
|
+
role: string;
|
|
1128
|
+
}[];
|
|
1129
|
+
references: {
|
|
1130
|
+
holder: string;
|
|
1131
|
+
source: string;
|
|
1132
|
+
}[];
|
|
1133
|
+
stranded: string[];
|
|
1134
|
+
};
|
|
1135
|
+
};
|
|
640
1136
|
type WorkloadIds = {
|
|
641
1137
|
github: string;
|
|
642
1138
|
repositoryId: string;
|
|
@@ -646,6 +1142,13 @@ type WorkloadIds = {
|
|
|
646
1142
|
projectId: string;
|
|
647
1143
|
namespaceId: string;
|
|
648
1144
|
};
|
|
1145
|
+
type DismissedKey = {
|
|
1146
|
+
key: string;
|
|
1147
|
+
in: string[];
|
|
1148
|
+
folder: string | null;
|
|
1149
|
+
dismissedBy: string;
|
|
1150
|
+
dismissedAt: string;
|
|
1151
|
+
};
|
|
649
1152
|
type DryRunOutcome = "added" | "archived" | "changed" | "unchanged";
|
|
650
1153
|
type DryRunResult = {
|
|
651
1154
|
dryRun: true;
|
|
@@ -660,12 +1163,12 @@ type IdentityRow = {
|
|
|
660
1163
|
createdAt: string;
|
|
661
1164
|
lastSignInAt: string | null;
|
|
662
1165
|
};
|
|
663
|
-
type
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
1166
|
+
type InheritedGrant = {
|
|
1167
|
+
member: string;
|
|
1168
|
+
place: string;
|
|
1169
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1170
|
+
roleName: string;
|
|
1171
|
+
expiresAt: string | null;
|
|
669
1172
|
};
|
|
670
1173
|
type Me = {
|
|
671
1174
|
principal: {
|
|
@@ -677,18 +1180,15 @@ type Me = {
|
|
|
677
1180
|
instanceRole: "owner" | "root-admin" | "user";
|
|
678
1181
|
isRootAdmin: boolean;
|
|
679
1182
|
canReadAudit: boolean;
|
|
1183
|
+
features: {
|
|
1184
|
+
mcp: boolean;
|
|
1185
|
+
workloads: boolean;
|
|
1186
|
+
};
|
|
680
1187
|
environments: {
|
|
681
1188
|
project: string;
|
|
682
1189
|
environment: string;
|
|
683
1190
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
684
1191
|
}[];
|
|
685
|
-
instance: null | {
|
|
686
|
-
version: string;
|
|
687
|
-
migrations: {
|
|
688
|
-
applied: number;
|
|
689
|
-
known: string[];
|
|
690
|
-
};
|
|
691
|
-
};
|
|
692
1192
|
};
|
|
693
1193
|
type Member = {
|
|
694
1194
|
member: string;
|
|
@@ -707,6 +1207,11 @@ type Member = {
|
|
|
707
1207
|
expiresAt: string | null;
|
|
708
1208
|
}[];
|
|
709
1209
|
};
|
|
1210
|
+
type MissingKey = {
|
|
1211
|
+
key: string;
|
|
1212
|
+
in: string[];
|
|
1213
|
+
folder: string | null;
|
|
1214
|
+
};
|
|
710
1215
|
type OffboardingReport = {
|
|
711
1216
|
principalType: "service" | "user";
|
|
712
1217
|
principalId: string;
|
|
@@ -720,6 +1225,7 @@ type OffboardingReport = {
|
|
|
720
1225
|
sessions: number;
|
|
721
1226
|
tokens: number;
|
|
722
1227
|
identities: number;
|
|
1228
|
+
apps: number;
|
|
723
1229
|
};
|
|
724
1230
|
exposed: {
|
|
725
1231
|
project: string;
|
|
@@ -738,11 +1244,48 @@ type OffboardingReport = {
|
|
|
738
1244
|
expiresAt: string;
|
|
739
1245
|
lastUsedAt: string | null;
|
|
740
1246
|
}[];
|
|
1247
|
+
apps: {
|
|
1248
|
+
id: string;
|
|
1249
|
+
name: string;
|
|
1250
|
+
host: string | null;
|
|
1251
|
+
registration: "cimd" | "dcr";
|
|
1252
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
1253
|
+
createdAt: string;
|
|
1254
|
+
lastUsedAt: string | null;
|
|
1255
|
+
lastUsedIp: string | null;
|
|
1256
|
+
expiresAt: string;
|
|
1257
|
+
}[];
|
|
1258
|
+
references: {
|
|
1259
|
+
id: string;
|
|
1260
|
+
holder: string;
|
|
1261
|
+
source: string;
|
|
1262
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1263
|
+
version: number | null;
|
|
1264
|
+
createdBy: string;
|
|
1265
|
+
createdAt: string;
|
|
1266
|
+
endedBy: string | null;
|
|
1267
|
+
endedAt: string | null;
|
|
1268
|
+
}[];
|
|
1269
|
+
};
|
|
1270
|
+
type ListedReference = {
|
|
1271
|
+
id: string;
|
|
1272
|
+
holder: string;
|
|
1273
|
+
source: string;
|
|
1274
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1275
|
+
version: number | null;
|
|
1276
|
+
createdBy: string;
|
|
1277
|
+
createdAt: string;
|
|
1278
|
+
endedBy: string | null;
|
|
1279
|
+
endedAt: string | null;
|
|
1280
|
+
readers: null | string[];
|
|
1281
|
+
canBreak: boolean;
|
|
1282
|
+
holderArchived: boolean;
|
|
741
1283
|
};
|
|
742
1284
|
type ProjectSummary = {
|
|
743
1285
|
slug: string;
|
|
744
1286
|
name: string;
|
|
745
1287
|
archivedAt: string | null;
|
|
1288
|
+
folder: string | null;
|
|
746
1289
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
747
1290
|
environments: {
|
|
748
1291
|
slug: string;
|
|
@@ -755,6 +1298,17 @@ type ProjectSummary = {
|
|
|
755
1298
|
}[];
|
|
756
1299
|
secretCount: number | null;
|
|
757
1300
|
};
|
|
1301
|
+
type ReferenceView = {
|
|
1302
|
+
id: string;
|
|
1303
|
+
holder: string;
|
|
1304
|
+
source: string;
|
|
1305
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1306
|
+
version: number | null;
|
|
1307
|
+
createdBy: string;
|
|
1308
|
+
createdAt: string;
|
|
1309
|
+
endedBy: string | null;
|
|
1310
|
+
endedAt: string | null;
|
|
1311
|
+
};
|
|
758
1312
|
type RemovedMember = {
|
|
759
1313
|
principalType: "service" | "user";
|
|
760
1314
|
principalId: string;
|
|
@@ -762,6 +1316,19 @@ type RemovedMember = {
|
|
|
762
1316
|
};
|
|
763
1317
|
type SecretKey = {
|
|
764
1318
|
key: string;
|
|
1319
|
+
reference: null | {
|
|
1320
|
+
id: string;
|
|
1321
|
+
holder: string;
|
|
1322
|
+
source: string;
|
|
1323
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1324
|
+
version: number | null;
|
|
1325
|
+
createdBy: string;
|
|
1326
|
+
createdAt: string;
|
|
1327
|
+
endedBy: string | null;
|
|
1328
|
+
endedAt: string | null;
|
|
1329
|
+
canOpenSource: boolean;
|
|
1330
|
+
};
|
|
1331
|
+
folder: string | null;
|
|
765
1332
|
archived: boolean;
|
|
766
1333
|
version: number | null;
|
|
767
1334
|
updatedAt: string | null;
|
|
@@ -803,10 +1370,42 @@ type SetResult = {
|
|
|
803
1370
|
version: number;
|
|
804
1371
|
} | {
|
|
805
1372
|
archived: true;
|
|
1373
|
+
} | {
|
|
1374
|
+
reference: string;
|
|
806
1375
|
};
|
|
807
1376
|
};
|
|
808
1377
|
};
|
|
809
1378
|
//#endregion
|
|
1379
|
+
//#region src/folders.d.ts
|
|
1380
|
+
/**
|
|
1381
|
+
* Rows grouped by folder, as every list shows them: those in no folder
|
|
1382
|
+
* first, then each folder by name, each keeping the order it was given. A
|
|
1383
|
+
* folder only arranges a list (docs/design/environments.md).
|
|
1384
|
+
*/
|
|
1385
|
+
declare function byFolder<T extends {
|
|
1386
|
+
folder: string | null;
|
|
1387
|
+
}>(rows: readonly T[]): [string | null, T[]][];
|
|
1388
|
+
/** The folders in use among `rows`, by name. */
|
|
1389
|
+
declare function foldersOf(rows: readonly {
|
|
1390
|
+
folder: string | null;
|
|
1391
|
+
}[]): string[];
|
|
1392
|
+
//#endregion
|
|
1393
|
+
//#region src/members.d.ts
|
|
1394
|
+
/**
|
|
1395
|
+
* How members are named, to people and to the API. A service account, a
|
|
1396
|
+
* machine identity that signs in by OIDC (trust bindings) or with bearer
|
|
1397
|
+
* tokens, is `service:<name>` wherever a person reads or types one. The
|
|
1398
|
+
* API, the vault and the audit log keep `token:<name>`, which the log's
|
|
1399
|
+
* signed entries hold: so the rename is here, at the edges, and nothing
|
|
1400
|
+
* stored or verified changes.
|
|
1401
|
+
*/
|
|
1402
|
+
/** A member as people read it: `service:deploy` for the API's `token:deploy`; anyone else as they are. */
|
|
1403
|
+
declare function shownMember(member: string): string;
|
|
1404
|
+
/** A member as the API takes it, from what a person typed: `service:deploy` and `token:deploy` alike name a service account. */
|
|
1405
|
+
declare function apiMember(member: string): string;
|
|
1406
|
+
/** A service account's name alone, from any of its forms: `deploy`, `service:deploy` or `token:deploy`. */
|
|
1407
|
+
declare function serviceName(member: string): string;
|
|
1408
|
+
//#endregion
|
|
810
1409
|
//#region src/index.d.ts
|
|
811
1410
|
type RouteKey = keyof Api;
|
|
812
1411
|
/** What a caller sends: the body, or the query string for a GET. */
|
|
@@ -848,18 +1447,15 @@ declare function createClient(options: ClientOptions): {
|
|
|
848
1447
|
instanceRole: "owner" | "root-admin" | "user";
|
|
849
1448
|
isRootAdmin: boolean;
|
|
850
1449
|
canReadAudit: boolean;
|
|
1450
|
+
features: {
|
|
1451
|
+
mcp: boolean;
|
|
1452
|
+
workloads: boolean;
|
|
1453
|
+
};
|
|
851
1454
|
environments: {
|
|
852
1455
|
project: string;
|
|
853
1456
|
environment: string;
|
|
854
1457
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
855
1458
|
}[];
|
|
856
|
-
instance: null | {
|
|
857
|
-
version: string;
|
|
858
|
-
migrations: {
|
|
859
|
-
applied: number;
|
|
860
|
-
known: string[];
|
|
861
|
-
};
|
|
862
|
-
};
|
|
863
1459
|
}>;
|
|
864
1460
|
projects: {
|
|
865
1461
|
/** With their environments. */
|
|
@@ -868,6 +1464,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
868
1464
|
slug: string;
|
|
869
1465
|
name: string;
|
|
870
1466
|
archivedAt: string | null;
|
|
1467
|
+
folder: string | null;
|
|
871
1468
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
872
1469
|
environments: {
|
|
873
1470
|
slug: string;
|
|
@@ -880,6 +1477,13 @@ declare function createClient(options: ClientOptions): {
|
|
|
880
1477
|
}[];
|
|
881
1478
|
secretCount: number | null;
|
|
882
1479
|
}[];
|
|
1480
|
+
everyProject: {
|
|
1481
|
+
member: string;
|
|
1482
|
+
place: string;
|
|
1483
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1484
|
+
roleName: string;
|
|
1485
|
+
expiresAt: string | null;
|
|
1486
|
+
}[];
|
|
883
1487
|
}>;
|
|
884
1488
|
create: (project: string, input: RouteInput<"PUT /projects/:project">) => Promise<{
|
|
885
1489
|
project: {
|
|
@@ -888,12 +1492,43 @@ declare function createClient(options: ClientOptions): {
|
|
|
888
1492
|
archivedAt: string | null;
|
|
889
1493
|
};
|
|
890
1494
|
created: boolean;
|
|
1495
|
+
inherited: {
|
|
1496
|
+
member: string;
|
|
1497
|
+
place: string;
|
|
1498
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1499
|
+
roleName: string;
|
|
1500
|
+
expiresAt: string | null;
|
|
1501
|
+
}[];
|
|
891
1502
|
}>;
|
|
892
1503
|
update: (project: string, patch: RouteInput<"PATCH /projects/:project">) => Promise<{
|
|
893
1504
|
project: {
|
|
894
1505
|
slug: string;
|
|
895
1506
|
name: string;
|
|
896
1507
|
archivedAt: string | null;
|
|
1508
|
+
folder: string | null;
|
|
1509
|
+
};
|
|
1510
|
+
}>;
|
|
1511
|
+
/** What deleting an archived project would erase and revoke; changes nothing. */
|
|
1512
|
+
previewDelete: (project: string) => Promise<DeletionResult>;
|
|
1513
|
+
/** Delete an archived project for good: its values erased, its grants revoked, its slug free. Owners only. */
|
|
1514
|
+
delete: (project: string) => Promise<{
|
|
1515
|
+
dryRun: boolean;
|
|
1516
|
+
deletion: {
|
|
1517
|
+
path: string;
|
|
1518
|
+
tombstone: string;
|
|
1519
|
+
environments: string[];
|
|
1520
|
+
keys: number;
|
|
1521
|
+
versions: number;
|
|
1522
|
+
grants: {
|
|
1523
|
+
member: string;
|
|
1524
|
+
place: string;
|
|
1525
|
+
role: string;
|
|
1526
|
+
}[];
|
|
1527
|
+
references: {
|
|
1528
|
+
holder: string;
|
|
1529
|
+
source: string;
|
|
1530
|
+
}[];
|
|
1531
|
+
stranded: string[];
|
|
897
1532
|
};
|
|
898
1533
|
}>;
|
|
899
1534
|
};
|
|
@@ -905,6 +1540,19 @@ declare function createClient(options: ClientOptions): {
|
|
|
905
1540
|
archivedAt: string | null;
|
|
906
1541
|
};
|
|
907
1542
|
created: boolean;
|
|
1543
|
+
inherited: {
|
|
1544
|
+
member: string;
|
|
1545
|
+
place: string;
|
|
1546
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1547
|
+
roleName: string;
|
|
1548
|
+
expiresAt: string | null;
|
|
1549
|
+
}[];
|
|
1550
|
+
forked: null | {
|
|
1551
|
+
from: string;
|
|
1552
|
+
keys: number;
|
|
1553
|
+
references: number;
|
|
1554
|
+
copied: string[];
|
|
1555
|
+
};
|
|
908
1556
|
}>;
|
|
909
1557
|
update: (path: string, patch: RouteInput<"PATCH /projects/:project/:environment">) => Promise<{
|
|
910
1558
|
environment: {
|
|
@@ -912,6 +1560,58 @@ declare function createClient(options: ClientOptions): {
|
|
|
912
1560
|
name: string;
|
|
913
1561
|
archivedAt: string | null;
|
|
914
1562
|
};
|
|
1563
|
+
inherited: {
|
|
1564
|
+
member: string;
|
|
1565
|
+
place: string;
|
|
1566
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1567
|
+
roleName: string;
|
|
1568
|
+
expiresAt: string | null;
|
|
1569
|
+
}[];
|
|
1570
|
+
}>;
|
|
1571
|
+
/** What deleting an archived environment would erase and revoke; changes nothing. */
|
|
1572
|
+
previewDelete: (path: string) => Promise<DeletionResult>;
|
|
1573
|
+
/** Delete an archived environment for good, as a project is. Owners only. */
|
|
1574
|
+
delete: (path: string) => Promise<{
|
|
1575
|
+
dryRun: boolean;
|
|
1576
|
+
deletion: {
|
|
1577
|
+
path: string;
|
|
1578
|
+
tombstone: string;
|
|
1579
|
+
environments: string[];
|
|
1580
|
+
keys: number;
|
|
1581
|
+
versions: number;
|
|
1582
|
+
grants: {
|
|
1583
|
+
member: string;
|
|
1584
|
+
place: string;
|
|
1585
|
+
role: string;
|
|
1586
|
+
}[];
|
|
1587
|
+
references: {
|
|
1588
|
+
holder: string;
|
|
1589
|
+
source: string;
|
|
1590
|
+
}[];
|
|
1591
|
+
stranded: string[];
|
|
1592
|
+
};
|
|
1593
|
+
}>;
|
|
1594
|
+
/** The keys its sibling environments have and it lacks, those you can see, and those its team dismissed. */
|
|
1595
|
+
missing: (path: string) => Promise<{
|
|
1596
|
+
missing: {
|
|
1597
|
+
key: string;
|
|
1598
|
+
in: string[];
|
|
1599
|
+
folder: string | null;
|
|
1600
|
+
}[];
|
|
1601
|
+
dismissed: {
|
|
1602
|
+
key: string;
|
|
1603
|
+
in: string[];
|
|
1604
|
+
folder: string | null;
|
|
1605
|
+
dismissedBy: string;
|
|
1606
|
+
dismissedAt: string;
|
|
1607
|
+
}[];
|
|
1608
|
+
}>;
|
|
1609
|
+
/** Dismiss missing keys (`true`) or restore them (`null`). */
|
|
1610
|
+
dismiss: (path: string, patch: RouteInput<"PATCH /projects/:project/:environment/dismissals">) => Promise<{
|
|
1611
|
+
operationId: string;
|
|
1612
|
+
keys: {
|
|
1613
|
+
[key: string]: "dismissed" | "restored" | "unchanged";
|
|
1614
|
+
};
|
|
915
1615
|
}>;
|
|
916
1616
|
};
|
|
917
1617
|
secrets: {
|
|
@@ -920,6 +1620,19 @@ declare function createClient(options: ClientOptions): {
|
|
|
920
1620
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
921
1621
|
keys: {
|
|
922
1622
|
key: string;
|
|
1623
|
+
reference: null | {
|
|
1624
|
+
id: string;
|
|
1625
|
+
holder: string;
|
|
1626
|
+
source: string;
|
|
1627
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1628
|
+
version: number | null;
|
|
1629
|
+
createdBy: string;
|
|
1630
|
+
createdAt: string;
|
|
1631
|
+
endedBy: string | null;
|
|
1632
|
+
endedAt: string | null;
|
|
1633
|
+
canOpenSource: boolean;
|
|
1634
|
+
};
|
|
1635
|
+
folder: string | null;
|
|
923
1636
|
archived: boolean;
|
|
924
1637
|
version: number | null;
|
|
925
1638
|
updatedAt: string | null;
|
|
@@ -960,10 +1673,49 @@ declare function createClient(options: ClientOptions): {
|
|
|
960
1673
|
rename: (path: string, key: string) => Promise<{
|
|
961
1674
|
key: string;
|
|
962
1675
|
archived: boolean;
|
|
1676
|
+
folder: string | null;
|
|
963
1677
|
}>;
|
|
964
1678
|
update: (path: string, patch: RouteInput<"PATCH /secrets/:project/:environment/:key">) => Promise<{
|
|
965
1679
|
key: string;
|
|
966
1680
|
archived: boolean;
|
|
1681
|
+
folder: string | null;
|
|
1682
|
+
}>;
|
|
1683
|
+
};
|
|
1684
|
+
/**
|
|
1685
|
+
* References: secrets read through others (docs/design/environments.md).
|
|
1686
|
+
* A key becomes one with `secrets.set(path, { KEY: { ref: 'market/prod/KEY' } })`.
|
|
1687
|
+
*/
|
|
1688
|
+
references: {
|
|
1689
|
+
/** The live references into and out of a place, `market`, `market/prod` or `market/prod/KEY`, and who reads through them. */
|
|
1690
|
+
list: (path: string) => Promise<{
|
|
1691
|
+
references: {
|
|
1692
|
+
id: string;
|
|
1693
|
+
holder: string;
|
|
1694
|
+
source: string;
|
|
1695
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1696
|
+
version: number | null;
|
|
1697
|
+
createdBy: string;
|
|
1698
|
+
createdAt: string;
|
|
1699
|
+
endedBy: string | null;
|
|
1700
|
+
endedAt: string | null;
|
|
1701
|
+
readers: null | string[];
|
|
1702
|
+
canBreak: boolean;
|
|
1703
|
+
holderArchived: boolean;
|
|
1704
|
+
}[];
|
|
1705
|
+
}>;
|
|
1706
|
+
/** Break the reference a secret is: its readers stop reading the source through it. */
|
|
1707
|
+
break: (path: string) => Promise<{
|
|
1708
|
+
reference: {
|
|
1709
|
+
id: string;
|
|
1710
|
+
holder: string;
|
|
1711
|
+
source: string;
|
|
1712
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1713
|
+
version: number | null;
|
|
1714
|
+
createdBy: string;
|
|
1715
|
+
createdAt: string;
|
|
1716
|
+
endedBy: string | null;
|
|
1717
|
+
endedAt: string | null;
|
|
1718
|
+
};
|
|
967
1719
|
}>;
|
|
968
1720
|
};
|
|
969
1721
|
members: {
|
|
@@ -1006,6 +1758,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
1006
1758
|
sessions: number;
|
|
1007
1759
|
tokens: number;
|
|
1008
1760
|
identities: number;
|
|
1761
|
+
apps: number;
|
|
1009
1762
|
};
|
|
1010
1763
|
exposed: {
|
|
1011
1764
|
project: string;
|
|
@@ -1024,6 +1777,28 @@ declare function createClient(options: ClientOptions): {
|
|
|
1024
1777
|
expiresAt: string;
|
|
1025
1778
|
lastUsedAt: string | null;
|
|
1026
1779
|
}[];
|
|
1780
|
+
apps: {
|
|
1781
|
+
id: string;
|
|
1782
|
+
name: string;
|
|
1783
|
+
host: string | null;
|
|
1784
|
+
registration: "cimd" | "dcr";
|
|
1785
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
1786
|
+
createdAt: string;
|
|
1787
|
+
lastUsedAt: string | null;
|
|
1788
|
+
lastUsedIp: string | null;
|
|
1789
|
+
expiresAt: string;
|
|
1790
|
+
}[];
|
|
1791
|
+
references: {
|
|
1792
|
+
id: string;
|
|
1793
|
+
holder: string;
|
|
1794
|
+
source: string;
|
|
1795
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1796
|
+
version: number | null;
|
|
1797
|
+
createdBy: string;
|
|
1798
|
+
createdAt: string;
|
|
1799
|
+
endedBy: string | null;
|
|
1800
|
+
endedAt: string | null;
|
|
1801
|
+
}[];
|
|
1027
1802
|
}>;
|
|
1028
1803
|
add: (member: string, input?: RouteInput<"PUT /members/:member">) => Promise<{
|
|
1029
1804
|
member: string;
|
|
@@ -1037,6 +1812,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
1037
1812
|
sessions: number;
|
|
1038
1813
|
tokens: number;
|
|
1039
1814
|
identities: number;
|
|
1815
|
+
apps: number;
|
|
1040
1816
|
};
|
|
1041
1817
|
report: {
|
|
1042
1818
|
principalType: "service" | "user";
|
|
@@ -1051,6 +1827,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
1051
1827
|
sessions: number;
|
|
1052
1828
|
tokens: number;
|
|
1053
1829
|
identities: number;
|
|
1830
|
+
apps: number;
|
|
1054
1831
|
};
|
|
1055
1832
|
exposed: {
|
|
1056
1833
|
project: string;
|
|
@@ -1069,6 +1846,28 @@ declare function createClient(options: ClientOptions): {
|
|
|
1069
1846
|
expiresAt: string;
|
|
1070
1847
|
lastUsedAt: string | null;
|
|
1071
1848
|
}[];
|
|
1849
|
+
apps: {
|
|
1850
|
+
id: string;
|
|
1851
|
+
name: string;
|
|
1852
|
+
host: string | null;
|
|
1853
|
+
registration: "cimd" | "dcr";
|
|
1854
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
1855
|
+
createdAt: string;
|
|
1856
|
+
lastUsedAt: string | null;
|
|
1857
|
+
lastUsedIp: string | null;
|
|
1858
|
+
expiresAt: string;
|
|
1859
|
+
}[];
|
|
1860
|
+
references: {
|
|
1861
|
+
id: string;
|
|
1862
|
+
holder: string;
|
|
1863
|
+
source: string;
|
|
1864
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1865
|
+
version: number | null;
|
|
1866
|
+
createdBy: string;
|
|
1867
|
+
createdAt: string;
|
|
1868
|
+
endedBy: string | null;
|
|
1869
|
+
endedAt: string | null;
|
|
1870
|
+
}[];
|
|
1072
1871
|
};
|
|
1073
1872
|
}>;
|
|
1074
1873
|
};
|
|
@@ -1191,6 +1990,137 @@ declare function createClient(options: ClientOptions): {
|
|
|
1191
1990
|
decided: true;
|
|
1192
1991
|
}>;
|
|
1193
1992
|
};
|
|
1993
|
+
/**
|
|
1994
|
+
* Folders, which arrange lists and do nothing else: a folder exists while
|
|
1995
|
+
* something is filed in it. Renaming one re-files all of it, onto a folder
|
|
1996
|
+
* that exists merges the two; removing one takes all of it out, each item
|
|
1997
|
+
* staying where it is, in no folder. Moving one item is `projects.update`
|
|
1998
|
+
* or `secrets.update` with a `folder`.
|
|
1999
|
+
*/
|
|
2000
|
+
folders: {
|
|
2001
|
+
/** A folder of projects, renamed. Takes managing every project in it. */
|
|
2002
|
+
rename: (folder: string, name: string) => Promise<{
|
|
2003
|
+
folder: string | null;
|
|
2004
|
+
moved: string[];
|
|
2005
|
+
}>;
|
|
2006
|
+
/** Every project out of a folder. */
|
|
2007
|
+
remove: (folder: string) => Promise<{
|
|
2008
|
+
folder: string | null;
|
|
2009
|
+
moved: string[];
|
|
2010
|
+
}>;
|
|
2011
|
+
/** One of an environment's key folders, `market/prod`, renamed. Takes writing there. */
|
|
2012
|
+
renameKeys: (environment: string, folder: string, name: string) => Promise<{
|
|
2013
|
+
folder: string | null;
|
|
2014
|
+
moved: string[];
|
|
2015
|
+
}>;
|
|
2016
|
+
/** Every key out of one of an environment's folders. */
|
|
2017
|
+
removeKeys: (environment: string, folder: string) => Promise<{
|
|
2018
|
+
folder: string | null;
|
|
2019
|
+
moved: string[];
|
|
2020
|
+
}>;
|
|
2021
|
+
};
|
|
2022
|
+
/**
|
|
2023
|
+
* An MCP client asking to connect, by its authorization request, and the
|
|
2024
|
+
* person's answer: where to send the browser next.
|
|
2025
|
+
*/
|
|
2026
|
+
oauth: {
|
|
2027
|
+
describe: (request: RouteInput<"GET /oauth/authorizations">) => Promise<{
|
|
2028
|
+
status: "invalid";
|
|
2029
|
+
message: string;
|
|
2030
|
+
} | {
|
|
2031
|
+
status: "refused";
|
|
2032
|
+
message: string;
|
|
2033
|
+
redirect: string;
|
|
2034
|
+
} | {
|
|
2035
|
+
status: "ready";
|
|
2036
|
+
client: {
|
|
2037
|
+
id: string;
|
|
2038
|
+
name: string;
|
|
2039
|
+
host: string | null;
|
|
2040
|
+
registration: "cimd" | "dcr";
|
|
2041
|
+
};
|
|
2042
|
+
redirectHost: string;
|
|
2043
|
+
loopbackOnly: boolean;
|
|
2044
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
2045
|
+
connections: ("browse" | "manage-access" | "read-values" | "write")[][];
|
|
2046
|
+
days: number;
|
|
2047
|
+
}>;
|
|
2048
|
+
decide: (input: RouteInput<"POST /oauth/authorizations">) => Promise<{
|
|
2049
|
+
redirect: string;
|
|
2050
|
+
}>;
|
|
2051
|
+
};
|
|
2052
|
+
/** The MCP clients I connected. */
|
|
2053
|
+
/** A change an MCP client asked for: what it would do, and the person's decision, which makes it. */
|
|
2054
|
+
approvals: {
|
|
2055
|
+
get: (id: string) => Promise<{
|
|
2056
|
+
approval: {
|
|
2057
|
+
id: string;
|
|
2058
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
2059
|
+
client: {
|
|
2060
|
+
name: string;
|
|
2061
|
+
host: string | null;
|
|
2062
|
+
registration: "cimd" | "dcr";
|
|
2063
|
+
};
|
|
2064
|
+
tool: string;
|
|
2065
|
+
summary: string;
|
|
2066
|
+
details: {
|
|
2067
|
+
label: string;
|
|
2068
|
+
value: string;
|
|
2069
|
+
kind?: "mono" | "time";
|
|
2070
|
+
}[];
|
|
2071
|
+
asks: null | {
|
|
2072
|
+
value: {
|
|
2073
|
+
label: string;
|
|
2074
|
+
note: string;
|
|
2075
|
+
};
|
|
2076
|
+
};
|
|
2077
|
+
kind: "change" | "reveal";
|
|
2078
|
+
digest: string;
|
|
2079
|
+
createdAt: string;
|
|
2080
|
+
expiresAt: string;
|
|
2081
|
+
outcome: null | {
|
|
2082
|
+
text: string;
|
|
2083
|
+
result?: {
|
|
2084
|
+
[key: string]: unknown;
|
|
2085
|
+
};
|
|
2086
|
+
error?: string;
|
|
2087
|
+
};
|
|
2088
|
+
};
|
|
2089
|
+
}>;
|
|
2090
|
+
decide: (id: string, input: RouteInput<"POST /approvals/:id">) => Promise<{
|
|
2091
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
2092
|
+
outcome: {
|
|
2093
|
+
text: string;
|
|
2094
|
+
result?: {
|
|
2095
|
+
[key: string]: unknown;
|
|
2096
|
+
};
|
|
2097
|
+
error?: string;
|
|
2098
|
+
};
|
|
2099
|
+
shown: {
|
|
2100
|
+
label: string;
|
|
2101
|
+
value: string;
|
|
2102
|
+
kind?: "mono" | "time";
|
|
2103
|
+
}[];
|
|
2104
|
+
}>;
|
|
2105
|
+
};
|
|
2106
|
+
apps: {
|
|
2107
|
+
list: () => Promise<{
|
|
2108
|
+
apps: {
|
|
2109
|
+
id: string;
|
|
2110
|
+
name: string;
|
|
2111
|
+
host: string | null;
|
|
2112
|
+
registration: "cimd" | "dcr";
|
|
2113
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
2114
|
+
createdAt: string;
|
|
2115
|
+
lastUsedAt: string | null;
|
|
2116
|
+
lastUsedIp: string | null;
|
|
2117
|
+
expiresAt: string;
|
|
2118
|
+
}[];
|
|
2119
|
+
}>;
|
|
2120
|
+
disconnect: (id: string) => Promise<{
|
|
2121
|
+
disconnected: true;
|
|
2122
|
+
}>;
|
|
2123
|
+
};
|
|
1194
2124
|
audit: {
|
|
1195
2125
|
list: (query?: RouteInput<"GET /audit">) => Promise<{
|
|
1196
2126
|
entries: {
|
|
@@ -1284,4 +2214,4 @@ declare function planImport(coffre: CoffreClient, path: string, entries: readonl
|
|
|
1284
2214
|
changes: Record<string, string>;
|
|
1285
2215
|
}>;
|
|
1286
2216
|
//#endregion
|
|
1287
|
-
export {
|
|
2217
|
+
export { DryRunOutcome as A, ReferenceView as B, BindingPlan as C, Deletion as D, Decision as E, Me as F, SessionRow as G, SecretKey as H, Member as I, SetResult as K, MissingKey as L, IdentityRow as M, InheritedGrant as N, DeletionResult as O, ListedReference as P, OffboardingReport as R, AuthorizationView as S, ConnectedApp as T, SecretVersion as U, RemovedMember as V, ServiceTokenRow as W, AccessValue as _, Params as a, AuditEntryView as b, RouteOutput as c, planImport as d, apiMember as f, foldersOf as g, byFolder as h, ImportAction as i, DryRunResult as j, DismissedKey as k, Transport as l, shownMember as m, CoffreClient as n, RouteInput as o, serviceName as p, WorkloadIds as q, CoffreError as r, RouteKey as s, ClientOptions as t, createClient as u, Api as v, BindingView as w, AuthInfo as x, ApprovalView as y, ProjectSummary as z };
|