From 4a215a507ff881e2d2c75cf7863c3354f3cff1f6 Mon Sep 17 00:00:00 2001 From: Christopher Meyer Date: Wed, 8 Apr 2020 20:20:27 +0200 Subject: [PATCH] updates --- lib/index.cjs.js | 47 +++++-- lib/index.cjs.js.map | 2 +- lib/index.es.js | 47 +++++-- lib/index.es.js.map | 2 +- lib/index.js | 46 +++++-- lib/index.js.map | 2 +- lib/index.min.js | 2 +- lib/index.min.js.map | 2 +- package.json | 2 +- src/auth.js | 2 +- src/handlers/members.js | 4 +- src/handlers/nodes.js | 24 +++- src/handlers/rhcore.js | 2 +- src/handlers/subtypes.json | 253 +++++++++++++++++++++++++++++++++++++ src/handlers/versions.js | 5 +- src/handlers/webreports.js | 2 +- src/handlers/workflow.js | 8 +- 17 files changed, 391 insertions(+), 61 deletions(-) create mode 100644 src/handlers/subtypes.json diff --git a/lib/index.cjs.js b/lib/index.cjs.js index 6015ba8..c9f91c7 100644 --- a/lib/index.cjs.js +++ b/lib/index.cjs.js @@ -26,7 +26,7 @@ function getInstance(baseURL) { }); instance.interceptors.response.use(response => { - let otcsticket = lodash(response, 'headers.otcsticket'); + const otcsticket = lodash(response, 'headers.otcsticket'); if (otcsticket) { instance.defaults.headers.common['OTCSTicket'] = otcsticket; @@ -89,12 +89,12 @@ const SubTypes = { var nodes = session => ({ addablenodetypes(dataid) { - return session.get(`/api/v1/nodes/${dataid}/addablenodetypes`) + return session.get(`api/v1/nodes/${dataid}/addablenodetypes`) }, async addDocument(parent_id, fileHandler, fileName = null) { - const url = '/api/v1/nodes'; + const url = 'api/v1/nodes'; const formData = formDataFactory.createFormData(); @@ -127,17 +127,33 @@ var nodes = session => ({ }) }, + node(dataid, params = {}) { + return session.get(`api/v2/nodes/${dataid}`, { params }) + }, + + ancestors(dataid, params = {}) { + return session.get(`api/v1/nodes/${dataid}/ancestors`, { params }) + }, + + volumeInfo(objType) { + return session.get(`api/v1/volumes/${objType}`) + }, + + volumes() { + return session.get('api/v2/volumes') + }, + addFolder(parent_id, name, params = {}) { return this.addItem(SubTypes.FOLDER, parent_id, name, params) }, children(dataid, params = {}) { // https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501 - return session.get(`/api/v2/nodes/${dataid}/nodes/`, { params }) + return session.get(`api/v2/nodes/${dataid}/nodes`, { params }) }, delete(dataid) { - return session.delete(`/api/v1/nodes/${dataid}/`) + return session.delete(`api/v1/nodes/${dataid}`) } }); @@ -151,10 +167,10 @@ var workflow = session => ({ }, draftprocesses(workflow_id) { - return session.postForm('/api/v2/draftprocesses', {workflow_id}) + return session.postForm('api/v2/draftprocesses', {workflow_id}) /* - return session.post('/api/v2/draftprocesses', {}, { + return session.post('api/v2/draftprocesses', {}, { params: { workflow_id } @@ -163,7 +179,7 @@ var workflow = session => ({ }, draftprocesses_update(draftprocess_id) { - return session.get('/api/v1/forms/draftprocesses/update', { + return session.get('api/v1/forms/draftprocesses/update', { params: { draftprocess_id } @@ -171,7 +187,7 @@ var workflow = session => ({ }, draftprocesses_put(draftprocess_id, body) { - return session.putForm(`/api/v2/draftprocesses/${draftprocess_id}`, { body }) + return session.putForm(`api/v2/draftprocesses/${draftprocess_id}`, { body }) }, draftprocesses_formUpdate(draftprocess_id, values) { @@ -205,7 +221,7 @@ var workflow = session => ({ var rhcore = session => ({ scriptNode(id, params = {}) { - return session.get(`/api/v1/rhcore/${id}`, { + return session.get(`api/v1/rhcore/${id}`, { params }) } @@ -225,11 +241,11 @@ var members = session => ({ ...options }; - return session.get(`/api/v2/members`, {params}) + return session.get(`api/v2/members`, {params}) }, member(id) { - return session.get(`/api/v2/members/${id}`) + return session.get(`api/v2/members/${id}`) } }); @@ -237,8 +253,11 @@ var members = session => ({ var versions = session => ({ async addVersion(dataid, fileHandler, fileName = null) { + // ERROR: This seemed to only upload the first 2500 characters when the file extension + // was .lxe (e.g., and unknown mimetype). Must look into this. + - const url = `/api/v1/nodes/${dataid}/versions`; + const url = `api/v1/nodes/${dataid}/versions`; const formData = formDataFactory.createFormData(); @@ -263,7 +282,7 @@ var versions = session => ({ var webreports = session => ({ run(dataid, params = {}) { - const url = `/api/v1/nodes/${dataid}/output`; + const url = `api/v1/nodes/${dataid}/output`; return session.get(url, { params }) } diff --git a/lib/index.cjs.js.map b/lib/index.cjs.js.map index 91a6303..7bf562b 100644 --- a/lib/index.cjs.js.map +++ b/lib/index.cjs.js.map @@ -1 +1 @@ -{"version":3,"file":"index.cjs.js","sources":["../src/handlers/form-data-factory.js","../src/auth.js","../src/handlers/nodes.js","../src/handlers/workflow.js","../src/handlers/rhcore.js","../src/handlers/members.js","../src/handlers/versions.js","../src/handlers/webreports.js","../src/Session.js","../src/index.js"],"sourcesContent":["module.exports = {\n\tcreateFormData() {\n\t\t if (process.node) {\n\t\t\tconst klass = require('form-data')\n\t\t\treturn new klass\n\t\t} else {\n\t\t\treturn new FormData()\n\t\t}\t\t\n\t}\n}","const axios = require('axios')\nconst get = require('lodash.get')\nconst FormDataFactory = require('./handlers/form-data-factory')\n\nfunction getInstance(baseURL) {\n\n\tconst instance = axios.create({\n\t\tbaseURL\n\t})\n\n\tinstance.interceptors.response.use(response => {\n\t\tlet otcsticket = get(response, 'headers.otcsticket')\n\n\t\tif (otcsticket) {\n\t\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\t\t}\n\t\treturn response\n\t}, error => {\n\t\treturn Promise.reject(error)\n\t})\n\n\treturn instance\n}\n\nfunction axiosFactory(options) {\n\tconst instance = getInstance(options.baseURL)\n\n\tconst username = get(options, 'username')\n\tconst password = get(options, 'password')\n\tconst otcsticket = get(options, 'otcsticket')\n\n\tif (otcsticket) {\n\n\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\n\t} else if (username && password) {\n\n\t\tinstance.interceptors.request.use(async request => {\n\n\t\t\tif (request.headers.common['OTCSTicket']) {\n\n\t\t\t\treturn request\n\n\t\t\t} else {\n\n\t\t\t\tconst formData = FormDataFactory.createFormData()\n\n\t\t\t\tformData.append('username', username)\n\t\t\t\tformData.append('password', password)\n\n\t\t\t\tlet response = process.node ? await axios.post(`${options.baseURL}/api/v1/auth/`, formData.getBuffer(), { headers: formData.getHeaders() }) : await axios.post(`${options.baseURL}/api/v1/auth/`, formData)\n\n\t\t\t\trequest.headers.common['OTCSTicket'] = get(response, 'data.ticket')\n\n\t\t\t\treturn request\n\t\t\t}\n\t\t})\n\t} else {\n\t\tthrow 'You must provide an otcsticket or username and password.'\n\t}\n\n\treturn instance\n}\n\nmodule.exports = axiosFactory","const FormDataFactory = require('./form-data-factory')\r\n\r\nconst SubTypes = {\r\n\tFOLDER: 0,\r\n\tDOCUMENT: 144\r\n}\r\n\r\nmodule.exports = session => ({\r\n\r\n\taddablenodetypes(dataid) {\r\n\t\treturn session.get(`/api/v1/nodes/${dataid}/addablenodetypes`)\r\n\t},\r\n\r\n\tasync addDocument(parent_id, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = '/api/v1/nodes'\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tformData.append('type', SubTypes.DOCUMENT)\r\n\t\tformData.append('parent_id', parent_id)\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n\taddItem(type, parent_id, name, params = {}) {\r\n\t\treturn session.postForm('api/v2/nodes', {\r\n\t\t\ttype,\r\n\t\t\tparent_id,\r\n\t\t\tname,\r\n\t\t\t...params\r\n\t\t})\r\n\t},\r\n\r\n\taddFolder(parent_id, name, params = {}) {\r\n\t\treturn this.addItem(SubTypes.FOLDER, parent_id, name, params)\r\n\t},\r\n\r\n\tchildren(dataid, params = {}) {\r\n\t\t// https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501\r\n\t\treturn session.get(`/api/v2/nodes/${dataid}/nodes/`, { params })\r\n\t},\r\n\r\n\tdelete(dataid) {\r\n\t\treturn session.delete(`/api/v1/nodes/${dataid}/`)\r\n\t}\r\n\r\n})","const get = require('lodash.get')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tstart(map_id) {\r\n\t\treturn this.draftprocesses(map_id)\r\n\t\t\t.then(response => get(response, 'data.results.draftprocess_id'))\r\n\t\t\t.then(draftprocess_id => this.draftprocesses_update(draftprocess_id))\r\n\t},\r\n\r\n\tdraftprocesses(workflow_id) {\r\n\t\treturn session.postForm('/api/v2/draftprocesses', {workflow_id})\r\n\t\t/*\r\n\t\t\r\n\t\t return session.post('/api/v2/draftprocesses', {}, {\r\n\t\t\tparams: {\r\n\t\t\t\tworkflow_id\r\n\t\t\t}\r\n\t\t})\r\n\t\t*/\r\n\t},\r\n\r\n\tdraftprocesses_update(draftprocess_id) {\r\n\t\treturn session.get('/api/v1/forms/draftprocesses/update', {\r\n\t\t\tparams: {\r\n\t\t\t\tdraftprocess_id\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\tdraftprocesses_put(draftprocess_id, body) {\r\n\t\treturn session.putForm(`/api/v2/draftprocesses/${draftprocess_id}`, { body })\r\n\t},\r\n\r\n\tdraftprocesses_formUpdate(draftprocess_id, values) {\r\n\t\t// : {\"WorkflowForm_2\":\"adsfasdf\"}\r\n\t\tconst body = {\r\n\t\t\taction: \"formUpdate\",\r\n\t\t\tvalues\r\n\t\t}\r\n\r\n\t\treturn this.draftprocesses_put(draftprocess_id, body)\r\n\t},\r\n\r\n\r\n\t// async start(map_id) {\r\n\t// \tdebugger\r\n\t// \t// this API is inconsistent with above\r\n\t// \tlet response = await this.draftprocesses(map_id)\r\n\r\n\t// \tlet draftprocess_id = get(response, 'data.results.draftprocess_id')\r\n\r\n\t// \tresponse = await this.draftprocesses_update(draftprocess_id)\r\n\r\n\t// \treturn response.data\r\n\r\n\t// }\r\n\r\n\r\n\r\n\r\n})","module.exports = session => ({\r\n\tscriptNode(id, params = {}) {\r\n\t\treturn session.get(`/api/v1/rhcore/${id}`, {\r\n\t\t\tparams\r\n\t\t})\r\n\t}\r\n})","module.exports = session => ({\n\n\tUSER: 0,\n\tGROUP: 1,\n\n\t// https://developer.opentext.com/awd/resources/apis/cs-rest-api-for-cs-16-s#!/members/SearchMember_get_1\n\tuserQuery(query, options = {}) {\n\t\tconst params = {\n\t\t\tlimit: 20,\n\t\t\twhere_type: [this.USER, this.GROUP],\n\t\t\tquery,\n\t\t\t...options\n\t\t}\n\n\t\treturn session.get(`/api/v2/members`, {params})\n\t},\n\n\tmember(id) {\n\t\treturn session.get(`/api/v2/members/${id}`)\n\t}\n\n})","const FormDataFactory = require('./form-data-factory')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tasync addVersion(dataid, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = `/api/v1/nodes/${dataid}/versions`\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\t// formData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\t\t\t// \r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\t// formData.append('name', fileHandler.name)\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n})","module.exports = session => ({\n\n\trun(dataid, params = {}) {\n\t\tconst url = `/api/v1/nodes/${dataid}/output`\n\t\treturn session.get(url, { params })\n\t}\n\n})","const auth = require('./auth')\r\nconst nodes = require('./handlers/nodes')\r\nconst workflow = require('./handlers/workflow')\r\nconst rhcore = require('./handlers/rhcore')\r\nconst members = require('./handlers/members')\r\nconst versions = require('./handlers/versions')\r\nconst webreports = require('./handlers/webreports')\r\nconst FormDataFactory = require('./handlers/form-data-factory')\r\n\r\nmodule.exports = class Session {\r\n\r\n\tconstructor(options) {\r\n\t\tthis.axios = auth(options)\r\n\t}\r\n\r\n\tget nodes() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._nodes == null) {\r\n\t\t\tthis._nodes = nodes(this)\r\n\t\t}\r\n\r\n\t\treturn this._nodes\r\n\t}\r\n\r\n\tget workflow() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._workflow == null) {\r\n\t\t\tthis._workflow = workflow(this)\r\n\t\t}\r\n\r\n\t\treturn this._workflow\r\n\t}\r\n\r\n\tget rhcore() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._rhcore == null) {\r\n\t\t\tthis._rhcore = rhcore(this)\r\n\t\t}\r\n\r\n\t\treturn this._rhcore\r\n\t}\r\n\r\n\tget members() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._members == null) {\r\n\t\t\tthis._members = members(this)\r\n\t\t}\r\n\r\n\t\treturn this._members\r\n\t}\r\n\r\n\tget webreports() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._webreports == null) {\r\n\t\t\tthis._webreports = webreports(this)\r\n\t\t}\r\n\r\n\t\treturn this._webreports\r\n\t}\r\n\r\n\tget versions() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._versions == null) {\r\n\t\t\tthis._versions = versions(this)\r\n\t\t}\r\n\r\n\t\treturn this._versions\r\n\t}\r\n\r\n\t_isObject(value) {\r\n\t\treturn value && typeof value === 'object' && value.constructor === Object\r\n\t}\r\n\r\n\t_objectToForm(obj) {\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tfor (let [key, value] of Object.entries(obj)) {\r\n\t\t\tif (Array.isArray(value) || this._isObject(value)) {\r\n\t\t\t\tformData.append(key, JSON.stringify(value))\r\n\t\t\t} else {\r\n\t\t\t\tformData.append(key, value)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formData\r\n\t}\r\n\r\n\tget(...args) {\r\n\t\treturn this.axios.get(...args)\r\n\t}\r\n\r\n\tputForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.put(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.put(url, formData)\r\n\t}\r\n\r\n\tpostForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.post(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.post(url, formData)\r\n\t}\r\n\r\n\tpatchForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.patch(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.patch(url, formData)\r\n\t}\r\n\r\n\tpost(...args) {\r\n\t\treturn this.axios.post(...args)\r\n\t}\r\n\r\n\tput(...args) {\r\n\t\treturn this.axios.put(...args)\r\n\t}\r\n\r\n\tdelete(...args) {\r\n\t\treturn this.axios.delete(...args)\r\n\t}\r\n\r\n\toptions(...args) {\r\n\t\treturn this.axios.options(...args)\r\n\t}\r\n\r\n\tpatch(...args) {\r\n\t\treturn this.axios.patch(...args)\r\n\t}\r\n\r\n}","const auth = require('./auth')\r\nconst Session = require('./Session')\r\n\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AG,IAAI,CAAC;AAClC,EAAE;AACF;AACA;;AC5HA,OAAc,GAAG,CAAC,IAAI,WAAEG,SAAO;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.cjs.js","sources":["../src/handlers/form-data-factory.js","../src/auth.js","../src/handlers/nodes.js","../src/handlers/workflow.js","../src/handlers/rhcore.js","../src/handlers/members.js","../src/handlers/versions.js","../src/handlers/webreports.js","../src/Session.js","../src/index.js"],"sourcesContent":["module.exports = {\n\tcreateFormData() {\n\t\t if (process.node) {\n\t\t\tconst klass = require('form-data')\n\t\t\treturn new klass\n\t\t} else {\n\t\t\treturn new FormData()\n\t\t}\t\t\n\t}\n}","const axios = require('axios')\nconst get = require('lodash.get')\nconst FormDataFactory = require('./handlers/form-data-factory')\n\nfunction getInstance(baseURL) {\n\n\tconst instance = axios.create({\n\t\tbaseURL\n\t})\n\n\tinstance.interceptors.response.use(response => {\n\t\tconst otcsticket = get(response, 'headers.otcsticket')\n\n\t\tif (otcsticket) {\n\t\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\t\t}\n\t\treturn response\n\t}, error => {\n\t\treturn Promise.reject(error)\n\t})\n\n\treturn instance\n}\n\nfunction axiosFactory(options) {\n\tconst instance = getInstance(options.baseURL)\n\n\tconst username = get(options, 'username')\n\tconst password = get(options, 'password')\n\tconst otcsticket = get(options, 'otcsticket')\n\n\tif (otcsticket) {\n\n\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\n\t} else if (username && password) {\n\n\t\tinstance.interceptors.request.use(async request => {\n\n\t\t\tif (request.headers.common['OTCSTicket']) {\n\n\t\t\t\treturn request\n\n\t\t\t} else {\n\n\t\t\t\tconst formData = FormDataFactory.createFormData()\n\n\t\t\t\tformData.append('username', username)\n\t\t\t\tformData.append('password', password)\n\n\t\t\t\tlet response = process.node ? await axios.post(`${options.baseURL}/api/v1/auth/`, formData.getBuffer(), { headers: formData.getHeaders() }) : await axios.post(`${options.baseURL}/api/v1/auth/`, formData)\n\n\t\t\t\trequest.headers.common['OTCSTicket'] = get(response, 'data.ticket')\n\n\t\t\t\treturn request\n\t\t\t}\n\t\t})\n\t} else {\n\t\tthrow 'You must provide an otcsticket or username and password.'\n\t}\n\n\treturn instance\n}\n\nmodule.exports = axiosFactory","const FormDataFactory = require('./form-data-factory')\r\n\r\nconst SubTypes = {\r\n\tFOLDER: 0,\r\n\tDOCUMENT: 144\r\n}\r\n\r\nmodule.exports = session => ({\r\n\r\n\taddablenodetypes(dataid) {\r\n\t\treturn session.get(`api/v1/nodes/${dataid}/addablenodetypes`)\r\n\t},\r\n\r\n\tasync addDocument(parent_id, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = 'api/v1/nodes'\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tformData.append('type', SubTypes.DOCUMENT)\r\n\t\tformData.append('parent_id', parent_id)\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n\taddItem(type, parent_id, name, params = {}) {\r\n\t\treturn session.postForm('api/v2/nodes', {\r\n\t\t\ttype,\r\n\t\t\tparent_id,\r\n\t\t\tname,\r\n\t\t\t...params\r\n\t\t})\r\n\t},\r\n\r\n\tnode(dataid, params = {}) {\r\n\t\treturn session.get(`api/v2/nodes/${dataid}`, { params })\r\n\t},\r\n\r\n\tancestors(dataid, params = {}) {\r\n\t\treturn session.get(`api/v1/nodes/${dataid}/ancestors`, { params })\r\n\t},\r\n\r\n\tvolumeInfo(objType) {\r\n\t\treturn session.get(`api/v1/volumes/${objType}`)\r\n\t},\r\n\r\n\tvolumes() {\r\n\t\treturn session.get('api/v2/volumes')\r\n\t},\r\n\r\n\taddFolder(parent_id, name, params = {}) {\r\n\t\treturn this.addItem(SubTypes.FOLDER, parent_id, name, params)\r\n\t},\r\n\r\n\tchildren(dataid, params = {}) {\r\n\t\t// https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501\r\n\t\treturn session.get(`api/v2/nodes/${dataid}/nodes`, { params })\r\n\t},\r\n\r\n\tdelete(dataid) {\r\n\t\treturn session.delete(`api/v1/nodes/${dataid}`)\r\n\t}\r\n\r\n})","const get = require('lodash.get')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tstart(map_id) {\r\n\t\treturn this.draftprocesses(map_id)\r\n\t\t\t.then(response => get(response, 'data.results.draftprocess_id'))\r\n\t\t\t.then(draftprocess_id => this.draftprocesses_update(draftprocess_id))\r\n\t},\r\n\r\n\tdraftprocesses(workflow_id) {\r\n\t\treturn session.postForm('api/v2/draftprocesses', {workflow_id})\r\n\t\t/*\r\n\t\t\r\n\t\t return session.post('api/v2/draftprocesses', {}, {\r\n\t\t\tparams: {\r\n\t\t\t\tworkflow_id\r\n\t\t\t}\r\n\t\t})\r\n\t\t*/\r\n\t},\r\n\r\n\tdraftprocesses_update(draftprocess_id) {\r\n\t\treturn session.get('api/v1/forms/draftprocesses/update', {\r\n\t\t\tparams: {\r\n\t\t\t\tdraftprocess_id\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\tdraftprocesses_put(draftprocess_id, body) {\r\n\t\treturn session.putForm(`api/v2/draftprocesses/${draftprocess_id}`, { body })\r\n\t},\r\n\r\n\tdraftprocesses_formUpdate(draftprocess_id, values) {\r\n\t\t// : {\"WorkflowForm_2\":\"adsfasdf\"}\r\n\t\tconst body = {\r\n\t\t\taction: \"formUpdate\",\r\n\t\t\tvalues\r\n\t\t}\r\n\r\n\t\treturn this.draftprocesses_put(draftprocess_id, body)\r\n\t},\r\n\r\n\r\n\t// async start(map_id) {\r\n\t// \tdebugger\r\n\t// \t// this API is inconsistent with above\r\n\t// \tlet response = await this.draftprocesses(map_id)\r\n\r\n\t// \tlet draftprocess_id = get(response, 'data.results.draftprocess_id')\r\n\r\n\t// \tresponse = await this.draftprocesses_update(draftprocess_id)\r\n\r\n\t// \treturn response.data\r\n\r\n\t// }\r\n\r\n\r\n\r\n\r\n})","module.exports = session => ({\r\n\tscriptNode(id, params = {}) {\r\n\t\treturn session.get(`api/v1/rhcore/${id}`, {\r\n\t\t\tparams\r\n\t\t})\r\n\t}\r\n})","module.exports = session => ({\n\n\tUSER: 0,\n\tGROUP: 1,\n\n\t// https://developer.opentext.com/awd/resources/apis/cs-rest-api-for-cs-16-s#!/members/SearchMember_get_1\n\tuserQuery(query, options = {}) {\n\t\tconst params = {\n\t\t\tlimit: 20,\n\t\t\twhere_type: [this.USER, this.GROUP],\n\t\t\tquery,\n\t\t\t...options\n\t\t}\n\n\t\treturn session.get(`api/v2/members`, {params})\n\t},\n\n\tmember(id) {\n\t\treturn session.get(`api/v2/members/${id}`)\n\t}\n\n})","const FormDataFactory = require('./form-data-factory')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tasync addVersion(dataid, fileHandler, fileName = null) {\r\n\t\t// ERROR: This seemed to only upload the first 2500 characters when the file extension\r\n\t\t// was .lxe (e.g., and unknown mimetype). Must look into this.\r\n\r\n\r\n\t\tconst url = `api/v1/nodes/${dataid}/versions`\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\t// formData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\t\t\t// \r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\t// formData.append('name', fileHandler.name)\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n})","module.exports = session => ({\n\n\trun(dataid, params = {}) {\n\t\tconst url = `api/v1/nodes/${dataid}/output`\n\t\treturn session.get(url, { params })\n\t}\n\n})","const auth = require('./auth')\r\nconst nodes = require('./handlers/nodes')\r\nconst workflow = require('./handlers/workflow')\r\nconst rhcore = require('./handlers/rhcore')\r\nconst members = require('./handlers/members')\r\nconst versions = require('./handlers/versions')\r\nconst webreports = require('./handlers/webreports')\r\nconst FormDataFactory = require('./handlers/form-data-factory')\r\n\r\nmodule.exports = class Session {\r\n\r\n\tconstructor(options) {\r\n\t\tthis.axios = auth(options)\r\n\t}\r\n\r\n\tget nodes() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._nodes == null) {\r\n\t\t\tthis._nodes = nodes(this)\r\n\t\t}\r\n\r\n\t\treturn this._nodes\r\n\t}\r\n\r\n\tget workflow() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._workflow == null) {\r\n\t\t\tthis._workflow = workflow(this)\r\n\t\t}\r\n\r\n\t\treturn this._workflow\r\n\t}\r\n\r\n\tget rhcore() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._rhcore == null) {\r\n\t\t\tthis._rhcore = rhcore(this)\r\n\t\t}\r\n\r\n\t\treturn this._rhcore\r\n\t}\r\n\r\n\tget members() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._members == null) {\r\n\t\t\tthis._members = members(this)\r\n\t\t}\r\n\r\n\t\treturn this._members\r\n\t}\r\n\r\n\tget webreports() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._webreports == null) {\r\n\t\t\tthis._webreports = webreports(this)\r\n\t\t}\r\n\r\n\t\treturn this._webreports\r\n\t}\r\n\r\n\tget versions() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._versions == null) {\r\n\t\t\tthis._versions = versions(this)\r\n\t\t}\r\n\r\n\t\treturn this._versions\r\n\t}\r\n\r\n\t_isObject(value) {\r\n\t\treturn value && typeof value === 'object' && value.constructor === Object\r\n\t}\r\n\r\n\t_objectToForm(obj) {\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tfor (let [key, value] of Object.entries(obj)) {\r\n\t\t\tif (Array.isArray(value) || this._isObject(value)) {\r\n\t\t\t\tformData.append(key, JSON.stringify(value))\r\n\t\t\t} else {\r\n\t\t\t\tformData.append(key, value)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formData\r\n\t}\r\n\r\n\tget(...args) {\r\n\t\treturn this.axios.get(...args)\r\n\t}\r\n\r\n\tputForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.put(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.put(url, formData)\r\n\t}\r\n\r\n\tpostForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.post(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.post(url, formData)\r\n\t}\r\n\r\n\tpatchForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.patch(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.patch(url, formData)\r\n\t}\r\n\r\n\tpost(...args) {\r\n\t\treturn this.axios.post(...args)\r\n\t}\r\n\r\n\tput(...args) {\r\n\t\treturn this.axios.put(...args)\r\n\t}\r\n\r\n\tdelete(...args) {\r\n\t\treturn this.axios.delete(...args)\r\n\t}\r\n\r\n\toptions(...args) {\r\n\t\treturn this.axios.options(...args)\r\n\t}\r\n\r\n\tpatch(...args) {\r\n\t\treturn this.axios.patch(...args)\r\n\t}\r\n\r\n}","const auth = require('./auth')\r\nconst Session = require('./Session')\r\n\r\nmodule.exports = {auth, Session}"],"names":["require$$0","get","FormDataFactory","path","require$$1","Session"],"mappings":";;;;;;;;;;;;AAAA,mBAAc,GAAG;AACjB,CAAC,cAAc,GAAG;AAClB,GAAqB;AACrB,GAAG,MAAM,KAAK,GAAGA,SAAoB;AACrC,GAAG,OAAO,IAAI,KAAK;AACnB,GAEG;AACH,EAAE;AACF;;ACLA,SAAS,WAAW,CAAC,OAAO,EAAE;AAC9B;AACA,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;AAC/B,EAAE,OAAO;AACT,EAAE,EAAC;AACH;AACA,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,IAAI;AAChD,EAAE,MAAM,UAAU,GAAGC,MAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAC;AACxD;AACA,EAAE,IAAI,UAAU,EAAE;AAClB,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,WAAU;AAC9D,GAAG;AACH,EAAE,OAAO,QAAQ;AACjB,EAAE,EAAE,KAAK,IAAI;AACb,EAAE,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9B,EAAE,EAAC;AACH;AACA,CAAC,OAAO,QAAQ;AAChB,CAAC;AACD;AACA,SAAS,YAAY,CAAC,OAAO,EAAE;AAC/B,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,OAAO,EAAC;AAC9C;AACA,CAAC,MAAM,QAAQ,GAAGA,MAAG,CAAC,OAAO,EAAE,UAAU,EAAC;AAC1C,CAAC,MAAM,QAAQ,GAAGA,MAAG,CAAC,OAAO,EAAE,UAA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;AAC7C,EAAE,QAAsB,IAAI,CAAC,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC,SAAS,EAAE,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE,EAAE,CAAC,CAA4B;AAC7H,EAAE;AACF;AACA,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE;AACf,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjC,EAAE;AACF;AACA,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE;AACd,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAChC,EAAE;AACF;AACA,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AACnC,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE;AAClB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AACpC,EAAE;AACF;AACA,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;AAClC,EAAE;AACF;AACA;;AC5HA,OAAc,GAAG,CAAC,IAAI,WAAEG,SAAO;;;;;;;;"} \ No newline at end of file diff --git a/lib/index.es.js b/lib/index.es.js index 6a3cdeb..61a6cc7 100644 --- a/lib/index.es.js +++ b/lib/index.es.js @@ -16,7 +16,7 @@ function getInstance(baseURL) { }); instance.interceptors.response.use(response => { - let otcsticket = lodash(response, 'headers.otcsticket'); + const otcsticket = lodash(response, 'headers.otcsticket'); if (otcsticket) { instance.defaults.headers.common['OTCSTicket'] = otcsticket; @@ -79,12 +79,12 @@ const SubTypes = { var nodes = session => ({ addablenodetypes(dataid) { - return session.get(`/api/v1/nodes/${dataid}/addablenodetypes`) + return session.get(`api/v1/nodes/${dataid}/addablenodetypes`) }, async addDocument(parent_id, fileHandler, fileName = null) { - const url = '/api/v1/nodes'; + const url = 'api/v1/nodes'; const formData = formDataFactory.createFormData(); @@ -112,17 +112,33 @@ var nodes = session => ({ }) }, + node(dataid, params = {}) { + return session.get(`api/v2/nodes/${dataid}`, { params }) + }, + + ancestors(dataid, params = {}) { + return session.get(`api/v1/nodes/${dataid}/ancestors`, { params }) + }, + + volumeInfo(objType) { + return session.get(`api/v1/volumes/${objType}`) + }, + + volumes() { + return session.get('api/v2/volumes') + }, + addFolder(parent_id, name, params = {}) { return this.addItem(SubTypes.FOLDER, parent_id, name, params) }, children(dataid, params = {}) { // https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501 - return session.get(`/api/v2/nodes/${dataid}/nodes/`, { params }) + return session.get(`api/v2/nodes/${dataid}/nodes`, { params }) }, delete(dataid) { - return session.delete(`/api/v1/nodes/${dataid}/`) + return session.delete(`api/v1/nodes/${dataid}`) } }); @@ -136,10 +152,10 @@ var workflow = session => ({ }, draftprocesses(workflow_id) { - return session.postForm('/api/v2/draftprocesses', {workflow_id}) + return session.postForm('api/v2/draftprocesses', {workflow_id}) /* - return session.post('/api/v2/draftprocesses', {}, { + return session.post('api/v2/draftprocesses', {}, { params: { workflow_id } @@ -148,7 +164,7 @@ var workflow = session => ({ }, draftprocesses_update(draftprocess_id) { - return session.get('/api/v1/forms/draftprocesses/update', { + return session.get('api/v1/forms/draftprocesses/update', { params: { draftprocess_id } @@ -156,7 +172,7 @@ var workflow = session => ({ }, draftprocesses_put(draftprocess_id, body) { - return session.putForm(`/api/v2/draftprocesses/${draftprocess_id}`, { body }) + return session.putForm(`api/v2/draftprocesses/${draftprocess_id}`, { body }) }, draftprocesses_formUpdate(draftprocess_id, values) { @@ -190,7 +206,7 @@ var workflow = session => ({ var rhcore = session => ({ scriptNode(id, params = {}) { - return session.get(`/api/v1/rhcore/${id}`, { + return session.get(`api/v1/rhcore/${id}`, { params }) } @@ -210,11 +226,11 @@ var members = session => ({ ...options }; - return session.get(`/api/v2/members`, {params}) + return session.get(`api/v2/members`, {params}) }, member(id) { - return session.get(`/api/v2/members/${id}`) + return session.get(`api/v2/members/${id}`) } }); @@ -222,8 +238,11 @@ var members = session => ({ var versions = session => ({ async addVersion(dataid, fileHandler, fileName = null) { + // ERROR: This seemed to only upload the first 2500 characters when the file extension + // was .lxe (e.g., and unknown mimetype). Must look into this. + - const url = `/api/v1/nodes/${dataid}/versions`; + const url = `api/v1/nodes/${dataid}/versions`; const formData = formDataFactory.createFormData(); @@ -244,7 +263,7 @@ var versions = session => ({ var webreports = session => ({ run(dataid, params = {}) { - const url = `/api/v1/nodes/${dataid}/output`; + const url = `api/v1/nodes/${dataid}/output`; return session.get(url, { params }) } diff --git a/lib/index.es.js.map b/lib/index.es.js.map index 33fb196..7038ef5 100644 --- a/lib/index.es.js.map +++ b/lib/index.es.js.map @@ -1 +1 @@ -{"version":3,"file":"index.es.js","sources":["../src/handlers/form-data-factory.js","../src/auth.js","../src/handlers/nodes.js","../src/handlers/workflow.js","../src/handlers/rhcore.js","../src/handlers/members.js","../src/handlers/versions.js","../src/handlers/webreports.js","../src/Session.js","../src/index.js"],"sourcesContent":["module.exports = {\n\tcreateFormData() {\n\t\t if (process.node) {\n\t\t\tconst klass = require('form-data')\n\t\t\treturn new klass\n\t\t} else {\n\t\t\treturn new FormData()\n\t\t}\t\t\n\t}\n}","const axios = require('axios')\nconst get = require('lodash.get')\nconst FormDataFactory = require('./handlers/form-data-factory')\n\nfunction getInstance(baseURL) {\n\n\tconst instance = axios.create({\n\t\tbaseURL\n\t})\n\n\tinstance.interceptors.response.use(response => {\n\t\tlet otcsticket = get(response, 'headers.otcsticket')\n\n\t\tif (otcsticket) {\n\t\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\t\t}\n\t\treturn response\n\t}, error => {\n\t\treturn Promise.reject(error)\n\t})\n\n\treturn instance\n}\n\nfunction axiosFactory(options) {\n\tconst instance = getInstance(options.baseURL)\n\n\tconst username = get(options, 'username')\n\tconst password = get(options, 'password')\n\tconst otcsticket = get(options, 'otcsticket')\n\n\tif (otcsticket) {\n\n\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\n\t} else if (username && password) {\n\n\t\tinstance.interceptors.request.use(async request => {\n\n\t\t\tif (request.headers.common['OTCSTicket']) {\n\n\t\t\t\treturn request\n\n\t\t\t} else {\n\n\t\t\t\tconst formData = FormDataFactory.createFormData()\n\n\t\t\t\tformData.append('username', username)\n\t\t\t\tformData.append('password', password)\n\n\t\t\t\tlet response = process.node ? await axios.post(`${options.baseURL}/api/v1/auth/`, formData.getBuffer(), { headers: formData.getHeaders() }) : await axios.post(`${options.baseURL}/api/v1/auth/`, formData)\n\n\t\t\t\trequest.headers.common['OTCSTicket'] = get(response, 'data.ticket')\n\n\t\t\t\treturn request\n\t\t\t}\n\t\t})\n\t} else {\n\t\tthrow 'You must provide an otcsticket or username and password.'\n\t}\n\n\treturn instance\n}\n\nmodule.exports = axiosFactory","const FormDataFactory = require('./form-data-factory')\r\n\r\nconst SubTypes = {\r\n\tFOLDER: 0,\r\n\tDOCUMENT: 144\r\n}\r\n\r\nmodule.exports = session => ({\r\n\r\n\taddablenodetypes(dataid) {\r\n\t\treturn session.get(`/api/v1/nodes/${dataid}/addablenodetypes`)\r\n\t},\r\n\r\n\tasync addDocument(parent_id, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = '/api/v1/nodes'\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tformData.append('type', SubTypes.DOCUMENT)\r\n\t\tformData.append('parent_id', parent_id)\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n\taddItem(type, parent_id, name, params = {}) {\r\n\t\treturn session.postForm('api/v2/nodes', {\r\n\t\t\ttype,\r\n\t\t\tparent_id,\r\n\t\t\tname,\r\n\t\t\t...params\r\n\t\t})\r\n\t},\r\n\r\n\taddFolder(parent_id, name, params = {}) {\r\n\t\treturn this.addItem(SubTypes.FOLDER, parent_id, name, params)\r\n\t},\r\n\r\n\tchildren(dataid, params = {}) {\r\n\t\t// https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501\r\n\t\treturn session.get(`/api/v2/nodes/${dataid}/nodes/`, { params })\r\n\t},\r\n\r\n\tdelete(dataid) {\r\n\t\treturn session.delete(`/api/v1/nodes/${dataid}/`)\r\n\t}\r\n\r\n})","const get = require('lodash.get')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tstart(map_id) {\r\n\t\treturn this.draftprocesses(map_id)\r\n\t\t\t.then(response => get(response, 'data.results.draftprocess_id'))\r\n\t\t\t.then(draftprocess_id => this.draftprocesses_update(draftprocess_id))\r\n\t},\r\n\r\n\tdraftprocesses(workflow_id) {\r\n\t\treturn session.postForm('/api/v2/draftprocesses', {workflow_id})\r\n\t\t/*\r\n\t\t\r\n\t\t return session.post('/api/v2/draftprocesses', {}, {\r\n\t\t\tparams: {\r\n\t\t\t\tworkflow_id\r\n\t\t\t}\r\n\t\t})\r\n\t\t*/\r\n\t},\r\n\r\n\tdraftprocesses_update(draftprocess_id) {\r\n\t\treturn session.get('/api/v1/forms/draftprocesses/update', {\r\n\t\t\tparams: {\r\n\t\t\t\tdraftprocess_id\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\tdraftprocesses_put(draftprocess_id, body) {\r\n\t\treturn session.putForm(`/api/v2/draftprocesses/${draftprocess_id}`, { body })\r\n\t},\r\n\r\n\tdraftprocesses_formUpdate(draftprocess_id, values) {\r\n\t\t// : {\"WorkflowForm_2\":\"adsfasdf\"}\r\n\t\tconst body = {\r\n\t\t\taction: \"formUpdate\",\r\n\t\t\tvalues\r\n\t\t}\r\n\r\n\t\treturn this.draftprocesses_put(draftprocess_id, body)\r\n\t},\r\n\r\n\r\n\t// async start(map_id) {\r\n\t// \tdebugger\r\n\t// \t// this API is inconsistent with above\r\n\t// \tlet response = await this.draftprocesses(map_id)\r\n\r\n\t// \tlet draftprocess_id = get(response, 'data.results.draftprocess_id')\r\n\r\n\t// \tresponse = await this.draftprocesses_update(draftprocess_id)\r\n\r\n\t// \treturn response.data\r\n\r\n\t// }\r\n\r\n\r\n\r\n\r\n})","module.exports = session => ({\r\n\tscriptNode(id, params = {}) {\r\n\t\treturn session.get(`/api/v1/rhcore/${id}`, {\r\n\t\t\tparams\r\n\t\t})\r\n\t}\r\n})","module.exports = session => ({\n\n\tUSER: 0,\n\tGROUP: 1,\n\n\t// https://developer.opentext.com/awd/resources/apis/cs-rest-api-for-cs-16-s#!/members/SearchMember_get_1\n\tuserQuery(query, options = {}) {\n\t\tconst params = {\n\t\t\tlimit: 20,\n\t\t\twhere_type: [this.USER, this.GROUP],\n\t\t\tquery,\n\t\t\t...options\n\t\t}\n\n\t\treturn session.get(`/api/v2/members`, {params})\n\t},\n\n\tmember(id) {\n\t\treturn session.get(`/api/v2/members/${id}`)\n\t}\n\n})","const FormDataFactory = require('./form-data-factory')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tasync addVersion(dataid, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = `/api/v1/nodes/${dataid}/versions`\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\t// formData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\t\t\t// \r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\t// formData.append('name', fileHandler.name)\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n})","module.exports = session => ({\n\n\trun(dataid, params = {}) {\n\t\tconst url = `/api/v1/nodes/${dataid}/output`\n\t\treturn session.get(url, { params })\n\t}\n\n})","const auth = require('./auth')\r\nconst nodes = require('./handlers/nodes')\r\nconst workflow = require('./handlers/workflow')\r\nconst rhcore = require('./handlers/rhcore')\r\nconst members = require('./handlers/members')\r\nconst versions = require('./handlers/versions')\r\nconst webreports = require('./handlers/webreports')\r\nconst FormDataFactory = require('./handlers/form-data-factory')\r\n\r\nmodule.exports = class Session {\r\n\r\n\tconstructor(options) {\r\n\t\tthis.axios = auth(options)\r\n\t}\r\n\r\n\tget nodes() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._nodes == null) {\r\n\t\t\tthis._nodes = nodes(this)\r\n\t\t}\r\n\r\n\t\treturn this._nodes\r\n\t}\r\n\r\n\tget workflow() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._workflow == null) {\r\n\t\t\tthis._workflow = workflow(this)\r\n\t\t}\r\n\r\n\t\treturn this._workflow\r\n\t}\r\n\r\n\tget rhcore() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._rhcore == null) {\r\n\t\t\tthis._rhcore = rhcore(this)\r\n\t\t}\r\n\r\n\t\treturn this._rhcore\r\n\t}\r\n\r\n\tget members() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._members == null) {\r\n\t\t\tthis._members = members(this)\r\n\t\t}\r\n\r\n\t\treturn this._members\r\n\t}\r\n\r\n\tget webreports() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._webreports == null) {\r\n\t\t\tthis._webreports = webreports(this)\r\n\t\t}\r\n\r\n\t\treturn this._webreports\r\n\t}\r\n\r\n\tget versions() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._versions == null) {\r\n\t\t\tthis._versions = versions(this)\r\n\t\t}\r\n\r\n\t\treturn this._versions\r\n\t}\r\n\r\n\t_isObject(value) {\r\n\t\treturn value && typeof value === 'object' && value.constructor === Object\r\n\t}\r\n\r\n\t_objectToForm(obj) {\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tfor (let [key, value] of Object.entries(obj)) {\r\n\t\t\tif (Array.isArray(value) || this._isObject(value)) {\r\n\t\t\t\tformData.append(key, JSON.stringify(value))\r\n\t\t\t} else {\r\n\t\t\t\tformData.append(key, value)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formData\r\n\t}\r\n\r\n\tget(...args) {\r\n\t\treturn this.axios.get(...args)\r\n\t}\r\n\r\n\tputForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.put(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.put(url, formData)\r\n\t}\r\n\r\n\tpostForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.post(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.post(url, formData)\r\n\t}\r\n\r\n\tpatchForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.patch(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.patch(url, formData)\r\n\t}\r\n\r\n\tpost(...args) {\r\n\t\treturn this.axios.post(...args)\r\n\t}\r\n\r\n\tput(...args) {\r\n\t\treturn this.axios.put(...args)\r\n\t}\r\n\r\n\tdelete(...args) {\r\n\t\treturn this.axios.delete(...args)\r\n\t}\r\n\r\n\toptions(...args) {\r\n\t\treturn this.axios.options(...args)\r\n\t}\r\n\r\n\tpatch(...args) {\r\n\t\treturn this.axios.patch(...args)\r\n\t}\r\n\r\n}","const auth = require('./auth')\r\nconst Session = require('./Session')\r\n\r\nmodule.exports = {auth, Session}"],"names":["get","FormDataFactory","Session"],"mappings":";;;AAAA,mBAAc,GAAG;AACjB,CAAC,cAAc,GAAG;AAClB,GAGS;AACT,GAAG,OAAO,IAAI,QAAQ,EAAE;AACxB,GAAG;AACH,EAAE;AACF;;ACLA,SAAS,WAAW,CAAC,OAAO,EAAE;AAC9B;AACA,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;AAC/B,EAAE,OAAO;AACT,EAAE,EAAC;AACH;AACA,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,IAAI;AAChD,EAAE,IAAI,UAAU,GAAGA,MAAG,CAAC,QAAQ,EAAE,oBAAoB,EAAC;AACtD;AACA,EAAE,IAAI,UAAU,EAAE;AAClB,GAAG,QAAQ,CAAC,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,YAAY,CAAC,GAAG,WAAU;AAC9D,GAAG;AACH,EAAE,OAAO,QAAQ;AACjB,EAAE,EAAE,KAAK,IAAI;AACb,EAAE,OAAO,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC;AAC9B,EAAE,EAAC;AACH;AACA,CAAC,OAAO,QAAQ;AAChB,CAAC;AACD;AACA,SAAS,YAAY,CAAC,OAAO,EAAE;AAC/B,CAAC,MAAM,QAAQ,GAAG,WAAW,CAAC,OAAO,CAAC,OAAO,EAAC;AAC9C;AACA,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AC,KAAK,CAAC,GAAG,EAAE,QAAQ,CAAC;AAC7H,EAAE;AACF;AACA,CAAC,IAAI,CAAC,GAAG,IAAI,EAAE;AACf,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjC,EAAE;AACF;AACA,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE;AACd,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAChC,EAAE;AACF;AACA,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AACnC,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE;AAClB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AACpC,EAAE;AACF;AACA,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;AAClC,EAAE;AACF;AACA;;AC5HA,OAAc,GAAG,CAAC,IAAI,WAAEC,SAAO;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.es.js","sources":["../src/handlers/form-data-factory.js","../src/auth.js","../src/handlers/nodes.js","../src/handlers/workflow.js","../src/handlers/rhcore.js","../src/handlers/members.js","../src/handlers/versions.js","../src/handlers/webreports.js","../src/Session.js","../src/index.js"],"sourcesContent":["module.exports = {\n\tcreateFormData() {\n\t\t if (process.node) {\n\t\t\tconst klass = require('form-data')\n\t\t\treturn new klass\n\t\t} else {\n\t\t\treturn new FormData()\n\t\t}\t\t\n\t}\n}","const axios = require('axios')\nconst get = require('lodash.get')\nconst FormDataFactory = require('./handlers/form-data-factory')\n\nfunction getInstance(baseURL) {\n\n\tconst instance = axios.create({\n\t\tbaseURL\n\t})\n\n\tinstance.interceptors.response.use(response => {\n\t\tconst otcsticket = get(response, 'headers.otcsticket')\n\n\t\tif (otcsticket) {\n\t\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\t\t}\n\t\treturn response\n\t}, error => {\n\t\treturn Promise.reject(error)\n\t})\n\n\treturn instance\n}\n\nfunction axiosFactory(options) {\n\tconst instance = getInstance(options.baseURL)\n\n\tconst username = get(options, 'username')\n\tconst password = get(options, 'password')\n\tconst otcsticket = get(options, 'otcsticket')\n\n\tif (otcsticket) {\n\n\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\n\t} else if (username && password) {\n\n\t\tinstance.interceptors.request.use(async request => {\n\n\t\t\tif (request.headers.common['OTCSTicket']) {\n\n\t\t\t\treturn request\n\n\t\t\t} else {\n\n\t\t\t\tconst formData = FormDataFactory.createFormData()\n\n\t\t\t\tformData.append('username', username)\n\t\t\t\tformData.append('password', password)\n\n\t\t\t\tlet response = process.node ? await axios.post(`${options.baseURL}/api/v1/auth/`, formData.getBuffer(), { headers: formData.getHeaders() }) : await axios.post(`${options.baseURL}/api/v1/auth/`, formData)\n\n\t\t\t\trequest.headers.common['OTCSTicket'] = get(response, 'data.ticket')\n\n\t\t\t\treturn request\n\t\t\t}\n\t\t})\n\t} else {\n\t\tthrow 'You must provide an otcsticket or username and password.'\n\t}\n\n\treturn instance\n}\n\nmodule.exports = axiosFactory","const FormDataFactory = require('./form-data-factory')\r\n\r\nconst SubTypes = {\r\n\tFOLDER: 0,\r\n\tDOCUMENT: 144\r\n}\r\n\r\nmodule.exports = session => ({\r\n\r\n\taddablenodetypes(dataid) {\r\n\t\treturn session.get(`api/v1/nodes/${dataid}/addablenodetypes`)\r\n\t},\r\n\r\n\tasync addDocument(parent_id, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = 'api/v1/nodes'\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tformData.append('type', SubTypes.DOCUMENT)\r\n\t\tformData.append('parent_id', parent_id)\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n\taddItem(type, parent_id, name, params = {}) {\r\n\t\treturn session.postForm('api/v2/nodes', {\r\n\t\t\ttype,\r\n\t\t\tparent_id,\r\n\t\t\tname,\r\n\t\t\t...params\r\n\t\t})\r\n\t},\r\n\r\n\tnode(dataid, params = {}) {\r\n\t\treturn session.get(`api/v2/nodes/${dataid}`, { params })\r\n\t},\r\n\r\n\tancestors(dataid, params = {}) {\r\n\t\treturn session.get(`api/v1/nodes/${dataid}/ancestors`, { params })\r\n\t},\r\n\r\n\tvolumeInfo(objType) {\r\n\t\treturn session.get(`api/v1/volumes/${objType}`)\r\n\t},\r\n\r\n\tvolumes() {\r\n\t\treturn session.get('api/v2/volumes')\r\n\t},\r\n\r\n\taddFolder(parent_id, name, params = {}) {\r\n\t\treturn this.addItem(SubTypes.FOLDER, parent_id, name, params)\r\n\t},\r\n\r\n\tchildren(dataid, params = {}) {\r\n\t\t// https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501\r\n\t\treturn session.get(`api/v2/nodes/${dataid}/nodes`, { params })\r\n\t},\r\n\r\n\tdelete(dataid) {\r\n\t\treturn session.delete(`api/v1/nodes/${dataid}`)\r\n\t}\r\n\r\n})","const get = require('lodash.get')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tstart(map_id) {\r\n\t\treturn this.draftprocesses(map_id)\r\n\t\t\t.then(response => get(response, 'data.results.draftprocess_id'))\r\n\t\t\t.then(draftprocess_id => this.draftprocesses_update(draftprocess_id))\r\n\t},\r\n\r\n\tdraftprocesses(workflow_id) {\r\n\t\treturn session.postForm('api/v2/draftprocesses', {workflow_id})\r\n\t\t/*\r\n\t\t\r\n\t\t return session.post('api/v2/draftprocesses', {}, {\r\n\t\t\tparams: {\r\n\t\t\t\tworkflow_id\r\n\t\t\t}\r\n\t\t})\r\n\t\t*/\r\n\t},\r\n\r\n\tdraftprocesses_update(draftprocess_id) {\r\n\t\treturn session.get('api/v1/forms/draftprocesses/update', {\r\n\t\t\tparams: {\r\n\t\t\t\tdraftprocess_id\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\tdraftprocesses_put(draftprocess_id, body) {\r\n\t\treturn session.putForm(`api/v2/draftprocesses/${draftprocess_id}`, { body })\r\n\t},\r\n\r\n\tdraftprocesses_formUpdate(draftprocess_id, values) {\r\n\t\t// : {\"WorkflowForm_2\":\"adsfasdf\"}\r\n\t\tconst body = {\r\n\t\t\taction: \"formUpdate\",\r\n\t\t\tvalues\r\n\t\t}\r\n\r\n\t\treturn this.draftprocesses_put(draftprocess_id, body)\r\n\t},\r\n\r\n\r\n\t// async start(map_id) {\r\n\t// \tdebugger\r\n\t// \t// this API is inconsistent with above\r\n\t// \tlet response = await this.draftprocesses(map_id)\r\n\r\n\t// \tlet draftprocess_id = get(response, 'data.results.draftprocess_id')\r\n\r\n\t// \tresponse = await this.draftprocesses_update(draftprocess_id)\r\n\r\n\t// \treturn response.data\r\n\r\n\t// }\r\n\r\n\r\n\r\n\r\n})","module.exports = session => ({\r\n\tscriptNode(id, params = {}) {\r\n\t\treturn session.get(`api/v1/rhcore/${id}`, {\r\n\t\t\tparams\r\n\t\t})\r\n\t}\r\n})","module.exports = session => ({\n\n\tUSER: 0,\n\tGROUP: 1,\n\n\t// https://developer.opentext.com/awd/resources/apis/cs-rest-api-for-cs-16-s#!/members/SearchMember_get_1\n\tuserQuery(query, options = {}) {\n\t\tconst params = {\n\t\t\tlimit: 20,\n\t\t\twhere_type: [this.USER, this.GROUP],\n\t\t\tquery,\n\t\t\t...options\n\t\t}\n\n\t\treturn session.get(`api/v2/members`, {params})\n\t},\n\n\tmember(id) {\n\t\treturn session.get(`api/v2/members/${id}`)\n\t}\n\n})","const FormDataFactory = require('./form-data-factory')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tasync addVersion(dataid, fileHandler, fileName = null) {\r\n\t\t// ERROR: This seemed to only upload the first 2500 characters when the file extension\r\n\t\t// was .lxe (e.g., and unknown mimetype). Must look into this.\r\n\r\n\r\n\t\tconst url = `api/v1/nodes/${dataid}/versions`\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\t// formData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\t\t\t// \r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\t// formData.append('name', fileHandler.name)\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n})","module.exports = session => ({\n\n\trun(dataid, params = {}) {\n\t\tconst url = `api/v1/nodes/${dataid}/output`\n\t\treturn session.get(url, { params })\n\t}\n\n})","const auth = require('./auth')\r\nconst nodes = require('./handlers/nodes')\r\nconst workflow = require('./handlers/workflow')\r\nconst rhcore = require('./handlers/rhcore')\r\nconst members = require('./handlers/members')\r\nconst versions = require('./handlers/versions')\r\nconst webreports = require('./handlers/webreports')\r\nconst FormDataFactory = require('./handlers/form-data-factory')\r\n\r\nmodule.exports = class Session {\r\n\r\n\tconstructor(options) {\r\n\t\tthis.axios = auth(options)\r\n\t}\r\n\r\n\tget nodes() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._nodes == null) {\r\n\t\t\tthis._nodes = nodes(this)\r\n\t\t}\r\n\r\n\t\treturn this._nodes\r\n\t}\r\n\r\n\tget workflow() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._workflow == null) {\r\n\t\t\tthis._workflow = workflow(this)\r\n\t\t}\r\n\r\n\t\treturn this._workflow\r\n\t}\r\n\r\n\tget rhcore() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._rhcore == null) {\r\n\t\t\tthis._rhcore = rhcore(this)\r\n\t\t}\r\n\r\n\t\treturn this._rhcore\r\n\t}\r\n\r\n\tget members() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._members == null) {\r\n\t\t\tthis._members = members(this)\r\n\t\t}\r\n\r\n\t\treturn this._members\r\n\t}\r\n\r\n\tget webreports() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._webreports == null) {\r\n\t\t\tthis._webreports = webreports(this)\r\n\t\t}\r\n\r\n\t\treturn this._webreports\r\n\t}\r\n\r\n\tget versions() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._versions == null) {\r\n\t\t\tthis._versions = versions(this)\r\n\t\t}\r\n\r\n\t\treturn this._versions\r\n\t}\r\n\r\n\t_isObject(value) {\r\n\t\treturn value && typeof value === 'object' && value.constructor === Object\r\n\t}\r\n\r\n\t_objectToForm(obj) {\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tfor (let [key, value] of Object.entries(obj)) {\r\n\t\t\tif (Array.isArray(value) || this._isObject(value)) {\r\n\t\t\t\tformData.append(key, JSON.stringify(value))\r\n\t\t\t} else {\r\n\t\t\t\tformData.append(key, value)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formData\r\n\t}\r\n\r\n\tget(...args) {\r\n\t\treturn this.axios.get(...args)\r\n\t}\r\n\r\n\tputForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.put(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.put(url, formData)\r\n\t}\r\n\r\n\tpostForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.post(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.post(url, formData)\r\n\t}\r\n\r\n\tpatchForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.patch(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.patch(url, formData)\r\n\t}\r\n\r\n\tpost(...args) {\r\n\t\treturn this.axios.post(...args)\r\n\t}\r\n\r\n\tput(...args) {\r\n\t\treturn this.axios.put(...args)\r\n\t}\r\n\r\n\tdelete(...args) {\r\n\t\treturn this.axios.delete(...args)\r\n\t}\r\n\r\n\toptions(...args) {\r\n\t\treturn this.axios.options(...args)\r\n\t}\r\n\r\n\tpatch(...args) {\r\n\t\treturn this.axios.patch(...args)\r\n\t}\r\n\r\n}","const auth = require('./auth')\r\nconst Session = require('./Session')\r\n\r\nmodule.exports = {auth, Session}"],"names":["get","FormDataFactory","Session"],"mappings":";;;AAAA,mBAAc,GAAG;AACjB,CAAC,cAAc,GAAG;AAClB,GAGS;AACT,GAAG,OAAO,IAAI,QAAQ,EAAE;AACxB,GAAG;AACH,EAAE;AACF;;ACLA,SAAS,WAAW,CAAC,OAAO,EAAE;AAC9B;AACA,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,MAAM,CAAC;AAC/B,EAAE,OAAO;AACT,EAAE,EAAC;AACH;AACA,CAAC,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,QAAQ,IAAI;AAChD,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KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AACjC,EAAE;AACF;AACA,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE;AACd,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC;AAChC,EAAE;AACF;AACA,CAAC,MAAM,CAAC,GAAG,IAAI,EAAE;AACjB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,GAAG,IAAI,CAAC;AACnC,EAAE;AACF;AACA,CAAC,OAAO,CAAC,GAAG,IAAI,EAAE;AAClB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;AACpC,EAAE;AACF;AACA,CAAC,KAAK,CAAC,GAAG,IAAI,EAAE;AAChB,EAAE,OAAO,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC;AAClC,EAAE;AACF;AACA;;AC5HA,OAAc,GAAG,CAAC,IAAI,WAAEC,SAAO;;;;;;;"} \ No newline at end of file diff --git a/lib/index.js b/lib/index.js index a9da3b5..dfb4fbb 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1987,7 +1987,7 @@ var nodes = function nodes(session) { return { addablenodetypes: function addablenodetypes(dataid) { - return session.get("/api/v1/nodes/".concat(dataid, "/addablenodetypes")); + return session.get("api/v1/nodes/".concat(dataid, "/addablenodetypes")); }, addDocument: function addDocument(parent_id, fileHandler) { var _arguments = arguments; @@ -1999,7 +1999,7 @@ switch (_context.prev = _context.next) { case 0: fileName = _arguments.length > 2 && _arguments[2] !== undefined ? _arguments[2] : null; - url = '/api/v1/nodes'; + url = 'api/v1/nodes'; formData = formDataFactory.createFormData(); formData.append('type', SubTypes.DOCUMENT); formData.append('parent_id', parent_id); @@ -2041,6 +2041,24 @@ name: name }, params)); }, + node: function node(dataid) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return session.get("api/v2/nodes/".concat(dataid), { + params: params + }); + }, + ancestors: function ancestors(dataid) { + var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + return session.get("api/v1/nodes/".concat(dataid, "/ancestors"), { + params: params + }); + }, + volumeInfo: function volumeInfo(objType) { + return session.get("api/v1/volumes/".concat(objType)); + }, + volumes: function volumes() { + return session.get('api/v2/volumes'); + }, addFolder: function addFolder(parent_id, name) { var params = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; return this.addItem(SubTypes.FOLDER, parent_id, name, params); @@ -2048,12 +2066,12 @@ children: function children(dataid) { var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; // https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501 - return session.get("/api/v2/nodes/".concat(dataid, "/nodes/"), { + return session.get("api/v2/nodes/".concat(dataid, "/nodes"), { params: params }); }, "delete": function _delete(dataid) { - return session["delete"]("/api/v1/nodes/".concat(dataid, "/")); + return session["delete"]("api/v1/nodes/".concat(dataid)); } }; }; @@ -2070,12 +2088,12 @@ }); }, draftprocesses: function draftprocesses(workflow_id) { - return session.postForm('/api/v2/draftprocesses', { + return session.postForm('api/v2/draftprocesses', { workflow_id: workflow_id }); /* - return session.post('/api/v2/draftprocesses', {}, { + return session.post('api/v2/draftprocesses', {}, { params: { workflow_id } @@ -2083,14 +2101,14 @@ */ }, draftprocesses_update: function draftprocesses_update(draftprocess_id) { - return session.get('/api/v1/forms/draftprocesses/update', { + return session.get('api/v1/forms/draftprocesses/update', { params: { draftprocess_id: draftprocess_id } }); }, draftprocesses_put: function draftprocesses_put(draftprocess_id, body) { - return session.putForm("/api/v2/draftprocesses/".concat(draftprocess_id), { + return session.putForm("api/v2/draftprocesses/".concat(draftprocess_id), { body: body }); }, @@ -2117,7 +2135,7 @@ return { scriptNode: function scriptNode(id) { var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - return session.get("/api/v1/rhcore/".concat(id), { + return session.get("api/v1/rhcore/".concat(id), { params: params }); } @@ -2138,12 +2156,12 @@ query: query }, options); - return session.get("/api/v2/members", { + return session.get("api/v2/members", { params: params }); }, member: function member(id) { - return session.get("/api/v2/members/".concat(id)); + return session.get("api/v2/members/".concat(id)); } }; }; @@ -2160,7 +2178,9 @@ switch (_context.prev = _context.next) { case 0: fileName = _arguments.length > 2 && _arguments[2] !== undefined ? _arguments[2] : null; - url = "/api/v1/nodes/".concat(dataid, "/versions"); + // ERROR: This seemed to only upload the first 2500 characters when the file extension + // was .lxe (e.g., and unknown mimetype). Must look into this. + url = "api/v1/nodes/".concat(dataid, "/versions"); formData = formDataFactory.createFormData(); { @@ -2200,7 +2220,7 @@ return { run: function run(dataid) { var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; - var url = "/api/v1/nodes/".concat(dataid, "/output"); + var url = "api/v1/nodes/".concat(dataid, "/output"); return session.get(url, { params: params }); diff --git a/lib/index.js.map b/lib/index.js.map index 2ad2ba5..90ae2cc 100644 --- a/lib/index.js.map +++ b/lib/index.js.map @@ -1 +1 @@ -{"version":3,"file":"index.js","sources":["../node_modules/regenerator-runtime/runtime.js","../node_modules/lodash.get/index.js","../src/handlers/form-data-factory.js","../src/auth.js","../src/handlers/nodes.js","../src/handlers/workflow.js","../src/handlers/rhcore.js","../src/handlers/members.js","../src/handlers/versions.js","../src/handlers/webreports.js","../src/Session.js","../src/index.js"],"sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","module.exports = {\n\tcreateFormData() {\n\t\t if (process.node) {\n\t\t\tconst klass = require('form-data')\n\t\t\treturn new klass\n\t\t} else {\n\t\t\treturn new FormData()\n\t\t}\t\t\n\t}\n}","const axios = require('axios')\nconst get = require('lodash.get')\nconst FormDataFactory = require('./handlers/form-data-factory')\n\nfunction getInstance(baseURL) {\n\n\tconst instance = axios.create({\n\t\tbaseURL\n\t})\n\n\tinstance.interceptors.response.use(response => {\n\t\tlet otcsticket = get(response, 'headers.otcsticket')\n\n\t\tif (otcsticket) {\n\t\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\t\t}\n\t\treturn response\n\t}, error => {\n\t\treturn Promise.reject(error)\n\t})\n\n\treturn instance\n}\n\nfunction axiosFactory(options) {\n\tconst instance = getInstance(options.baseURL)\n\n\tconst username = get(options, 'username')\n\tconst password = get(options, 'password')\n\tconst otcsticket = get(options, 'otcsticket')\n\n\tif (otcsticket) {\n\n\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\n\t} else if (username && password) {\n\n\t\tinstance.interceptors.request.use(async request => {\n\n\t\t\tif (request.headers.common['OTCSTicket']) {\n\n\t\t\t\treturn request\n\n\t\t\t} else {\n\n\t\t\t\tconst formData = FormDataFactory.createFormData()\n\n\t\t\t\tformData.append('username', username)\n\t\t\t\tformData.append('password', password)\n\n\t\t\t\tlet response = process.node ? await axios.post(`${options.baseURL}/api/v1/auth/`, formData.getBuffer(), { headers: formData.getHeaders() }) : await axios.post(`${options.baseURL}/api/v1/auth/`, formData)\n\n\t\t\t\trequest.headers.common['OTCSTicket'] = get(response, 'data.ticket')\n\n\t\t\t\treturn request\n\t\t\t}\n\t\t})\n\t} else {\n\t\tthrow 'You must provide an otcsticket or username and password.'\n\t}\n\n\treturn instance\n}\n\nmodule.exports = axiosFactory","const FormDataFactory = require('./form-data-factory')\r\n\r\nconst SubTypes = {\r\n\tFOLDER: 0,\r\n\tDOCUMENT: 144\r\n}\r\n\r\nmodule.exports = session => ({\r\n\r\n\taddablenodetypes(dataid) {\r\n\t\treturn session.get(`/api/v1/nodes/${dataid}/addablenodetypes`)\r\n\t},\r\n\r\n\tasync addDocument(parent_id, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = '/api/v1/nodes'\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tformData.append('type', SubTypes.DOCUMENT)\r\n\t\tformData.append('parent_id', parent_id)\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n\taddItem(type, parent_id, name, params = {}) {\r\n\t\treturn session.postForm('api/v2/nodes', {\r\n\t\t\ttype,\r\n\t\t\tparent_id,\r\n\t\t\tname,\r\n\t\t\t...params\r\n\t\t})\r\n\t},\r\n\r\n\taddFolder(parent_id, name, params = {}) {\r\n\t\treturn this.addItem(SubTypes.FOLDER, parent_id, name, params)\r\n\t},\r\n\r\n\tchildren(dataid, params = {}) {\r\n\t\t// https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501\r\n\t\treturn session.get(`/api/v2/nodes/${dataid}/nodes/`, { params })\r\n\t},\r\n\r\n\tdelete(dataid) {\r\n\t\treturn session.delete(`/api/v1/nodes/${dataid}/`)\r\n\t}\r\n\r\n})","const get = require('lodash.get')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tstart(map_id) {\r\n\t\treturn this.draftprocesses(map_id)\r\n\t\t\t.then(response => get(response, 'data.results.draftprocess_id'))\r\n\t\t\t.then(draftprocess_id => this.draftprocesses_update(draftprocess_id))\r\n\t},\r\n\r\n\tdraftprocesses(workflow_id) {\r\n\t\treturn session.postForm('/api/v2/draftprocesses', {workflow_id})\r\n\t\t/*\r\n\t\t\r\n\t\t return session.post('/api/v2/draftprocesses', {}, {\r\n\t\t\tparams: {\r\n\t\t\t\tworkflow_id\r\n\t\t\t}\r\n\t\t})\r\n\t\t*/\r\n\t},\r\n\r\n\tdraftprocesses_update(draftprocess_id) {\r\n\t\treturn session.get('/api/v1/forms/draftprocesses/update', {\r\n\t\t\tparams: {\r\n\t\t\t\tdraftprocess_id\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\tdraftprocesses_put(draftprocess_id, body) {\r\n\t\treturn session.putForm(`/api/v2/draftprocesses/${draftprocess_id}`, { body })\r\n\t},\r\n\r\n\tdraftprocesses_formUpdate(draftprocess_id, values) {\r\n\t\t// : {\"WorkflowForm_2\":\"adsfasdf\"}\r\n\t\tconst body = {\r\n\t\t\taction: \"formUpdate\",\r\n\t\t\tvalues\r\n\t\t}\r\n\r\n\t\treturn this.draftprocesses_put(draftprocess_id, body)\r\n\t},\r\n\r\n\r\n\t// async start(map_id) {\r\n\t// \tdebugger\r\n\t// \t// this API is inconsistent with above\r\n\t// \tlet response = await this.draftprocesses(map_id)\r\n\r\n\t// \tlet draftprocess_id = get(response, 'data.results.draftprocess_id')\r\n\r\n\t// \tresponse = await this.draftprocesses_update(draftprocess_id)\r\n\r\n\t// \treturn response.data\r\n\r\n\t// }\r\n\r\n\r\n\r\n\r\n})","module.exports = session => ({\r\n\tscriptNode(id, params = {}) {\r\n\t\treturn session.get(`/api/v1/rhcore/${id}`, {\r\n\t\t\tparams\r\n\t\t})\r\n\t}\r\n})","module.exports = session => ({\n\n\tUSER: 0,\n\tGROUP: 1,\n\n\t// https://developer.opentext.com/awd/resources/apis/cs-rest-api-for-cs-16-s#!/members/SearchMember_get_1\n\tuserQuery(query, options = {}) {\n\t\tconst params = {\n\t\t\tlimit: 20,\n\t\t\twhere_type: [this.USER, this.GROUP],\n\t\t\tquery,\n\t\t\t...options\n\t\t}\n\n\t\treturn session.get(`/api/v2/members`, {params})\n\t},\n\n\tmember(id) {\n\t\treturn session.get(`/api/v2/members/${id}`)\n\t}\n\n})","const FormDataFactory = require('./form-data-factory')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tasync addVersion(dataid, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = `/api/v1/nodes/${dataid}/versions`\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\t// formData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\t\t\t// \r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\t// formData.append('name', fileHandler.name)\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n})","module.exports = session => ({\n\n\trun(dataid, params = {}) {\n\t\tconst url = `/api/v1/nodes/${dataid}/output`\n\t\treturn session.get(url, { params })\n\t}\n\n})","const auth = require('./auth')\r\nconst nodes = require('./handlers/nodes')\r\nconst workflow = require('./handlers/workflow')\r\nconst rhcore = require('./handlers/rhcore')\r\nconst members = require('./handlers/members')\r\nconst versions = require('./handlers/versions')\r\nconst webreports = require('./handlers/webreports')\r\nconst FormDataFactory = require('./handlers/form-data-factory')\r\n\r\nmodule.exports = class Session {\r\n\r\n\tconstructor(options) {\r\n\t\tthis.axios = auth(options)\r\n\t}\r\n\r\n\tget nodes() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._nodes == null) {\r\n\t\t\tthis._nodes = nodes(this)\r\n\t\t}\r\n\r\n\t\treturn this._nodes\r\n\t}\r\n\r\n\tget workflow() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._workflow == null) {\r\n\t\t\tthis._workflow = workflow(this)\r\n\t\t}\r\n\r\n\t\treturn this._workflow\r\n\t}\r\n\r\n\tget rhcore() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._rhcore == null) {\r\n\t\t\tthis._rhcore = rhcore(this)\r\n\t\t}\r\n\r\n\t\treturn this._rhcore\r\n\t}\r\n\r\n\tget members() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._members == null) {\r\n\t\t\tthis._members = members(this)\r\n\t\t}\r\n\r\n\t\treturn this._members\r\n\t}\r\n\r\n\tget webreports() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._webreports == null) {\r\n\t\t\tthis._webreports = webreports(this)\r\n\t\t}\r\n\r\n\t\treturn this._webreports\r\n\t}\r\n\r\n\tget versions() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._versions == null) {\r\n\t\t\tthis._versions = versions(this)\r\n\t\t}\r\n\r\n\t\treturn this._versions\r\n\t}\r\n\r\n\t_isObject(value) {\r\n\t\treturn value && typeof value === 'object' && value.constructor === Object\r\n\t}\r\n\r\n\t_objectToForm(obj) {\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tfor (let [key, value] of Object.entries(obj)) {\r\n\t\t\tif (Array.isArray(value) || this._isObject(value)) {\r\n\t\t\t\tformData.append(key, JSON.stringify(value))\r\n\t\t\t} else {\r\n\t\t\t\tformData.append(key, value)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formData\r\n\t}\r\n\r\n\tget(...args) {\r\n\t\treturn this.axios.get(...args)\r\n\t}\r\n\r\n\tputForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.put(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.put(url, formData)\r\n\t}\r\n\r\n\tpostForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.post(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.post(url, formData)\r\n\t}\r\n\r\n\tpatchForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.patch(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.patch(url, formData)\r\n\t}\r\n\r\n\tpost(...args) {\r\n\t\treturn this.axios.post(...args)\r\n\t}\r\n\r\n\tput(...args) {\r\n\t\treturn this.axios.put(...args)\r\n\t}\r\n\r\n\tdelete(...args) {\r\n\t\treturn this.axios.delete(...args)\r\n\t}\r\n\r\n\toptions(...args) {\r\n\t\treturn this.axios.options(...args)\r\n\t}\r\n\r\n\tpatch(...args) {\r\n\t\treturn this.axios.patch(...args)\r\n\t}\r\n\r\n}","const auth = require('./auth')\r\nconst Session = require('./Session')\r\n\r\nmodule.exports = {auth, Session}"],"names":["runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","undefined","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","fn","obj","arg","type","call","err","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","constructor","displayName","defineIteratorMethods","forEach","method","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","value","then","unwrapped","error","previousPromise","enqueue","callInvokeWithMethodAndArg","async","Promise","iter","next","done","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","nextLoc","toString","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","keys","object","key","reverse","length","pop","iterable","iteratorMethod","isNaN","i","skipTempReset","prev","charAt","slice","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","FUNC_ERROR_TEXT","HASH_UNDEFINED","INFINITY","funcTag","genTag","symbolTag","reIsDeepProp","reIsPlainProp","reLeadingDot","rePropName","reRegExpChar","reEscapeChar","reIsHostCtor","freeGlobal","global","freeSelf","root","getValue","isHostObject","e","arrayProto","Array","funcProto","objectProto","coreJsData","maskSrcKey","uid","exec","IE_PROTO","funcToString","objectToString","reIsNative","RegExp","replace","splice","Map","getNative","nativeCreate","symbolProto","symbolToString","Hash","entries","index","clear","set","hashClear","__data__","hashDelete","has","hashGet","data","hashHas","hashSet","get","ListCache","listCacheClear","listCacheDelete","assocIndexOf","lastIndex","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","array","eq","baseGet","path","isKey","castPath","toKey","baseIsNative","isObject","isMasked","pattern","isFunction","test","toSource","baseToString","isSymbol","isArray","stringToPath","map","isKeyable","func","memoize","string","match","number","quote","resolver","memoized","args","arguments","apply","cache","Cache","other","tag","isObjectLike","defaultValue","createFormData","FormData","getInstance","baseURL","instance","axios","interceptors","response","use","otcsticket","defaults","headers","common","axiosFactory","options","username","password","request","formData","FormDataFactory","append","post","SubTypes","FOLDER","DOCUMENT","session","addablenodetypes","dataid","addDocument","parent_id","fileHandler","fileName","url","addItem","params","postForm","addFolder","children","start","map_id","draftprocesses","draftprocess_id","draftprocesses_update","workflow_id","draftprocesses_put","body","putForm","draftprocesses_formUpdate","action","scriptNode","id","USER","GROUP","userQuery","query","limit","where_type","member","addVersion","run","auth","_isObject","JSON","stringify","_objectToForm","put","patch","_nodes","nodes","_workflow","workflow","_rhcore","rhcore","_members","members","_webreports","webreports","_versions","versions","Session"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAM,CAAC,IAAD,CAArB;EACA;;EAED,aAAO,KAAKD,OAAZ;EACA;EA/BY;EAAA;EAAA,wBAiCC;;EAEb,UAAI,KAAKE,QAAL,IAAiB,IAArB,EAA2B;EAC1B,aAAKA,QAAL,GAAgBC,OAAO,CAAC,IAAD,CAAvB;EACA;;EAED,aAAO,KAAKD,QAAZ;EACA;EAxCY;EAAA;EAAA,wBA0CI;;EAEhB,UAAI,KAAKE,WAAL,IAAoB,IAAxB,EAA8B;EAC7B,aAAKA,WAAL,GAAmBC,UAAU,CAAC,IAAD,CAA7B;EACA;;EAED,aAAO,KAAKD,WAAZ;EACA;EAjDY;EAAA;EAAA,wBAmDE;;EAEd,UAAI,KAAKE,SAAL,IAAkB,IAAtB,EAA4B;EAC3B,aAAKA,SAAL,GAAiBC,QAAQ,CAAC,IAAD,CAAzB;EACA;;EAED,aAAO,KAAKD,SAAZ;EACA;EA1DY;;EAAA;EAAA,GAAd;;ECNA,OAAc,GAAG;EAACjB,EAAAA,IAAI,EAAJA,IAAD;EAAOmB,EAAAA,OAAO,EAAPA;EAAP,CAAjB;;;;;;;;;;;;;;;;"} \ No newline at end of file +{"version":3,"file":"index.js","sources":["../node_modules/regenerator-runtime/runtime.js","../node_modules/lodash.get/index.js","../src/handlers/form-data-factory.js","../src/auth.js","../src/handlers/nodes.js","../src/handlers/workflow.js","../src/handlers/rhcore.js","../src/handlers/members.js","../src/handlers/versions.js","../src/handlers/webreports.js","../src/Session.js","../src/index.js"],"sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","module.exports = {\n\tcreateFormData() {\n\t\t if (process.node) {\n\t\t\tconst klass = require('form-data')\n\t\t\treturn new klass\n\t\t} else {\n\t\t\treturn new FormData()\n\t\t}\t\t\n\t}\n}","const axios = require('axios')\nconst get = require('lodash.get')\nconst FormDataFactory = require('./handlers/form-data-factory')\n\nfunction getInstance(baseURL) {\n\n\tconst instance = axios.create({\n\t\tbaseURL\n\t})\n\n\tinstance.interceptors.response.use(response => {\n\t\tconst otcsticket = get(response, 'headers.otcsticket')\n\n\t\tif (otcsticket) {\n\t\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\t\t}\n\t\treturn response\n\t}, error => {\n\t\treturn Promise.reject(error)\n\t})\n\n\treturn instance\n}\n\nfunction axiosFactory(options) {\n\tconst instance = getInstance(options.baseURL)\n\n\tconst username = get(options, 'username')\n\tconst password = get(options, 'password')\n\tconst otcsticket = get(options, 'otcsticket')\n\n\tif (otcsticket) {\n\n\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\n\t} else if (username && password) {\n\n\t\tinstance.interceptors.request.use(async request => {\n\n\t\t\tif (request.headers.common['OTCSTicket']) {\n\n\t\t\t\treturn request\n\n\t\t\t} else {\n\n\t\t\t\tconst formData = FormDataFactory.createFormData()\n\n\t\t\t\tformData.append('username', username)\n\t\t\t\tformData.append('password', password)\n\n\t\t\t\tlet response = process.node ? await axios.post(`${options.baseURL}/api/v1/auth/`, formData.getBuffer(), { headers: formData.getHeaders() }) : await axios.post(`${options.baseURL}/api/v1/auth/`, formData)\n\n\t\t\t\trequest.headers.common['OTCSTicket'] = get(response, 'data.ticket')\n\n\t\t\t\treturn request\n\t\t\t}\n\t\t})\n\t} else {\n\t\tthrow 'You must provide an otcsticket or username and password.'\n\t}\n\n\treturn instance\n}\n\nmodule.exports = axiosFactory","const FormDataFactory = require('./form-data-factory')\r\n\r\nconst SubTypes = {\r\n\tFOLDER: 0,\r\n\tDOCUMENT: 144\r\n}\r\n\r\nmodule.exports = session => ({\r\n\r\n\taddablenodetypes(dataid) {\r\n\t\treturn session.get(`api/v1/nodes/${dataid}/addablenodetypes`)\r\n\t},\r\n\r\n\tasync addDocument(parent_id, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = 'api/v1/nodes'\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tformData.append('type', SubTypes.DOCUMENT)\r\n\t\tformData.append('parent_id', parent_id)\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n\taddItem(type, parent_id, name, params = {}) {\r\n\t\treturn session.postForm('api/v2/nodes', {\r\n\t\t\ttype,\r\n\t\t\tparent_id,\r\n\t\t\tname,\r\n\t\t\t...params\r\n\t\t})\r\n\t},\r\n\r\n\tnode(dataid, params = {}) {\r\n\t\treturn session.get(`api/v2/nodes/${dataid}`, { params })\r\n\t},\r\n\r\n\tancestors(dataid, params = {}) {\r\n\t\treturn session.get(`api/v1/nodes/${dataid}/ancestors`, { params })\r\n\t},\r\n\r\n\tvolumeInfo(objType) {\r\n\t\treturn session.get(`api/v1/volumes/${objType}`)\r\n\t},\r\n\r\n\tvolumes() {\r\n\t\treturn session.get('api/v2/volumes')\r\n\t},\r\n\r\n\taddFolder(parent_id, name, params = {}) {\r\n\t\treturn this.addItem(SubTypes.FOLDER, parent_id, name, params)\r\n\t},\r\n\r\n\tchildren(dataid, params = {}) {\r\n\t\t// https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501\r\n\t\treturn session.get(`api/v2/nodes/${dataid}/nodes`, { params })\r\n\t},\r\n\r\n\tdelete(dataid) {\r\n\t\treturn session.delete(`api/v1/nodes/${dataid}`)\r\n\t}\r\n\r\n})","const get = require('lodash.get')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tstart(map_id) {\r\n\t\treturn this.draftprocesses(map_id)\r\n\t\t\t.then(response => get(response, 'data.results.draftprocess_id'))\r\n\t\t\t.then(draftprocess_id => this.draftprocesses_update(draftprocess_id))\r\n\t},\r\n\r\n\tdraftprocesses(workflow_id) {\r\n\t\treturn session.postForm('api/v2/draftprocesses', {workflow_id})\r\n\t\t/*\r\n\t\t\r\n\t\t return session.post('api/v2/draftprocesses', {}, {\r\n\t\t\tparams: {\r\n\t\t\t\tworkflow_id\r\n\t\t\t}\r\n\t\t})\r\n\t\t*/\r\n\t},\r\n\r\n\tdraftprocesses_update(draftprocess_id) {\r\n\t\treturn session.get('api/v1/forms/draftprocesses/update', {\r\n\t\t\tparams: {\r\n\t\t\t\tdraftprocess_id\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\tdraftprocesses_put(draftprocess_id, body) {\r\n\t\treturn session.putForm(`api/v2/draftprocesses/${draftprocess_id}`, { body })\r\n\t},\r\n\r\n\tdraftprocesses_formUpdate(draftprocess_id, values) {\r\n\t\t// : {\"WorkflowForm_2\":\"adsfasdf\"}\r\n\t\tconst body = {\r\n\t\t\taction: \"formUpdate\",\r\n\t\t\tvalues\r\n\t\t}\r\n\r\n\t\treturn this.draftprocesses_put(draftprocess_id, body)\r\n\t},\r\n\r\n\r\n\t// async start(map_id) {\r\n\t// \tdebugger\r\n\t// \t// this API is inconsistent with above\r\n\t// \tlet response = await this.draftprocesses(map_id)\r\n\r\n\t// \tlet draftprocess_id = get(response, 'data.results.draftprocess_id')\r\n\r\n\t// \tresponse = await this.draftprocesses_update(draftprocess_id)\r\n\r\n\t// \treturn response.data\r\n\r\n\t// }\r\n\r\n\r\n\r\n\r\n})","module.exports = session => ({\r\n\tscriptNode(id, params = {}) {\r\n\t\treturn session.get(`api/v1/rhcore/${id}`, {\r\n\t\t\tparams\r\n\t\t})\r\n\t}\r\n})","module.exports = session => ({\n\n\tUSER: 0,\n\tGROUP: 1,\n\n\t// https://developer.opentext.com/awd/resources/apis/cs-rest-api-for-cs-16-s#!/members/SearchMember_get_1\n\tuserQuery(query, options = {}) {\n\t\tconst params = {\n\t\t\tlimit: 20,\n\t\t\twhere_type: [this.USER, this.GROUP],\n\t\t\tquery,\n\t\t\t...options\n\t\t}\n\n\t\treturn session.get(`api/v2/members`, {params})\n\t},\n\n\tmember(id) {\n\t\treturn session.get(`api/v2/members/${id}`)\n\t}\n\n})","const FormDataFactory = require('./form-data-factory')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tasync addVersion(dataid, fileHandler, fileName = null) {\r\n\t\t// ERROR: This seemed to only upload the first 2500 characters when the file extension\r\n\t\t// was .lxe (e.g., and unknown mimetype). Must look into this.\r\n\r\n\r\n\t\tconst url = `api/v1/nodes/${dataid}/versions`\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\t// formData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\t\t\t// \r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\t// formData.append('name', fileHandler.name)\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n})","module.exports = session => ({\n\n\trun(dataid, params = {}) {\n\t\tconst url = `api/v1/nodes/${dataid}/output`\n\t\treturn session.get(url, { params })\n\t}\n\n})","const auth = require('./auth')\r\nconst nodes = require('./handlers/nodes')\r\nconst workflow = require('./handlers/workflow')\r\nconst rhcore = require('./handlers/rhcore')\r\nconst members = require('./handlers/members')\r\nconst versions = require('./handlers/versions')\r\nconst webreports = require('./handlers/webreports')\r\nconst FormDataFactory = require('./handlers/form-data-factory')\r\n\r\nmodule.exports = class Session {\r\n\r\n\tconstructor(options) {\r\n\t\tthis.axios = auth(options)\r\n\t}\r\n\r\n\tget nodes() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._nodes == null) {\r\n\t\t\tthis._nodes = nodes(this)\r\n\t\t}\r\n\r\n\t\treturn this._nodes\r\n\t}\r\n\r\n\tget workflow() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._workflow == null) {\r\n\t\t\tthis._workflow = workflow(this)\r\n\t\t}\r\n\r\n\t\treturn this._workflow\r\n\t}\r\n\r\n\tget rhcore() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._rhcore == null) {\r\n\t\t\tthis._rhcore = rhcore(this)\r\n\t\t}\r\n\r\n\t\treturn this._rhcore\r\n\t}\r\n\r\n\tget members() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._members == null) {\r\n\t\t\tthis._members = members(this)\r\n\t\t}\r\n\r\n\t\treturn this._members\r\n\t}\r\n\r\n\tget webreports() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._webreports == null) {\r\n\t\t\tthis._webreports = webreports(this)\r\n\t\t}\r\n\r\n\t\treturn this._webreports\r\n\t}\r\n\r\n\tget versions() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._versions == null) {\r\n\t\t\tthis._versions = versions(this)\r\n\t\t}\r\n\r\n\t\treturn this._versions\r\n\t}\r\n\r\n\t_isObject(value) {\r\n\t\treturn value && typeof value === 'object' && value.constructor === Object\r\n\t}\r\n\r\n\t_objectToForm(obj) {\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tfor (let [key, value] of Object.entries(obj)) {\r\n\t\t\tif (Array.isArray(value) || this._isObject(value)) {\r\n\t\t\t\tformData.append(key, JSON.stringify(value))\r\n\t\t\t} else {\r\n\t\t\t\tformData.append(key, value)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formData\r\n\t}\r\n\r\n\tget(...args) {\r\n\t\treturn this.axios.get(...args)\r\n\t}\r\n\r\n\tputForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.put(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.put(url, formData)\r\n\t}\r\n\r\n\tpostForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.post(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.post(url, formData)\r\n\t}\r\n\r\n\tpatchForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.patch(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.patch(url, formData)\r\n\t}\r\n\r\n\tpost(...args) {\r\n\t\treturn this.axios.post(...args)\r\n\t}\r\n\r\n\tput(...args) {\r\n\t\treturn this.axios.put(...args)\r\n\t}\r\n\r\n\tdelete(...args) {\r\n\t\treturn this.axios.delete(...args)\r\n\t}\r\n\r\n\toptions(...args) {\r\n\t\treturn this.axios.options(...args)\r\n\t}\r\n\r\n\tpatch(...args) {\r\n\t\treturn this.axios.patch(...args)\r\n\t}\r\n\r\n}","const auth = require('./auth')\r\nconst Session = require('./Session')\r\n\r\nmodule.exports = {auth, Session}"],"names":["runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","undefined","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","makeInvokeMethod","tryCatch","fn","obj","arg","type","call","err","GenStateSuspendedStart","GenStateSuspendedYield","GenStateExecuting","GenStateCompleted","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","constructor","displayName","defineIteratorMethods","forEach","method","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","__await","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","value","then","unwrapped","error","previousPromise","enqueue","callInvokeWithMethodAndArg","async","Promise","iter","next","done","state","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","TypeError","info","resultName","nextLoc","toString","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","keys","object","key","reverse","length","pop","iterable","iteratorMethod","isNaN","i","skipTempReset","prev","charAt","slice","stop","rootEntry","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","FUNC_ERROR_TEXT","HASH_UNDEFINED","INFINITY","funcTag","genTag","symbolTag","reIsDeepProp","reIsPlainProp","reLeadingDot","rePropName","reRegExpChar","reEscapeChar","reIsHostCtor","freeGlobal","global","freeSelf","root","getValue","isHostObject","e","arrayProto","Array","funcProto","objectProto","coreJsData","maskSrcKey","uid","exec","IE_PROTO","funcToString","objectToString","reIsNative","RegExp","replace","splice","Map","getNative","nativeCreate","symbolProto","symbolToString","Hash","entries","index","clear","set","hashClear","__data__","hashDelete","has","hashGet","data","hashHas","hashSet","get","ListCache","listCacheClear","listCacheDelete","assocIndexOf","lastIndex","listCacheGet","listCacheHas","listCacheSet","MapCache","mapCacheClear","mapCacheDelete","getMapData","mapCacheGet","mapCacheHas","mapCacheSet","array","eq","baseGet","path","isKey","castPath","toKey","baseIsNative","isObject","isMasked","pattern","isFunction","test","toSource","baseToString","isSymbol","isArray","stringToPath","map","isKeyable","func","memoize","string","match","number","quote","resolver","memoized","args","arguments","apply","cache","Cache","other","tag","isObjectLike","defaultValue","createFormData","FormData","getInstance","baseURL","instance","axios","interceptors","response","use","otcsticket","defaults","headers","common","axiosFactory","options","username","password","request","formData","FormDataFactory","append","post","SubTypes","FOLDER","DOCUMENT","session","addablenodetypes","dataid","addDocument","parent_id","fileHandler","fileName","url","addItem","params","postForm","node","ancestors","volumeInfo","objType","volumes","addFolder","children","start","map_id","draftprocesses","draftprocess_id","draftprocesses_update","workflow_id","draftprocesses_put","body","putForm","draftprocesses_formUpdate","action","scriptNode","id","USER","GROUP","userQuery","query","limit","where_type","member","addVersion","run","auth","_isObject","JSON","stringify","_objectToForm","put","patch","_nodes","nodes","_workflow","workflow","_rhcore","rhcore","_members","members","_webreports","webreports","_versions","versions","Session"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAA;;;;;;EAOA,MAAIA,OAAO,GAAI,UAAUC,OAAV,EAAmB;;EAGhC,QAAIC,EAAE,GAAGC,MAAM,CAACC,SAAhB;EACA,QAAIC,MAAM,GAAGH,EAAE,CAACI,cAAhB;EACA,QAAIC,WAAJ,CALgC;;EAMhC,QAAIC,OAAO,GAAG,OAAOC,MAAP,KAAkB,UAAlB,GAA+BA,MAA/B,GAAwC,EAAtD;EACA,QAAIC,cAAc,GAAGF,OAAO,CAACG,QAAR,IAAoB,YAAzC;EACA,QAAIC,mBAAmB,GAAGJ,OAAO,CAACK,aAAR,IAAyB,iBAAnD;EACA,QAAIC,iBAAiB,GAAGN,OAAO,CAACO,WAAR,IAAuB,eAA/C;;EAEA,aAASC,IAAT,CAAcC,OAAd,EAAuBC,OAAvB,EAAgCC,IAAhC,EAAsCC,WAAtC,EAAmD;;EAEjD,UAAIC,cAAc,GAAGH,OAAO,IAAIA,OAAO,CAACd,SAAR,YAA6BkB,SAAxC,GAAoDJ,OAApD,GAA8DI,SAAnF;EACA,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ACA;;EAED,aAAO,KAAKD,QAAZ;EACA;EAxCY;EAAA;EAAA,wBA0CI;;EAEhB,UAAI,KAAKE,WAAL,IAAoB,IAAxB,EAA8B;EAC7B,aAAKA,WAAL,GAAmBC,UAAU,CAAC,IAAD,CAA7B;EACA;;EAED,aAAO,KAAKD,WAAZ;EACA;EAjDY;EAAA;EAAA,wBAmDE;;EAEd,UAAI,KAAKE,SAAL,IAAkB,IAAtB,EAA4B;EAC3B,aAAKA,SAAL,GAAiBC,QAAQ,CAAC,IAAD,CAAzB;EACA;;EAED,aAAO,KAAKD,SAAZ;EACA;EA1DY;;EAAA;EAAA,GAAd;;ECNA,OAAc,GAAG;EAACjB,EAAAA,IAAI,EAAJA,IAAD;EAAOmB,EAAAA,OAAO,EAAPA;EAAP,CAAjB;;;;;;;;;;;;;;;;"} \ No newline at end of file diff --git a/lib/index.min.js b/lib/index.min.js index 4b5c555..91c70c3 100644 --- a/lib/index.min.js +++ b/lib/index.min.js @@ -1,2 +1,2 @@ -!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("core-js/modules/es.object.to-string"),require("core-js/modules/es.promise"),require("core-js/modules/es.symbol"),require("core-js/modules/es.symbol.description"),require("core-js/modules/es.symbol.async-iterator"),require("core-js/modules/es.symbol.iterator"),require("core-js/modules/es.symbol.to-string-tag"),require("core-js/modules/es.array.for-each"),require("core-js/modules/es.array.iterator"),require("core-js/modules/es.array.reverse"),require("core-js/modules/es.array.slice"),require("core-js/modules/es.date.to-string"),require("core-js/modules/es.function.name"),require("core-js/modules/es.json.to-string-tag"),require("core-js/modules/es.math.to-string-tag"),require("core-js/modules/es.object.create"),require("core-js/modules/es.object.get-prototype-of"),require("core-js/modules/es.object.set-prototype-of"),require("core-js/modules/es.regexp.to-string"),require("core-js/modules/es.string.iterator"),require("core-js/modules/web.dom-collections.for-each"),require("core-js/modules/web.dom-collections.iterator"),require("axios"),require("core-js/modules/es.array.is-array"),require("core-js/modules/es.array.map"),require("core-js/modules/es.array.splice"),require("core-js/modules/es.regexp.constructor"),require("core-js/modules/es.regexp.exec"),require("core-js/modules/es.string.replace"),require("core-js/modules/es.object.entries")):"function"==typeof define&&define.amd?define(["exports","core-js/modules/es.object.to-string","core-js/modules/es.promise","core-js/modules/es.symbol","core-js/modules/es.symbol.description","core-js/modules/es.symbol.async-iterator","core-js/modules/es.symbol.iterator","core-js/modules/es.symbol.to-string-tag","core-js/modules/es.array.for-each","core-js/modules/es.array.iterator","core-js/modules/es.array.reverse","core-js/modules/es.array.slice","core-js/modules/es.date.to-string","core-js/modules/es.function.name","core-js/modules/es.json.to-string-tag","core-js/modules/es.math.to-string-tag","core-js/modules/es.object.create","core-js/modules/es.object.get-prototype-of","core-js/modules/es.object.set-prototype-of","core-js/modules/es.regexp.to-string","core-js/modules/es.string.iterator","core-js/modules/web.dom-collections.for-each","core-js/modules/web.dom-collections.iterator","axios","core-js/modules/es.array.is-array","core-js/modules/es.array.map","core-js/modules/es.array.splice","core-js/modules/es.regexp.constructor","core-js/modules/es.regexp.exec","core-js/modules/es.string.replace","core-js/modules/es.object.entries"],t):t((e=e||self).CSREST={},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,e.axios)}(this,(function(e,t,r,n,o,i,s,a,u,c,l,f,p,d,h,y,m,v,g,b,j,_,w,x){"use strict";function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t,r,n,o,i,s){try{var a=e[i](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function s(e){k(i,n,o,s,a,"next",e)}function a(e){k(i,n,o,s,a,"throw",e)}s(void 0)}))}}function E(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(a&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:x(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,C=/^\./,N=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,U=/\\(\\)?/g,$=/^\[object .+?Constructor\]$/,I="object"==O(R)&&R&&R.Object===Object&&R,D="object"==("undefined"==typeof self?"undefined":O(self))&&self&&self.Object===Object&&self,M=I||D||Function("return this")();var Y,B=Array.prototype,H=Function.prototype,J=Object.prototype,Q=M["__core-js_shared__"],V=(Y=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",z=H.toString,K=J.hasOwnProperty,W=J.toString,X=RegExp("^"+z.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=M.Symbol,ee=B.splice,te=pe(M,"Map"),re=pe(Object,"create"),ne=Z?Z.prototype:void 0,oe=ne?ne.toString:void 0;function ie(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1},se.prototype.set=function(e,t){var r=this.__data__,n=ue(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},ae.prototype.clear=function(){this.__data__={hash:new ie,map:new(te||se),string:new ie}},ae.prototype.delete=function(e){return fe(this,e).delete(e)},ae.prototype.get=function(e){return fe(this,e).get(e)},ae.prototype.has=function(e){return fe(this,e).has(e)},ae.prototype.set=function(e,t){return fe(this,e).set(e,t),this};var de=ye((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ge(e))return oe?oe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return C.test(e)&&r.push(""),e.replace(N,(function(e,t,n,o){r.push(n?o.replace(U,"$1"):t||e)})),r}));function he(e){if("string"==typeof e||ge(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ye(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s),s};return r.cache=new(ye.Cache||ae),r}ye.Cache=ae;var me=Array.isArray;function ve(e){var t=O(e);return!!e&&("object"==t||"function"==t)}function ge(e){return"symbol"==O(e)||function(e){return!!e&&"object"==O(e)}(e)&&"[object Symbol]"==W.call(e)}var be=function(e,t,r){var n=null==e?void 0:ce(e,t);return void 0===n?r:n},je=function(){return new FormData};var _e=function(e){var t=function(e){var t=x.create({baseURL:e});return t.interceptors.response.use((function(e){var r=be(e,"headers.otcsticket");return r&&(t.defaults.headers.common.OTCSTicket=r),e}),(function(e){return Promise.reject(e)})),t}(e.baseURL),r=be(e,"username"),n=be(e,"password"),o=be(e,"otcsticket");if(o)t.defaults.headers.common.OTCSTicket=o;else{if(!r||!n)throw"You must provide an otcsticket or username and password.";t.interceptors.request.use(function(){var t=S(regeneratorRuntime.mark((function t(o){var i,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.headers.common.OTCSTicket){t.next=4;break}return t.abrupt("return",o);case 4:(i=je()).append("username",r),i.append("password",n),t.next=13;break;case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,x.post("".concat(e.baseURL,"/api/v1/auth/"),i);case 15:t.t0=t.sent;case 16:return s=t.t0,o.headers.common.OTCSTicket=be(s,"data.ticket"),t.abrupt("return",o);case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}return t},we=0,xe=144,Oe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.axios=_e(t)}var t,r,n;return t=e,(r=[{key:"_isObject",value:function(e){return e&&"object"===O(e)&&e.constructor===Object}},{key:"_objectToForm",value:function(e){for(var t=je(),r=0,n=Object.entries(e);r2&&void 0!==n[2]?n[2]:null,s="/api/v1/nodes",(a=je()).append("type",xe),a.append("parent_id",t),o.next=17;break;case 10:return u=o.sent,c=i||(void 0).basename(r),a.append("file",u,c),a.append("name",c),o.abrupt("return",e.post(s,a.getBuffer(),{headers:a.getHeaders()}));case 17:return l=i||r.name,a.append("file",r,l),a.append("name",l),o.abrupt("return",e.post(s,a));case 21:case"end":return o.stop()}}),o)})))()},addItem:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.postForm("api/v2/nodes",P({type:t,parent_id:r,name:n},o))},addFolder:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.addItem(we,e,t,r)},children:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("/api/v2/nodes/".concat(t,"/nodes/"),{params:r})},delete:function(t){return e.delete("/api/v1/nodes/".concat(t,"/"))}})),this._nodes}},{key:"workflow",get:function(){var e;return null==this._workflow&&(this._workflow=(e=this,{start:function(e){var t=this;return this.draftprocesses(e).then((function(e){return be(e,"data.results.draftprocess_id")})).then((function(e){return t.draftprocesses_update(e)}))},draftprocesses:function(t){return e.postForm("/api/v2/draftprocesses",{workflow_id:t})},draftprocesses_update:function(t){return e.get("/api/v1/forms/draftprocesses/update",{params:{draftprocess_id:t}})},draftprocesses_put:function(t,r){return e.putForm("/api/v2/draftprocesses/".concat(t),{body:r})},draftprocesses_formUpdate:function(e,t){var r={action:"formUpdate",values:t};return this.draftprocesses_put(e,r)}})),this._workflow}},{key:"rhcore",get:function(){var e;return null==this._rhcore&&(this._rhcore=(e=this,{scriptNode:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("/api/v1/rhcore/".concat(t),{params:r})}})),this._rhcore}},{key:"members",get:function(){var e;return null==this._members&&(this._members=(e=this,{USER:0,GROUP:1,userQuery:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=P({limit:20,where_type:[this.USER,this.GROUP],query:t},r);return e.get("/api/v2/members",{params:n})},member:function(t){return e.get("/api/v2/members/".concat(t))}})),this._members}},{key:"webreports",get:function(){var e;return null==this._webreports&&(this._webreports=(e=this,{run:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="/api/v1/nodes/".concat(t,"/output");return e.get(n,{params:r})}})),this._webreports}},{key:"versions",get:function(){var e;return null==this._versions&&(this._versions=(e=this,{addVersion:function(t,r){var n=arguments;return S(regeneratorRuntime.mark((function o(){var i,s,a,u,c,l;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:i=n.length>2&&void 0!==n[2]?n[2]:null,s="/api/v1/nodes/".concat(t,"/versions"),a=je(),o.next=14;break;case 8:return u=o.sent,c=i||(void 0).basename(r),a.append("file",u,c),o.abrupt("return",e.post(s,a.getBuffer(),{headers:a.getHeaders()}));case 14:return l=i||r.name,a.append("file",r,l),o.abrupt("return",e.post(s,a));case 17:case"end":return o.stop()}}),o)})))()}})),this._versions}}])&&E(t.prototype,r),n&&E(t,n),e}(),ke={auth:_e,Session:Oe},Se=ke.auth,Ee=ke.Session;e.Session=Ee,e.auth=Se,e.default=ke,Object.defineProperty(e,"__esModule",{value:!0})})); +!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("core-js/modules/es.object.to-string"),require("core-js/modules/es.promise"),require("core-js/modules/es.symbol"),require("core-js/modules/es.symbol.description"),require("core-js/modules/es.symbol.async-iterator"),require("core-js/modules/es.symbol.iterator"),require("core-js/modules/es.symbol.to-string-tag"),require("core-js/modules/es.array.for-each"),require("core-js/modules/es.array.iterator"),require("core-js/modules/es.array.reverse"),require("core-js/modules/es.array.slice"),require("core-js/modules/es.date.to-string"),require("core-js/modules/es.function.name"),require("core-js/modules/es.json.to-string-tag"),require("core-js/modules/es.math.to-string-tag"),require("core-js/modules/es.object.create"),require("core-js/modules/es.object.get-prototype-of"),require("core-js/modules/es.object.set-prototype-of"),require("core-js/modules/es.regexp.to-string"),require("core-js/modules/es.string.iterator"),require("core-js/modules/web.dom-collections.for-each"),require("core-js/modules/web.dom-collections.iterator"),require("axios"),require("core-js/modules/es.array.is-array"),require("core-js/modules/es.array.map"),require("core-js/modules/es.array.splice"),require("core-js/modules/es.regexp.constructor"),require("core-js/modules/es.regexp.exec"),require("core-js/modules/es.string.replace"),require("core-js/modules/es.object.entries")):"function"==typeof define&&define.amd?define(["exports","core-js/modules/es.object.to-string","core-js/modules/es.promise","core-js/modules/es.symbol","core-js/modules/es.symbol.description","core-js/modules/es.symbol.async-iterator","core-js/modules/es.symbol.iterator","core-js/modules/es.symbol.to-string-tag","core-js/modules/es.array.for-each","core-js/modules/es.array.iterator","core-js/modules/es.array.reverse","core-js/modules/es.array.slice","core-js/modules/es.date.to-string","core-js/modules/es.function.name","core-js/modules/es.json.to-string-tag","core-js/modules/es.math.to-string-tag","core-js/modules/es.object.create","core-js/modules/es.object.get-prototype-of","core-js/modules/es.object.set-prototype-of","core-js/modules/es.regexp.to-string","core-js/modules/es.string.iterator","core-js/modules/web.dom-collections.for-each","core-js/modules/web.dom-collections.iterator","axios","core-js/modules/es.array.is-array","core-js/modules/es.array.map","core-js/modules/es.array.splice","core-js/modules/es.regexp.constructor","core-js/modules/es.regexp.exec","core-js/modules/es.string.replace","core-js/modules/es.object.entries"],t):t((e=e||self).CSREST={},null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,e.axios)}(this,(function(e,t,r,n,o,i,s,a,u,c,l,f,p,d,h,y,v,m,g,b,j,_,w,x){"use strict";function O(e){return(O="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function k(e,t,r,n,o,i,s){try{var a=e[i](s),u=a.value}catch(e){return void r(e)}a.done?t(u):Promise.resolve(u).then(n,o)}function S(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function s(e){k(i,n,o,s,a,"next",e)}function a(e){k(i,n,o,s,a,"throw",e)}s(void 0)}))}}function E(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--o){var i=this.tryEntries[o],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var a=r.call(i,"catchLoc"),u=r.call(i,"finallyLoc");if(a&&u){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&r.call(o,"finallyLoc")&&this.prev=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),_(r),c}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:x(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),c}},e}(e.exports);try{regeneratorRuntime=t}catch(e){Function("r","regeneratorRuntime = r")(t)}}));var A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,G=/^\w*$/,C=/^\./,I=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,N=/\\(\\)?/g,U=/^\[object .+?Constructor\]$/,$="object"==O(R)&&R&&R.Object===Object&&R,D="object"==("undefined"==typeof self?"undefined":O(self))&&self&&self.Object===Object&&self,M=$||D||Function("return this")();var Y,B=Array.prototype,H=Function.prototype,J=Object.prototype,Q=M["__core-js_shared__"],V=(Y=/[^.]+$/.exec(Q&&Q.keys&&Q.keys.IE_PROTO||""))?"Symbol(src)_1."+Y:"",z=H.toString,K=J.hasOwnProperty,W=J.toString,X=RegExp("^"+z.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Z=M.Symbol,ee=B.splice,te=pe(M,"Map"),re=pe(Object,"create"),ne=Z?Z.prototype:void 0,oe=ne?ne.toString:void 0;function ie(e){var t=-1,r=e?e.length:0;for(this.clear();++t-1},se.prototype.set=function(e,t){var r=this.__data__,n=ue(r,e);return n<0?r.push([e,t]):r[n][1]=t,this},ae.prototype.clear=function(){this.__data__={hash:new ie,map:new(te||se),string:new ie}},ae.prototype.delete=function(e){return fe(this,e).delete(e)},ae.prototype.get=function(e){return fe(this,e).get(e)},ae.prototype.has=function(e){return fe(this,e).has(e)},ae.prototype.set=function(e,t){return fe(this,e).set(e,t),this};var de=ye((function(e){var t;e=null==(t=e)?"":function(e){if("string"==typeof e)return e;if(ge(e))return oe?oe.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}(t);var r=[];return C.test(e)&&r.push(""),e.replace(I,(function(e,t,n,o){r.push(n?o.replace(N,"$1"):t||e)})),r}));function he(e){if("string"==typeof e||ge(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function ye(e,t){if("function"!=typeof e||t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function r(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var s=e.apply(this,n);return r.cache=i.set(o,s),s};return r.cache=new(ye.Cache||ae),r}ye.Cache=ae;var ve=Array.isArray;function me(e){var t=O(e);return!!e&&("object"==t||"function"==t)}function ge(e){return"symbol"==O(e)||function(e){return!!e&&"object"==O(e)}(e)&&"[object Symbol]"==W.call(e)}var be=function(e,t,r){var n=null==e?void 0:ce(e,t);return void 0===n?r:n},je=function(){return new FormData};var _e=function(e){var t=function(e){var t=x.create({baseURL:e});return t.interceptors.response.use((function(e){var r=be(e,"headers.otcsticket");return r&&(t.defaults.headers.common.OTCSTicket=r),e}),(function(e){return Promise.reject(e)})),t}(e.baseURL),r=be(e,"username"),n=be(e,"password"),o=be(e,"otcsticket");if(o)t.defaults.headers.common.OTCSTicket=o;else{if(!r||!n)throw"You must provide an otcsticket or username and password.";t.interceptors.request.use(function(){var t=S(regeneratorRuntime.mark((function t(o){var i,s;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!o.headers.common.OTCSTicket){t.next=4;break}return t.abrupt("return",o);case 4:(i=je()).append("username",r),i.append("password",n),t.next=13;break;case 10:t.t0=t.sent,t.next=16;break;case 13:return t.next=15,x.post("".concat(e.baseURL,"/api/v1/auth/"),i);case 15:t.t0=t.sent;case 16:return s=t.t0,o.headers.common.OTCSTicket=be(s,"data.ticket"),t.abrupt("return",o);case 19:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}return t},we=0,xe=144,Oe=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.axios=_e(t)}var t,r,n;return t=e,(r=[{key:"_isObject",value:function(e){return e&&"object"===O(e)&&e.constructor===Object}},{key:"_objectToForm",value:function(e){for(var t=je(),r=0,n=Object.entries(e);r2&&void 0!==n[2]?n[2]:null,s="api/v1/nodes",(a=je()).append("type",xe),a.append("parent_id",t),o.next=17;break;case 10:return u=o.sent,c=i||(void 0).basename(r),a.append("file",u,c),a.append("name",c),o.abrupt("return",e.post(s,a.getBuffer(),{headers:a.getHeaders()}));case 17:return l=i||r.name,a.append("file",r,l),a.append("name",l),o.abrupt("return",e.post(s,a));case 21:case"end":return o.stop()}}),o)})))()},addItem:function(t,r,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};return e.postForm("api/v2/nodes",P({type:t,parent_id:r,name:n},o))},node:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("api/v2/nodes/".concat(t),{params:r})},ancestors:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("api/v1/nodes/".concat(t,"/ancestors"),{params:r})},volumeInfo:function(t){return e.get("api/v1/volumes/".concat(t))},volumes:function(){return e.get("api/v2/volumes")},addFolder:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.addItem(we,e,t,r)},children:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("api/v2/nodes/".concat(t,"/nodes"),{params:r})},delete:function(t){return e.delete("api/v1/nodes/".concat(t))}})),this._nodes}},{key:"workflow",get:function(){var e;return null==this._workflow&&(this._workflow=(e=this,{start:function(e){var t=this;return this.draftprocesses(e).then((function(e){return be(e,"data.results.draftprocess_id")})).then((function(e){return t.draftprocesses_update(e)}))},draftprocesses:function(t){return e.postForm("api/v2/draftprocesses",{workflow_id:t})},draftprocesses_update:function(t){return e.get("api/v1/forms/draftprocesses/update",{params:{draftprocess_id:t}})},draftprocesses_put:function(t,r){return e.putForm("api/v2/draftprocesses/".concat(t),{body:r})},draftprocesses_formUpdate:function(e,t){var r={action:"formUpdate",values:t};return this.draftprocesses_put(e,r)}})),this._workflow}},{key:"rhcore",get:function(){var e;return null==this._rhcore&&(this._rhcore=(e=this,{scriptNode:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get("api/v1/rhcore/".concat(t),{params:r})}})),this._rhcore}},{key:"members",get:function(){var e;return null==this._members&&(this._members=(e=this,{USER:0,GROUP:1,userQuery:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=P({limit:20,where_type:[this.USER,this.GROUP],query:t},r);return e.get("api/v2/members",{params:n})},member:function(t){return e.get("api/v2/members/".concat(t))}})),this._members}},{key:"webreports",get:function(){var e;return null==this._webreports&&(this._webreports=(e=this,{run:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n="api/v1/nodes/".concat(t,"/output");return e.get(n,{params:r})}})),this._webreports}},{key:"versions",get:function(){var e;return null==this._versions&&(this._versions=(e=this,{addVersion:function(t,r){var n=arguments;return S(regeneratorRuntime.mark((function o(){var i,s,a,u,c,l;return regeneratorRuntime.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:i=n.length>2&&void 0!==n[2]?n[2]:null,s="api/v1/nodes/".concat(t,"/versions"),a=je(),o.next=14;break;case 8:return u=o.sent,c=i||(void 0).basename(r),a.append("file",u,c),o.abrupt("return",e.post(s,a.getBuffer(),{headers:a.getHeaders()}));case 14:return l=i||r.name,a.append("file",r,l),o.abrupt("return",e.post(s,a));case 17:case"end":return o.stop()}}),o)})))()}})),this._versions}}])&&E(t.prototype,r),n&&E(t,n),e}(),ke={auth:_e,Session:Oe},Se=ke.auth,Ee=ke.Session;e.Session=Ee,e.auth=Se,e.default=ke,Object.defineProperty(e,"__esModule",{value:!0})})); //# sourceMappingURL=index.min.js.map diff --git a/lib/index.min.js.map b/lib/index.min.js.map index eef59cf..94c46e5 100644 --- a/lib/index.min.js.map +++ b/lib/index.min.js.map @@ -1 +1 @@ -{"version":3,"file":"index.min.js","sources":["../node_modules/regenerator-runtime/runtime.js","../node_modules/lodash.get/index.js","../src/handlers/form-data-factory.js","../src/auth.js","../src/handlers/nodes.js","../src/Session.js","../src/handlers/workflow.js","../src/handlers/rhcore.js","../src/handlers/members.js","../src/handlers/webreports.js","../src/handlers/versions.js","../src/index.js"],"sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","module.exports = {\n\tcreateFormData() {\n\t\t if (process.node) {\n\t\t\tconst klass = require('form-data')\n\t\t\treturn new klass\n\t\t} else {\n\t\t\treturn new FormData()\n\t\t}\t\t\n\t}\n}","const axios = require('axios')\nconst get = require('lodash.get')\nconst FormDataFactory = require('./handlers/form-data-factory')\n\nfunction getInstance(baseURL) {\n\n\tconst instance = axios.create({\n\t\tbaseURL\n\t})\n\n\tinstance.interceptors.response.use(response => {\n\t\tlet otcsticket = get(response, 'headers.otcsticket')\n\n\t\tif (otcsticket) {\n\t\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\t\t}\n\t\treturn response\n\t}, error => {\n\t\treturn Promise.reject(error)\n\t})\n\n\treturn instance\n}\n\nfunction axiosFactory(options) {\n\tconst instance = getInstance(options.baseURL)\n\n\tconst username = get(options, 'username')\n\tconst password = get(options, 'password')\n\tconst otcsticket = get(options, 'otcsticket')\n\n\tif (otcsticket) {\n\n\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\n\t} else if (username && password) {\n\n\t\tinstance.interceptors.request.use(async request => {\n\n\t\t\tif (request.headers.common['OTCSTicket']) {\n\n\t\t\t\treturn request\n\n\t\t\t} else {\n\n\t\t\t\tconst formData = FormDataFactory.createFormData()\n\n\t\t\t\tformData.append('username', username)\n\t\t\t\tformData.append('password', password)\n\n\t\t\t\tlet response = process.node ? await axios.post(`${options.baseURL}/api/v1/auth/`, formData.getBuffer(), { headers: formData.getHeaders() }) : await axios.post(`${options.baseURL}/api/v1/auth/`, formData)\n\n\t\t\t\trequest.headers.common['OTCSTicket'] = get(response, 'data.ticket')\n\n\t\t\t\treturn request\n\t\t\t}\n\t\t})\n\t} else {\n\t\tthrow 'You must provide an otcsticket or username and password.'\n\t}\n\n\treturn instance\n}\n\nmodule.exports = axiosFactory","const FormDataFactory = require('./form-data-factory')\r\n\r\nconst SubTypes = {\r\n\tFOLDER: 0,\r\n\tDOCUMENT: 144\r\n}\r\n\r\nmodule.exports = session => ({\r\n\r\n\taddablenodetypes(dataid) {\r\n\t\treturn session.get(`/api/v1/nodes/${dataid}/addablenodetypes`)\r\n\t},\r\n\r\n\tasync addDocument(parent_id, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = '/api/v1/nodes'\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tformData.append('type', SubTypes.DOCUMENT)\r\n\t\tformData.append('parent_id', parent_id)\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n\taddItem(type, parent_id, name, params = {}) {\r\n\t\treturn session.postForm('api/v2/nodes', {\r\n\t\t\ttype,\r\n\t\t\tparent_id,\r\n\t\t\tname,\r\n\t\t\t...params\r\n\t\t})\r\n\t},\r\n\r\n\taddFolder(parent_id, name, params = {}) {\r\n\t\treturn this.addItem(SubTypes.FOLDER, parent_id, name, params)\r\n\t},\r\n\r\n\tchildren(dataid, params = {}) {\r\n\t\t// https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501\r\n\t\treturn session.get(`/api/v2/nodes/${dataid}/nodes/`, { params })\r\n\t},\r\n\r\n\tdelete(dataid) {\r\n\t\treturn session.delete(`/api/v1/nodes/${dataid}/`)\r\n\t}\r\n\r\n})","const auth = require('./auth')\r\nconst nodes = require('./handlers/nodes')\r\nconst workflow = require('./handlers/workflow')\r\nconst rhcore = require('./handlers/rhcore')\r\nconst members = require('./handlers/members')\r\nconst versions = require('./handlers/versions')\r\nconst webreports = require('./handlers/webreports')\r\nconst FormDataFactory = require('./handlers/form-data-factory')\r\n\r\nmodule.exports = class Session {\r\n\r\n\tconstructor(options) {\r\n\t\tthis.axios = auth(options)\r\n\t}\r\n\r\n\tget nodes() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._nodes == null) {\r\n\t\t\tthis._nodes = nodes(this)\r\n\t\t}\r\n\r\n\t\treturn this._nodes\r\n\t}\r\n\r\n\tget workflow() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._workflow == null) {\r\n\t\t\tthis._workflow = workflow(this)\r\n\t\t}\r\n\r\n\t\treturn this._workflow\r\n\t}\r\n\r\n\tget rhcore() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._rhcore == null) {\r\n\t\t\tthis._rhcore = rhcore(this)\r\n\t\t}\r\n\r\n\t\treturn this._rhcore\r\n\t}\r\n\r\n\tget members() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._members == null) {\r\n\t\t\tthis._members = members(this)\r\n\t\t}\r\n\r\n\t\treturn this._members\r\n\t}\r\n\r\n\tget webreports() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._webreports == null) {\r\n\t\t\tthis._webreports = webreports(this)\r\n\t\t}\r\n\r\n\t\treturn this._webreports\r\n\t}\r\n\r\n\tget versions() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._versions == null) {\r\n\t\t\tthis._versions = versions(this)\r\n\t\t}\r\n\r\n\t\treturn this._versions\r\n\t}\r\n\r\n\t_isObject(value) {\r\n\t\treturn value && typeof value === 'object' && value.constructor === Object\r\n\t}\r\n\r\n\t_objectToForm(obj) {\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tfor (let [key, value] of Object.entries(obj)) {\r\n\t\t\tif (Array.isArray(value) || this._isObject(value)) {\r\n\t\t\t\tformData.append(key, JSON.stringify(value))\r\n\t\t\t} else {\r\n\t\t\t\tformData.append(key, value)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formData\r\n\t}\r\n\r\n\tget(...args) {\r\n\t\treturn this.axios.get(...args)\r\n\t}\r\n\r\n\tputForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.put(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.put(url, formData)\r\n\t}\r\n\r\n\tpostForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.post(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.post(url, formData)\r\n\t}\r\n\r\n\tpatchForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.patch(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.patch(url, formData)\r\n\t}\r\n\r\n\tpost(...args) {\r\n\t\treturn this.axios.post(...args)\r\n\t}\r\n\r\n\tput(...args) {\r\n\t\treturn this.axios.put(...args)\r\n\t}\r\n\r\n\tdelete(...args) {\r\n\t\treturn this.axios.delete(...args)\r\n\t}\r\n\r\n\toptions(...args) {\r\n\t\treturn this.axios.options(...args)\r\n\t}\r\n\r\n\tpatch(...args) {\r\n\t\treturn this.axios.patch(...args)\r\n\t}\r\n\r\n}","const get = require('lodash.get')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tstart(map_id) {\r\n\t\treturn this.draftprocesses(map_id)\r\n\t\t\t.then(response => get(response, 'data.results.draftprocess_id'))\r\n\t\t\t.then(draftprocess_id => this.draftprocesses_update(draftprocess_id))\r\n\t},\r\n\r\n\tdraftprocesses(workflow_id) {\r\n\t\treturn session.postForm('/api/v2/draftprocesses', {workflow_id})\r\n\t\t/*\r\n\t\t\r\n\t\t return session.post('/api/v2/draftprocesses', {}, {\r\n\t\t\tparams: {\r\n\t\t\t\tworkflow_id\r\n\t\t\t}\r\n\t\t})\r\n\t\t*/\r\n\t},\r\n\r\n\tdraftprocesses_update(draftprocess_id) {\r\n\t\treturn session.get('/api/v1/forms/draftprocesses/update', {\r\n\t\t\tparams: {\r\n\t\t\t\tdraftprocess_id\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\tdraftprocesses_put(draftprocess_id, body) {\r\n\t\treturn session.putForm(`/api/v2/draftprocesses/${draftprocess_id}`, { body })\r\n\t},\r\n\r\n\tdraftprocesses_formUpdate(draftprocess_id, values) {\r\n\t\t// : {\"WorkflowForm_2\":\"adsfasdf\"}\r\n\t\tconst body = {\r\n\t\t\taction: \"formUpdate\",\r\n\t\t\tvalues\r\n\t\t}\r\n\r\n\t\treturn this.draftprocesses_put(draftprocess_id, body)\r\n\t},\r\n\r\n\r\n\t// async start(map_id) {\r\n\t// \tdebugger\r\n\t// \t// this API is inconsistent with above\r\n\t// \tlet response = await this.draftprocesses(map_id)\r\n\r\n\t// \tlet draftprocess_id = get(response, 'data.results.draftprocess_id')\r\n\r\n\t// \tresponse = await this.draftprocesses_update(draftprocess_id)\r\n\r\n\t// \treturn response.data\r\n\r\n\t// }\r\n\r\n\r\n\r\n\r\n})","module.exports = session => ({\r\n\tscriptNode(id, params = {}) {\r\n\t\treturn session.get(`/api/v1/rhcore/${id}`, {\r\n\t\t\tparams\r\n\t\t})\r\n\t}\r\n})","module.exports = session => ({\n\n\tUSER: 0,\n\tGROUP: 1,\n\n\t// https://developer.opentext.com/awd/resources/apis/cs-rest-api-for-cs-16-s#!/members/SearchMember_get_1\n\tuserQuery(query, options = {}) {\n\t\tconst params = {\n\t\t\tlimit: 20,\n\t\t\twhere_type: [this.USER, this.GROUP],\n\t\t\tquery,\n\t\t\t...options\n\t\t}\n\n\t\treturn session.get(`/api/v2/members`, {params})\n\t},\n\n\tmember(id) {\n\t\treturn session.get(`/api/v2/members/${id}`)\n\t}\n\n})","module.exports = session => ({\n\n\trun(dataid, params = {}) {\n\t\tconst url = `/api/v1/nodes/${dataid}/output`\n\t\treturn session.get(url, { params })\n\t}\n\n})","const FormDataFactory = require('./form-data-factory')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tasync addVersion(dataid, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = `/api/v1/nodes/${dataid}/versions`\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\t// formData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\t\t\t// \r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\t// formData.append('name', fileHandler.name)\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n})","const auth = require('./auth')\r\nconst Session = require('./Session')\r\n\r\nmodule.exports = {auth, Session}"],"names":["runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","method","arg","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","value","makeInvokeMethod","fn","obj","call","err","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","_typeof","__await","then","unwrapped","error","undefined","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","keys","object","key","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","reIsDeepProp","reIsPlainProp","reLeadingDot","rePropName","reEscapeChar","reIsHostCtor","freeGlobal","global","freeSelf","root","uid","arrayProto","Array","funcProto","objectProto","coreJsData","maskSrcKey","exec","IE_PROTO","funcToString","objectToString","reIsNative","RegExp","replace","splice","Map","getNative","nativeCreate","symbolProto","symbolToString","Hash","entries","index","clear","set","ListCache","MapCache","assocIndexOf","array","other","baseGet","path","isArray","isSymbol","test","isKey","stringToPath","toKey","baseIsNative","isObject","func","tag","isFunction","e","isHostObject","toSource","getMapData","map","data","__data__","getValue","has","get","memoize","string","baseToString","match","number","quote","resolver","memoized","args","arguments","apply","cache","Cache","isObjectLike","defaultValue","FormData","options","instance","baseURL","axios","interceptors","response","use","otcsticket","defaults","headers","common","getInstance","username","password","request","formData","FormDataFactory","append","post","SubTypes","auth","_isObject","JSON","stringify","url","params","_objectToForm","put","patch","session","_nodes","addablenodetypes","dataid","addDocument","parent_id","fileHandler","fileName","addItem","postForm","addFolder","children","_workflow","start","map_id","draftprocesses","draftprocess_id","_this","draftprocesses_update","workflow_id","draftprocesses_put","body","putForm","draftprocesses_formUpdate","action","_rhcore","scriptNode","id","_members","USER","GROUP","userQuery","query","limit","where_type","member","_webreports","run","_versions","addVersion","Session"],"mappings":"g2KAOIA,EAAW,SAAUC,OAGnBC,EAAKC,OAAOC,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A,QFoCM7L,KAAK0N,wCGvCG,IAAAzB,SH4CM,MAAjBjM,KAAK6N,gBACHA,UG7CS5B,EH6CUjM,KG7CE,CAE5B8N,KAAM,EACNC,MAAO,EAGPC,mBAAUC,OAAO7D,yDAAU,GACpByB,KACLqC,MAAO,GACPC,WAAY,CAACnO,KAAK8N,KAAM9N,KAAK+N,OAC7BE,MAAAA,GACG7D,UAGG6B,EAAQ9C,sBAAuB,CAAC0C,OAAAA,KAGxCuC,gBAAOR,UACC3B,EAAQ9C,8BAAuByE,QH8B/B5N,KAAK6N,4CIhDG,IAAA5B,SJqDS,MAApBjM,KAAKqO,mBACHA,aItDSpC,EJsDgBjM,KItDJ,CAE5BsO,aAAIlC,OAAQP,yDAAS,GACdD,0BAAuBQ,oBACtBH,EAAQ9C,IAAIyC,EAAK,CAAEC,OAAAA,QJqDnB7L,KAAKqO,6CKvDG,IAAApC,SL4DO,MAAlBjM,KAAKuO,iBACHA,WK7DStC,EL6DYjM,KK7DA,CAEtBwO,oBAAWpC,EAAQG,kKAAaC,iCAAW,KAE1CZ,0BAAuBQ,eAEvBjB,EAAWC,8KAmBZnI,EAAOuJ,GAAYD,EAAYtJ,KAEnCkI,EAASE,OAAO,OAAQkB,EAAatJ,qBAE9BgJ,EAAQX,KAAKM,EAAKT,sDLmCnBnL,KAAKuO,kDM/DG,CAAC/C,KAAAA,GAAMiD,QAAAA"} \ No newline at end of file +{"version":3,"file":"index.min.js","sources":["../node_modules/regenerator-runtime/runtime.js","../node_modules/lodash.get/index.js","../src/handlers/form-data-factory.js","../src/auth.js","../src/handlers/nodes.js","../src/Session.js","../src/handlers/workflow.js","../src/handlers/rhcore.js","../src/handlers/members.js","../src/handlers/webreports.js","../src/handlers/versions.js","../src/index.js"],"sourcesContent":["/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n IteratorPrototype[iteratorSymbol] = function () {\n return this;\n };\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = Gp.constructor = GeneratorFunctionPrototype;\n GeneratorFunctionPrototype.constructor = GeneratorFunction;\n GeneratorFunctionPrototype[toStringTagSymbol] =\n GeneratorFunction.displayName = \"GeneratorFunction\";\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n prototype[method] = function(arg) {\n return this._invoke(method, arg);\n };\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n if (!(toStringTagSymbol in genFun)) {\n genFun[toStringTagSymbol] = \"GeneratorFunction\";\n }\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n AsyncIterator.prototype[asyncIteratorSymbol] = function () {\n return this;\n };\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n Gp[toStringTagSymbol] = \"Generator\";\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n Gp[iteratorSymbol] = function() {\n return this;\n };\n\n Gp.toString = function() {\n return \"[object Generator]\";\n };\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n}\n","/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n symbolTag = '[object Symbol]';\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/,\n reLeadingDot = /^\\./,\n rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar Symbol = root.Symbol,\n splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = isKey(path, object) ? [path] : castPath(path);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value) {\n return isArray(value) ? value : stringToPath(value);\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoize(function(string) {\n string = toString(string);\n\n var result = [];\n if (reLeadingDot.test(string)) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, string) {\n result.push(quote ? string.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\n/**\n * Gets the value at `path` of `object`. If the resolved value is\n * `undefined`, the `defaultValue` is returned in its place.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @param {*} [defaultValue] The value returned for `undefined` resolved values.\n * @returns {*} Returns the resolved value.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.get(object, 'a[0].b.c');\n * // => 3\n *\n * _.get(object, ['a', '0', 'b', 'c']);\n * // => 3\n *\n * _.get(object, 'a.b.c', 'default');\n * // => 'default'\n */\nfunction get(object, path, defaultValue) {\n var result = object == null ? undefined : baseGet(object, path);\n return result === undefined ? defaultValue : result;\n}\n\nmodule.exports = get;\n","module.exports = {\n\tcreateFormData() {\n\t\t if (process.node) {\n\t\t\tconst klass = require('form-data')\n\t\t\treturn new klass\n\t\t} else {\n\t\t\treturn new FormData()\n\t\t}\t\t\n\t}\n}","const axios = require('axios')\nconst get = require('lodash.get')\nconst FormDataFactory = require('./handlers/form-data-factory')\n\nfunction getInstance(baseURL) {\n\n\tconst instance = axios.create({\n\t\tbaseURL\n\t})\n\n\tinstance.interceptors.response.use(response => {\n\t\tconst otcsticket = get(response, 'headers.otcsticket')\n\n\t\tif (otcsticket) {\n\t\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\t\t}\n\t\treturn response\n\t}, error => {\n\t\treturn Promise.reject(error)\n\t})\n\n\treturn instance\n}\n\nfunction axiosFactory(options) {\n\tconst instance = getInstance(options.baseURL)\n\n\tconst username = get(options, 'username')\n\tconst password = get(options, 'password')\n\tconst otcsticket = get(options, 'otcsticket')\n\n\tif (otcsticket) {\n\n\t\tinstance.defaults.headers.common['OTCSTicket'] = otcsticket\n\n\t} else if (username && password) {\n\n\t\tinstance.interceptors.request.use(async request => {\n\n\t\t\tif (request.headers.common['OTCSTicket']) {\n\n\t\t\t\treturn request\n\n\t\t\t} else {\n\n\t\t\t\tconst formData = FormDataFactory.createFormData()\n\n\t\t\t\tformData.append('username', username)\n\t\t\t\tformData.append('password', password)\n\n\t\t\t\tlet response = process.node ? await axios.post(`${options.baseURL}/api/v1/auth/`, formData.getBuffer(), { headers: formData.getHeaders() }) : await axios.post(`${options.baseURL}/api/v1/auth/`, formData)\n\n\t\t\t\trequest.headers.common['OTCSTicket'] = get(response, 'data.ticket')\n\n\t\t\t\treturn request\n\t\t\t}\n\t\t})\n\t} else {\n\t\tthrow 'You must provide an otcsticket or username and password.'\n\t}\n\n\treturn instance\n}\n\nmodule.exports = axiosFactory","const FormDataFactory = require('./form-data-factory')\r\n\r\nconst SubTypes = {\r\n\tFOLDER: 0,\r\n\tDOCUMENT: 144\r\n}\r\n\r\nmodule.exports = session => ({\r\n\r\n\taddablenodetypes(dataid) {\r\n\t\treturn session.get(`api/v1/nodes/${dataid}/addablenodetypes`)\r\n\t},\r\n\r\n\tasync addDocument(parent_id, fileHandler, fileName = null) {\r\n\r\n\t\tconst url = 'api/v1/nodes'\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tformData.append('type', SubTypes.DOCUMENT)\r\n\t\tformData.append('parent_id', parent_id)\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\tformData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n\taddItem(type, parent_id, name, params = {}) {\r\n\t\treturn session.postForm('api/v2/nodes', {\r\n\t\t\ttype,\r\n\t\t\tparent_id,\r\n\t\t\tname,\r\n\t\t\t...params\r\n\t\t})\r\n\t},\r\n\r\n\tnode(dataid, params = {}) {\r\n\t\treturn session.get(`api/v2/nodes/${dataid}`, { params })\r\n\t},\r\n\r\n\tancestors(dataid, params = {}) {\r\n\t\treturn session.get(`api/v1/nodes/${dataid}/ancestors`, { params })\r\n\t},\r\n\r\n\tvolumeInfo(objType) {\r\n\t\treturn session.get(`api/v1/volumes/${objType}`)\r\n\t},\r\n\r\n\tvolumes() {\r\n\t\treturn session.get('api/v2/volumes')\r\n\t},\r\n\r\n\taddFolder(parent_id, name, params = {}) {\r\n\t\treturn this.addItem(SubTypes.FOLDER, parent_id, name, params)\r\n\t},\r\n\r\n\tchildren(dataid, params = {}) {\r\n\t\t// https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501\r\n\t\treturn session.get(`api/v2/nodes/${dataid}/nodes`, { params })\r\n\t},\r\n\r\n\tdelete(dataid) {\r\n\t\treturn session.delete(`api/v1/nodes/${dataid}`)\r\n\t}\r\n\r\n})","const auth = require('./auth')\r\nconst nodes = require('./handlers/nodes')\r\nconst workflow = require('./handlers/workflow')\r\nconst rhcore = require('./handlers/rhcore')\r\nconst members = require('./handlers/members')\r\nconst versions = require('./handlers/versions')\r\nconst webreports = require('./handlers/webreports')\r\nconst FormDataFactory = require('./handlers/form-data-factory')\r\n\r\nmodule.exports = class Session {\r\n\r\n\tconstructor(options) {\r\n\t\tthis.axios = auth(options)\r\n\t}\r\n\r\n\tget nodes() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._nodes == null) {\r\n\t\t\tthis._nodes = nodes(this)\r\n\t\t}\r\n\r\n\t\treturn this._nodes\r\n\t}\r\n\r\n\tget workflow() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._workflow == null) {\r\n\t\t\tthis._workflow = workflow(this)\r\n\t\t}\r\n\r\n\t\treturn this._workflow\r\n\t}\r\n\r\n\tget rhcore() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._rhcore == null) {\r\n\t\t\tthis._rhcore = rhcore(this)\r\n\t\t}\r\n\r\n\t\treturn this._rhcore\r\n\t}\r\n\r\n\tget members() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._members == null) {\r\n\t\t\tthis._members = members(this)\r\n\t\t}\r\n\r\n\t\treturn this._members\r\n\t}\r\n\r\n\tget webreports() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._webreports == null) {\r\n\t\t\tthis._webreports = webreports(this)\r\n\t\t}\r\n\r\n\t\treturn this._webreports\r\n\t}\r\n\r\n\tget versions() {\r\n\t\t// this creates a circular reference.. bad?\r\n\t\tif (this._versions == null) {\r\n\t\t\tthis._versions = versions(this)\r\n\t\t}\r\n\r\n\t\treturn this._versions\r\n\t}\r\n\r\n\t_isObject(value) {\r\n\t\treturn value && typeof value === 'object' && value.constructor === Object\r\n\t}\r\n\r\n\t_objectToForm(obj) {\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tfor (let [key, value] of Object.entries(obj)) {\r\n\t\t\tif (Array.isArray(value) || this._isObject(value)) {\r\n\t\t\t\tformData.append(key, JSON.stringify(value))\r\n\t\t\t} else {\r\n\t\t\t\tformData.append(key, value)\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn formData\r\n\t}\r\n\r\n\tget(...args) {\r\n\t\treturn this.axios.get(...args)\r\n\t}\r\n\r\n\tputForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.put(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.put(url, formData)\r\n\t}\r\n\r\n\tpostForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.post(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.post(url, formData)\r\n\t}\r\n\r\n\tpatchForm(url, params) {\r\n\t\tconst formData = this._objectToForm(params)\r\n\t\treturn process.node ? this.patch(url, formData.getBuffer(), { headers: formData.getHeaders() }) : this.patch(url, formData)\r\n\t}\r\n\r\n\tpost(...args) {\r\n\t\treturn this.axios.post(...args)\r\n\t}\r\n\r\n\tput(...args) {\r\n\t\treturn this.axios.put(...args)\r\n\t}\r\n\r\n\tdelete(...args) {\r\n\t\treturn this.axios.delete(...args)\r\n\t}\r\n\r\n\toptions(...args) {\r\n\t\treturn this.axios.options(...args)\r\n\t}\r\n\r\n\tpatch(...args) {\r\n\t\treturn this.axios.patch(...args)\r\n\t}\r\n\r\n}","const get = require('lodash.get')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tstart(map_id) {\r\n\t\treturn this.draftprocesses(map_id)\r\n\t\t\t.then(response => get(response, 'data.results.draftprocess_id'))\r\n\t\t\t.then(draftprocess_id => this.draftprocesses_update(draftprocess_id))\r\n\t},\r\n\r\n\tdraftprocesses(workflow_id) {\r\n\t\treturn session.postForm('api/v2/draftprocesses', {workflow_id})\r\n\t\t/*\r\n\t\t\r\n\t\t return session.post('api/v2/draftprocesses', {}, {\r\n\t\t\tparams: {\r\n\t\t\t\tworkflow_id\r\n\t\t\t}\r\n\t\t})\r\n\t\t*/\r\n\t},\r\n\r\n\tdraftprocesses_update(draftprocess_id) {\r\n\t\treturn session.get('api/v1/forms/draftprocesses/update', {\r\n\t\t\tparams: {\r\n\t\t\t\tdraftprocess_id\r\n\t\t\t}\r\n\t\t})\r\n\t},\r\n\r\n\tdraftprocesses_put(draftprocess_id, body) {\r\n\t\treturn session.putForm(`api/v2/draftprocesses/${draftprocess_id}`, { body })\r\n\t},\r\n\r\n\tdraftprocesses_formUpdate(draftprocess_id, values) {\r\n\t\t// : {\"WorkflowForm_2\":\"adsfasdf\"}\r\n\t\tconst body = {\r\n\t\t\taction: \"formUpdate\",\r\n\t\t\tvalues\r\n\t\t}\r\n\r\n\t\treturn this.draftprocesses_put(draftprocess_id, body)\r\n\t},\r\n\r\n\r\n\t// async start(map_id) {\r\n\t// \tdebugger\r\n\t// \t// this API is inconsistent with above\r\n\t// \tlet response = await this.draftprocesses(map_id)\r\n\r\n\t// \tlet draftprocess_id = get(response, 'data.results.draftprocess_id')\r\n\r\n\t// \tresponse = await this.draftprocesses_update(draftprocess_id)\r\n\r\n\t// \treturn response.data\r\n\r\n\t// }\r\n\r\n\r\n\r\n\r\n})","module.exports = session => ({\r\n\tscriptNode(id, params = {}) {\r\n\t\treturn session.get(`api/v1/rhcore/${id}`, {\r\n\t\t\tparams\r\n\t\t})\r\n\t}\r\n})","module.exports = session => ({\n\n\tUSER: 0,\n\tGROUP: 1,\n\n\t// https://developer.opentext.com/awd/resources/apis/cs-rest-api-for-cs-16-s#!/members/SearchMember_get_1\n\tuserQuery(query, options = {}) {\n\t\tconst params = {\n\t\t\tlimit: 20,\n\t\t\twhere_type: [this.USER, this.GROUP],\n\t\t\tquery,\n\t\t\t...options\n\t\t}\n\n\t\treturn session.get(`api/v2/members`, {params})\n\t},\n\n\tmember(id) {\n\t\treturn session.get(`api/v2/members/${id}`)\n\t}\n\n})","module.exports = session => ({\n\n\trun(dataid, params = {}) {\n\t\tconst url = `api/v1/nodes/${dataid}/output`\n\t\treturn session.get(url, { params })\n\t}\n\n})","const FormDataFactory = require('./form-data-factory')\r\n\r\nmodule.exports = session => ({\r\n\r\n\tasync addVersion(dataid, fileHandler, fileName = null) {\r\n\t\t// ERROR: This seemed to only upload the first 2500 characters when the file extension\r\n\t\t// was .lxe (e.g., and unknown mimetype). Must look into this.\r\n\r\n\r\n\t\tconst url = `api/v1/nodes/${dataid}/versions`\r\n\r\n\t\tconst formData = FormDataFactory.createFormData()\r\n\r\n\t\tif (process.node) {\r\n\t\t\t// node.js\r\n\t\t\tconst fsp = require('fs').promises\r\n\t\t\tconst path = require('path')\r\n\r\n\t\t\tlet f = await fsp.readFile(fileHandler)\r\n\t\t\tlet name = fileName || path.basename(fileHandler)\r\n\r\n\t\t\tformData.append('file', f, name)\r\n\t\t\t// formData.append('name', name)\r\n\r\n\t\t\treturn session.post(url, formData.getBuffer(), { headers: formData.getHeaders() })\r\n\r\n\t\t} else {\r\n\t\t\t// browser\r\n\t\t\t// \r\n\r\n\t\t\tlet name = fileName || fileHandler.name\r\n\r\n\t\t\tformData.append('file', fileHandler, name)\r\n\t\t\t// formData.append('name', fileHandler.name)\r\n\t\t\treturn session.post(url, formData)\r\n\t\t}\r\n\t},\r\n\r\n})","const auth = require('./auth')\r\nconst Session = require('./Session')\r\n\r\nmodule.exports = {auth, Session}"],"names":["runtime","exports","Op","Object","prototype","hasOwn","hasOwnProperty","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","_invoke","state","method","arg","Error","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","type","done","value","makeInvokeMethod","fn","obj","call","err","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","previousPromise","callInvokeWithMethodAndArg","resolve","reject","invoke","result","_typeof","__await","then","unwrapped","error","undefined","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","constructor","displayName","isGeneratorFunction","genFun","ctor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","toString","keys","object","key","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","module","regeneratorRuntime","accidentalStrictMode","Function","reIsDeepProp","reIsPlainProp","reLeadingDot","rePropName","reEscapeChar","reIsHostCtor","freeGlobal","global","freeSelf","root","uid","arrayProto","Array","funcProto","objectProto","coreJsData","maskSrcKey","exec","IE_PROTO","funcToString","objectToString","reIsNative","RegExp","replace","splice","Map","getNative","nativeCreate","symbolProto","symbolToString","Hash","entries","index","clear","set","ListCache","MapCache","assocIndexOf","array","other","baseGet","path","isArray","isSymbol","test","isKey","stringToPath","toKey","baseIsNative","isObject","func","tag","isFunction","e","isHostObject","toSource","getMapData","map","data","__data__","getValue","has","get","memoize","string","baseToString","match","number","quote","resolver","memoized","args","arguments","apply","cache","Cache","isObjectLike","defaultValue","FormData","options","instance","baseURL","axios","interceptors","response","use","otcsticket","defaults","headers","common","getInstance","username","password","request","formData","FormDataFactory","append","post","SubTypes","auth","_isObject","JSON","stringify","url","params","_objectToForm","put","patch","session","_nodes","addablenodetypes","dataid","addDocument","parent_id","fileHandler","fileName","addItem","postForm","node","ancestors","volumeInfo","objType","volumes","addFolder","children","_workflow","start","map_id","draftprocesses","draftprocess_id","_this","draftprocesses_update","workflow_id","draftprocesses_put","body","putForm","draftprocesses_formUpdate","action","_rhcore","scriptNode","id","_members","USER","GROUP","userQuery","query","limit","where_type","member","_webreports","run","_versions","addVersion","Session"],"mappings":"g2KAOIA,EAAW,SAAUC,OAGnBC,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eAEZC,EAA4B,mBAAXC,OAAwBA,OAAS,GAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,yBAEtCC,EAAKC,EAASC,EAASC,EAAMC,OAEhCC,EAAiBH,GAAWA,EAAQb,qBAAqBiB,EAAYJ,EAAUI,EAC/EC,EAAYnB,OAAOoB,OAAOH,EAAehB,WACzCoB,EAAU,IAAIC,EAAQN,GAAe,WAIzCG,EAAUI,iBAqMcV,EAASE,EAAMM,OACnCG,EA9KuB,wBAgLpB,SAAgBC,EAAQC,MA9KT,cA+KhBF,QACI,IAAIG,MAAM,mCA/KE,cAkLhBH,EAA6B,IAChB,UAAXC,QACIC,SAKDE,QAGTP,EAAQI,OAASA,EACjBJ,EAAQK,IAAMA,IAED,KACPG,EAAWR,EAAQQ,YACnBA,EAAU,KACRC,EAAiBC,EAAoBF,EAAUR,MAC/CS,EAAgB,IACdA,IAAmBE,EAAkB,gBAClCF,MAIY,SAAnBT,EAAQI,OAGVJ,EAAQY,KAAOZ,EAAQa,MAAQb,EAAQK,SAElC,GAAuB,UAAnBL,EAAQI,OAAoB,IAjNhB,mBAkNjBD,QACFA,EAhNc,YAiNRH,EAAQK,IAGhBL,EAAQc,kBAAkBd,EAAQK,SAEN,WAAnBL,EAAQI,QACjBJ,EAAQe,OAAO,SAAUf,EAAQK,KAGnCF,EA3NkB,gBA6Nda,EAASC,EAASzB,EAASE,EAAMM,MACjB,WAAhBgB,EAAOE,KAAmB,IAG5Bf,EAAQH,EAAQmB,KAhOA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kB,EAAatJ,qBAE9BgJ,EAAQX,KAAKM,EAAKT,sDLgCnBnL,KAAK4O,kDM/DG,CAACpD,KAAAA,GAAMsD,QAAAA"} \ No newline at end of file diff --git a/package.json b/package.json index 2ff69c2..75287f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@kweli/cs-rest", - "version": "1.0.7", + "version": "1.0.8", "description": "Simple authentication and REST calls for OpenText Content Server.", "main": "lib/index.cjs.js", "module": "lib/index.es.js", diff --git a/src/auth.js b/src/auth.js index 4b09e33..0b26074 100644 --- a/src/auth.js +++ b/src/auth.js @@ -9,7 +9,7 @@ function getInstance(baseURL) { }) instance.interceptors.response.use(response => { - let otcsticket = get(response, 'headers.otcsticket') + const otcsticket = get(response, 'headers.otcsticket') if (otcsticket) { instance.defaults.headers.common['OTCSTicket'] = otcsticket diff --git a/src/handlers/members.js b/src/handlers/members.js index 6d26324..97f28d1 100644 --- a/src/handlers/members.js +++ b/src/handlers/members.js @@ -12,11 +12,11 @@ module.exports = session => ({ ...options } - return session.get(`/api/v2/members`, {params}) + return session.get(`api/v2/members`, {params}) }, member(id) { - return session.get(`/api/v2/members/${id}`) + return session.get(`api/v2/members/${id}`) } }) \ No newline at end of file diff --git a/src/handlers/nodes.js b/src/handlers/nodes.js index cfcb98a..cea2f36 100644 --- a/src/handlers/nodes.js +++ b/src/handlers/nodes.js @@ -8,12 +8,12 @@ const SubTypes = { module.exports = session => ({ addablenodetypes(dataid) { - return session.get(`/api/v1/nodes/${dataid}/addablenodetypes`) + return session.get(`api/v1/nodes/${dataid}/addablenodetypes`) }, async addDocument(parent_id, fileHandler, fileName = null) { - const url = '/api/v1/nodes' + const url = 'api/v1/nodes' const formData = FormDataFactory.createFormData() @@ -55,17 +55,33 @@ module.exports = session => ({ }) }, + node(dataid, params = {}) { + return session.get(`api/v2/nodes/${dataid}`, { params }) + }, + + ancestors(dataid, params = {}) { + return session.get(`api/v1/nodes/${dataid}/ancestors`, { params }) + }, + + volumeInfo(objType) { + return session.get(`api/v1/volumes/${objType}`) + }, + + volumes() { + return session.get('api/v2/volumes') + }, + addFolder(parent_id, name, params = {}) { return this.addItem(SubTypes.FOLDER, parent_id, name, params) }, children(dataid, params = {}) { // https://developer.opentext.com/webaccess/#url=%2Fawd%2Fresources%2Fapis%2Fcs-rest-api-for-cs-16-s%23!%2Fnodes%2FgetSubnodes_get_15&tab=501 - return session.get(`/api/v2/nodes/${dataid}/nodes/`, { params }) + return session.get(`api/v2/nodes/${dataid}/nodes`, { params }) }, delete(dataid) { - return session.delete(`/api/v1/nodes/${dataid}/`) + return session.delete(`api/v1/nodes/${dataid}`) } }) \ No newline at end of file diff --git a/src/handlers/rhcore.js b/src/handlers/rhcore.js index 9ec44cd..e203714 100644 --- a/src/handlers/rhcore.js +++ b/src/handlers/rhcore.js @@ -1,6 +1,6 @@ module.exports = session => ({ scriptNode(id, params = {}) { - return session.get(`/api/v1/rhcore/${id}`, { + return session.get(`api/v1/rhcore/${id}`, { params }) } diff --git a/src/handlers/subtypes.json b/src/handlers/subtypes.json new file mode 100644 index 0000000..08090c3 --- /dev/null +++ b/src/handlers/subtypes.json @@ -0,0 +1,253 @@ +{ + "2WayTee": 294, + "Accession": 834, + "ActiveFolder": 1298, + "Activeview": 30309, + "ActivityManager": 907, + "Alias": 1, + "Appearance": 480, + "AppearanceFolder": 483, + "AppearancesVolume": 481, + "ArchiveFolder": 31711, + "BackupManager": 290, + "BackupProcess": 291, + "BestBets": 274, + "Blog": 356, + "BlogEntry": 357, + "BoxFolder": 530, + "Category": 131, + "CategoryFolder": 132, + "Channel": 207, + "ChannelVol": 209, + "Classification": 199, + "Classification Shortcut": 197, + "ClassificationTree": 196, + "ClassifiedItems": 194, + "Collection": 298, + "Column": 902, + "Comments": 345, + "CommentsReply": 348, + "CommentsVol": 346, + "CommExpertContainer": 3030338, + "CommExpertGroup": 3030339, + "CommStore": 3030329, + "CommTemplate": 3030002, + "CommTemplateFolder": 3030333, + "CommTemplateVol": 3030004, + "CommURLStore": 3030335, + "CommWorkspace": 3030334, + "CommXSLVolume": 3030205, + "CompoundDoc": 136, + "CompoundEMail": 557, + "ContentModuleFolder": 3030372, + "csapps CSApplicationManifest": 32658, + "csapps CSApplicationsVolume": 32657, + "CustomView": 146, + "CustomViewTemplate": 844, + "DataFlowManager": 270, + "DataSourceFolder": 276, + "DirWalker": 277, + "Discussion": 215, + "DispositionGroup": 602, + "Document": 144, + "DocumentLLNode": 1297, + "DocumentServer": 283, + "Dossier": 32912, + "DossierCabinet": 32916, + "DossierCabinetArchive": 31707, + "DossierTemplate": 32914, + "DossierTemplateFolder": 31709, + "DossierTemplatesVolume": 32917, + "DossierTemplateVolume": 32915, + "DossierVolume": 32913, + "DPSBinding": 31602, + "DPSFolder": 31601, + "DPSVolume": 31603, + "DTDLLNode": 335, + "DynamicView": 900, + "EMail": 749, + "EmailConversationItems": 2504, + "Enterprise Archive Document": 753, + "Facet": 904, + "FacetFolder": 905, + "FacetTree": 903, + "FailedFolder": 1299, + "FixedSystemColumn": 906, + "Folder": 0, + "Form": 223, + "Generation": 2, + "GENERICCONTENTMODULE": 3030371, + "GlobalAppearance": 482, + "HoldContainer": 833, + "HTMLConversion": 282, + "HTMLFormView": 226, + "Importer": 293, + "Inbox": 731, + "IndexEngine": 368, + "IndexTracer": 147, + "IndexUpdate": 281, + "InternalOTDS": 924, + "ItemTemplateVol": 541, + "ItemTemplateVolFolder": 542, + "JournalVolume": 361, + "LibraryExtractor": 259, + "LibraryObj": 272, + "LLNode Email Folder": 751, + "LLNodeFAQ": 123475, + "LLNodeFAQEntry": 123476, + "LLNodeForum": 123469, + "LLNodeForumEntry": 123470, + "LLNodeURQuestion": 430, + "LLNodeURReply": 432, + "Locators": 422, + "Mailbox": 732, + "MailStore": 3030331, + "ManagedSpace": 31710, + "MediaType": 410, + "MediaTypesContainer": 414, + "MemcachedFolder": 919, + "MemcachedProcess": 920, + "Merge": 273, + "MicroPost": 1281, + "MicroPostVolume": 1282, + "MultiVolClassification": 372, + "MultiVolClassificationProxy": 374, + "MultiVolClassificationTree": 373, + "MyReservedItems": 870, + "MyWorkbenches": 532, + "NAVMENUVOL": 3030756, + "News": 208, + "OTCIndexObj": 257, + "Partition": 371, + "PartitionMap": 370, + "PersonalComm": 3030203, + "PersonalCommSystemVolume": 3030003, + "PersonalCommVol": 3030204, + "PersonalStagingFolder": 398, + "PersonalWebpage": 3030343, + "PhysicalItemBox": 424, + "PhysicalItemContainer": 412, + "PhysicalItemCopy": 419, + "PhysicalItem_non_Container": 411, + "PhysObjAdmin": 415, + "PhysObjBatchLabels": 418, + "PhysObjCirculation": 416, + "PhysObjReports": 417, + "Poll": 218, + "Process": 271, + "Profile": 195, + "Project": 202, + "ProjectTemplate": 543, + "ProjectVol": 201, + "Prospector": 384, + "ProspectorQueries": 380, + "ProspectorSnapshot": 387, + "Provenance": 829, + "Proxy": 260, + "PublishingFolder": 31712, + "PublishingFolderVolume": 31713, + "QAFolder": 441, + "QueryFile": 296, + "QuestionVolume": 431, + "RecentItems": 327, + "RecordType": 425, + "RecordTypesContainer": 428, + "RedForm": 32918, + "RedFormVolume": 32919, + "Release": 138, + "RemoteLLDataSource": 381, + "Reply": 134, + "Report": 299, + "Revision": 139, + "RIMSDisposition": 555, + "RIMSDispositionsContainer": 554, + "RIMSHoldMaintenance": 552, + "RIMSRsiContainer": 553, + "RMAdministration": 556, + "RMClassification": 551, + "RMFolder": 426, + "RMPart": 427, + "RMReportsContainer": 558, + "RMThesaurus": 559, + "ScanConfigurationVolume": 2505, + "ScheduledHoldCriteria": 835, + "ScriptNode": 32901, + "SearchBroker": 258, + "SearchEngine": 369, + "SearchManager": 269, + "SearchReport": 278, + "SearchResultsTemplate": 383, + "SearchTemplate": 292, + "Simplate": 31678, + "SkyPodLLVolume": 49547, + "SliceFolder": 275, + "SocialObject": 1280, + "SocialObjectVolume": 1283, + "SPCJOBDESCR": 797, + "SPCJOBDESCRFOLDER": 796, + "SPCVOLUME": 795, + "spdcommittee": 3030202, + "spdcommitteevol": 3030201, + "spdcommitteevolume": 3030001, + "spdemail": 3030130, + "Spider": 280, + "StorageManagement": 421, + "SubmitVersionNode": 231, + "Task": 206, + "TaskGroup": 205, + "TaskList": 204, + "TaskListVol": 210, + "TaskMilestone": 212, + "Template": 230, + "TemplateFolder": 268, + "TextDocument": 145, + "Topic": 130, + "Transfers": 423, + "TransportBox": 531, + "TransportItem": 526, + "TransportItemPart": 527, + "UrgentRequests": 3030330, + "URL": 140, + "VirtualFolder": 899, + "VolBlog": 123461, + "VolCategories": 133, + "VolClassification": 198, + "VolComments": 347, + "VolDAP": 987352, + "VolDeletedItems": 405, + "VolDirectory": 375, + "VolDiscussion": 143, + "VolDomainWorkspace": 180, + "VolDTD": 336, + "VolEditWorkflow": 162, + "VolFacets": 901, + "VolLibrary": 141, + "VolOrphan": 403, + "VolPersonalStaging": 397, + "VolPerspectives": 908, + "VolPhysObj": 413, + "VolRecMan": 550, + "VolRelease": 137, + "VolReports": 211, + "VolSystem": 148, + "VolTracer": 149, + "VolumeFolder": 484, + "VolumeLLVolume": 1296, + "VolWarehouse": 525, + "VolWorkbin": 142, + "VolWorkflow": 161, + "WarehouseFolder": 529, + "WebFormConnectionVolume": 236, + "WebFormDatabaseConnection": 235, + "WebFormLookup": 234, + "WebFormLookupVolume": 233, + "WebReports": 30303, + "WFMapLLNode": 128, + "WFStatusNode": 190, + "WIKI": 5573, + "WIKIPAGE": 5574, + "Workbench": 528, + "WorkflowAttachments": 154, + "XMLActivatorCon": 286, + "XMLActivatorProd": 285 +} \ No newline at end of file diff --git a/src/handlers/versions.js b/src/handlers/versions.js index e3fa411..086bac0 100644 --- a/src/handlers/versions.js +++ b/src/handlers/versions.js @@ -3,8 +3,11 @@ const FormDataFactory = require('./form-data-factory') module.exports = session => ({ async addVersion(dataid, fileHandler, fileName = null) { + // ERROR: This seemed to only upload the first 2500 characters when the file extension + // was .lxe (e.g., and unknown mimetype). Must look into this. - const url = `/api/v1/nodes/${dataid}/versions` + + const url = `api/v1/nodes/${dataid}/versions` const formData = FormDataFactory.createFormData() diff --git a/src/handlers/webreports.js b/src/handlers/webreports.js index 9fd3ca5..ed787f7 100644 --- a/src/handlers/webreports.js +++ b/src/handlers/webreports.js @@ -1,7 +1,7 @@ module.exports = session => ({ run(dataid, params = {}) { - const url = `/api/v1/nodes/${dataid}/output` + const url = `api/v1/nodes/${dataid}/output` return session.get(url, { params }) } diff --git a/src/handlers/workflow.js b/src/handlers/workflow.js index 691e0f3..83d864e 100644 --- a/src/handlers/workflow.js +++ b/src/handlers/workflow.js @@ -9,10 +9,10 @@ module.exports = session => ({ }, draftprocesses(workflow_id) { - return session.postForm('/api/v2/draftprocesses', {workflow_id}) + return session.postForm('api/v2/draftprocesses', {workflow_id}) /* - return session.post('/api/v2/draftprocesses', {}, { + return session.post('api/v2/draftprocesses', {}, { params: { workflow_id } @@ -21,7 +21,7 @@ module.exports = session => ({ }, draftprocesses_update(draftprocess_id) { - return session.get('/api/v1/forms/draftprocesses/update', { + return session.get('api/v1/forms/draftprocesses/update', { params: { draftprocess_id } @@ -29,7 +29,7 @@ module.exports = session => ({ }, draftprocesses_put(draftprocess_id, body) { - return session.putForm(`/api/v2/draftprocesses/${draftprocess_id}`, { body }) + return session.putForm(`api/v2/draftprocesses/${draftprocess_id}`, { body }) }, draftprocesses_formUpdate(draftprocess_id, values) {