@danxbot/ui 20.2.0 → 20.3.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.
|
@@ -14,9 +14,10 @@ export interface ApiKey {
|
|
|
14
14
|
/** ISO instant, or `null`/omitted for a key with no expiry. */
|
|
15
15
|
expiresAt?: string | null;
|
|
16
16
|
}
|
|
17
|
-
/** Makes a key's role editable in place. `roles` are the roles the owner may pick from
|
|
17
|
+
/** Makes a key's role editable in place. `roles` are the roles the owner may pick from: one list for every key, or a function
|
|
18
|
+
* of the key when the keys do not share one (DX-4431: an agent session takes agent roles, a worker a human role that can manage workers). */
|
|
18
19
|
export interface KeyRoleEditor {
|
|
19
|
-
roles: Role[];
|
|
20
|
+
roles: Role[] | ((apiKey: ApiKey) => Role[]);
|
|
20
21
|
/** The permission catalog, used to name the permissions that make a role unavailable. */
|
|
21
22
|
permissions: Permission[];
|
|
22
23
|
/** What the owner holds. A role holding anything outside this set is listed but cannot be chosen. */
|