watson-developer-cloud
Version:
Client library to use the IBM Watson Services and AlchemyAPI
1 lines • 1.39 MB
JavaScript
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Watson=e()}}(function(){var define,module,exports;return function e(t,i,n){function r(o,s){if(!i[o]){if(!t[o]){var c="function"==typeof require&&require;if(!s&&c)return c(o,!0);if(a)return a(o,!0);var u=new Error("Cannot find module '"+o+"'");throw u.code="MODULE_NOT_FOUND",u}var p=i[o]={exports:{}};t[o][0].call(p.exports,function(e){var i=t[o][1][e];return r(i||e)},p,p.exports,e,t,i,n)}return i[o].exports}for(var a="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=e("extend"),o=e("../lib/base_service"),s=e("../lib/helper"),c=function(e){function t(t){var i=e.call(this,t)||this;if(void 0===i._options.version)throw new Error("Argument error: version was not specified");return i._options.qs.version=t.version,i}return r(t,e),t.prototype.message=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/message",method:"POST",json:!0,body:{input:i.input,alternate_intents:i.alternate_intents,context:i.context,entities:i.entities,intents:i.intents,output:i.output},qs:{nodes_visited_details:i.nodes_visited_details},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createWorkspace=function(e,t){var i="function"!=typeof e||t?a({},e):{},n="function"!=typeof e||t?t||function(){}:e,r={options:{url:"/v1/workspaces",method:"POST",json:!0,body:{name:i.name,description:i.description,language:i.language,intents:i.intents,entities:i.entities,dialog_nodes:i.dialog_nodes,counterexamples:i.counterexamples,metadata:i.metadata,learning_opt_out:i.learning_opt_out,system_settings:i.system_settings}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(r,n)},t.prototype.deleteWorkspace=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}",method:"DELETE",path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getWorkspace=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}",method:"GET",qs:{export:i.export,include_audit:i.include_audit,sort:i.sort},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listWorkspaces=function(e,t){var i="function"!=typeof e||t?a({},e):{},n="function"!=typeof e||t?t||function(){}:e,r={options:{url:"/v1/workspaces",method:"GET",qs:{page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(r,n)},t.prototype.updateWorkspace=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}",method:"POST",json:!0,body:{name:i.name,description:i.description,language:i.language,intents:i.intents,entities:i.entities,dialog_nodes:i.dialog_nodes,counterexamples:i.counterexamples,metadata:i.metadata,learning_opt_out:i.learning_opt_out,system_settings:i.system_settings},qs:{append:i.append},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createIntent=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents",method:"POST",json:!0,body:{intent:i.intent,description:i.description,examples:i.examples},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteIntent=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}",method:"DELETE",path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getIntent=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}",method:"GET",qs:{export:i.export,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listIntents=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents",method:"GET",qs:{export:i.export,page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateIntent=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}",method:"POST",json:!0,body:{intent:i.new_intent,description:i.new_description,examples:i.new_examples},path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createExample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples",method:"POST",json:!0,body:{text:i.text,mentions:i.mentions},path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteExample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}",method:"DELETE",path:{workspace_id:i.workspace_id,intent:i.intent,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getExample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}",method:"GET",qs:{include_audit:i.include_audit},path:{workspace_id:i.workspace_id,intent:i.intent,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listExamples=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples",method:"GET",qs:{page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateExample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}",method:"POST",json:!0,body:{text:i.new_text,mentions:i.new_mentions},path:{workspace_id:i.workspace_id,intent:i.intent,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createCounterexample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/counterexamples",method:"POST",json:!0,body:{text:i.text},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteCounterexample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/counterexamples/{text}",method:"DELETE",path:{workspace_id:i.workspace_id,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getCounterexample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/counterexamples/{text}",method:"GET",qs:{include_audit:i.include_audit},path:{workspace_id:i.workspace_id,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listCounterexamples=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/counterexamples",method:"GET",qs:{page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateCounterexample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/counterexamples/{text}",method:"POST",json:!0,body:{text:i.new_text},path:{workspace_id:i.workspace_id,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createEntity=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities",method:"POST",json:!0,body:{entity:i.entity,description:i.description,metadata:i.metadata,values:i.values,fuzzy_match:i.fuzzy_match},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteEntity=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}",method:"DELETE",path:{workspace_id:i.workspace_id,entity:i.entity}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getEntity=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}",method:"GET",qs:{export:i.export,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,entity:i.entity}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listEntities=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities",method:"GET",qs:{export:i.export,page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateEntity=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}",method:"POST",json:!0,body:{entity:i.new_entity,description:i.new_description,metadata:i.new_metadata,fuzzy_match:i.new_fuzzy_match,values:i.new_values},path:{workspace_id:i.workspace_id,entity:i.entity}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listMentions=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/mentions",method:"GET",qs:{export:i.export,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,entity:i.entity}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createValue=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values",method:"POST",json:!0,body:{value:i.value,metadata:i.metadata,synonyms:i.synonyms,patterns:i.patterns,type:i.value_type},path:{workspace_id:i.workspace_id,entity:i.entity}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteValue=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}",method:"DELETE",path:{workspace_id:i.workspace_id,entity:i.entity,value:i.value}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getValue=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}",method:"GET",qs:{export:i.export,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,entity:i.entity,value:i.value}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listValues=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values",method:"GET",qs:{export:i.export,page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,entity:i.entity}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateValue=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}",method:"POST",json:!0,body:{value:i.new_value,metadata:i.new_metadata,type:i.new_type,synonyms:i.new_synonyms,patterns:i.new_patterns},path:{workspace_id:i.workspace_id,entity:i.entity,value:i.value}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createSynonym=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value","synonym"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms",method:"POST",json:!0,body:{synonym:i.synonym},path:{workspace_id:i.workspace_id,entity:i.entity,value:i.value}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteSynonym=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value","synonym"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms/{synonym}",method:"DELETE",path:{workspace_id:i.workspace_id,entity:i.entity,value:i.value,synonym:i.synonym}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getSynonym=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value","synonym"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms/{synonym}",method:"GET",qs:{include_audit:i.include_audit},path:{workspace_id:i.workspace_id,entity:i.entity,value:i.value,synonym:i.synonym}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listSynonyms=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms",method:"GET",qs:{page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,entity:i.entity,value:i.value}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateSynonym=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","entity","value","synonym"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/entities/{entity}/values/{value}/synonyms/{synonym}",method:"POST",json:!0,body:{synonym:i.new_synonym},path:{workspace_id:i.workspace_id,entity:i.entity,value:i.value,synonym:i.synonym}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createDialogNode=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","dialog_node"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/dialog_nodes",method:"POST",json:!0,body:{dialog_node:i.dialog_node,description:i.description,conditions:i.conditions,parent:i.parent,previous_sibling:i.previous_sibling,output:i.output,context:i.context,metadata:i.metadata,next_step:i.next_step,actions:i.actions,title:i.title,type:i.node_type,event_name:i.event_name,variable:i.variable,digress_in:i.digress_in,digress_out:i.digress_out,digress_out_slots:i.digress_out_slots,user_label:i.user_label},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteDialogNode=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","dialog_node"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}",method:"DELETE",path:{workspace_id:i.workspace_id,dialog_node:i.dialog_node}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getDialogNode=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","dialog_node"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}",method:"GET",qs:{include_audit:i.include_audit},path:{workspace_id:i.workspace_id,dialog_node:i.dialog_node}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listDialogNodes=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/dialog_nodes",method:"GET",qs:{page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateDialogNode=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","dialog_node"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/dialog_nodes/{dialog_node}",method:"POST",json:!0,body:{dialog_node:i.new_dialog_node,description:i.new_description,conditions:i.new_conditions,parent:i.new_parent,previous_sibling:i.new_previous_sibling,output:i.new_output,context:i.new_context,metadata:i.new_metadata,next_step:i.new_next_step,title:i.new_title,type:i.new_type,event_name:i.new_event_name,variable:i.new_variable,actions:i.new_actions,digress_in:i.new_digress_in,digress_out:i.new_digress_out,digress_out_slots:i.new_digress_out_slots,user_label:i.new_user_label},path:{workspace_id:i.workspace_id,dialog_node:i.dialog_node}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listAllLogs=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["filter"]);if(r)return n(r);var o={options:{url:"/v1/logs",method:"GET",qs:{filter:i.filter,sort:i.sort,page_limit:i.page_limit,cursor:i.cursor}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listLogs=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/logs",method:"GET",qs:{sort:i.sort,filter:i.filter,page_limit:i.page_limit,cursor:i.cursor},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteUserData=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["customer_id"]);if(r)return n(r);var o={options:{url:"/v1/user_data",method:"DELETE",qs:{customer_id:i.customer_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.URL="https://gateway.watsonplatform.net/assistant/api",t}(o.BaseService);c.prototype.name="conversation",c.prototype.serviceVersion="v1",function(e){!function(e){!function(e){e.STABLE="stable"}(e.Sort||(e.Sort={}))}(e.GetWorkspaceConstants||(e.GetWorkspaceConstants={})),function(e){!function(e){e.NAME="name",e.UPDATED="updated"}(e.Sort||(e.Sort={}))}(e.ListWorkspacesConstants||(e.ListWorkspacesConstants={})),function(e){!function(e){e.INTENT="intent",e.UPDATED="updated"}(e.Sort||(e.Sort={}))}(e.ListIntentsConstants||(e.ListIntentsConstants={})),function(e){!function(e){e.TEXT="text",e.UPDATED="updated"}(e.Sort||(e.Sort={}))}(e.ListExamplesConstants||(e.ListExamplesConstants={})),function(e){!function(e){e.TEXT="text",e.UPDATED="updated"}(e.Sort||(e.Sort={}))}(e.ListCounterexamplesConstants||(e.ListCounterexamplesConstants={})),function(e){!function(e){e.ENTITY="entity",e.UPDATED="updated"}(e.Sort||(e.Sort={}))}(e.ListEntitiesConstants||(e.ListEntitiesConstants={})),function(e){!function(e){e.SYNONYMS="synonyms",e.PATTERNS="patterns"}(e.ValueType||(e.ValueType={}))}(e.CreateValueConstants||(e.CreateValueConstants={})),function(e){!function(e){e.VALUE="value",e.UPDATED="updated"}(e.Sort||(e.Sort={}))}(e.ListValuesConstants||(e.ListValuesConstants={})),function(e){!function(e){e.SYNONYMS="synonyms",e.PATTERNS="patterns"}(e.ValueType||(e.ValueType={}))}(e.UpdateValueConstants||(e.UpdateValueConstants={})),function(e){!function(e){e.SYNONYM="synonym",e.UPDATED="updated"}(e.Sort||(e.Sort={}))}(e.ListSynonymsConstants||(e.ListSynonymsConstants={})),function(e){!function(e){e.STANDARD="standard",e.EVENT_HANDLER="event_handler",e.FRAME="frame",e.SLOT="slot",e.RESPONSE_CONDITION="response_condition",e.FOLDER="folder"}(e.NodeType||(e.NodeType={})),function(e){e.FOCUS="focus",e.INPUT="input",e.FILLED="filled",e.VALIDATE="validate",e.FILLED_MULTIPLE="filled_multiple",e.GENERIC="generic",e.NOMATCH="nomatch",e.NOMATCH_RESPONSES_DEPLETED="nomatch_responses_depleted",e.DIGRESSION_RETURN_PROMPT="digression_return_prompt"}(e.EventName||(e.EventName={})),function(e){e.NOT_AVAILABLE="not_available",e.RETURNS="returns",e.DOES_NOT_RETURN="does_not_return"}(e.DigressIn||(e.DigressIn={})),function(e){e.RETURNING="allow_returning",e.ALL="allow_all",e.ALL_NEVER_RETURN="allow_all_never_return"}(e.DigressOut||(e.DigressOut={})),function(e){e.NOT_ALLOWED="not_allowed",e.ALLOW_RETURNING="allow_returning",e.ALLOW_ALL="allow_all"}(e.DigressOutSlots||(e.DigressOutSlots={}))}(e.CreateDialogNodeConstants||(e.CreateDialogNodeConstants={})),function(e){!function(e){e.DIALOG_NODE="dialog_node",e.UPDATED="updated"}(e.Sort||(e.Sort={}))}(e.ListDialogNodesConstants||(e.ListDialogNodesConstants={})),function(e){!function(e){e.STANDARD="standard",e.EVENT_HANDLER="event_handler",e.FRAME="frame",e.SLOT="slot",e.RESPONSE_CONDITION="response_condition",e.FOLDER="folder"}(e.NodeType||(e.NodeType={})),function(e){e.FOCUS="focus",e.INPUT="input",e.FILLED="filled",e.VALIDATE="validate",e.FILLED_MULTIPLE="filled_multiple",e.GENERIC="generic",e.NOMATCH="nomatch",e.NOMATCH_RESPONSES_DEPLETED="nomatch_responses_depleted",e.DIGRESSION_RETURN_PROMPT="digression_return_prompt"}(e.EventName||(e.EventName={})),function(e){e.NOT_AVAILABLE="not_available",e.RETURNS="returns",e.DOES_NOT_RETURN="does_not_return"}(e.DigressIn||(e.DigressIn={})),function(e){e.RETURNING="allow_returning",e.ALL="allow_all",e.ALL_NEVER_RETURN="allow_all_never_return"}(e.DigressOut||(e.DigressOut={})),function(e){e.NOT_ALLOWED="not_allowed",e.ALLOW_RETURNING="allow_returning",e.ALLOW_ALL="allow_all"}(e.DigressOutSlots||(e.DigressOutSlots={}))}(e.UpdateDialogNodeConstants||(e.UpdateDialogNodeConstants={}))}(c||(c={})),t.exports=c},{"../lib/base_service":13,"../lib/helper":15,extend:179}],2:[function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=e("extend"),o=e("../lib/base_service"),s=e("../lib/helper"),c=function(e){function t(t){var i=e.call(this,t)||this;if(void 0===i._options.version)throw new Error("Argument error: version was not specified");return i._options.qs.version=t.version,i}return r(t,e),t.prototype.createSession=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["assistant_id"]);if(r)return n(r);var o={options:{url:"/v2/assistants/{assistant_id}/sessions",method:"POST",path:{assistant_id:i.assistant_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteSession=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["assistant_id","session_id"]);if(r)return n(r);var o={options:{url:"/v2/assistants/{assistant_id}/sessions/{session_id}",method:"DELETE",path:{assistant_id:i.assistant_id,session_id:i.session_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.message=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["assistant_id","session_id"]);if(r)return n(r);var o={options:{url:"/v2/assistants/{assistant_id}/sessions/{session_id}/message",method:"POST",json:!0,body:{input:i.input,context:i.context},path:{assistant_id:i.assistant_id,session_id:i.session_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.URL="https://gateway.watsonplatform.net/assistant/api",t}(o.BaseService);c.prototype.name="conversation",c.prototype.serviceVersion="v2",t.exports=c},{"../lib/base_service":13,"../lib/helper":15,extend:179}],3:[function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=e("url"),o=function(e){function t(t){var i=e.call(this,t)||this;i.target_url=t.url;var n=a.parse(i._options.url);return n.pathname="/authorization/api",i._options.url=a.format(n),i}return r(t,e),t.prototype.getToken=function(e,t){if("function"==typeof e&&(t=e,e={url:this.target_url}),this.tokenManager)return this.tokenManager.getToken(t);if(e.url){var i={options:{method:"GET",url:"/v1/token?url="+e.url},defaultOptions:this._options};return this.createRequest(i,t)}t(new Error("Missing required parameters: url"))},t.URL="https://stream.watsonplatform.net/authorization/api",t}(e("../lib/base_service").BaseService);o.prototype.name="authorization",o.prototype.serviceVersion="v1",t.exports=o},{"../lib/base_service":13,url:373}],4:[function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=e("extend"),o=e("../lib/base_service"),s=e("../lib/helper"),c=function(e){function t(t){var i=e.call(this,t)||this;if(void 0===i._options.version)throw new Error("Argument error: version was not specified");return i._options.qs.version=t.version,i}return r(t,e),t.prototype.convertToHtml=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["file"]);if(r)return n(r);i.file&&!i.filename&&console.warn("WARNING: `filename` should be provided if `file` is not null. This will be REQUIRED in the next major release.");var o={file:{data:i.file,filename:i.filename,contentType:i.file_content_type}},c={options:{url:"/v1/html_conversion",method:"POST",qs:{model_id:i.model_id},formData:o},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"multipart/form-data"},i.headers)})};return this.createRequest(c,n)},t.prototype.classifyElements=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["file"]);if(r)return n(r);var o={file:{data:i.file,filename:i.filename,contentType:i.file_content_type}},c={options:{url:"/v1/element_classification",method:"POST",qs:{model_id:i.model_id},formData:o},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"multipart/form-data"},i.headers)})};return this.createRequest(c,n)},t.prototype.extractTables=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["file"]);if(r)return n(r);var o={file:{data:i.file,filename:i.filename,contentType:i.file_content_type}},c={options:{url:"/v1/tables",method:"POST",qs:{model_id:i.model_id},formData:o},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"multipart/form-data"},i.headers)})};return this.createRequest(c,n)},t.prototype.compareDocuments=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["file_1","file_2"]);if(r)return n(r);var o={file_1:{data:i.file_1,filename:i.file_1_filename,contentType:i.file_1_content_type},file_2:{data:i.file_2,filename:i.file_2_filename,contentType:i.file_2_content_type}},c={options:{url:"/v1/comparison",method:"POST",qs:{file_1_label:i.file_1_label,file_2_label:i.file_2_label,model_id:i.model_id},formData:o},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"multipart/form-data"},i.headers)})};return this.createRequest(c,n)},t.prototype.addFeedback=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["feedback_data"]);if(r)return n(r);var o={options:{url:"/v1/feedback",method:"POST",json:!0,body:{feedback_data:i.feedback_data,user_id:i.user_id,comment:i.comment}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteFeedback=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["feedback_id"]);if(r)return n(r);var o={options:{url:"/v1/feedback/{feedback_id}",method:"DELETE",qs:{model_id:i.model_id},path:{feedback_id:i.feedback_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getFeedback=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["feedback_id"]);if(r)return n(r);var o={options:{url:"/v1/feedback/{feedback_id}",method:"GET",qs:{model_id:i.model_id},path:{feedback_id:i.feedback_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listFeedback=function(e,t){var i="function"!=typeof e||t?a({},e):{},n="function"!=typeof e||t?t||function(){}:e,r={options:{url:"/v1/feedback",method:"GET",qs:{feedback_type:i.feedback_type,before:i.before,after:i.after,document_title:i.document_title,model_id:i.model_id,model_version:i.model_version,category_removed:i.category_removed,category_added:i.category_added,category_not_changed:i.category_not_changed,type_removed:i.type_removed,type_added:i.type_added,type_not_changed:i.type_not_changed,page_limit:i.page_limit,cursor:i.cursor,sort:i.sort,include_total:i.include_total}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(r,n)},t.prototype.createBatch=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["_function","input_credentials_file","input_bucket_location","input_bucket_name","output_credentials_file","output_bucket_location","output_bucket_name"]);if(r)return n(r);var o={input_credentials_file:{data:i.input_credentials_file,filename:i.input_credentials_filename,contentType:"application/json"},input_bucket_location:i.input_bucket_location,input_bucket_name:i.input_bucket_name,output_credentials_file:{data:i.output_credentials_file,filename:i.output_credentials_filename,contentType:"application/json"},output_bucket_location:i.output_bucket_location,output_bucket_name:i.output_bucket_name},c={options:{url:"/v1/batches",method:"POST",qs:{function:i._function,model_id:i.model_id},formData:o},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"multipart/form-data"},i.headers)})};return this.createRequest(c,n)},t.prototype.getBatch=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["batch_id"]);if(r)return n(r);var o={options:{url:"/v1/batches/{batch_id}",method:"GET",path:{batch_id:i.batch_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listBatches=function(e,t){var i="function"!=typeof e||t?a({},e):{},n="function"!=typeof e||t?t||function(){}:e,r={options:{url:"/v1/batches",method:"GET"},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(r,n)},t.prototype.updateBatch=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["batch_id","action"]);if(r)return n(r);var o={options:{url:"/v1/batches/{batch_id}",method:"PUT",qs:{action:i.action,model_id:i.model_id},path:{batch_id:i.batch_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.URL="https://gateway.watsonplatform.net/compare-comply/api",t}(o.BaseService);c.prototype.name="compare-comply",c.prototype.serviceVersion="v1",function(e){!function(e){!function(e){e.CONTRACTS="contracts",e.TABLES="tables"}(e.ModelId||(e.ModelId={})),function(e){e.APPLICATION_PDF="application/pdf",e.IMAGE_BMP="image/bmp",e.IMAGE_GIF="image/gif",e.IMAGE_JPEG="image/jpeg",e.IMAGE_PNG="image/png",e.IMAGE_TIFF="image/tiff",e.TEXT_PLAIN="text/plain"}(e.FileContentType||(e.FileContentType={}))}(e.ConvertToHtmlConstants||(e.ConvertToHtmlConstants={})),function(e){!function(e){e.CONTRACTS="contracts",e.TABLES="tables"}(e.ModelId||(e.ModelId={})),function(e){e.APPLICATION_PDF="application/pdf",e.IMAGE_BMP="image/bmp",e.IMAGE_GIF="image/gif",e.IMAGE_JPEG="image/jpeg",e.IMAGE_PNG="image/png",e.IMAGE_TIFF="image/tiff"}(e.FileContentType||(e.FileContentType={}))}(e.ClassifyElementsConstants||(e.ClassifyElementsConstants={})),function(e){!function(e){e.CONTRACTS="contracts",e.TABLES="tables"}(e.ModelId||(e.ModelId={})),function(e){e.APPLICATION_PDF="application/pdf",e.IMAGE_BMP="image/bmp",e.IMAGE_GIF="image/gif",e.IMAGE_JPEG="image/jpeg",e.IMAGE_PNG="image/png",e.IMAGE_TIFF="image/tiff",e.TEXT_PLAIN="text/plain"}(e.FileContentType||(e.FileContentType={}))}(e.ExtractTablesConstants||(e.ExtractTablesConstants={})),function(e){!function(e){e.CONTRACTS="contracts",e.TABLES="tables"}(e.ModelId||(e.ModelId={})),function(e){e.APPLICATION_PDF="application/pdf",e.APPLICATION_JSON="application/json",e.IMAGE_BMP="image/bmp",e.IMAGE_GIF="image/gif",e.IMAGE_JPEG="image/jpeg",e.IMAGE_PNG="image/png",e.IMAGE_TIFF="image/tiff"}(e.File1ContentType||(e.File1ContentType={})),function(e){e.APPLICATION_PDF="application/pdf",e.APPLICATION_JSON="application/json",e.IMAGE_BMP="image/bmp",e.IMAGE_GIF="image/gif",e.IMAGE_JPEG="image/jpeg",e.IMAGE_PNG="image/png",e.IMAGE_TIFF="image/tiff"}(e.File2ContentType||(e.File2ContentType={}))}(e.CompareDocumentsConstants||(e.CompareDocumentsConstants={})),function(e){!function(e){e.CONTRACTS="contracts",e.TABLES="tables"}(e.ModelId||(e.ModelId={}))}(e.DeleteFeedbackConstants||(e.DeleteFeedbackConstants={})),function(e){!function(e){e.CONTRACTS="contracts",e.TABLES="tables"}(e.ModelId||(e.ModelId={}))}(e.GetFeedbackConstants||(e.GetFeedbackConstants={})),function(e){!function(e){e.HTML_CONVERSION="html_conversion",e.ELEMENT_CLASSIFICATION="element_classification",e.TABLES="tables"}(e.Function||(e.Function={})),function(e){e.CONTRACTS="contracts",e.TABLES="tables"}(e.ModelId||(e.ModelId={}))}(e.CreateBatchConstants||(e.CreateBatchConstants={})),function(e){!function(e){e.RESCAN="rescan",e.CANCEL="cancel"}(e.Action||(e.Action={})),function(e){e.CONTRACTS="contracts",e.TABLES="tables"}(e.ModelId||(e.ModelId={}))}(e.UpdateBatchConstants||(e.UpdateBatchConstants={}))}(c||(c={})),t.exports=c},{"../lib/base_service":13,"../lib/helper":15,extend:179}],5:[function(e,t,i){"use strict";var n,r=this&&this.__extends||(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])},function(e,t){function i(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}),a=e("extend"),o=e("../lib/base_service"),s=e("../lib/helper"),c=function(e){function t(t){var i=e.call(this,t)||this;if(void 0===i._options.version)throw new Error("Argument error: version was not specified");return i._options.qs.version=t.version,i}return r(t,e),t.prototype.message=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/message",method:"POST",json:!0,body:{input:i.input,alternate_intents:i.alternate_intents,context:i.context,entities:i.entities,intents:i.intents,output:i.output},qs:{nodes_visited_details:i.nodes_visited_details},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createWorkspace=function(e,t){var i="function"!=typeof e||t?a({},e):{},n="function"!=typeof e||t?t||function(){}:e,r={options:{url:"/v1/workspaces",method:"POST",json:!0,body:{name:i.name,description:i.description,language:i.language,intents:i.intents,entities:i.entities,dialog_nodes:i.dialog_nodes,counterexamples:i.counterexamples,metadata:i.metadata,learning_opt_out:i.learning_opt_out,system_settings:i.system_settings}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(r,n)},t.prototype.deleteWorkspace=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}",method:"DELETE",path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getWorkspace=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}",method:"GET",qs:{export:i.export,include_audit:i.include_audit},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listWorkspaces=function(e,t){var i="function"!=typeof e||t?a({},e):{},n="function"!=typeof e||t?t||function(){}:e,r={options:{url:"/v1/workspaces",method:"GET",qs:{page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(r,n)},t.prototype.updateWorkspace=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}",method:"POST",json:!0,body:{name:i.name,description:i.description,language:i.language,intents:i.intents,entities:i.entities,dialog_nodes:i.dialog_nodes,counterexamples:i.counterexamples,metadata:i.metadata,learning_opt_out:i.learning_opt_out,system_settings:i.system_settings},qs:{append:i.append},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createIntent=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents",method:"POST",json:!0,body:{intent:i.intent,description:i.description,examples:i.examples},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteIntent=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}",method:"DELETE",path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getIntent=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}",method:"GET",qs:{export:i.export,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listIntents=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents",method:"GET",qs:{export:i.export,page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateIntent=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}",method:"POST",json:!0,body:{intent:i.new_intent,description:i.new_description,examples:i.new_examples},path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createExample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples",method:"POST",json:!0,body:{text:i.text,mentions:i.mentions},path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteExample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}",method:"DELETE",path:{workspace_id:i.workspace_id,intent:i.intent,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getExample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}",method:"GET",qs:{include_audit:i.include_audit},path:{workspace_id:i.workspace_id,intent:i.intent,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.listExamples=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples",method:"GET",qs:{page_limit:i.page_limit,include_count:i.include_count,sort:i.sort,cursor:i.cursor,include_audit:i.include_audit},path:{workspace_id:i.workspace_id,intent:i.intent}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.updateExample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","intent","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/intents/{intent}/examples/{text}",method:"POST",json:!0,body:{text:i.new_text,mentions:i.new_mentions},path:{workspace_id:i.workspace_id,intent:i.intent,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.createCounterexample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/counterexamples",method:"POST",json:!0,body:{text:i.text},path:{workspace_id:i.workspace_id}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json","Content-Type":"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.deleteCounterexample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","text"]);if(r)return n(r);var o={options:{url:"/v1/workspaces/{workspace_id}/counterexamples/{text}",method:"DELETE",path:{workspace_id:i.workspace_id,text:i.text}},defaultOptions:a(!0,{},this._options,{headers:a(!0,{Accept:"application/json"},i.headers)})};return this.createRequest(o,n)},t.prototype.getCounterexample=function(e,t){var i=a({},e),n=t||function(){},r=s.getMissingParams(i,["workspace_id","text"]);if(r)return n(r);var o={options: