emr-types
Version:
Comprehensive TypeScript Types Library for Electronic Medical Record (EMR) Applications - Domain-Driven Design with Zod Validation
51 lines • 1.2 kB
TypeScript
/**
* Email Value Object
*
* Represents an email address with validation
*
* @interface Email
* @description Email value object for domain entities
*/
export interface Email {
/** The email address value */
value: string;
/** Whether the email is valid */
isValid: boolean;
/** The local part (before @) */
localPart: string;
/** The domain part (after @) */
domain: string;
/** Timestamp when email was validated */
validatedAt: Date;
}
/**
* Email Factory Functions
*/
export declare const EmailFactory: {
/**
* Create an email from string
*/
create: (value: string) => Email;
/**
* Create an email from parts
*/
fromParts: (localPart: string, domain: string) => Email;
};
/**
* Email Validation Functions
*/
export declare const EmailValidator: {
/**
* Check if a string is a valid email
*/
isValid: (value: string) => boolean;
/**
* Check if email is from a common provider
*/
isCommonProvider: (email: Email) => boolean;
/**
* Check if email is from a business domain
*/
isBusinessEmail: (email: Email) => boolean;
};
//# sourceMappingURL=Email.d.ts.map