emr-types
Version:
Comprehensive TypeScript Types Library for Electronic Medical Record (EMR) Applications - Domain-Driven Design with Zod Validation
90 lines • 1.94 kB
TypeScript
/**
* Tenant ID Value Object
*
* Type-safe tenant identifier with validation
*/
import { Id } from '../../shared/value-objects/Id';
/**
* Tenant ID Type
*
* Branded type for tenant identification
*/
export type TenantId = Id & {
readonly __brand: 'TenantId';
};
/**
* Tenant ID Factory
*/
export declare const TenantIdFactory: {
/**
* Create a new tenant ID
*/
create(): TenantId;
/**
* Create tenant ID from string
*/
fromString(value: string): TenantId;
/**
* Create tenant ID from UUID
*/
fromUuid(uuid: string): TenantId;
/**
* Create tenant ID from ULID
*/
fromUlid(ulid: string): TenantId;
/**
* Create custom tenant ID
*/
createCustom(value: string, format?: string): TenantId;
};
/**
* Tenant ID Validator
*/
export declare const TenantIdValidator: {
/**
* Check if value is a valid tenant ID
*/
isValid(value: any): value is TenantId;
/**
* Validate tenant ID format
*/
validateFormat(value: string): boolean;
/**
* Check if tenant ID is empty
*/
isEmpty(tenantId: TenantId): boolean;
/**
* Compare two tenant IDs
*/
areEqual(tenantId1: TenantId, tenantId2: TenantId): boolean;
};
/**
* Tenant ID Utilities
*/
export declare const TenantIdUtils: {
/**
* Convert tenant ID to string
*/
toString(tenantId: TenantId): string;
/**
* Get tenant ID type
*/
getType(tenantId: TenantId): string;
/**
* Check if tenant ID is UUID
*/
isUuid(tenantId: TenantId): boolean;
/**
* Check if tenant ID is ULID
*/
isUlid(tenantId: TenantId): boolean;
/**
* Check if tenant ID is custom
*/
isCustom(tenantId: TenantId): boolean;
/**
* Check if tenant ID is auto-increment
*/
isAutoIncrement(tenantId: TenantId): boolean;
};
//# sourceMappingURL=TenantId.d.ts.map