import Times from './times'; import Users from './users'; const enums = { patch.operation: ['test', 'replace'], stringOrInteger: ['string', 'integer'], time.patch.path: ['distance', 'time', 'id'], user.patch.path: ['username', 'password', 'role', 'id'], user.role: ['user', 'manager', 'admin'], }; export default class JoglogApiClient { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } this.enums = enums; this.times = new Times(options); this.users = new Users(options); } }