declare namespace Type { namespace Account { namespace AccountService { export type AccountId = GUID interface AccountDefinition { id: string name: string displayName: string role?: TRole props?: TProp } type Account = AccountDefinition } namespace AuthenticationService { export type Settings = { authentication?: { ttl?: number } } export interface AuthenticationData { // We use uuid to identify unique authentication // suggest using hash of the unique criteria from TMeta guid?: string accountId?: string createdAt?: number active?: boolean type: TType meta: TMeta } export type CommonAuthenticationData = AuthenticationData<"common", { name: string displayName: string email: string password?: string passwordHash?: string active: boolean }> } } }