JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 8
  • Score
    100M100P100Q60350F
  • License MIT

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

Package Exports

  • @upv/ushi-shared
  • @upv/ushi-shared/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@upv/ushi-shared) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

📦 USHI Core Shared Package

Auto-generated documentation of all modules in src/. Includes file-level summaries, exports, and structure.


🗂️ File Structure

📁 constants
  📄 RoleRegistry.ts
📁 dto
  📁 base
    📄 BaseDto.ts
  📁 demographics
    📄 DemographicsProfileDto.ts
  📁 identity
    📄 IdentityProfileDto.ts
  📄 index.ts
  📁 lms
    📄 LMSUserProfileDto.ts
  📁 region
    📄 RegionDto.ts
  📁 role
    📄 RoleAssignmentDto.ts
    📄 RoleDto.ts
  📁 social
    📄 SocialProfileDto.ts
  📁 trial
    📄 TrialParticipantProfileDto.ts
  📁 user
    📄 UserDto.ts
    📄 UserProfileDto.ts
  📁 wallet
    📄 WalletProfileDto.ts
📁 enums
  📄 index.ts
  📄 role.ts
📄 index.ts
📁 types
  📄 base.ts
  📄 demographicsProfile.ts
  📄 identityProfile.ts
  📄 index.ts
  📄 lmsUserProfile.ts
  📄 role.ts
  📄 roleAssignment.ts
  📄 socialProfile.ts
  📄 trialParticipantProfile.ts
  📄 user.ts
  📄 userProfile.ts
  📄 walletProfile.ts
📁 utils
  📄 formatters.ts
  📄 index.ts
  📄 roleHelpers.ts
  📄 userRoleHelpers.ts

.

File Description Exports
index.ts

constants

File Description Exports
RoleRegistry.ts RoleRegistry Maps each RoleDomain to the valid UserRole[] values allowed in that domain. This is used for validation, UI dropdowns, and system-wide role management. RoleRegistry

dto

File Description Exports
index.ts

dto/base

File Description Exports
BaseDto.ts BaseDto Abstract base class for all Data Transfer Objects in the USHI platform. Provides core properties and serialization logic for consistent handling of domain entities. @template T - Raw input type extending IBaseDtoInput

dto/demographics

File Description Exports
DemographicsProfileDto.ts DemographicsProfileDto DTO for user identity and demographics used in trials, personalization, and segmentation.

dto/identity

File Description Exports
IdentityProfileDto.ts IdentityProfileDto DTO for structured legal identity associated with a user. Useful for secure trials, identity verification, or eConsent.

dto/lms

File Description Exports
LMSUserProfileDto.ts LMSUserProfileDto DTO for user learning profile in the USHI LMS system.

dto/region

File Description Exports
RegionDto.ts IRegionDto - Raw input structure for Region

dto/role

File Description Exports
RoleAssignmentDto.ts RoleAssignmentDto DTO class for managing user roles within scoped domains and contexts. Supports auditing, expiration, and status tracking.
RoleDto.ts RoleDto Data Transfer Object for Role entities in the USHI platform. Encapsulates role identity (e.g., 'admin', 'student') and domain scope (e.g., LMS, Trial), providing consistent serialization and access to role data.

dto/social

File Description Exports
SocialProfileDto.ts SocialProfileDto DTO for representing a user's social presence in the USHI community platform.

dto/trial

File Description Exports
TrialParticipantProfileDto.ts TrialParticipantProfileDto DTO for representing a user's enrollment and status within a clinical trial.

dto/user

File Description Exports
UserDto.ts UserDto DTO for the global User entity in the USHI platform. This is the root user object shared across all systems (LMS, Trials, Social).
UserProfileDto.ts UserProfileDto Aggregated DTO class that builds a full UserProfile from raw nested inputs.

dto/wallet

File Description Exports
WalletProfileDto.ts WalletProfileDto DTO for storing blockchain-linked user identity.

enums

File Description Exports
index.ts
role.ts RoleDomain Enumerates all supported domain scopes for role-based access and identity in the USHI platform. These domains allow roles to be logically separated by function and context.

types

File Description Exports
base.ts Raw input type for DTO constructors
demographicsProfile.ts IDemographicsProfileDto - Raw input for user identity & demographics
identityProfile.ts IIdentityProfileDto - Raw input for identity profile
index.ts
lmsUserProfile.ts ILMSUserProfileDto - Raw input for LMS user profile
role.ts IRoleDto Represents the raw input structure for a Role entity, typically used when creating or updating roles in the system.
roleAssignment.ts Status of a role assignment
socialProfile.ts ISocialProfileDto - Raw input for social profile creation/update
trialParticipantProfile.ts ITrialParticipantProfileDto - Raw input for trial profile
user.ts IUserDto - Raw input shape for global User entity
userProfile.ts UserProfile - Unified cross-domain representation of a user in the USHI platform. Used for aggregation, display, and platform-wide access decisions.
walletProfile.ts IWalletProfileDto - Raw input for wallet info

utils

File Description Exports
formatters.ts
index.ts
roleHelpers.ts RoleDefinition Represents an enriched role entry for display, validation, or configuration. getAllRoleDefinitions, getRoleDefinitionByKeyAndDomain, getValidRolesForDomain
userRoleHelpers.ts getActiveAssignmentsForUser Filters role assignments to include only those that: - belong to the specified user - are currently active - have not expired @param userId - The user ID to filter by @param assignments - All role assignments in the system @param now - Optional override for current time (defaults to Date.now()) @returns Array of active, non-expired role assignments getActiveAssignmentsForUser, isRoleStillValid, validateRoleAssignments