UNPKG

emr-types

Version:

Comprehensive TypeScript Types Library for Electronic Medical Record (EMR) Applications - Domain-Driven Design with Zod Validation

90 lines 1.84 kB
/** * User ID Value Object * * Type-safe user identifier with validation */ import { Id } from '../../shared/value-objects/Id'; /** * User ID Type * * Branded type for user identification */ export type UserId = Id & { readonly __brand: 'UserId'; }; /** * User ID Factory */ export declare const UserIdFactory: { /** * Create a new user ID */ create(): UserId; /** * Create user ID from string */ fromString(value: string): UserId; /** * Create user ID from UUID */ fromUuid(uuid: string): UserId; /** * Create user ID from ULID */ fromUlid(ulid: string): UserId; /** * Create custom user ID */ createCustom(value: string, format?: string): UserId; }; /** * User ID Validator */ export declare const UserIdValidator: { /** * Check if value is a valid user ID */ isValid(value: any): value is UserId; /** * Validate user ID format */ validateFormat(value: string): boolean; /** * Check if user ID is empty */ isEmpty(userId: UserId): boolean; /** * Compare two user IDs */ areEqual(userId1: UserId, userId2: UserId): boolean; }; /** * User ID Utilities */ export declare const UserIdUtils: { /** * Convert user ID to string */ toString(userId: UserId): string; /** * Get user ID type */ getType(userId: UserId): string; /** * Check if user ID is UUID */ isUuid(userId: UserId): boolean; /** * Check if user ID is ULID */ isUlid(userId: UserId): boolean; /** * Check if user ID is custom */ isCustom(userId: UserId): boolean; /** * Check if user ID is auto-increment */ isAutoIncrement(userId: UserId): boolean; }; //# sourceMappingURL=UserId.d.ts.map