Skip to content
0

katanakit-js / AccessRoleDefinitionSchema

Variable: AccessRoleDefinitionSchema ​

ts
const AccessRoleDefinitionSchema: ZodObject<{
  capabilities: ZodArray<ZodString>;
  label: ZodString;
  rank: ZodNumber;
  slug: ZodString;
}, $strip>;

Defined in: src/schemas/access.schema.ts:87

A role definition.

rank lives on the definition rather than in a lookup table so a custom role participates in the hierarchy on equal terms — a rank hardcoded outside the registry makes every registered role silently inherit nothing. Lower is more privileged.

Released under the MIT License.