API reference
team-role
Import
Section titled “Import”import * as api from "@fungi.computer/cairn/team-role";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| type alias | TeamRole | A Team role accepted by the shared role grammar. |
| constant | teamRoles | The shared vocabulary of roles held by a Team member. |
| constant | teamRoleSchema | Schema for role strings received from ordinary serialized data. |
| function | teamRoleAtLeast() | Whether role meets or exceeds a minimum role rank. |
TeamRoletype alias
Section titled “TeamRole”type TeamRole = z.infer<typeof teamRoleSchema>;A Team role accepted by the shared role grammar.
teamRolesconstant
Section titled “teamRoles”const teamRoles: readonly ["owner", "admin", "member"];The shared vocabulary of roles held by a Team member.
teamRoleSchemaconstant
Section titled “teamRoleSchema”const teamRoleSchema: z.ZodType<(typeof teamRoles)[number]>;Schema for role strings received from ordinary serialized data.
teamRoleAtLeast()function
Section titled “teamRoleAtLeast()”function teamRoleAtLeast(role, minimum): boolean;Whether role meets or exceeds a minimum role rank.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
role |
"owner" | "admin" | "member" |
minimum |
"owner" | "admin" | "member" |
Returns
Section titled “Returns”boolean