@coffre/ui 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.
Files changed (180) hide show
  1. package/dist/chunks/audit-sentence-BhHmvQX_.js +660 -0
  2. package/dist/chunks/audit-sentence-BhHmvQX_.js.map +1 -0
  3. package/dist/chunks/connected-apps-CUOyEZXR.js +146 -0
  4. package/dist/chunks/connected-apps-CUOyEZXR.js.map +1 -0
  5. package/dist/chunks/delete-place-CRX7ntE8.js +206 -0
  6. package/dist/chunks/delete-place-CRX7ntE8.js.map +1 -0
  7. package/dist/chunks/{directory-CSjWWUQ1.js → directory-CxxrnGUL.js} +177 -60
  8. package/dist/chunks/directory-CxxrnGUL.js.map +1 -0
  9. package/dist/chunks/folders-DoBmCwOi.js +207 -0
  10. package/dist/chunks/folders-DoBmCwOi.js.map +1 -0
  11. package/dist/chunks/grants-CXcmhujY.js +669 -0
  12. package/dist/chunks/grants-CXcmhujY.js.map +1 -0
  13. package/dist/chunks/offboarding-6eAduCsM.js +305 -0
  14. package/dist/chunks/offboarding-6eAduCsM.js.map +1 -0
  15. package/dist/chunks/one-time-DXEl9hbg.js +35 -0
  16. package/dist/chunks/one-time-DXEl9hbg.js.map +1 -0
  17. package/dist/chunks/page-DvsgZ2Hd.js +391 -0
  18. package/dist/chunks/page-DvsgZ2Hd.js.map +1 -0
  19. package/dist/chunks/principal-BIN-xwZw.js +42 -0
  20. package/dist/chunks/principal-BIN-xwZw.js.map +1 -0
  21. package/dist/chunks/{principal-page-D_91OA0l.js → principal-page-B9R2zPlp.js} +259 -251
  22. package/dist/chunks/principal-page-B9R2zPlp.js.map +1 -0
  23. package/dist/chunks/project-page-SRCtRe2g.js +17 -0
  24. package/dist/chunks/project-page-SRCtRe2g.js.map +1 -0
  25. package/dist/chunks/{queries-CQ81o4so.js → queries-DVR_i3rA.js} +132 -30
  26. package/dist/chunks/queries-DVR_i3rA.js.map +1 -0
  27. package/dist/chunks/references-B6pLT1uQ.js +343 -0
  28. package/dist/chunks/references-B6pLT1uQ.js.map +1 -0
  29. package/dist/chunks/{row-state-0PsrEzOL.js → row-state-DOPUsjQK.js} +3 -3
  30. package/dist/chunks/{row-state-0PsrEzOL.js.map → row-state-DOPUsjQK.js.map} +1 -1
  31. package/dist/chunks/signin-errors--ykMFuqN.js +57 -0
  32. package/dist/chunks/signin-errors--ykMFuqN.js.map +1 -0
  33. package/dist/chunks/tabs-BmwKfUeK.js +22 -0
  34. package/dist/chunks/tabs-BmwKfUeK.js.map +1 -0
  35. package/dist/chunks/{theme-B2vQolVR.js → theme-DJuz-xLM.js} +3 -3
  36. package/dist/chunks/{theme-B2vQolVR.js.map → theme-DJuz-xLM.js.map} +1 -1
  37. package/dist/chunks/{ui-DixXLQvQ.js → ui-DJje3gST.js} +6 -3
  38. package/dist/chunks/ui-DJje3gST.js.map +1 -0
  39. package/dist/chunks/{use-change-c6CeLRin.js → use-change-CZdI2MJG.js} +75 -21
  40. package/dist/chunks/use-change-CZdI2MJG.js.map +1 -0
  41. package/dist/chunks/{use-shell-jxd7Tzd-.js → use-shell-rNKfGjdj.js} +3 -3
  42. package/dist/chunks/{use-shell-jxd7Tzd-.js.map → use-shell-rNKfGjdj.js.map} +1 -1
  43. package/dist/chunks/validation-D312_NLf.js +87 -0
  44. package/dist/chunks/validation-D312_NLf.js.map +1 -0
  45. package/dist/index.d.ts +385 -31
  46. package/dist/index.js +188 -102
  47. package/dist/index.js.map +1 -1
  48. package/dist/pages/account.d.ts +2 -2
  49. package/dist/pages/account.js +174 -135
  50. package/dist/pages/account.js.map +1 -1
  51. package/dist/pages/approval.d.ts +9 -0
  52. package/dist/pages/approval.js +207 -0
  53. package/dist/pages/approval.js.map +1 -0
  54. package/dist/pages/audit.js +17 -542
  55. package/dist/pages/audit.js.map +1 -1
  56. package/dist/pages/device-login.js +2 -3
  57. package/dist/pages/device-login.js.map +1 -1
  58. package/dist/pages/environment.js +647 -257
  59. package/dist/pages/environment.js.map +1 -1
  60. package/dist/pages/login.js +18 -7
  61. package/dist/pages/login.js.map +1 -1
  62. package/dist/pages/oauth-authorize.d.ts +10 -0
  63. package/dist/pages/oauth-authorize.js +249 -0
  64. package/dist/pages/oauth-authorize.js.map +1 -0
  65. package/dist/pages/project-access.d.ts +6 -0
  66. package/dist/pages/project-access.js +370 -0
  67. package/dist/pages/project-access.js.map +1 -0
  68. package/dist/pages/project-environments.d.ts +4 -0
  69. package/dist/pages/project-environments.js +593 -0
  70. package/dist/pages/project-environments.js.map +1 -0
  71. package/dist/pages/project-settings.d.ts +4 -0
  72. package/dist/pages/project-settings.js +242 -0
  73. package/dist/pages/project-settings.js.map +1 -0
  74. package/dist/pages/project.d.ts +10 -2
  75. package/dist/pages/project.js +57 -934
  76. package/dist/pages/project.js.map +1 -1
  77. package/dist/pages/projects.js +53 -21
  78. package/dist/pages/projects.js.map +1 -1
  79. package/dist/pages/service-account.d.ts +10 -0
  80. package/dist/pages/{token.js → service-account.js} +112 -54
  81. package/dist/pages/service-account.js.map +1 -0
  82. package/dist/pages/service-accounts.d.ts +3 -0
  83. package/dist/pages/service-accounts.js +38 -0
  84. package/dist/pages/service-accounts.js.map +1 -0
  85. package/dist/pages/settings.d.ts +1 -0
  86. package/dist/pages/settings.js +104 -42
  87. package/dist/pages/settings.js.map +1 -1
  88. package/dist/pages/unregistered.js +2 -3
  89. package/dist/pages/unregistered.js.map +1 -1
  90. package/dist/pages/user.d.ts +6 -1
  91. package/dist/pages/user.js +18 -6
  92. package/dist/pages/user.js.map +1 -1
  93. package/dist/pages/users.js +6 -10
  94. package/dist/pages/users.js.map +1 -1
  95. package/package.json +3 -3
  96. package/src/components/actions-log.tsx +117 -0
  97. package/src/components/audit-sentence.tsx +55 -0
  98. package/src/components/command-palette.tsx +4 -4
  99. package/src/components/connected-apps.tsx +138 -0
  100. package/src/components/delete-place.tsx +180 -0
  101. package/src/components/directory.tsx +266 -110
  102. package/src/components/every-project.tsx +287 -0
  103. package/src/components/expiry-field.tsx +42 -0
  104. package/src/components/folders.tsx +219 -0
  105. package/src/components/grants.tsx +11 -4
  106. package/src/components/icons.tsx +2 -0
  107. package/src/components/missing.tsx +110 -0
  108. package/src/components/offboarding.tsx +62 -34
  109. package/src/components/page.tsx +4 -1
  110. package/src/components/principal-page.tsx +154 -108
  111. package/src/components/principal-picker.tsx +5 -5
  112. package/src/components/principal.tsx +4 -4
  113. package/src/components/references.tsx +323 -0
  114. package/src/components/service-tokens.tsx +112 -93
  115. package/src/components/shell.tsx +11 -32
  116. package/src/components/tabs.tsx +18 -0
  117. package/src/components/trusted-workloads.tsx +97 -79
  118. package/src/components/ui.tsx +8 -1
  119. package/src/index.ts +13 -3
  120. package/src/layout.tsx +2 -2
  121. package/src/lib/access-plan.ts +2 -2
  122. package/src/lib/audit-sentences.ts +161 -77
  123. package/src/lib/changes.ts +77 -5
  124. package/src/lib/coffre.ts +3 -2
  125. package/src/lib/one-time.ts +32 -0
  126. package/src/lib/project-access.ts +11 -23
  127. package/src/lib/project-page.ts +14 -0
  128. package/src/lib/queries.ts +126 -32
  129. package/src/lib/search.ts +25 -0
  130. package/src/lib/signin-errors.ts +45 -1
  131. package/src/lib/validation.ts +14 -0
  132. package/src/options.ts +187 -42
  133. package/src/pages/account.tsx +176 -133
  134. package/src/pages/approval.tsx +197 -0
  135. package/src/pages/audit.tsx +9 -61
  136. package/src/pages/environment.tsx +585 -286
  137. package/src/pages/login.tsx +8 -2
  138. package/src/pages/oauth-authorize.tsx +233 -0
  139. package/src/pages/project-access.tsx +219 -0
  140. package/src/pages/project-environments.tsx +582 -0
  141. package/src/pages/project-settings.tsx +259 -0
  142. package/src/pages/project.tsx +52 -879
  143. package/src/pages/projects.tsx +55 -18
  144. package/src/pages/service-account.tsx +50 -0
  145. package/src/pages/{tokens.tsx → service-accounts.tsx} +9 -6
  146. package/src/pages/settings.tsx +62 -8
  147. package/src/pages/user.tsx +16 -4
  148. package/src/pages/users.tsx +2 -2
  149. package/src/parity.ts +160 -0
  150. package/src/register.ts +57 -10
  151. package/src/router.tsx +4 -0
  152. package/src/shared/models.ts +6 -2
  153. package/src/styles/globals.css +536 -31
  154. package/dist/chunks/directory-CSjWWUQ1.js.map +0 -1
  155. package/dist/chunks/grants-saMQagmG.js +0 -160
  156. package/dist/chunks/grants-saMQagmG.js.map +0 -1
  157. package/dist/chunks/icons-D-PfAfnH.js +0 -203
  158. package/dist/chunks/icons-D-PfAfnH.js.map +0 -1
  159. package/dist/chunks/offboarding-C6l30DZR.js +0 -263
  160. package/dist/chunks/offboarding-C6l30DZR.js.map +0 -1
  161. package/dist/chunks/page-C5HcNqf2.js +0 -190
  162. package/dist/chunks/page-C5HcNqf2.js.map +0 -1
  163. package/dist/chunks/principal-page-D_91OA0l.js.map +0 -1
  164. package/dist/chunks/queries-CQ81o4so.js.map +0 -1
  165. package/dist/chunks/signin-errors-BEFlVDbQ.js +0 -30
  166. package/dist/chunks/signin-errors-BEFlVDbQ.js.map +0 -1
  167. package/dist/chunks/ui-DixXLQvQ.js.map +0 -1
  168. package/dist/chunks/use-action-CWsg_YWU.js +0 -49
  169. package/dist/chunks/use-action-CWsg_YWU.js.map +0 -1
  170. package/dist/chunks/use-change-c6CeLRin.js.map +0 -1
  171. package/dist/chunks/validation-BQtqPe2V.js +0 -29
  172. package/dist/chunks/validation-BQtqPe2V.js.map +0 -1
  173. package/dist/pages/token.d.ts +0 -3
  174. package/dist/pages/token.js.map +0 -1
  175. package/dist/pages/tokens.d.ts +0 -3
  176. package/dist/pages/tokens.js +0 -39
  177. package/dist/pages/tokens.js.map +0 -1
  178. package/dist/project-BqIy8gYR.d.ts +0 -5
  179. package/src/lib/instance.ts +0 -13
  180. package/src/pages/token.tsx +0 -34
