UNPKG

cbp-lib

Version:

Libraries for cbp

38 lines (32 loc) 830 B
'use strict' import {httpRequest} from '../_helpers/http' import {ArgumentError} from '../_helpers/custom-error' import {Schema, validateSchema} from '../_helpers/types' export class Manager { constructor(options) { if (typeof options !== 'object') { throw new ArgumentError('argument options must be type \'object\'') } this.options = options // validate options validateSchema(Schema.mgmtClientOptions, options) .catch(error => { throw new ArgumentError(error) }) } get(id) { return 'Get user by id' } getAll() { return 'Get all users' } create() { return 'Create user' } update() { return 'Update user' } delete() { return 'Delete user' } }