import { Repository } from './repository' ; import { DirectThreadEntity , ProfileEntity } from '../entities' ; export class EntityFactory extends Repository { public directThread ( id ) { const thread = new DirectThreadEntity ( this . client ) ; if ( id instanceof Array ) { thread . userIds = id ; } else { thread . threadId = id ; } return thread ; } public profile ( pk ) { const thread = new ProfileEntity ( this . client ) ; thread . pk = pk ; return thread ; } }