@@ -0,0 +1,18 @@
1
+ import { Children, type ReactNode } from 'react';
2
+
3
+ /**
4
+ * A page's sections as tabs under its header. Each is a `<Link>` to a route
5
+ * nested under the page's layout, the first to its index with
6
+ * `activeOptions={{ exact: true, includeSearch: false }}`, and the router
7
+ * marks the one shown `aria-current="page"`. The caller leaves out a tab
8
+ * nobody may open.
9
+ */
10
+ export function PageTabs({ label, children }: { label: string; children: ReactNode }) {
11
+ // One tab is no choice at all.
12
+ if (Children.toArray(children).length < 2) return null;
13
+ return (
14
+ <nav className="tabs" aria-label={label}>
15
+ {children}
16
+ </nav>
17
+ );
18
+ }
@@ -24,86 +24,104 @@ export function TrustedWorkloads({ serviceId, bindings }: { serviceId: string; b
24
24
  const { status, dismiss } = useChangeStatus(change.list.queryKey);
25
25
 
26
26
  return (
27
- <Card
28
- labelledBy="trusted-workloads"
29
- title="Trusted workloads"
30
- description="CI runs that may sign in as this service with the ID token their platform signs, when every claim of a binding matches. Nothing long-lived is stored."
31
- actions={<TrustWorkload serviceId={serviceId} />}
32
- >
33
- {bindings.length === 0 ? (
34
- <EmptyState title="No trusted workloads">
35
- CI can still use a token. Trust a workflow to let its runs sign in without one.
36
- </EmptyState>
37
- ) : (
38
- <div className="dt-wrap">
39
- <table className="dt">
40
- <thead>
41
- <tr>
42
- <th>Workload</th>
43
- <th className="col-shrink">Added (UTC)</th>
44
- <th className="col-shrink">Last used</th>
45
- <th className="col-actions">
46
- <span className="visually-hidden">Actions</span>
47
- </th>
48
- </tr>
49
- </thead>
50
- <tbody>
51
- {bindings.map((binding) => {
52
- const state = status(binding.id);
53
- const { title, detail } = summary(binding);
54
- return (
55
- <Fragment key={binding.id}>
56
- <tr className={rowClass(state)}>
57
- <td>
58
- <span className="cell-account">
59
- {binding.profile.startsWith('github') ? <GitHub size={15} /> : <Link size={15} />}
27
+ <>
28
+ <Card
29
+ labelledBy="trusted-workloads"
30
+ title="Sign in with OIDC"
31
+ description="The way with nothing to store: CI runs sign in as this service account with the ID token their platform signs, when every claim of a trust binding matches. Recommended wherever the CI signs one."
32
+ >
33
+ {bindings.length === 0 ? (
34
+ <EmptyState title="No trust bindings">
35
+ Trust a CI workflow to let its runs sign in as this service account with no stored secret. Until then, CI needs a bearer token.
36
+ </EmptyState>
37
+ ) : (
38
+ <div className="dt-wrap">
39
+ <table className="dt">
40
+ <thead>
41
+ <tr>
42
+ <th>Workload</th>
43
+ <th className="col-shrink">Added (UTC)</th>
44
+ <th className="col-shrink">Last used</th>
45
+ <th className="col-actions">
46
+ <span className="visually-hidden">Actions</span>
47
+ </th>
48
+ </tr>
49
+ </thead>
50
+ <tbody>
51
+ {bindings.map((binding) => {
52
+ const state = status(binding.id);
53
+ const { title, detail } = summary(binding);
54
+ return (
55
+ <Fragment key={binding.id}>
56
+ <tr className={rowClass(state)}>
57
+ <td>
58
+ <span className="cell-account">
59
+ {binding.profile.startsWith('github') ? <GitHub size={15} /> : <Link size={15} />}
60
+ <span className="cell-stack">
61
+ <span>{binding.label ?? title}</span>
62
+ <small>{binding.label === null ? detail : `${title} · ${detail}`}</small>
63
+ <details className="claims">
64
+ <summary>Claims</summary>
65
+ <Claims binding={binding} />
66
+ </details>
67
+ </span>
68
+ </span>
69
+ </td>
70
+ <td className="nowrap">
60
71
  <span className="cell-stack">
61
- <span>{binding.label ?? title}</span>
62
- <small>{binding.label === null ? detail : `${title} · ${detail}`}</small>
63
- <details className="claims">
64
- <summary>Claims</summary>
65
- <Claims binding={binding} />
66
- </details>
72
+ <Timestamp iso={binding.createdAt} />
73
+ <small>by {binding.createdBy}</small>
67
74
  </span>
68
- </span>
69
- </td>
70
- <td className="nowrap">
71
- <span className="cell-stack">
72
- <Timestamp iso={binding.createdAt} />
73
- <small>by {binding.createdBy}</small>
74
- </span>
75
- </td>
76
- <td className="nowrap cell-muted">
77
- {binding.lastUsedAt === null ? 'Never' : <Timestamp iso={binding.lastUsedAt} display="relative" />}
78
- </td>
79
- <td className="col-actions">
80
- {state.state === 'pending' ? (
81
- <RowPending status={state} />
82
- ) : (
83
- <ConfirmButton
84
- trigger={
85
- <button className="act">
86
- <X size={13} />
87
- Remove
88
- </button>
89
- }
90
- title={<>Stop trusting {binding.label ?? title}?</>}
91
- body="Its runs are refused from their next sign-in, and credentials they hold stop working. A binding removed is never trusted again; to trust the runs again, add a new one."
92
- confirmLabel="Remove binding"
93
- onConfirm={() => remove(binding)}
94
- />
95
- )}
96
- </td>
97
- </tr>
98
- <RowFailure status={state} columns={4} onDismiss={() => state.state === 'failed' && dismiss(state.mutationId)} />
99
- </Fragment>
100
- );
101
- })}
102
- </tbody>
103
- </table>
104
- </div>
105
- )}
106
- </Card>
75
+ </td>
76
+ <td className="nowrap cell-muted">
77
+ {binding.lastUsedAt === null ? 'Never' : <Timestamp iso={binding.lastUsedAt} display="relative" />}
78
+ </td>
79
+ <td className="col-actions">
80
+ {state.state === 'pending' ? (
81
+ <RowPending status={state} />
82
+ ) : (
83
+ <ConfirmButton
84
+ trigger={
85
+ <button className="act">
86
+ <X size={13} />
87
+ Remove
88
+ </button>
89
+ }
90
+ title={<>Stop trusting {binding.label ?? title}?</>}
91
+ body={
92
+ <>
93
+ Runs of <strong>{title}</strong> ({detail}) can no longer sign in as{' '}
94
+ <span className="mono">service:{serviceId}</span>, and credentials they hold stop
95
+ working at once.{' '}
96
+ {binding.lastUsedAt === null ? (
97
+ 'It was never used.'
98
+ ) : (
99
+ <>
100
+ It was last used <Timestamp iso={binding.lastUsedAt} display="relative" />.
101
+ </>
102
+ )}{' '}
103
+ A binding removed is never trusted again; to trust the runs again, add a new one.
104
+ </>
105
+ }
106
+ confirmLabel="Remove binding"
107
+ onConfirm={() => remove(binding)}
108
+ />
109
+ )}
110
+ </td>
111
+ </tr>
112
+ <RowFailure status={state} columns={4} onDismiss={() => state.state === 'failed' && dismiss(state.mutationId)} />
113
+ </Fragment>
114
+ );
115
+ })}
116
+ </tbody>
117
+ </table>
118
+ </div>
119
+ )}
120
+ </Card>
121
+ <div className="table-actions">
122
+ <TrustWorkload serviceId={serviceId} />
123
+ </div>
124
+ </>
107
125
  );
108
126
  }
109
127
 
@@ -191,7 +209,7 @@ function TrustWorkload({ serviceId }: { serviceId: string }) {
191
209
 
192
210
  return (
193
211
  <>
194
- <button className="btn btn-sm" onClick={() => setOpen(true)}>
212
+ <button className="btn" onClick={() => setOpen(true)}>
195
213
  <Plus size={14} />
196
214
  Trust a workload
197
215
  </button>
@@ -166,6 +166,7 @@ const NOTICE_ICON = {
166
166
  info: Info,
167
167
  good: Check,
168
168
  bad: AlertTriangle,
169
+ warn: AlertTriangle,
169
170
  neutral: Info,
170
171
  } as const;
171
172
 
@@ -300,12 +301,16 @@ export function CopyButton({
300
301
  type ConfirmProps = {
301
302
  title: ReactNode;
302
303
  body: ReactNode;
304
+ /** What the body's sentence cannot hold, such as a list: after it, outside its paragraph. */
305
+ detail?: ReactNode;
303
306
  confirmLabel: string;
304
307
  destructive?: boolean;
308
+ /** While something must happen first, which `detail` says. */
309
+ confirmDisabled?: boolean;
305
310
  onConfirm: () => void;
306
311
  };
307
312
 
308
- function ConfirmContent({ title, body, confirmLabel, destructive, onConfirm }: ConfirmProps) {
313
+ function ConfirmContent({ title, body, detail, confirmLabel, destructive, confirmDisabled, onConfirm }: ConfirmProps) {
309
314
  const { portal } = usePreferences();
310
315
  return (
311
316
  <AlertDialog.Portal container={portal}>
@@ -313,11 +318,13 @@ function ConfirmContent({ title, body, confirmLabel, destructive, onConfirm }: C
313
318
  <AlertDialog.Popup className="dialog dialog-confirm">
314
319
  <AlertDialog.Title className="dialog-title">{title}</AlertDialog.Title>
315
320
  <AlertDialog.Description className="dialog-body">{body}</AlertDialog.Description>
321
+ {detail}
316
322
  <div className="dialog-actions">
317
323
  <AlertDialog.Close className="btn">Cancel</AlertDialog.Close>
318
324
  <AlertDialog.Close
319
325
  className={`btn ${destructive === false ? 'btn-primary' : 'btn-danger'}`}
320
326
  onClick={onConfirm}
327
+ disabled={confirmDisabled}
321
328
  >
322
329
  {confirmLabel}
323
330
  </AlertDialog.Close>
package/src/index.ts CHANGED
@@ -8,22 +8,32 @@ export { CoffreProvider } from './layout.tsx';
8
8
  export { useCoffre } from './lib/coffre.ts';
9
9
  export { createRouter } from './router.tsx';
10
10
  export {
11
- access,
12
11
  account,
12
+ approval,
13
13
  audit,
14
14
  deviceLogin,
15
15
  environment,
16
16
  home,
17
17
  login,
18
+ oauthAuthorize,
18
19
  project,
20
+ projectEnvironments,
19
21
  projects,
22
+ projectServiceAccounts,
23
+ projectSettings,
24
+ projectUsers,
25
+ serviceAccount,
26
+ serviceAccountAccess,
27
+ serviceAccountActivity,
28
+ serviceAccounts,
29
+ serviceAccountSignIn,
20
30
  settings,
21
31
  shell,
22
32
  solo,
23
- token,
24
- tokens,
25
33
  unregistered,
26
34
  user,
35
+ userAccess,
36
+ userActivity,
27
37
  users,
28
38
  type CoffreContext,
29
39
  } from './options.ts';
package/src/layout.tsx CHANGED
@@ -84,13 +84,13 @@ export function CoffreProvider({ children }: { children: ReactNode }) {
84
84
 
85
85
  /** coffre's shell: the nav, around the signed-in pages. */
86
86
  export function ShellLayout() {
87
- const { principal, instanceRole, projects, capabilities, instance } = useShell();
87
+ const { principal, instanceRole, projects, capabilities } = useShell();
88
88
  return (
89
89
  <>
90
90
  <a className="skip-link" href="#content">
91
91
  Skip to content
92
92
  </a>
93
- <Shell projects={projects} principal={principal} instanceRole={instanceRole} capabilities={capabilities} instance={instance}>
93
+ <Shell projects={projects} principal={principal} instanceRole={instanceRole} capabilities={capabilities}>
94
94
  <Outlet />
95
95
  </Shell>
96
96
  </>
@@ -4,7 +4,7 @@ import type { Role } from '@coffre/core/access';
4
4
  import type { GrantRow } from '../shared/models';
5
5
 
6
6
  /** Read or write on one environment, and when it ends: an ISO instant, or null for never. */
7
- export type EnvironmentAccess = { role: 'viewer' | 'developer'; expiresAt: string | null };
7
+ export type EnvironmentAccess = { role: Extract<Role, 'viewer' | 'developer'>; expiresAt: string | null };
8
8
 
9
9
  /**
10
10
  * What one project is set to in a principal's access editor: nothing, owner,
@@ -16,7 +16,7 @@ export type EnvironmentAccess = { role: 'viewer' | 'developer'; expiresAt: strin
16
16
  * leaves them alone unless another setting is picked.
17
17
  */
18
18
  export type AccessPlan = {
19
- level: 'none' | 'owner' | 'viewer' | 'developer' | 'env' | 'custom';
19
+ level: 'none' | Extract<Role, 'owner' | 'viewer' | 'developer'> | 'env' | 'custom';
20
20
  /** When the project-wide level ends. */
21
21
  expiresAt: string | null;
22
22
  /** Environments without an entry get no access. */