import Accounts from './accounts'; import Deposits from './deposits'; import Payments from './payments'; import Transfers from './transfers'; import Validations from './validations'; import Withdraws from './withdraws'; const enums = { appSortBy: ['created', 'edited'], originalType: ['api_json'], publication: ['membership_requests.create', 'memberships.create', 'applications.create', 'versions.create'], sortOrder: ['asc', 'desc'], visibility: ['public'], }; export default class Mard2pApiClient { constructor(opts) { let options = opts; if (typeof opts === 'string') { options = { host: opts }; // convert host string to options object } this.enums = enums; this.accounts = new Accounts(options); this.deposits = new Deposits(options); this.payments = new Payments(options); this.transfers = new Transfers(options); this.validations = new Validations(options); this.withdraws = new Withdraws(options); } }