emr-types
Version:
Comprehensive TypeScript Types Library for Electronic Medical Record (EMR) Applications - Domain-Driven Design with Zod Validation
53 lines • 1.44 kB
TypeScript
/**
* Phone Number Value Object
*
* Represents a phone number with validation and formatting
*
* @interface PhoneNumber
* @description Phone number value object for domain entities
*/
export interface PhoneNumber {
/** The phone number value */
value: string;
/** Whether the phone number is valid */
isValid: boolean;
/** The country code */
countryCode: string;
/** The national number (without country code) */
nationalNumber: string;
/** The formatted display number */
formatted: string;
/** Timestamp when phone number was validated */
validatedAt: Date;
}
/**
* Phone Number Factory Functions
*/
export declare const PhoneNumberFactory: {
/**
* Create a phone number from string
*/
create: (value: string, countryCode?: string) => PhoneNumber;
/**
* Create a phone number from parts
*/
fromParts: (countryCode: string, nationalNumber: string) => PhoneNumber;
};
/**
* Phone Number Validation Functions
*/
export declare const PhoneNumberValidator: {
/**
* Check if a string is a valid Vietnamese phone number
*/
isValidVietnamese: (value: string) => boolean;
/**
* Check if phone number is mobile
*/
isMobile: (phoneNumber: PhoneNumber) => boolean;
/**
* Check if phone number is landline
*/
isLandline: (phoneNumber: PhoneNumber) => boolean;
};
//# sourceMappingURL=PhoneNumber.d.ts.map