@coffre/ui 0.2.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/chunks/audit-sentence-BhHmvQX_.js +660 -0
- package/dist/chunks/audit-sentence-BhHmvQX_.js.map +1 -0
- package/dist/chunks/delete-place-CRX7ntE8.js +206 -0
- package/dist/chunks/delete-place-CRX7ntE8.js.map +1 -0
- package/dist/chunks/{directory-CSjWWUQ1.js → directory-zr3ek7Mc.js} +175 -60
- package/dist/chunks/directory-zr3ek7Mc.js.map +1 -0
- package/dist/chunks/folders-DoBmCwOi.js +207 -0
- package/dist/chunks/folders-DoBmCwOi.js.map +1 -0
- package/dist/chunks/grants-Cw1FyGID.js +669 -0
- package/dist/chunks/grants-Cw1FyGID.js.map +1 -0
- package/dist/chunks/offboarding-CE6d7um1.js +305 -0
- package/dist/chunks/offboarding-CE6d7um1.js.map +1 -0
- package/dist/chunks/one-time-DXEl9hbg.js +35 -0
- package/dist/chunks/one-time-DXEl9hbg.js.map +1 -0
- package/dist/chunks/page-DvsgZ2Hd.js +391 -0
- package/dist/chunks/page-DvsgZ2Hd.js.map +1 -0
- package/dist/chunks/principal-BIN-xwZw.js +42 -0
- package/dist/chunks/principal-BIN-xwZw.js.map +1 -0
- package/dist/chunks/{principal-page-D_91OA0l.js → principal-page-DhjO76GH.js} +245 -251
- package/dist/chunks/principal-page-DhjO76GH.js.map +1 -0
- package/dist/chunks/project-page-SRCtRe2g.js +17 -0
- package/dist/chunks/project-page-SRCtRe2g.js.map +1 -0
- package/dist/chunks/{queries-CQ81o4so.js → queries-DVR_i3rA.js} +132 -30
- package/dist/chunks/queries-DVR_i3rA.js.map +1 -0
- package/dist/chunks/references-B6pLT1uQ.js +343 -0
- package/dist/chunks/references-B6pLT1uQ.js.map +1 -0
- package/dist/chunks/{row-state-0PsrEzOL.js → row-state-DOPUsjQK.js} +3 -3
- package/dist/chunks/{row-state-0PsrEzOL.js.map → row-state-DOPUsjQK.js.map} +1 -1
- package/dist/chunks/signin-errors--ykMFuqN.js +57 -0
- package/dist/chunks/signin-errors--ykMFuqN.js.map +1 -0
- package/dist/chunks/tabs-BmwKfUeK.js +22 -0
- package/dist/chunks/tabs-BmwKfUeK.js.map +1 -0
- package/dist/chunks/{theme-B2vQolVR.js → theme-DJuz-xLM.js} +3 -3
- package/dist/chunks/{theme-B2vQolVR.js.map → theme-DJuz-xLM.js.map} +1 -1
- package/dist/chunks/{ui-DixXLQvQ.js → ui-DJje3gST.js} +6 -3
- package/dist/chunks/ui-DJje3gST.js.map +1 -0
- package/dist/chunks/{use-change-c6CeLRin.js → use-change-DUiGO19U.js} +52 -21
- package/dist/chunks/use-change-DUiGO19U.js.map +1 -0
- package/dist/chunks/{use-shell-jxd7Tzd-.js → use-shell-rNKfGjdj.js} +3 -3
- package/dist/chunks/{use-shell-jxd7Tzd-.js.map → use-shell-rNKfGjdj.js.map} +1 -1
- package/dist/chunks/validation-D312_NLf.js +87 -0
- package/dist/chunks/validation-D312_NLf.js.map +1 -0
- package/dist/index.d.ts +361 -27
- package/dist/index.js +188 -98
- package/dist/index.js.map +1 -1
- package/dist/pages/account.d.ts +2 -2
- package/dist/pages/account.js +297 -135
- package/dist/pages/account.js.map +1 -1
- package/dist/pages/approval.d.ts +9 -0
- package/dist/pages/approval.js +207 -0
- package/dist/pages/approval.js.map +1 -0
- package/dist/pages/audit.js +17 -542
- package/dist/pages/audit.js.map +1 -1
- package/dist/pages/device-login.js +2 -3
- package/dist/pages/device-login.js.map +1 -1
- package/dist/pages/environment.js +647 -257
- package/dist/pages/environment.js.map +1 -1
- package/dist/pages/login.js +18 -7
- package/dist/pages/login.js.map +1 -1
- package/dist/pages/oauth-authorize.d.ts +10 -0
- package/dist/pages/oauth-authorize.js +249 -0
- package/dist/pages/oauth-authorize.js.map +1 -0
- package/dist/pages/project-access.d.ts +6 -0
- package/dist/pages/project-access.js +370 -0
- package/dist/pages/project-access.js.map +1 -0
- package/dist/pages/project-environments.d.ts +4 -0
- package/dist/pages/project-environments.js +593 -0
- package/dist/pages/project-environments.js.map +1 -0
- package/dist/pages/project-settings.d.ts +4 -0
- package/dist/pages/project-settings.js +242 -0
- package/dist/pages/project-settings.js.map +1 -0
- package/dist/pages/project.d.ts +10 -2
- package/dist/pages/project.js +57 -934
- package/dist/pages/project.js.map +1 -1
- package/dist/pages/projects.js +53 -21
- package/dist/pages/projects.js.map +1 -1
- package/dist/pages/service-account.d.ts +10 -0
- package/dist/pages/{token.js → service-account.js} +115 -56
- package/dist/pages/service-account.js.map +1 -0
- package/dist/pages/service-accounts.d.ts +3 -0
- package/dist/pages/service-accounts.js +38 -0
- package/dist/pages/service-accounts.js.map +1 -0
- package/dist/pages/settings.d.ts +1 -0
- package/dist/pages/settings.js +104 -42
- package/dist/pages/settings.js.map +1 -1
- package/dist/pages/unregistered.js +2 -3
- package/dist/pages/unregistered.js.map +1 -1
- package/dist/pages/user.d.ts +6 -1
- package/dist/pages/user.js +18 -6
- package/dist/pages/user.js.map +1 -1
- package/dist/pages/users.js +6 -10
- package/dist/pages/users.js.map +1 -1
- package/package.json +3 -3
- package/src/components/actions-log.tsx +117 -0
- package/src/components/audit-sentence.tsx +55 -0
- package/src/components/command-palette.tsx +4 -4
- package/src/components/delete-place.tsx +180 -0
- package/src/components/directory.tsx +259 -110
- package/src/components/every-project.tsx +287 -0
- package/src/components/expiry-field.tsx +42 -0
- package/src/components/folders.tsx +219 -0
- package/src/components/grants.tsx +11 -4
- package/src/components/icons.tsx +2 -0
- package/src/components/missing.tsx +110 -0
- package/src/components/offboarding.tsx +61 -33
- package/src/components/page.tsx +4 -1
- package/src/components/principal-page.tsx +136 -106
- package/src/components/principal-picker.tsx +5 -5
- package/src/components/principal.tsx +4 -4
- package/src/components/references.tsx +323 -0
- package/src/components/service-tokens.tsx +115 -95
- package/src/components/shell.tsx +11 -32
- package/src/components/tabs.tsx +18 -0
- package/src/components/trusted-workloads.tsx +97 -79
- package/src/components/ui.tsx +8 -1
- package/src/index.ts +13 -2
- package/src/layout.tsx +2 -2
- package/src/lib/access-plan.ts +2 -2
- package/src/lib/audit-sentences.ts +161 -77
- package/src/lib/changes.ts +56 -5
- package/src/lib/coffre.ts +3 -2
- package/src/lib/one-time.ts +32 -0
- package/src/lib/project-access.ts +11 -23
- package/src/lib/project-page.ts +14 -0
- package/src/lib/queries.ts +126 -32
- package/src/lib/search.ts +25 -0
- package/src/lib/signin-errors.ts +45 -1
- package/src/lib/validation.ts +14 -0
- package/src/options.ts +187 -35
- package/src/pages/account.tsx +274 -129
- package/src/pages/approval.tsx +197 -0
- package/src/pages/audit.tsx +9 -61
- package/src/pages/environment.tsx +585 -286
- package/src/pages/login.tsx +8 -2
- package/src/pages/oauth-authorize.tsx +233 -0
- package/src/pages/project-access.tsx +219 -0
- package/src/pages/project-environments.tsx +582 -0
- package/src/pages/project-settings.tsx +259 -0
- package/src/pages/project.tsx +52 -879
- package/src/pages/projects.tsx +55 -18
- package/src/pages/service-account.tsx +50 -0
- package/src/pages/{tokens.tsx → service-accounts.tsx} +9 -6
- package/src/pages/settings.tsx +62 -8
- package/src/pages/user.tsx +16 -4
- package/src/pages/users.tsx +2 -2
- package/src/parity.ts +160 -0
- package/src/register.ts +58 -9
- package/src/router.tsx +4 -0
- package/src/shared/models.ts +6 -2
- package/src/styles/globals.css +536 -31
- package/dist/chunks/directory-CSjWWUQ1.js.map +0 -1
- package/dist/chunks/grants-saMQagmG.js +0 -160
- package/dist/chunks/grants-saMQagmG.js.map +0 -1
- package/dist/chunks/icons-D-PfAfnH.js +0 -203
- package/dist/chunks/icons-D-PfAfnH.js.map +0 -1
- package/dist/chunks/offboarding-C6l30DZR.js +0 -263
- package/dist/chunks/offboarding-C6l30DZR.js.map +0 -1
- package/dist/chunks/page-C5HcNqf2.js +0 -190
- package/dist/chunks/page-C5HcNqf2.js.map +0 -1
- package/dist/chunks/principal-page-D_91OA0l.js.map +0 -1
- package/dist/chunks/queries-CQ81o4so.js.map +0 -1
- package/dist/chunks/signin-errors-BEFlVDbQ.js +0 -30
- package/dist/chunks/signin-errors-BEFlVDbQ.js.map +0 -1
- package/dist/chunks/ui-DixXLQvQ.js.map +0 -1
- package/dist/chunks/use-action-CWsg_YWU.js +0 -49
- package/dist/chunks/use-action-CWsg_YWU.js.map +0 -1
- package/dist/chunks/use-change-c6CeLRin.js.map +0 -1
- package/dist/chunks/validation-BQtqPe2V.js +0 -29
- package/dist/chunks/validation-BQtqPe2V.js.map +0 -1
- package/dist/pages/token.d.ts +0 -3
- package/dist/pages/token.js.map +0 -1
- package/dist/pages/tokens.d.ts +0 -3
- package/dist/pages/tokens.js +0 -39
- package/dist/pages/tokens.js.map +0 -1
- package/dist/project-BqIy8gYR.d.ts +0 -5
- package/src/lib/instance.ts +0 -13
- package/src/pages/token.tsx +0 -34
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { n as ProjectTab } from "./project-BqIy8gYR.js";
|
|
2
1
|
import { ReactNode } from "react";
|
|
3
|
-
import { CoffreClient, Member } from "@coffre/client";
|
|
2
|
+
import { CoffreClient, Member, RouteInput } from "@coffre/client";
|
|
4
3
|
import { AnyRoute, ParsedLocation } from "@tanstack/react-router";
|
|
5
4
|
import "@coffre/core/pages";
|
|
6
5
|
import "@coffre/core/access";
|
|
@@ -94,7 +93,13 @@ type NavigationBlocker = {
|
|
|
94
93
|
};
|
|
95
94
|
//#endregion
|
|
96
95
|
//#region src/shared/models.d.ts
|
|
97
|
-
type DirectoryPrincipal = Pick<Member, 'principalType' | 'principalId' | 'instanceRole' | 'isRootAdmin'> & Partial<Pick<Member, 'tampered'
|
|
96
|
+
type DirectoryPrincipal = Pick<Member, 'principalType' | 'principalId' | 'instanceRole' | 'isRootAdmin'> & Partial<Pick<Member, 'tampered'>> & {
|
|
97
|
+
/** Where it has access, when the list said; a member just added has none yet. */
|
|
98
|
+
grants?: {
|
|
99
|
+
project: string;
|
|
100
|
+
environment: string | null;
|
|
101
|
+
}[];
|
|
102
|
+
};
|
|
98
103
|
//#endregion
|
|
99
104
|
//#region src/lib/queries.d.ts
|
|
100
105
|
type AuditSearch = {
|
|
@@ -103,6 +108,21 @@ type AuditSearch = {
|
|
|
103
108
|
detail?: '1';
|
|
104
109
|
};
|
|
105
110
|
//#endregion
|
|
111
|
+
//#region src/lib/signin-errors.d.ts
|
|
112
|
+
type LoginSearch = {
|
|
113
|
+
next?: string;
|
|
114
|
+
error?: string;
|
|
115
|
+
with?: string;
|
|
116
|
+
via?: string;
|
|
117
|
+
};
|
|
118
|
+
/**
|
|
119
|
+
* `/login`'s search: where to resume after signing in, same-origin paths
|
|
120
|
+
* only, since an absolute URL accepted here would make the sign-in page an
|
|
121
|
+
* open redirect; and the sign-in's `error`, with account_mismatch's `with`
|
|
122
|
+
* and `via`, provider ids, shown once, then taken out of the URL.
|
|
123
|
+
*/
|
|
124
|
+
declare function loginSearch(search: Record<string, unknown>): LoginSearch;
|
|
125
|
+
//#endregion
|
|
106
126
|
//#region src/options.d.ts
|
|
107
127
|
/**
|
|
108
128
|
* What coffre's routes read through the router: the API as the visitor
|
|
@@ -145,6 +165,7 @@ export declare const projects: {
|
|
|
145
165
|
slug: string;
|
|
146
166
|
name: string;
|
|
147
167
|
archivedAt: string | null;
|
|
168
|
+
folder: string | null;
|
|
148
169
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
149
170
|
environments: {
|
|
150
171
|
slug: string;
|
|
@@ -157,13 +178,75 @@ export declare const projects: {
|
|
|
157
178
|
}[];
|
|
158
179
|
secretCount: number | null;
|
|
159
180
|
}[];
|
|
181
|
+
everyProject: {
|
|
182
|
+
member: string;
|
|
183
|
+
place: string;
|
|
184
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
185
|
+
roleName: string;
|
|
186
|
+
expiresAt: string | null;
|
|
187
|
+
}[];
|
|
160
188
|
})>;
|
|
161
189
|
};
|
|
162
|
-
/**
|
|
190
|
+
/**
|
|
191
|
+
* `/projects/$project`, the layout of a project's tabs: its header, and the
|
|
192
|
+
* tabs its visitor may open. Each tab is a page under it that reads its own.
|
|
193
|
+
*/
|
|
163
194
|
declare const project$1: {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
}
|
|
195
|
+
loader: ({ context }: Loader<{
|
|
196
|
+
project: string;
|
|
197
|
+
}>) => Promise<{
|
|
198
|
+
ok: false;
|
|
199
|
+
error: string;
|
|
200
|
+
signedOut: boolean;
|
|
201
|
+
} | ({
|
|
202
|
+
ok: true;
|
|
203
|
+
} & {
|
|
204
|
+
projects: {
|
|
205
|
+
slug: string;
|
|
206
|
+
name: string;
|
|
207
|
+
archivedAt: string | null;
|
|
208
|
+
folder: string | null;
|
|
209
|
+
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
210
|
+
environments: {
|
|
211
|
+
slug: string;
|
|
212
|
+
name: string;
|
|
213
|
+
accessible: boolean;
|
|
214
|
+
details: null | {
|
|
215
|
+
archivedAt: string | null;
|
|
216
|
+
secretCount: number | null;
|
|
217
|
+
};
|
|
218
|
+
}[];
|
|
219
|
+
secretCount: number | null;
|
|
220
|
+
}[];
|
|
221
|
+
everyProject: {
|
|
222
|
+
member: string;
|
|
223
|
+
place: string;
|
|
224
|
+
role: "access-manager" | "auditor" | "developer" | "maintainer" | "owner" | "viewer";
|
|
225
|
+
roleName: string;
|
|
226
|
+
expiresAt: string | null;
|
|
227
|
+
}[];
|
|
228
|
+
})>;
|
|
229
|
+
};
|
|
230
|
+
/** `/projects/$project/`, its environments, and who can open each when you manage its access. */
|
|
231
|
+
export declare const projectEnvironments: {
|
|
232
|
+
loader: ({ context, params }: Loader<{
|
|
233
|
+
project: string;
|
|
234
|
+
}>) => Promise<void>;
|
|
235
|
+
};
|
|
236
|
+
/** `/projects/$project/users`: who holds access, and what others read of it through references. */
|
|
237
|
+
export declare const projectUsers: {
|
|
238
|
+
loader: ({ context, params }: Loader<{
|
|
239
|
+
project: string;
|
|
240
|
+
}>) => Promise<void>;
|
|
241
|
+
};
|
|
242
|
+
/** `/projects/$project/service-accounts`. */
|
|
243
|
+
export declare const projectServiceAccounts: {
|
|
244
|
+
loader: ({ context, params }: Loader<{
|
|
245
|
+
project: string;
|
|
246
|
+
}>) => Promise<void>;
|
|
247
|
+
};
|
|
248
|
+
/** `/projects/$project/settings`: the project itself, which its layout read. */
|
|
249
|
+
export declare const projectSettings: {
|
|
167
250
|
loader: ({ context, params }: Loader<{
|
|
168
251
|
project: string;
|
|
169
252
|
}>) => Promise<void>;
|
|
@@ -186,6 +269,19 @@ declare const environment$1: {
|
|
|
186
269
|
permissions: ("audit.read" | "environment.manage" | "grant.manage" | "project.manage" | "secret.archive" | "secret.read" | "secret.write")[];
|
|
187
270
|
keys: {
|
|
188
271
|
key: string;
|
|
272
|
+
reference: null | {
|
|
273
|
+
id: string;
|
|
274
|
+
holder: string;
|
|
275
|
+
source: string;
|
|
276
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
277
|
+
version: number | null;
|
|
278
|
+
createdBy: string;
|
|
279
|
+
createdAt: string;
|
|
280
|
+
endedBy: string | null;
|
|
281
|
+
endedAt: string | null;
|
|
282
|
+
canOpenSource: boolean;
|
|
283
|
+
};
|
|
284
|
+
folder: string | null;
|
|
189
285
|
archived: boolean;
|
|
190
286
|
version: number | null;
|
|
191
287
|
updatedAt: string | null;
|
|
@@ -263,37 +359,78 @@ export declare const users: {
|
|
|
263
359
|
}[];
|
|
264
360
|
})>;
|
|
265
361
|
};
|
|
266
|
-
/** `/users/$user
|
|
362
|
+
/** `/users/$user`, the layout of a user's tabs: who they are to the instance, for owners. */
|
|
267
363
|
export declare const user: {
|
|
268
364
|
loader: ({ context, params }: Loader<{
|
|
269
365
|
user: string;
|
|
270
|
-
}>) => Promise<
|
|
271
|
-
};
|
|
272
|
-
/** `/tokens`. */
|
|
273
|
-
export declare const tokens: {
|
|
274
|
-
loader: ({ context }: Loader) => Promise<{
|
|
366
|
+
}>) => Promise<{
|
|
275
367
|
ok: false;
|
|
276
368
|
error: string;
|
|
277
369
|
signedOut: boolean;
|
|
278
370
|
} | ({
|
|
279
371
|
ok: true;
|
|
280
372
|
} & {
|
|
281
|
-
|
|
282
|
-
removed: {
|
|
373
|
+
report: {
|
|
283
374
|
principalType: "service" | "user";
|
|
284
375
|
principalId: string;
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
376
|
+
status: "active" | "removed" | "tampered";
|
|
377
|
+
instanceRole: "owner" | "root-admin" | "user";
|
|
378
|
+
isRootAdmin: boolean;
|
|
379
|
+
removedAt: string | null;
|
|
380
|
+
removedBy: string | null;
|
|
381
|
+
live: {
|
|
382
|
+
grants: number;
|
|
383
|
+
sessions: number;
|
|
384
|
+
tokens: number;
|
|
385
|
+
identities: number;
|
|
386
|
+
};
|
|
387
|
+
exposed: {
|
|
388
|
+
project: string;
|
|
389
|
+
environment: string;
|
|
390
|
+
key: string;
|
|
391
|
+
version: number;
|
|
392
|
+
how: "read" | "wrote";
|
|
393
|
+
at: string;
|
|
394
|
+
}[];
|
|
395
|
+
rotated: number;
|
|
396
|
+
issuedTokens: {
|
|
397
|
+
id: string;
|
|
398
|
+
service: string;
|
|
399
|
+
label: string | null;
|
|
400
|
+
hint: string;
|
|
401
|
+
expiresAt: string;
|
|
402
|
+
lastUsedAt: string | null;
|
|
403
|
+
}[];
|
|
404
|
+
references: {
|
|
405
|
+
id: string;
|
|
406
|
+
holder: string;
|
|
407
|
+
source: string;
|
|
408
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
409
|
+
version: number | null;
|
|
410
|
+
createdBy: string;
|
|
411
|
+
createdAt: string;
|
|
412
|
+
endedBy: string | null;
|
|
413
|
+
endedAt: string | null;
|
|
414
|
+
}[];
|
|
415
|
+
};
|
|
416
|
+
}) | ({
|
|
417
|
+
ok: true;
|
|
418
|
+
} & {
|
|
419
|
+
report: null;
|
|
420
|
+
}) | null>;
|
|
421
|
+
};
|
|
422
|
+
/** `/users/$user/`, their access on every project where you manage it. */
|
|
423
|
+
export declare const userAccess: {
|
|
424
|
+
loader: ({ context }: Loader) => Promise<void>;
|
|
288
425
|
};
|
|
289
|
-
/** `/
|
|
290
|
-
export declare const
|
|
426
|
+
/** `/users/$user/activity`, for whoever reads the audit log; the others are sent to the first tab. */
|
|
427
|
+
export declare const userActivity: {
|
|
291
428
|
loader: ({ context, params }: Loader<{
|
|
292
|
-
|
|
429
|
+
user: string;
|
|
293
430
|
}>) => Promise<void>;
|
|
294
431
|
};
|
|
295
|
-
/** `/
|
|
296
|
-
export declare const
|
|
432
|
+
/** `/service-accounts`. */
|
|
433
|
+
export declare const serviceAccounts: {
|
|
297
434
|
loader: ({ context }: Loader) => Promise<{
|
|
298
435
|
ok: false;
|
|
299
436
|
error: string;
|
|
@@ -309,6 +446,90 @@ export declare const settings: {
|
|
|
309
446
|
}[];
|
|
310
447
|
})>;
|
|
311
448
|
};
|
|
449
|
+
/** `/service-accounts/$account`, the layout of a service account's tabs: who it is to the instance, for owners. */
|
|
450
|
+
export declare const serviceAccount: {
|
|
451
|
+
loader: ({ context, params }: Loader<{
|
|
452
|
+
account: string;
|
|
453
|
+
}>) => Promise<{
|
|
454
|
+
ok: false;
|
|
455
|
+
error: string;
|
|
456
|
+
signedOut: boolean;
|
|
457
|
+
} | ({
|
|
458
|
+
ok: true;
|
|
459
|
+
} & {
|
|
460
|
+
report: {
|
|
461
|
+
principalType: "service" | "user";
|
|
462
|
+
principalId: string;
|
|
463
|
+
status: "active" | "removed" | "tampered";
|
|
464
|
+
instanceRole: "owner" | "root-admin" | "user";
|
|
465
|
+
isRootAdmin: boolean;
|
|
466
|
+
removedAt: string | null;
|
|
467
|
+
removedBy: string | null;
|
|
468
|
+
live: {
|
|
469
|
+
grants: number;
|
|
470
|
+
sessions: number;
|
|
471
|
+
tokens: number;
|
|
472
|
+
identities: number;
|
|
473
|
+
};
|
|
474
|
+
exposed: {
|
|
475
|
+
project: string;
|
|
476
|
+
environment: string;
|
|
477
|
+
key: string;
|
|
478
|
+
version: number;
|
|
479
|
+
how: "read" | "wrote";
|
|
480
|
+
at: string;
|
|
481
|
+
}[];
|
|
482
|
+
rotated: number;
|
|
483
|
+
issuedTokens: {
|
|
484
|
+
id: string;
|
|
485
|
+
service: string;
|
|
486
|
+
label: string | null;
|
|
487
|
+
hint: string;
|
|
488
|
+
expiresAt: string;
|
|
489
|
+
lastUsedAt: string | null;
|
|
490
|
+
}[];
|
|
491
|
+
references: {
|
|
492
|
+
id: string;
|
|
493
|
+
holder: string;
|
|
494
|
+
source: string;
|
|
495
|
+
state: "broken" | "live" | "replaced" | "source_archived" | "source_deleted" | "source_empty" | "source_is_reference";
|
|
496
|
+
version: number | null;
|
|
497
|
+
createdBy: string;
|
|
498
|
+
createdAt: string;
|
|
499
|
+
endedBy: string | null;
|
|
500
|
+
endedAt: string | null;
|
|
501
|
+
}[];
|
|
502
|
+
};
|
|
503
|
+
}) | ({
|
|
504
|
+
ok: true;
|
|
505
|
+
} & {
|
|
506
|
+
report: null;
|
|
507
|
+
}) | null>;
|
|
508
|
+
};
|
|
509
|
+
/**
|
|
510
|
+
* `/service-accounts/$account/`, how it signs in: its trusted workloads and
|
|
511
|
+
* bearer tokens. Only an owner manages them, and only while it is active;
|
|
512
|
+
* anyone else is sent to its access.
|
|
513
|
+
*/
|
|
514
|
+
export declare const serviceAccountSignIn: {
|
|
515
|
+
loader: ({ context, params }: Loader<{
|
|
516
|
+
account: string;
|
|
517
|
+
}>) => Promise<void>;
|
|
518
|
+
};
|
|
519
|
+
/** `/service-accounts/$account/access`. */
|
|
520
|
+
export declare const serviceAccountAccess: {
|
|
521
|
+
loader: ({ context }: Loader) => Promise<void>;
|
|
522
|
+
};
|
|
523
|
+
/** `/service-accounts/$account/activity`, as a user's. */
|
|
524
|
+
export declare const serviceAccountActivity: {
|
|
525
|
+
loader: ({ context, params }: Loader<{
|
|
526
|
+
account: string;
|
|
527
|
+
}>) => Promise<void>;
|
|
528
|
+
};
|
|
529
|
+
/** `/settings`. */
|
|
530
|
+
export declare const settings: {
|
|
531
|
+
loader: ({ context }: Loader) => Promise<void>;
|
|
532
|
+
};
|
|
312
533
|
type AccountSearch = {
|
|
313
534
|
linked?: string;
|
|
314
535
|
error?: string;
|
|
@@ -320,10 +541,7 @@ export declare const account: {
|
|
|
320
541
|
};
|
|
321
542
|
/** `/login`. */
|
|
322
543
|
export declare const login: {
|
|
323
|
-
validateSearch:
|
|
324
|
-
next?: string;
|
|
325
|
-
error?: string;
|
|
326
|
-
};
|
|
544
|
+
validateSearch: typeof loginSearch;
|
|
327
545
|
loader: ({ context }: Loader) => Promise<void>;
|
|
328
546
|
};
|
|
329
547
|
/** `/unregistered`. */
|
|
@@ -366,6 +584,122 @@ export declare const deviceLogin: {
|
|
|
366
584
|
error: string;
|
|
367
585
|
} | null>;
|
|
368
586
|
};
|
|
587
|
+
/**
|
|
588
|
+
* `/approvals/$approval`: a change an MCP client asked for, which its person
|
|
589
|
+
* decides here. Its own read: the page shows what the change would do now.
|
|
590
|
+
*/
|
|
591
|
+
export declare const approval: {
|
|
592
|
+
loader: ({ context, params, location }: Loader<{
|
|
593
|
+
approval: string;
|
|
594
|
+
}>) => Promise<{
|
|
595
|
+
ok: false;
|
|
596
|
+
error: string;
|
|
597
|
+
signedOut: boolean;
|
|
598
|
+
} | ({
|
|
599
|
+
ok: true;
|
|
600
|
+
} & {
|
|
601
|
+
approval: {
|
|
602
|
+
id: string;
|
|
603
|
+
status: "approved" | "cancelled" | "denied" | "expired" | "failed" | "pending";
|
|
604
|
+
client: {
|
|
605
|
+
name: string;
|
|
606
|
+
host: string | null;
|
|
607
|
+
registration: "cimd" | "dcr";
|
|
608
|
+
};
|
|
609
|
+
tool: string;
|
|
610
|
+
summary: string;
|
|
611
|
+
details: {
|
|
612
|
+
label: string;
|
|
613
|
+
value: string;
|
|
614
|
+
kind?: "mono" | "time";
|
|
615
|
+
}[];
|
|
616
|
+
asks: null | {
|
|
617
|
+
value: {
|
|
618
|
+
label: string;
|
|
619
|
+
note: string;
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
kind: "change" | "reveal";
|
|
623
|
+
digest: string;
|
|
624
|
+
createdAt: string;
|
|
625
|
+
expiresAt: string;
|
|
626
|
+
outcome: null | {
|
|
627
|
+
text: string;
|
|
628
|
+
result?: {
|
|
629
|
+
[key: string]: unknown;
|
|
630
|
+
};
|
|
631
|
+
error?: string;
|
|
632
|
+
};
|
|
633
|
+
};
|
|
634
|
+
})>;
|
|
635
|
+
};
|
|
636
|
+
type AuthorizationSearch = RouteInput<'GET /oauth/authorizations'>;
|
|
637
|
+
/**
|
|
638
|
+
* `/oauth/authorize`: an MCP client asking to connect. Its parameters go to
|
|
639
|
+
* the API as sent, which says which it takes; the router keeps them strings,
|
|
640
|
+
* so a `state` of `1e5` goes back as `1e5`.
|
|
641
|
+
*/
|
|
642
|
+
export declare const oauthAuthorize: {
|
|
643
|
+
validateSearch: (search: Record<string, unknown>) => AuthorizationSearch;
|
|
644
|
+
loaderDeps: ({ search }: {
|
|
645
|
+
search: AuthorizationSearch;
|
|
646
|
+
}) => {
|
|
647
|
+
request: {
|
|
648
|
+
client_id?: string;
|
|
649
|
+
redirect_uri?: string;
|
|
650
|
+
response_type?: string;
|
|
651
|
+
code_challenge?: string;
|
|
652
|
+
code_challenge_method?: string;
|
|
653
|
+
state?: string;
|
|
654
|
+
scope?: string;
|
|
655
|
+
resource?: string;
|
|
656
|
+
};
|
|
657
|
+
};
|
|
658
|
+
loader: ({ context, deps, location }: Loader & {
|
|
659
|
+
deps: {
|
|
660
|
+
request: AuthorizationSearch;
|
|
661
|
+
};
|
|
662
|
+
}) => Promise<{
|
|
663
|
+
request: {
|
|
664
|
+
client_id?: string;
|
|
665
|
+
redirect_uri?: string;
|
|
666
|
+
response_type?: string;
|
|
667
|
+
code_challenge?: string;
|
|
668
|
+
code_challenge_method?: string;
|
|
669
|
+
state?: string;
|
|
670
|
+
scope?: string;
|
|
671
|
+
resource?: string;
|
|
672
|
+
};
|
|
673
|
+
email: string;
|
|
674
|
+
result: {
|
|
675
|
+
ok: false;
|
|
676
|
+
error: string;
|
|
677
|
+
signedOut: boolean;
|
|
678
|
+
} | ({
|
|
679
|
+
ok: true;
|
|
680
|
+
} & ({
|
|
681
|
+
status: "invalid";
|
|
682
|
+
message: string;
|
|
683
|
+
} | {
|
|
684
|
+
status: "refused";
|
|
685
|
+
message: string;
|
|
686
|
+
redirect: string;
|
|
687
|
+
} | {
|
|
688
|
+
status: "ready";
|
|
689
|
+
client: {
|
|
690
|
+
id: string;
|
|
691
|
+
name: string;
|
|
692
|
+
host: string | null;
|
|
693
|
+
registration: "cimd" | "dcr";
|
|
694
|
+
};
|
|
695
|
+
redirectHost: string;
|
|
696
|
+
loopbackOnly: boolean;
|
|
697
|
+
scopes: ("browse" | "manage-access" | "read-values" | "write")[];
|
|
698
|
+
connections: ("browse" | "manage-access" | "read-values" | "write")[][];
|
|
699
|
+
days: number;
|
|
700
|
+
}));
|
|
701
|
+
}>;
|
|
702
|
+
};
|
|
369
703
|
//#endregion
|
|
370
704
|
//#region src/router.d.ts
|
|
371
705
|
/**
|