@coffre/client 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{index-BuMxAzSu.d.ts → index-CsGTyqgO.d.ts} +898 -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 +564 -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;
|
|
@@ -241,6 +439,17 @@ type Api = {
|
|
|
241
439
|
expiresAt: string;
|
|
242
440
|
lastUsedAt: string | null;
|
|
243
441
|
}[];
|
|
442
|
+
references: {
|
|
443
|
+
id: string;
|
|
444
|
+
holder: string;
|
|
445
|
+
source: string;
|
|
446
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
447
|
+
version: number | null;
|
|
448
|
+
createdBy: string;
|
|
449
|
+
createdAt: string;
|
|
450
|
+
endedBy: string | null;
|
|
451
|
+
endedAt: string | null;
|
|
452
|
+
}[];
|
|
244
453
|
};
|
|
245
454
|
};
|
|
246
455
|
"PUT /members/:member": {
|
|
@@ -293,6 +502,17 @@ type Api = {
|
|
|
293
502
|
expiresAt: string;
|
|
294
503
|
lastUsedAt: string | null;
|
|
295
504
|
}[];
|
|
505
|
+
references: {
|
|
506
|
+
id: string;
|
|
507
|
+
holder: string;
|
|
508
|
+
source: string;
|
|
509
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
510
|
+
version: number | null;
|
|
511
|
+
createdBy: string;
|
|
512
|
+
createdAt: string;
|
|
513
|
+
endedBy: string | null;
|
|
514
|
+
endedAt: string | null;
|
|
515
|
+
}[];
|
|
296
516
|
};
|
|
297
517
|
};
|
|
298
518
|
};
|
|
@@ -481,6 +701,80 @@ type Api = {
|
|
|
481
701
|
decided: true;
|
|
482
702
|
};
|
|
483
703
|
};
|
|
704
|
+
"GET /oauth/authorizations": {
|
|
705
|
+
input: {
|
|
706
|
+
client_id?: string;
|
|
707
|
+
redirect_uri?: string;
|
|
708
|
+
response_type?: string;
|
|
709
|
+
code_challenge?: string;
|
|
710
|
+
code_challenge_method?: string;
|
|
711
|
+
state?: string;
|
|
712
|
+
scope?: string;
|
|
713
|
+
resource?: string;
|
|
714
|
+
};
|
|
715
|
+
output: {
|
|
716
|
+
status: "invalid";
|
|
717
|
+
message: string;
|
|
718
|
+
} | {
|
|
719
|
+
status: "refused";
|
|
720
|
+
message: string;
|
|
721
|
+
redirect: string;
|
|
722
|
+
} | {
|
|
723
|
+
status: "ready";
|
|
724
|
+
client: {
|
|
725
|
+
id: string;
|
|
726
|
+
name: string;
|
|
727
|
+
host: string | null;
|
|
728
|
+
registration: "cimd" | "dcr";
|
|
729
|
+
};
|
|
730
|
+
redirectHost: string;
|
|
731
|
+
loopbackOnly: boolean;
|
|
732
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
733
|
+
connections: ("browse" | "manage-access" | "read-values" | "write")[][];
|
|
734
|
+
days: number;
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
"POST /oauth/authorizations": {
|
|
738
|
+
input: {
|
|
739
|
+
request: {
|
|
740
|
+
client_id?: string;
|
|
741
|
+
redirect_uri?: string;
|
|
742
|
+
response_type?: string;
|
|
743
|
+
code_challenge?: string;
|
|
744
|
+
code_challenge_method?: string;
|
|
745
|
+
state?: string;
|
|
746
|
+
scope?: string;
|
|
747
|
+
resource?: string;
|
|
748
|
+
};
|
|
749
|
+
approve: boolean;
|
|
750
|
+
scopes?: string[];
|
|
751
|
+
};
|
|
752
|
+
output: {
|
|
753
|
+
redirect: string;
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
"GET /apps": {
|
|
757
|
+
input: undefined;
|
|
758
|
+
output: {
|
|
759
|
+
apps: {
|
|
760
|
+
id: string;
|
|
761
|
+
name: string;
|
|
762
|
+
host: string | null;
|
|
763
|
+
registration: "cimd" | "dcr";
|
|
764
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
765
|
+
createdAt: string;
|
|
766
|
+
lastUsedAt: string | null;
|
|
767
|
+
lastUsedIp: string | null;
|
|
768
|
+
expiresAt: string;
|
|
769
|
+
}[];
|
|
770
|
+
};
|
|
771
|
+
};
|
|
772
|
+
"DELETE /apps/:id": {
|
|
773
|
+
input: undefined;
|
|
774
|
+
output: {
|
|
775
|
+
disconnected: true;
|
|
776
|
+
};
|
|
777
|
+
};
|
|
484
778
|
"GET /audit": {
|
|
485
779
|
input: {
|
|
486
780
|
path?: string;
|
|
@@ -565,11 +859,104 @@ type Api = {
|
|
|
565
859
|
};
|
|
566
860
|
};
|
|
567
861
|
};
|
|
862
|
+
"GET /approvals/:id": {
|
|
863
|
+
input: undefined;
|
|
864
|
+
output: {
|
|
865
|
+
approval: {
|
|
866
|
+
id: string;
|
|
867
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
868
|
+
client: {
|
|
869
|
+
name: string;
|
|
870
|
+
host: string | null;
|
|
871
|
+
registration: "cimd" | "dcr";
|
|
872
|
+
};
|
|
873
|
+
tool: string;
|
|
874
|
+
summary: string;
|
|
875
|
+
details: {
|
|
876
|
+
label: string;
|
|
877
|
+
value: string;
|
|
878
|
+
kind?: "mono" | "time";
|
|
879
|
+
}[];
|
|
880
|
+
asks: null | {
|
|
881
|
+
value: {
|
|
882
|
+
label: string;
|
|
883
|
+
note: string;
|
|
884
|
+
};
|
|
885
|
+
};
|
|
886
|
+
kind: "change" | "reveal";
|
|
887
|
+
digest: string;
|
|
888
|
+
createdAt: string;
|
|
889
|
+
expiresAt: string;
|
|
890
|
+
outcome: null | {
|
|
891
|
+
text: string;
|
|
892
|
+
result?: {
|
|
893
|
+
[key: string]: unknown;
|
|
894
|
+
};
|
|
895
|
+
error?: string;
|
|
896
|
+
};
|
|
897
|
+
};
|
|
898
|
+
};
|
|
899
|
+
};
|
|
900
|
+
"POST /approvals/:id": {
|
|
901
|
+
input: {
|
|
902
|
+
approve: boolean;
|
|
903
|
+
digest: string;
|
|
904
|
+
value?: string;
|
|
905
|
+
};
|
|
906
|
+
output: {
|
|
907
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
908
|
+
outcome: {
|
|
909
|
+
text: string;
|
|
910
|
+
result?: {
|
|
911
|
+
[key: string]: unknown;
|
|
912
|
+
};
|
|
913
|
+
error?: string;
|
|
914
|
+
};
|
|
915
|
+
shown: {
|
|
916
|
+
label: string;
|
|
917
|
+
value: string;
|
|
918
|
+
kind?: "mono" | "time";
|
|
919
|
+
}[];
|
|
920
|
+
};
|
|
921
|
+
};
|
|
568
922
|
};
|
|
569
923
|
type AccessValue = "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer" | null | {
|
|
570
924
|
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
571
925
|
until: string | null;
|
|
572
926
|
};
|
|
927
|
+
type ApprovalView = {
|
|
928
|
+
id: string;
|
|
929
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
930
|
+
client: {
|
|
931
|
+
name: string;
|
|
932
|
+
host: string | null;
|
|
933
|
+
registration: "cimd" | "dcr";
|
|
934
|
+
};
|
|
935
|
+
tool: string;
|
|
936
|
+
summary: string;
|
|
937
|
+
details: {
|
|
938
|
+
label: string;
|
|
939
|
+
value: string;
|
|
940
|
+
kind?: "mono" | "time";
|
|
941
|
+
}[];
|
|
942
|
+
asks: null | {
|
|
943
|
+
value: {
|
|
944
|
+
label: string;
|
|
945
|
+
note: string;
|
|
946
|
+
};
|
|
947
|
+
};
|
|
948
|
+
kind: "change" | "reveal";
|
|
949
|
+
digest: string;
|
|
950
|
+
createdAt: string;
|
|
951
|
+
expiresAt: string;
|
|
952
|
+
outcome: null | {
|
|
953
|
+
text: string;
|
|
954
|
+
result?: {
|
|
955
|
+
[key: string]: unknown;
|
|
956
|
+
};
|
|
957
|
+
error?: string;
|
|
958
|
+
};
|
|
959
|
+
};
|
|
573
960
|
type AuditEntryView = {
|
|
574
961
|
seq: number;
|
|
575
962
|
author: "app" | "vault";
|
|
@@ -612,6 +999,27 @@ type AuthInfo = {
|
|
|
612
999
|
assertion: boolean;
|
|
613
1000
|
};
|
|
614
1001
|
};
|
|
1002
|
+
type AuthorizationView = {
|
|
1003
|
+
status: "invalid";
|
|
1004
|
+
message: string;
|
|
1005
|
+
} | {
|
|
1006
|
+
status: "refused";
|
|
1007
|
+
message: string;
|
|
1008
|
+
redirect: string;
|
|
1009
|
+
} | {
|
|
1010
|
+
status: "ready";
|
|
1011
|
+
client: {
|
|
1012
|
+
id: string;
|
|
1013
|
+
name: string;
|
|
1014
|
+
host: string | null;
|
|
1015
|
+
registration: "cimd" | "dcr";
|
|
1016
|
+
};
|
|
1017
|
+
redirectHost: string;
|
|
1018
|
+
loopbackOnly: boolean;
|
|
1019
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
1020
|
+
connections: ("browse" | "manage-access" | "read-values" | "write")[][];
|
|
1021
|
+
days: number;
|
|
1022
|
+
};
|
|
615
1023
|
type BindingPlan = {
|
|
616
1024
|
profile: "custom" | "github" | "github-reusable" | "github-reusable-organization" | "gitlab";
|
|
617
1025
|
issuer: string;
|
|
@@ -637,6 +1045,69 @@ type BindingView = {
|
|
|
637
1045
|
createdBy: string;
|
|
638
1046
|
lastUsedAt: string | null;
|
|
639
1047
|
};
|
|
1048
|
+
type ConnectedApp = {
|
|
1049
|
+
id: string;
|
|
1050
|
+
name: string;
|
|
1051
|
+
host: string | null;
|
|
1052
|
+
registration: "cimd" | "dcr";
|
|
1053
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
1054
|
+
createdAt: string;
|
|
1055
|
+
lastUsedAt: string | null;
|
|
1056
|
+
lastUsedIp: string | null;
|
|
1057
|
+
expiresAt: string;
|
|
1058
|
+
};
|
|
1059
|
+
type Deletion = {
|
|
1060
|
+
path: string;
|
|
1061
|
+
tombstone: string;
|
|
1062
|
+
environments: string[];
|
|
1063
|
+
keys: number;
|
|
1064
|
+
versions: number;
|
|
1065
|
+
grants: {
|
|
1066
|
+
member: string;
|
|
1067
|
+
place: string;
|
|
1068
|
+
role: string;
|
|
1069
|
+
}[];
|
|
1070
|
+
references: {
|
|
1071
|
+
holder: string;
|
|
1072
|
+
source: string;
|
|
1073
|
+
}[];
|
|
1074
|
+
stranded: string[];
|
|
1075
|
+
};
|
|
1076
|
+
type Decision = {
|
|
1077
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
1078
|
+
outcome: {
|
|
1079
|
+
text: string;
|
|
1080
|
+
result?: {
|
|
1081
|
+
[key: string]: unknown;
|
|
1082
|
+
};
|
|
1083
|
+
error?: string;
|
|
1084
|
+
};
|
|
1085
|
+
shown: {
|
|
1086
|
+
label: string;
|
|
1087
|
+
value: string;
|
|
1088
|
+
kind?: "mono" | "time";
|
|
1089
|
+
}[];
|
|
1090
|
+
};
|
|
1091
|
+
type DeletionResult = {
|
|
1092
|
+
dryRun: boolean;
|
|
1093
|
+
deletion: {
|
|
1094
|
+
path: string;
|
|
1095
|
+
tombstone: string;
|
|
1096
|
+
environments: string[];
|
|
1097
|
+
keys: number;
|
|
1098
|
+
versions: number;
|
|
1099
|
+
grants: {
|
|
1100
|
+
member: string;
|
|
1101
|
+
place: string;
|
|
1102
|
+
role: string;
|
|
1103
|
+
}[];
|
|
1104
|
+
references: {
|
|
1105
|
+
holder: string;
|
|
1106
|
+
source: string;
|
|
1107
|
+
}[];
|
|
1108
|
+
stranded: string[];
|
|
1109
|
+
};
|
|
1110
|
+
};
|
|
640
1111
|
type WorkloadIds = {
|
|
641
1112
|
github: string;
|
|
642
1113
|
repositoryId: string;
|
|
@@ -646,6 +1117,13 @@ type WorkloadIds = {
|
|
|
646
1117
|
projectId: string;
|
|
647
1118
|
namespaceId: string;
|
|
648
1119
|
};
|
|
1120
|
+
type DismissedKey = {
|
|
1121
|
+
key: string;
|
|
1122
|
+
in: string[];
|
|
1123
|
+
folder: string | null;
|
|
1124
|
+
dismissedBy: string;
|
|
1125
|
+
dismissedAt: string;
|
|
1126
|
+
};
|
|
649
1127
|
type DryRunOutcome = "added" | "archived" | "changed" | "unchanged";
|
|
650
1128
|
type DryRunResult = {
|
|
651
1129
|
dryRun: true;
|
|
@@ -660,12 +1138,12 @@ type IdentityRow = {
|
|
|
660
1138
|
createdAt: string;
|
|
661
1139
|
lastSignInAt: string | null;
|
|
662
1140
|
};
|
|
663
|
-
type
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
1141
|
+
type InheritedGrant = {
|
|
1142
|
+
member: string;
|
|
1143
|
+
place: string;
|
|
1144
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1145
|
+
roleName: string;
|
|
1146
|
+
expiresAt: string | null;
|
|
669
1147
|
};
|
|
670
1148
|
type Me = {
|
|
671
1149
|
principal: {
|
|
@@ -677,18 +1155,15 @@ type Me = {
|
|
|
677
1155
|
instanceRole: "owner" | "root-admin" | "user";
|
|
678
1156
|
isRootAdmin: boolean;
|
|
679
1157
|
canReadAudit: boolean;
|
|
1158
|
+
features: {
|
|
1159
|
+
mcp: boolean;
|
|
1160
|
+
workloads: boolean;
|
|
1161
|
+
};
|
|
680
1162
|
environments: {
|
|
681
1163
|
project: string;
|
|
682
1164
|
environment: string;
|
|
683
1165
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
684
1166
|
}[];
|
|
685
|
-
instance: null | {
|
|
686
|
-
version: string;
|
|
687
|
-
migrations: {
|
|
688
|
-
applied: number;
|
|
689
|
-
known: string[];
|
|
690
|
-
};
|
|
691
|
-
};
|
|
692
1167
|
};
|
|
693
1168
|
type Member = {
|
|
694
1169
|
member: string;
|
|
@@ -707,6 +1182,11 @@ type Member = {
|
|
|
707
1182
|
expiresAt: string | null;
|
|
708
1183
|
}[];
|
|
709
1184
|
};
|
|
1185
|
+
type MissingKey = {
|
|
1186
|
+
key: string;
|
|
1187
|
+
in: string[];
|
|
1188
|
+
folder: string | null;
|
|
1189
|
+
};
|
|
710
1190
|
type OffboardingReport = {
|
|
711
1191
|
principalType: "service" | "user";
|
|
712
1192
|
principalId: string;
|
|
@@ -738,11 +1218,37 @@ type OffboardingReport = {
|
|
|
738
1218
|
expiresAt: string;
|
|
739
1219
|
lastUsedAt: string | null;
|
|
740
1220
|
}[];
|
|
1221
|
+
references: {
|
|
1222
|
+
id: string;
|
|
1223
|
+
holder: string;
|
|
1224
|
+
source: string;
|
|
1225
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1226
|
+
version: number | null;
|
|
1227
|
+
createdBy: string;
|
|
1228
|
+
createdAt: string;
|
|
1229
|
+
endedBy: string | null;
|
|
1230
|
+
endedAt: string | null;
|
|
1231
|
+
}[];
|
|
1232
|
+
};
|
|
1233
|
+
type ListedReference = {
|
|
1234
|
+
id: string;
|
|
1235
|
+
holder: string;
|
|
1236
|
+
source: string;
|
|
1237
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1238
|
+
version: number | null;
|
|
1239
|
+
createdBy: string;
|
|
1240
|
+
createdAt: string;
|
|
1241
|
+
endedBy: string | null;
|
|
1242
|
+
endedAt: string | null;
|
|
1243
|
+
readers: null | string[];
|
|
1244
|
+
canBreak: boolean;
|
|
1245
|
+
holderArchived: boolean;
|
|
741
1246
|
};
|
|
742
1247
|
type ProjectSummary = {
|
|
743
1248
|
slug: string;
|
|
744
1249
|
name: string;
|
|
745
1250
|
archivedAt: string | null;
|
|
1251
|
+
folder: string | null;
|
|
746
1252
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
747
1253
|
environments: {
|
|
748
1254
|
slug: string;
|
|
@@ -755,6 +1261,17 @@ type ProjectSummary = {
|
|
|
755
1261
|
}[];
|
|
756
1262
|
secretCount: number | null;
|
|
757
1263
|
};
|
|
1264
|
+
type ReferenceView = {
|
|
1265
|
+
id: string;
|
|
1266
|
+
holder: string;
|
|
1267
|
+
source: string;
|
|
1268
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1269
|
+
version: number | null;
|
|
1270
|
+
createdBy: string;
|
|
1271
|
+
createdAt: string;
|
|
1272
|
+
endedBy: string | null;
|
|
1273
|
+
endedAt: string | null;
|
|
1274
|
+
};
|
|
758
1275
|
type RemovedMember = {
|
|
759
1276
|
principalType: "service" | "user";
|
|
760
1277
|
principalId: string;
|
|
@@ -762,6 +1279,19 @@ type RemovedMember = {
|
|
|
762
1279
|
};
|
|
763
1280
|
type SecretKey = {
|
|
764
1281
|
key: string;
|
|
1282
|
+
reference: null | {
|
|
1283
|
+
id: string;
|
|
1284
|
+
holder: string;
|
|
1285
|
+
source: string;
|
|
1286
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1287
|
+
version: number | null;
|
|
1288
|
+
createdBy: string;
|
|
1289
|
+
createdAt: string;
|
|
1290
|
+
endedBy: string | null;
|
|
1291
|
+
endedAt: string | null;
|
|
1292
|
+
canOpenSource: boolean;
|
|
1293
|
+
};
|
|
1294
|
+
folder: string | null;
|
|
765
1295
|
archived: boolean;
|
|
766
1296
|
version: number | null;
|
|
767
1297
|
updatedAt: string | null;
|
|
@@ -803,10 +1333,42 @@ type SetResult = {
|
|
|
803
1333
|
version: number;
|
|
804
1334
|
} | {
|
|
805
1335
|
archived: true;
|
|
1336
|
+
} | {
|
|
1337
|
+
reference: string;
|
|
806
1338
|
};
|
|
807
1339
|
};
|
|
808
1340
|
};
|
|
809
1341
|
//#endregion
|
|
1342
|
+
//#region src/folders.d.ts
|
|
1343
|
+
/**
|
|
1344
|
+
* Rows grouped by folder, as every list shows them: those in no folder
|
|
1345
|
+
* first, then each folder by name, each keeping the order it was given. A
|
|
1346
|
+
* folder only arranges a list (docs/design/environments.md).
|
|
1347
|
+
*/
|
|
1348
|
+
declare function byFolder<T extends {
|
|
1349
|
+
folder: string | null;
|
|
1350
|
+
}>(rows: readonly T[]): [string | null, T[]][];
|
|
1351
|
+
/** The folders in use among `rows`, by name. */
|
|
1352
|
+
declare function foldersOf(rows: readonly {
|
|
1353
|
+
folder: string | null;
|
|
1354
|
+
}[]): string[];
|
|
1355
|
+
//#endregion
|
|
1356
|
+
//#region src/members.d.ts
|
|
1357
|
+
/**
|
|
1358
|
+
* How members are named, to people and to the API. A service account, a
|
|
1359
|
+
* machine identity that signs in by OIDC (trust bindings) or with bearer
|
|
1360
|
+
* tokens, is `service:<name>` wherever a person reads or types one. The
|
|
1361
|
+
* API, the vault and the audit log keep `token:<name>`, which the log's
|
|
1362
|
+
* signed entries hold: so the rename is here, at the edges, and nothing
|
|
1363
|
+
* stored or verified changes.
|
|
1364
|
+
*/
|
|
1365
|
+
/** A member as people read it: `service:deploy` for the API's `token:deploy`; anyone else as they are. */
|
|
1366
|
+
declare function shownMember(member: string): string;
|
|
1367
|
+
/** A member as the API takes it, from what a person typed: `service:deploy` and `token:deploy` alike name a service account. */
|
|
1368
|
+
declare function apiMember(member: string): string;
|
|
1369
|
+
/** A service account's name alone, from any of its forms: `deploy`, `service:deploy` or `token:deploy`. */
|
|
1370
|
+
declare function serviceName(member: string): string;
|
|
1371
|
+
//#endregion
|
|
810
1372
|
//#region src/index.d.ts
|
|
811
1373
|
type RouteKey = keyof Api;
|
|
812
1374
|
/** What a caller sends: the body, or the query string for a GET. */
|
|
@@ -848,18 +1410,15 @@ declare function createClient(options: ClientOptions): {
|
|
|
848
1410
|
instanceRole: "owner" | "root-admin" | "user";
|
|
849
1411
|
isRootAdmin: boolean;
|
|
850
1412
|
canReadAudit: boolean;
|
|
1413
|
+
features: {
|
|
1414
|
+
mcp: boolean;
|
|
1415
|
+
workloads: boolean;
|
|
1416
|
+
};
|
|
851
1417
|
environments: {
|
|
852
1418
|
project: string;
|
|
853
1419
|
environment: string;
|
|
854
1420
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
855
1421
|
}[];
|
|
856
|
-
instance: null | {
|
|
857
|
-
version: string;
|
|
858
|
-
migrations: {
|
|
859
|
-
applied: number;
|
|
860
|
-
known: string[];
|
|
861
|
-
};
|
|
862
|
-
};
|
|
863
1422
|
}>;
|
|
864
1423
|
projects: {
|
|
865
1424
|
/** With their environments. */
|
|
@@ -868,6 +1427,7 @@ declare function createClient(options: ClientOptions): {
|
|
|
868
1427
|
slug: string;
|
|
869
1428
|
name: string;
|
|
870
1429
|
archivedAt: string | null;
|
|
1430
|
+
folder: string | null;
|
|
871
1431
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
872
1432
|
environments: {
|
|
873
1433
|
slug: string;
|
|
@@ -880,6 +1440,13 @@ declare function createClient(options: ClientOptions): {
|
|
|
880
1440
|
}[];
|
|
881
1441
|
secretCount: number | null;
|
|
882
1442
|
}[];
|
|
1443
|
+
everyProject: {
|
|
1444
|
+
member: string;
|
|
1445
|
+
place: string;
|
|
1446
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1447
|
+
roleName: string;
|
|
1448
|
+
expiresAt: string | null;
|
|
1449
|
+
}[];
|
|
883
1450
|
}>;
|
|
884
1451
|
create: (project: string, input: RouteInput<"PUT /projects/:project">) => Promise<{
|
|
885
1452
|
project: {
|
|
@@ -888,12 +1455,43 @@ declare function createClient(options: ClientOptions): {
|
|
|
888
1455
|
archivedAt: string | null;
|
|
889
1456
|
};
|
|
890
1457
|
created: boolean;
|
|
1458
|
+
inherited: {
|
|
1459
|
+
member: string;
|
|
1460
|
+
place: string;
|
|
1461
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1462
|
+
roleName: string;
|
|
1463
|
+
expiresAt: string | null;
|
|
1464
|
+
}[];
|
|
891
1465
|
}>;
|
|
892
1466
|
update: (project: string, patch: RouteInput<"PATCH /projects/:project">) => Promise<{
|
|
893
1467
|
project: {
|
|
894
1468
|
slug: string;
|
|
895
1469
|
name: string;
|
|
896
1470
|
archivedAt: string | null;
|
|
1471
|
+
folder: string | null;
|
|
1472
|
+
};
|
|
1473
|
+
}>;
|
|
1474
|
+
/** What deleting an archived project would erase and revoke; changes nothing. */
|
|
1475
|
+
previewDelete: (project: string) => Promise<DeletionResult>;
|
|
1476
|
+
/** Delete an archived project for good: its values erased, its grants revoked, its slug free. Owners only. */
|
|
1477
|
+
delete: (project: string) => Promise<{
|
|
1478
|
+
dryRun: boolean;
|
|
1479
|
+
deletion: {
|
|
1480
|
+
path: string;
|
|
1481
|
+
tombstone: string;
|
|
1482
|
+
environments: string[];
|
|
1483
|
+
keys: number;
|
|
1484
|
+
versions: number;
|
|
1485
|
+
grants: {
|
|
1486
|
+
member: string;
|
|
1487
|
+
place: string;
|
|
1488
|
+
role: string;
|
|
1489
|
+
}[];
|
|
1490
|
+
references: {
|
|
1491
|
+
holder: string;
|
|
1492
|
+
source: string;
|
|
1493
|
+
}[];
|
|
1494
|
+
stranded: string[];
|
|
897
1495
|
};
|
|
898
1496
|
}>;
|
|
899
1497
|
};
|
|
@@ -905,6 +1503,19 @@ declare function createClient(options: ClientOptions): {
|
|
|
905
1503
|
archivedAt: string | null;
|
|
906
1504
|
};
|
|
907
1505
|
created: boolean;
|
|
1506
|
+
inherited: {
|
|
1507
|
+
member: string;
|
|
1508
|
+
place: string;
|
|
1509
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1510
|
+
roleName: string;
|
|
1511
|
+
expiresAt: string | null;
|
|
1512
|
+
}[];
|
|
1513
|
+
forked: null | {
|
|
1514
|
+
from: string;
|
|
1515
|
+
keys: number;
|
|
1516
|
+
references: number;
|
|
1517
|
+
copied: string[];
|
|
1518
|
+
};
|
|
908
1519
|
}>;
|
|
909
1520
|
update: (path: string, patch: RouteInput<"PATCH /projects/:project/:environment">) => Promise<{
|
|
910
1521
|
environment: {
|
|
@@ -912,6 +1523,58 @@ declare function createClient(options: ClientOptions): {
|
|
|
912
1523
|
name: string;
|
|
913
1524
|
archivedAt: string | null;
|
|
914
1525
|
};
|
|
1526
|
+
inherited: {
|
|
1527
|
+
member: string;
|
|
1528
|
+
place: string;
|
|
1529
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
1530
|
+
roleName: string;
|
|
1531
|
+
expiresAt: string | null;
|
|
1532
|
+
}[];
|
|
1533
|
+
}>;
|
|
1534
|
+
/** What deleting an archived environment would erase and revoke; changes nothing. */
|
|
1535
|
+
previewDelete: (path: string) => Promise<DeletionResult>;
|
|
1536
|
+
/** Delete an archived environment for good, as a project is. Owners only. */
|
|
1537
|
+
delete: (path: string) => Promise<{
|
|
1538
|
+
dryRun: boolean;
|
|
1539
|
+
deletion: {
|
|
1540
|
+
path: string;
|
|
1541
|
+
tombstone: string;
|
|
1542
|
+
environments: string[];
|
|
1543
|
+
keys: number;
|
|
1544
|
+
versions: number;
|
|
1545
|
+
grants: {
|
|
1546
|
+
member: string;
|
|
1547
|
+
place: string;
|
|
1548
|
+
role: string;
|
|
1549
|
+
}[];
|
|
1550
|
+
references: {
|
|
1551
|
+
holder: string;
|
|
1552
|
+
source: string;
|
|
1553
|
+
}[];
|
|
1554
|
+
stranded: string[];
|
|
1555
|
+
};
|
|
1556
|
+
}>;
|
|
1557
|
+
/** The keys its sibling environments have and it lacks, those you can see, and those its team dismissed. */
|
|
1558
|
+
missing: (path: string) => Promise<{
|
|
1559
|
+
missing: {
|
|
1560
|
+
key: string;
|
|
1561
|
+
in: string[];
|
|
1562
|
+
folder: string | null;
|
|
1563
|
+
}[];
|
|
1564
|
+
dismissed: {
|
|
1565
|
+
key: string;
|
|
1566
|
+
in: string[];
|
|
1567
|
+
folder: string | null;
|
|
1568
|
+
dismissedBy: string;
|
|
1569
|
+
dismissedAt: string;
|
|
1570
|
+
}[];
|
|
1571
|
+
}>;
|
|
1572
|
+
/** Dismiss missing keys (`true`) or restore them (`null`). */
|
|
1573
|
+
dismiss: (path: string, patch: RouteInput<"PATCH /projects/:project/:environment/dismissals">) => Promise<{
|
|
1574
|
+
operationId: string;
|
|
1575
|
+
keys: {
|
|
1576
|
+
[key: string]: "dismissed" | "restored" | "unchanged";
|
|
1577
|
+
};
|
|
915
1578
|
}>;
|
|
916
1579
|
};
|
|
917
1580
|
secrets: {
|
|
@@ -920,6 +1583,19 @@ declare function createClient(options: ClientOptions): {
|
|
|
920
1583
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
921
1584
|
keys: {
|
|
922
1585
|
key: string;
|
|
1586
|
+
reference: null | {
|
|
1587
|
+
id: string;
|
|
1588
|
+
holder: string;
|
|
1589
|
+
source: string;
|
|
1590
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1591
|
+
version: number | null;
|
|
1592
|
+
createdBy: string;
|
|
1593
|
+
createdAt: string;
|
|
1594
|
+
endedBy: string | null;
|
|
1595
|
+
endedAt: string | null;
|
|
1596
|
+
canOpenSource: boolean;
|
|
1597
|
+
};
|
|
1598
|
+
folder: string | null;
|
|
923
1599
|
archived: boolean;
|
|
924
1600
|
version: number | null;
|
|
925
1601
|
updatedAt: string | null;
|
|
@@ -960,10 +1636,49 @@ declare function createClient(options: ClientOptions): {
|
|
|
960
1636
|
rename: (path: string, key: string) => Promise<{
|
|
961
1637
|
key: string;
|
|
962
1638
|
archived: boolean;
|
|
1639
|
+
folder: string | null;
|
|
963
1640
|
}>;
|
|
964
1641
|
update: (path: string, patch: RouteInput<"PATCH /secrets/:project/:environment/:key">) => Promise<{
|
|
965
1642
|
key: string;
|
|
966
1643
|
archived: boolean;
|
|
1644
|
+
folder: string | null;
|
|
1645
|
+
}>;
|
|
1646
|
+
};
|
|
1647
|
+
/**
|
|
1648
|
+
* References: secrets read through others (docs/design/environments.md).
|
|
1649
|
+
* A key becomes one with `secrets.set(path, { KEY: { ref: 'market/prod/KEY' } })`.
|
|
1650
|
+
*/
|
|
1651
|
+
references: {
|
|
1652
|
+
/** The live references into and out of a place, `market`, `market/prod` or `market/prod/KEY`, and who reads through them. */
|
|
1653
|
+
list: (path: string) => Promise<{
|
|
1654
|
+
references: {
|
|
1655
|
+
id: string;
|
|
1656
|
+
holder: string;
|
|
1657
|
+
source: string;
|
|
1658
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1659
|
+
version: number | null;
|
|
1660
|
+
createdBy: string;
|
|
1661
|
+
createdAt: string;
|
|
1662
|
+
endedBy: string | null;
|
|
1663
|
+
endedAt: string | null;
|
|
1664
|
+
readers: null | string[];
|
|
1665
|
+
canBreak: boolean;
|
|
1666
|
+
holderArchived: boolean;
|
|
1667
|
+
}[];
|
|
1668
|
+
}>;
|
|
1669
|
+
/** Break the reference a secret is: its readers stop reading the source through it. */
|
|
1670
|
+
break: (path: string) => Promise<{
|
|
1671
|
+
reference: {
|
|
1672
|
+
id: string;
|
|
1673
|
+
holder: string;
|
|
1674
|
+
source: string;
|
|
1675
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1676
|
+
version: number | null;
|
|
1677
|
+
createdBy: string;
|
|
1678
|
+
createdAt: string;
|
|
1679
|
+
endedBy: string | null;
|
|
1680
|
+
endedAt: string | null;
|
|
1681
|
+
};
|
|
967
1682
|
}>;
|
|
968
1683
|
};
|
|
969
1684
|
members: {
|
|
@@ -1024,6 +1739,17 @@ declare function createClient(options: ClientOptions): {
|
|
|
1024
1739
|
expiresAt: string;
|
|
1025
1740
|
lastUsedAt: string | null;
|
|
1026
1741
|
}[];
|
|
1742
|
+
references: {
|
|
1743
|
+
id: string;
|
|
1744
|
+
holder: string;
|
|
1745
|
+
source: string;
|
|
1746
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1747
|
+
version: number | null;
|
|
1748
|
+
createdBy: string;
|
|
1749
|
+
createdAt: string;
|
|
1750
|
+
endedBy: string | null;
|
|
1751
|
+
endedAt: string | null;
|
|
1752
|
+
}[];
|
|
1027
1753
|
}>;
|
|
1028
1754
|
add: (member: string, input?: RouteInput<"PUT /members/:member">) => Promise<{
|
|
1029
1755
|
member: string;
|
|
@@ -1069,6 +1795,17 @@ declare function createClient(options: ClientOptions): {
|
|
|
1069
1795
|
expiresAt: string;
|
|
1070
1796
|
lastUsedAt: string | null;
|
|
1071
1797
|
}[];
|
|
1798
|
+
references: {
|
|
1799
|
+
id: string;
|
|
1800
|
+
holder: string;
|
|
1801
|
+
source: string;
|
|
1802
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
1803
|
+
version: number | null;
|
|
1804
|
+
createdBy: string;
|
|
1805
|
+
createdAt: string;
|
|
1806
|
+
endedBy: string | null;
|
|
1807
|
+
endedAt: string | null;
|
|
1808
|
+
}[];
|
|
1072
1809
|
};
|
|
1073
1810
|
}>;
|
|
1074
1811
|
};
|
|
@@ -1191,6 +1928,137 @@ declare function createClient(options: ClientOptions): {
|
|
|
1191
1928
|
decided: true;
|
|
1192
1929
|
}>;
|
|
1193
1930
|
};
|
|
1931
|
+
/**
|
|
1932
|
+
* Folders, which arrange lists and do nothing else: a folder exists while
|
|
1933
|
+
* something is filed in it. Renaming one re-files all of it, onto a folder
|
|
1934
|
+
* that exists merges the two; removing one takes all of it out, each item
|
|
1935
|
+
* staying where it is, in no folder. Moving one item is `projects.update`
|
|
1936
|
+
* or `secrets.update` with a `folder`.
|
|
1937
|
+
*/
|
|
1938
|
+
folders: {
|
|
1939
|
+
/** A folder of projects, renamed. Takes managing every project in it. */
|
|
1940
|
+
rename: (folder: string, name: string) => Promise<{
|
|
1941
|
+
folder: string | null;
|
|
1942
|
+
moved: string[];
|
|
1943
|
+
}>;
|
|
1944
|
+
/** Every project out of a folder. */
|
|
1945
|
+
remove: (folder: string) => Promise<{
|
|
1946
|
+
folder: string | null;
|
|
1947
|
+
moved: string[];
|
|
1948
|
+
}>;
|
|
1949
|
+
/** One of an environment's key folders, `market/prod`, renamed. Takes writing there. */
|
|
1950
|
+
renameKeys: (environment: string, folder: string, name: string) => Promise<{
|
|
1951
|
+
folder: string | null;
|
|
1952
|
+
moved: string[];
|
|
1953
|
+
}>;
|
|
1954
|
+
/** Every key out of one of an environment's folders. */
|
|
1955
|
+
removeKeys: (environment: string, folder: string) => Promise<{
|
|
1956
|
+
folder: string | null;
|
|
1957
|
+
moved: string[];
|
|
1958
|
+
}>;
|
|
1959
|
+
};
|
|
1960
|
+
/**
|
|
1961
|
+
* An MCP client asking to connect, by its authorization request, and the
|
|
1962
|
+
* person's answer: where to send the browser next.
|
|
1963
|
+
*/
|
|
1964
|
+
oauth: {
|
|
1965
|
+
describe: (request: RouteInput<"GET /oauth/authorizations">) => Promise<{
|
|
1966
|
+
status: "invalid";
|
|
1967
|
+
message: string;
|
|
1968
|
+
} | {
|
|
1969
|
+
status: "refused";
|
|
1970
|
+
message: string;
|
|
1971
|
+
redirect: string;
|
|
1972
|
+
} | {
|
|
1973
|
+
status: "ready";
|
|
1974
|
+
client: {
|
|
1975
|
+
id: string;
|
|
1976
|
+
name: string;
|
|
1977
|
+
host: string | null;
|
|
1978
|
+
registration: "cimd" | "dcr";
|
|
1979
|
+
};
|
|
1980
|
+
redirectHost: string;
|
|
1981
|
+
loopbackOnly: boolean;
|
|
1982
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
1983
|
+
connections: ("browse" | "manage-access" | "read-values" | "write")[][];
|
|
1984
|
+
days: number;
|
|
1985
|
+
}>;
|
|
1986
|
+
decide: (input: RouteInput<"POST /oauth/authorizations">) => Promise<{
|
|
1987
|
+
redirect: string;
|
|
1988
|
+
}>;
|
|
1989
|
+
};
|
|
1990
|
+
/** The MCP clients I connected. */
|
|
1991
|
+
/** A change an MCP client asked for: what it would do, and the person's decision, which makes it. */
|
|
1992
|
+
approvals: {
|
|
1993
|
+
get: (id: string) => Promise<{
|
|
1994
|
+
approval: {
|
|
1995
|
+
id: string;
|
|
1996
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
1997
|
+
client: {
|
|
1998
|
+
name: string;
|
|
1999
|
+
host: string | null;
|
|
2000
|
+
registration: "cimd" | "dcr";
|
|
2001
|
+
};
|
|
2002
|
+
tool: string;
|
|
2003
|
+
summary: string;
|
|
2004
|
+
details: {
|
|
2005
|
+
label: string;
|
|
2006
|
+
value: string;
|
|
2007
|
+
kind?: "mono" | "time";
|
|
2008
|
+
}[];
|
|
2009
|
+
asks: null | {
|
|
2010
|
+
value: {
|
|
2011
|
+
label: string;
|
|
2012
|
+
note: string;
|
|
2013
|
+
};
|
|
2014
|
+
};
|
|
2015
|
+
kind: "change" | "reveal";
|
|
2016
|
+
digest: string;
|
|
2017
|
+
createdAt: string;
|
|
2018
|
+
expiresAt: string;
|
|
2019
|
+
outcome: null | {
|
|
2020
|
+
text: string;
|
|
2021
|
+
result?: {
|
|
2022
|
+
[key: string]: unknown;
|
|
2023
|
+
};
|
|
2024
|
+
error?: string;
|
|
2025
|
+
};
|
|
2026
|
+
};
|
|
2027
|
+
}>;
|
|
2028
|
+
decide: (id: string, input: RouteInput<"POST /approvals/:id">) => Promise<{
|
|
2029
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
2030
|
+
outcome: {
|
|
2031
|
+
text: string;
|
|
2032
|
+
result?: {
|
|
2033
|
+
[key: string]: unknown;
|
|
2034
|
+
};
|
|
2035
|
+
error?: string;
|
|
2036
|
+
};
|
|
2037
|
+
shown: {
|
|
2038
|
+
label: string;
|
|
2039
|
+
value: string;
|
|
2040
|
+
kind?: "mono" | "time";
|
|
2041
|
+
}[];
|
|
2042
|
+
}>;
|
|
2043
|
+
};
|
|
2044
|
+
apps: {
|
|
2045
|
+
list: () => Promise<{
|
|
2046
|
+
apps: {
|
|
2047
|
+
id: string;
|
|
2048
|
+
name: string;
|
|
2049
|
+
host: string | null;
|
|
2050
|
+
registration: "cimd" | "dcr";
|
|
2051
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
2052
|
+
createdAt: string;
|
|
2053
|
+
lastUsedAt: string | null;
|
|
2054
|
+
lastUsedIp: string | null;
|
|
2055
|
+
expiresAt: string;
|
|
2056
|
+
}[];
|
|
2057
|
+
}>;
|
|
2058
|
+
disconnect: (id: string) => Promise<{
|
|
2059
|
+
disconnected: true;
|
|
2060
|
+
}>;
|
|
2061
|
+
};
|
|
1194
2062
|
audit: {
|
|
1195
2063
|
list: (query?: RouteInput<"GET /audit">) => Promise<{
|
|
1196
2064
|
entries: {
|
|
@@ -1284,4 +2152,4 @@ declare function planImport(coffre: CoffreClient, path: string, entries: readonl
|
|
|
1284
2152
|
changes: Record<string, string>;
|
|
1285
2153
|
}>;
|
|
1286
2154
|
//#endregion
|
|
1287
|
-
export {
|
|
2155
|
+
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 };
|