import { Node } from 'neo4j-driver' ; export class User { constructor ( private readonly node ) { } getId ( ) { return ( < Record < string , any > > this . node . properties ) . id ; } getPassword ( ) { return ( < Record < string , any > > this . node . properties ) . password ; } getClaims ( ) { const { username , email , bio , image } = < Record < string , any > > this . node . properties ; return { sub : username , username , email , bio , image : image || 'https://picsum.photos/200' , } ; } toJson ( ) { const { password , bio , image , ... properties } = < Record < string , any > > this . node . properties ; return { image : image || 'https://picsum.photos/200' , bio : bio || null , ... properties , } ; } }