UNPKG

@upv/ushi-shared

Version:

Shared DTOs, types, and utilities for the USHI platform (LMS, Trials, Social, Wallet).

49 lines (48 loc) 1.69 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PersonStatus = exports.PersonRole = exports.RoleDomain = void 0; /** * RoleDomain * * Logical domain scopes used in role-based access control across the USHI platform. * Enables contextual permission separation (e.g., global vs LMS vs trial-specific). */ var RoleDomain; (function (RoleDomain) { RoleDomain["GLOBAL"] = "global"; RoleDomain["LMS"] = "lms"; RoleDomain["SOCIAL"] = "social"; RoleDomain["TRIAL"] = "trial"; })(RoleDomain || (exports.RoleDomain = RoleDomain = {})); /** * PersonRole * * Enumerates all assignable user roles across different domains. * Used in both backend authorization logic and frontend feature gating. */ var PersonRole; (function (PersonRole) { PersonRole["ADMIN"] = "admin"; PersonRole["STUDENT"] = "student"; PersonRole["CREATOR"] = "creator"; PersonRole["COACH"] = "coach"; PersonRole["PARTICIPANT"] = "participant"; PersonRole["MODERATOR"] = "moderator"; PersonRole["RESEARCHER"] = "researcher"; PersonRole["ORGANIZER"] = "organizer"; PersonRole["SPONSOR"] = "sponsor"; })(PersonRole || (exports.PersonRole = PersonRole = {})); /** * PersonStatus * * Represents the state of a user account throughout its lifecycle. * Used for gating login, activation, and administrative control. */ var PersonStatus; (function (PersonStatus) { PersonStatus["PENDING"] = "pending"; PersonStatus["VALIDATED"] = "validated"; PersonStatus["ACTIVE"] = "active"; PersonStatus["SUSPENDED"] = "suspended"; PersonStatus["DELETED"] = "deleted"; })(PersonStatus || (exports.PersonStatus = PersonStatus = {}));