Files
archie/ui/src/org/org.ts
T

34 lines
757 B
TypeScript

/** An org on the instance. A non-admin only ever sees their own. */
export interface Org {
id: string;
name: string;
}
export interface OrgWorkspace {
id: string;
org_id: string;
name: string;
environment?: string;
}
export type Role = "owner" | "admin" | "developer" | "viewer";
/** The roles the domain accepts, in descending authority. */
export const ROLES: Role[] = ["owner", "admin", "developer", "viewer"];
/** How a role reads wherever the dashboard offers one. */
export const ROLE_LABELS: Record<Role, string> = {
owner: "Owner",
admin: "Admin",
developer: "Developer",
viewer: "Viewer",
};
export interface Member {
identity_id: string;
kind: string;
display_name: string;
workspace_id?: string;
role: Role;
}