purecloud-platform-client-v2 213.1.0 → 215.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +31 -3
- package/dist/node/purecloud-platform-client-v2.js +446 -118
- package/dist/web-amd/purecloud-platform-client-v2.js +446 -118
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +213 -149
- package/dist/web-cjs/purecloud-platform-client-v2.js +223 -156
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +369 -229
- package/package.json +1 -1
- package/src/purecloud-platform-client-v2/AbstractHttpClient.js +29 -0
- package/src/purecloud-platform-client-v2/ApiClient.js +21 -1
- package/src/purecloud-platform-client-v2/DefaultHttpClient.js +41 -0
- package/src/purecloud-platform-client-v2/api/AgentAssistantsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AgentCopilotApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AgentUIApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AlertingApi.js +45 -1
- package/src/purecloud-platform-client-v2/api/AnalyticsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ArchitectApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuditApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/AuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/BillingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CarrierServicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/CoachingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ContentManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ConversationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DataExtensionsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DataPrivacyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/DownloadsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmailsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EmployeeEngagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/EventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ExternalContactsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FaxApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/FlowsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GamificationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GeolocationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GreetingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/GroupsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IdentityProviderApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/InfrastructureAsCodeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/IntegrationsApi.js +1 -6
- package/src/purecloud-platform-client-v2/api/JourneyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/KnowledgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguageUnderstandingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LanguagesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LearningApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LicenseApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LocationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/LogCaptureApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/MobileDevicesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/NotificationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OAuthApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ObjectsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OperationalEventsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OrganizationAuthorizationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/OutboundApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/PresenceApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ProcessAutomationApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/QualityApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ResponseManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/RoutingApi.js +1 -31
- package/src/purecloud-platform-client-v2/api/SCIMApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScreenRecordingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/ScriptsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SearchApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SettingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SocialMediaApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SpeechTextAnalyticsApi.js +107 -1
- package/src/purecloud-platform-client-v2/api/StationsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/SuggestApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TaskManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TeamsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TextbotsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/TokensApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UploadsApi.js +1 -2
- package/src/purecloud-platform-client-v2/api/UsageApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UserRecordingsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/UsersApi.js +125 -1
- package/src/purecloud-platform-client-v2/api/UtilitiesApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/VoicemailApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebChatApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebDeploymentsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WebMessagingApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WidgetsApi.js +1 -1
- package/src/purecloud-platform-client-v2/api/WorkforceManagementApi.js +1 -1
- package/src/purecloud-platform-client-v2/index.js +1 -1
package/dist/web-cjs/bundle.js
CHANGED
|
@@ -854,11 +854,20 @@ axios.Cancel=axios.CanceledError;// Expose all/spread
|
|
|
854
854
|
axios.all=function all(promises){return Promise.all(promises);};axios.spread=spread;// Expose isAxiosError
|
|
855
855
|
axios.isAxiosError=isAxiosError;// Expose mergeConfig
|
|
856
856
|
axios.mergeConfig=mergeConfig;axios.AxiosHeaders=AxiosHeaders$1;axios.formToJSON=function(thing){return formDataToJSON(utils$1.isHTMLForm(thing)?new FormData(thing):thing);};axios.getAdapter=adapters.getAdapter;axios.HttpStatusCode=HttpStatusCode$1;axios["default"]=axios;// this module should only have a default export
|
|
857
|
-
var axios$1=axios;var AbstractHttpClient=/*#__PURE__*/function(){function AbstractHttpClient(){_classCallCheck(this,AbstractHttpClient);this.timeout=16000;}return _createClass(AbstractHttpClient,[{key:"setTimeout",value:function setTimeout(timeout){if(timeout===null||timeout===undefined||typeof timeout!=='number'){throw new Error("The 'timeout' property must be a number");}this.timeout=timeout;}},{key:"setHttpsAgent",value:function setHttpsAgent(httpsAgent){if(httpsAgent&&_typeof(httpsAgent)!=='object'){throw new Error("The 'httpsAgent' property must be an object");}this.httpsAgent=httpsAgent;}},{key:"request",value:function request(httpRequestOptions){throw new Error("method must be implemented");}}
|
|
857
|
+
var axios$1=axios;var AbstractHttpClient=/*#__PURE__*/function(){function AbstractHttpClient(){_classCallCheck(this,AbstractHttpClient);this.timeout=16000;}return _createClass(AbstractHttpClient,[{key:"setTimeout",value:function setTimeout(timeout){if(timeout===null||timeout===undefined||typeof timeout!=='number'){throw new Error("The 'timeout' property must be a number");}this.timeout=timeout;}},{key:"setHttpsAgent",value:function setHttpsAgent(httpsAgent){if(httpsAgent&&_typeof(httpsAgent)!=='object'){throw new Error("The 'httpsAgent' property must be an object");}this.httpsAgent=httpsAgent;}},{key:"request",value:function request(httpRequestOptions){throw new Error("method must be implemented");}},{key:"enableHooks",value:function enableHooks(){throw new Error("method must be implemented");}/**
|
|
858
|
+
* Set a PreHook function that modifies the request config before execution.
|
|
859
|
+
* @param {(config: object) => object | Promise<object> | void} hookFunction
|
|
860
|
+
*/},{key:"setPreHook",value:function setPreHook(hookFunction){if(typeof hookFunction!=="function"||hookFunction.length!==1){throw new Error("preHook must be a function that accepts (config)");}this.preHook=hookFunction;this.enableHooks();}/**
|
|
861
|
+
* Set a PostHook function that processes the response or error after execution.
|
|
862
|
+
* @param {(response: object | null, error: Error | null) => object | Promise<object> | void} hookFunction
|
|
863
|
+
*/},{key:"setPostHook",value:function setPostHook(hookFunction){if(typeof hookFunction!=="function"||hookFunction.length!==1){throw new Error("postHook must be a function that accepts (response)");}this.postHook=hookFunction;this.enableHooks();}}]);}();var HttpRequestOptions=/*#__PURE__*/function(){function HttpRequestOptions(url,method,headers,params,data,timeout){_classCallCheck(this,HttpRequestOptions);this.setUrl(url);this.setMethod(method);if(headers){this.setHeaders(headers);}if(params){this.setParams(params);}if(data){this.setData(data);}if(timeout!==null&&timeout!==undefined)this.setTimeout(timeout);else this.timeout=16000;}// Mandatory fields with validation
|
|
858
864
|
return _createClass(HttpRequestOptions,[{key:"setUrl",value:function setUrl(url){if(!url)throw new Error("The 'url' property is required");this.url=url;}},{key:"setMethod",value:function setMethod(method){var validMethods=['GET','POST','PUT','DELETE','PATCH','OPTIONS','HEAD'];if(!method||!validMethods.includes(method.toUpperCase())){throw new Error("The 'method' property is invalid or missing");}this.method=method.toUpperCase();}},{key:"setData",value:function setData(data){if(data===undefined||data===null){throw new Error("The 'data' property is required");}this.data=data;}// Optional fields
|
|
859
865
|
},{key:"setParams",value:function setParams(params){if(params&&_typeof(params)!=='object'){throw new Error("The 'params' property must be an object");}this.params=params;}// Optional fields
|
|
860
866
|
},{key:"setHeaders",value:function setHeaders(headers){if(headers&&_typeof(headers)!=='object'){throw new Error("The 'headers' property must be an object");}this.headers=headers;}},{key:"setTimeout",value:function setTimeout(timeout){if(timeout===undefined||timeout===null||typeof timeout!=='number'){throw new Error("The 'timeout' property must be a number");}this.timeout=timeout;}}]);}();// Default client is Axios
|
|
861
|
-
var DefaultHttpClient=/*#__PURE__*/function(_AbstractHttpClient){function DefaultHttpClient(timeout,httpsAgent){var _this2;_classCallCheck(this,DefaultHttpClient);_this2=_callSuper(this,DefaultHttpClient);if(timeout!==null&&timeout!==undefined)_this2.setTimeout(timeout);else _this2.timeout=16000;if(httpsAgent!==null&&httpsAgent!==undefined)_this2.setHttpsAgent(httpsAgent);else _this2.httpsAgent;_this2._axiosInstance=axios$1.create({});return _this2;}_inherits(DefaultHttpClient,_AbstractHttpClient);return _createClass(DefaultHttpClient,[{key:"
|
|
867
|
+
var DefaultHttpClient=/*#__PURE__*/function(_AbstractHttpClient){function DefaultHttpClient(timeout,httpsAgent){var _this2;_classCallCheck(this,DefaultHttpClient);_this2=_callSuper(this,DefaultHttpClient);if(timeout!==null&&timeout!==undefined)_this2.setTimeout(timeout);else _this2.timeout=16000;if(httpsAgent!==null&&httpsAgent!==undefined)_this2.setHttpsAgent(httpsAgent);else _this2.httpsAgent;_this2._axiosInstance=axios$1.create({});return _this2;}_inherits(DefaultHttpClient,_AbstractHttpClient);return _createClass(DefaultHttpClient,[{key:"enableHooks",value:function enableHooks(){var _this3=this;if(this.preHook&&typeof this.preHook==='function'){if(this.requestInterceptorId!==undefined){axios$1.interceptors.request.eject(this.requestInterceptorId);}this.requestInterceptorId=this._axiosInstance.interceptors.request.use(/*#__PURE__*/function(){var _ref23=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee9(config){return _regeneratorRuntime().wrap(function _callee9$(_context10){while(1)switch(_context10.prev=_context10.next){case 0:_context10.next=2;return _this3.preHook(config);case 2:config=_context10.sent;return _context10.abrupt("return",config);case 4:case"end":return _context10.stop();}},_callee9);}));return function(_x11){return _ref23.apply(this,arguments);};}(),function(error){// Handle errors before the request is sent
|
|
868
|
+
console.error('Request Pre-Hook Error:',error.message);return Promise.reject(error);});}if(this.postHook&&typeof this.postHook==='function'){// Response interceptor (for post-hooks)
|
|
869
|
+
if(this.responseInterceptorId!==undefined){axios$1.interceptors.response.eject(this.responseInterceptorId);}this.responseInterceptorId=this._axiosInstance.interceptors.response.use(/*#__PURE__*/function(){var _ref24=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee10(response){return _regeneratorRuntime().wrap(function _callee10$(_context11){while(1)switch(_context11.prev=_context11.next){case 0:_context11.next=2;return _this3.postHook(response);case 2:response=_context11.sent;return _context11.abrupt("return",response);case 4:case"end":return _context11.stop();}},_callee10);}));return function(_x12){return _ref24.apply(this,arguments);};}(),/*#__PURE__*/function(){var _ref25=_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee11(error){return _regeneratorRuntime().wrap(function _callee11$(_context12){while(1)switch(_context12.prev=_context12.next){case 0:console.error('Post-Hook: Response Error',error.message);// Optionally call post-hook in case of errors
|
|
870
|
+
return _context12.abrupt("return",Promise.reject(error));case 2:case"end":return _context12.stop();}},_callee11);}));return function(_x13){return _ref25.apply(this,arguments);};}());}}},{key:"request",value:function request(httpRequestOptions){if(!(httpRequestOptions instanceof HttpRequestOptions)){throw new Error("httpRequestOptions must be instance of HttpRequestOptions ");}var config=this.toAxiosConfig(httpRequestOptions);return this._axiosInstance.request(config);}// Method to generate Axios-compatible config
|
|
862
871
|
},{key:"toAxiosConfig",value:function toAxiosConfig(httpRequestOptions){if(!httpRequestOptions.url||!httpRequestOptions.method){throw new Error("Mandatory fields 'url' and 'method' must be set before making a request");}var config={url:httpRequestOptions.url,method:httpRequestOptions.method};if(httpRequestOptions.params)config.params=httpRequestOptions.params;if(httpRequestOptions.headers)config.headers=httpRequestOptions.headers;if(httpRequestOptions.data)config.data=httpRequestOptions.data;if(this.timeout!=null&&this.timeout!=undefined)config.timeout=this.timeout;if(this.httpsAgent)config.httpsAgent=this.httpsAgent;return config;}}]);}(AbstractHttpClient);var logLevelEnum={level:{LNone:'none',LError:'error',LDebug:'debug',LTrace:'trace'}};var logFormatEnum={formats:{JSON:'json',TEXT:'text'}};var Logger=/*#__PURE__*/function(){function Logger(){_classCallCheck(this,Logger);this.log_level=logLevelEnum.level.LNone;this.log_format=logFormatEnum.formats.TEXT;this.log_to_console=true;this.log_file_path;this.log_response_body=false;this.log_request_body=false;this.setLogger();}return _createClass(Logger,[{key:"logLevelEnum",get:function get(){return logLevelEnum;}},{key:"logFormatEnum",get:function get(){return logFormatEnum;}},{key:"setLogger",value:function setLogger(){}},{key:"log",value:function log(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody){var content=this.formatLog(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody);if(typeof window!=='undefined'){var shouldLog=this.calculateLogLevel(level);if(shouldLog>0&&this.log_to_console===true){if(this.log_format===this.logFormatEnum.formats.JSON){console.log(content);}else{console.log("".concat(level.toUpperCase(),": ").concat(content));}}}else{if(this.logger.transports.length>0)this.logger.log(level,content);}}},{key:"calculateLogLevel",value:function calculateLogLevel(level){switch(this.log_level){case this.logLevelEnum.level.LError:if(level!==this.logLevelEnum.level.LError){return-1;}return 1;case this.logLevelEnum.level.LDebug:if(level===this.logLevelEnum.level.LTrace){return-1;}return 1;case this.logLevelEnum.level.LTrace:return 1;default:return-1;}}},{key:"formatLog",value:function formatLog(level,statusCode,method,url,requestHeaders,responseHeaders,requestBody,responseBody){var result;var localRequestHeaders=requestHeaders?JSON.parse(JSON.stringify(requestHeaders)):null;var localResponseHeaders=responseHeaders?JSON.parse(JSON.stringify(responseHeaders)):null;var localRequestBody=requestBody?JSON.parse(JSON.stringify(requestBody)):null;var localResponseBody=responseBody?JSON.parse(JSON.stringify(responseBody)):null;if(requestHeaders)localRequestHeaders['Authorization']='[REDACTED]';if(!this.log_request_body)localRequestBody=undefined;if(!this.log_response_body)localResponseBody=undefined;if(this.log_format&&this.log_format===logFormatEnum.formats.JSON){result={level:level,date:new Date().toISOString(),method:method,url:decodeURIComponent(url),correlationId:localResponseHeaders?localResponseHeaders['inin-correlation-id']?localResponseHeaders['inin-correlation-id']:'':'',statusCode:statusCode};if(localRequestHeaders)result.requestHeaders=localRequestHeaders;if(localResponseHeaders)result.responseHeaders=localResponseHeaders;if(localRequestBody)result.requestBody=localRequestBody;if(localResponseBody)result.responseBody=localResponseBody;}else{result="".concat(new Date().toISOString(),"\n=== REQUEST === \n").concat(this.formatValue('URL',decodeURIComponent(url))).concat(this.formatValue('Method',method)).concat(this.formatValue('Headers',this.formatHeaderString(localRequestHeaders))).concat(this.formatValue('Body',localRequestBody?JSON.stringify(localRequestBody,null,2):''),"\n=== RESPONSE ===\n").concat(this.formatValue('Status',statusCode)).concat(this.formatValue('Headers',this.formatHeaderString(localResponseHeaders))).concat(this.formatValue('CorrelationId',localResponseHeaders?localResponseHeaders['inin-correlation-id']?localResponseHeaders['inin-correlation-id']:'':'')).concat(this.formatValue('Body',localResponseBody?JSON.stringify(localResponseBody,null,2):''));}return result;}},{key:"formatHeaderString",value:function formatHeaderString(headers){var headerString='';if(!headers)return headerString;for(var _i=0,_Object$entries=Object.entries(headers);_i<_Object$entries.length;_i++){var _Object$entries$_i=_slicedToArray(_Object$entries[_i],2),key=_Object$entries$_i[0],value=_Object$entries$_i[1];headerString+="\n\t".concat(key,": ").concat(value);}return headerString;}},{key:"formatValue",value:function formatValue(key,value){if(!value||value===''||value==='{}')return'';return"".concat(key,": ").concat(value,"\n");}},{key:"getLogLevel",value:function getLogLevel(level){switch(level){case'error':return logLevelEnum.level.LError;case'debug':return logLevelEnum.level.LDebug;case'trace':return logLevelEnum.level.LTrace;default:return logLevelEnum.level.LNone;}}},{key:"getLogFormat",value:function getLogFormat(format){switch(format){case'json':return logFormatEnum.formats.JSON;default:return logFormatEnum.formats.TEXT;}}}]);}();var Configuration=/*#__PURE__*/function(){function Configuration(){_classCallCheck(this,Configuration);if(!Configuration.instance){Configuration.instance=this;}if(typeof window!=='undefined'){this.configPath='';}else{var os=require('os');var path=require('path');this.configPath=path.join(os.homedir(),'.genesyscloudjavascript','config');}this.refresh_access_token=true;this.refresh_token_wait_max=10;this.live_reload_config=true;this.host;this.environment;this.basePath;this.authUrl;this.config;this.gateway=undefined;this.logger=new Logger();this.setEnvironment();this.liveLoadConfig();}return _createClass(Configuration,[{key:"instance",get:/**
|
|
863
872
|
* Singleton getter
|
|
864
873
|
*/function get(){return Configuration.instance;}/**
|
|
@@ -882,7 +891,7 @@ if(env)this.environment=env;else this.environment=this.host?this.host:'mypureclo
|
|
|
882
891
|
this.environment=this.environment.replace(/\/+$/,'');// Strip protocol and subdomain
|
|
883
892
|
if(this.environment.startsWith('https://'))this.environment=this.environment.substring(8);if(this.environment.startsWith('http://'))this.environment=this.environment.substring(7);if(this.environment.startsWith('api.'))this.environment=this.environment.substring(4);this.basePath="https://api.".concat(this.environment);this.authUrl="https://login.".concat(this.environment);}},{key:"getConfUrl",value:function getConfUrl(pathType,regionUrl){if(!this.gateway)return regionUrl;if(!this.gateway.host)return regionUrl;var url=this.gateway.protocol+'://'+this.gateway.host;if(this.gateway.port>-1)url=url+':'+this.gateway.port.toString();if(pathType==='login'){if(this.gateway.path_params_login){if(this.gateway.path_params_login.startsWith('/'))url=url+this.gateway.path_params_login;else url=url+'/'+this.gateway.path_params_login;}}else{if(this.gateway.path_params_api){if(this.gateway.path_params_api.startsWith('/'))url=url+this.gateway.path_params_api;else url=url+'/'+this.gateway.path_params_api;}}return url;}},{key:"getConfigString",value:function getConfigString(section,key){if(this.config._sections[section])return this.config._sections[section][key];}},{key:"getConfigBoolean",value:function getConfigBoolean(section,key){if(this.config._sections[section]&&this.config._sections[section][key]!==undefined){if(typeof this.config._sections[section][key]==='string'){return this.config._sections[section][key]==='true';}else return this.config._sections[section][key];}}},{key:"getConfigInt",value:function getConfigInt(section,key){if(this.config._sections[section]&&this.config._sections[section][key]){if(typeof this.config._sections[section][key]==='string'){return parseInt(this.config._sections[section][key]);}else return this.config._sections[section][key];}}}]);}();/**
|
|
884
893
|
* @module purecloud-platform-client-v2/ApiClient
|
|
885
|
-
* @version
|
|
894
|
+
* @version 215.0.0
|
|
886
895
|
*/var ApiClient=/*#__PURE__*/function(){/**
|
|
887
896
|
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
|
888
897
|
* application to use this class directly - the *Api and model classes provide the public API for the service. The
|
|
@@ -961,6 +970,12 @@ var tempState=this.authData.state;this.authData=localStorage.getItem("".concat(t
|
|
|
961
970
|
* @param {string} keyPath - path for key
|
|
962
971
|
* @param {string} caPath - path for public certs
|
|
963
972
|
*/},{key:"setMTLSCertificates",value:function setMTLSCertificates(certPath,keyPath,caPath){{throw new Error("MTLS authentication is managed by the Browser itself. MTLS certificates cannot be set via code on Browser.");}}/**
|
|
973
|
+
* @description Sets preHook functions for the httpClient
|
|
974
|
+
* @param {string} preHook - method definition for prehook
|
|
975
|
+
*/},{key:"setPreHook",value:function setPreHook(preHook){var httpClient=this.getHttpClient();httpClient.setPreHook(preHook);}/**
|
|
976
|
+
* @description Sets postHook functions for the httpClient
|
|
977
|
+
* @param {string} postHook - method definition for posthook
|
|
978
|
+
*/},{key:"setPostHook",value:function setPostHook(postHook){var httpClient=this.getHttpClient();httpClient.setPostHook(postHook);}/**
|
|
964
979
|
* @description Sets the certificate content if MTLS authentication is needed
|
|
965
980
|
* @param {string} certContent - content for certs
|
|
966
981
|
* @param {string} keyContent - content for key
|
|
@@ -983,43 +998,43 @@ var tempState=this.authData.state;this.authData=localStorage.getItem("".concat(t
|
|
|
983
998
|
* @param {string} opts.state - (optional) An arbitrary string to be passed back with the login response. Used for client apps to associate login responses with a request.
|
|
984
999
|
* @param {string} opts.org - (optional) The organization name that would normally used when specifying an organization name when logging in. This is only used when a provider is also specified.
|
|
985
1000
|
* @param {string} opts.provider - (optional) Authentication provider to log in with e.g. okta, adfs, salesforce, onelogin. This is only used when an org is also specified.
|
|
986
|
-
*/},{key:"loginImplicitGrant",value:function loginImplicitGrant(clientId,redirectUri,opts){var
|
|
1001
|
+
*/},{key:"loginImplicitGrant",value:function loginImplicitGrant(clientId,redirectUri,opts){var _this4=this;// Check for auth token in hash
|
|
987
1002
|
var hash=this._setValuesFromUrlHash();this.clientId=clientId;this.redirectUri=redirectUri;if(!opts)opts={};return new Promise(function(resolve,reject){// Abort if org and provider are not set together
|
|
988
1003
|
if(opts.org&&!opts.provider){reject(new Error('opts.provider must be set if opts.org is set'));}else if(opts.provider&&!opts.org){reject(new Error('opts.org must be set if opts.provider is set'));}// Abort on auth error
|
|
989
|
-
if(hash&&hash.error){hash.accessToken=undefined;
|
|
990
|
-
|
|
1004
|
+
if(hash&&hash.error){hash.accessToken=undefined;_this4._saveSettings(hash);return reject(new Error("[".concat(hash.error,"] ").concat(hash.error_description)));}// Test token and proceed with login
|
|
1005
|
+
_this4._testTokenAccess().then(function(){if(!_this4.authData.state&&opts.state)_this4.authData.state=opts.state;resolve(_this4.authData);})["catch"](function(error){var query={client_id:encodeURIComponent(_this4.clientId),redirect_uri:encodeURIComponent(_this4.redirectUri),response_type:'token'};if(opts.state)query.state=encodeURIComponent(opts.state);if(opts.org)query.org=encodeURIComponent(opts.org);if(opts.provider)query.provider=encodeURIComponent(opts.provider);var url=_this4._buildAuthUrl('oauth/authorize',query);window.location.replace(url);});});}/**
|
|
991
1006
|
* @description Initiates the client credentials login flow. Only available in node apps.
|
|
992
1007
|
* @param {string} clientId - The client ID of an OAuth Implicit Grant client
|
|
993
1008
|
* @param {string} clientSecret - The client secret of an OAuth Implicit Grant client
|
|
994
|
-
*/},{key:"loginClientCredentialsGrant",value:function loginClientCredentialsGrant(clientId,clientSecret){var
|
|
995
|
-
if(typeof window!=='undefined'){reject(new Error('The client credentials grant is not supported in a browser.'));return;}var headers={'Authorization':"Basic ".concat(authHeader)};var requestOptions=new HttpRequestOptions("".concat(loginBasePath,"/oauth/token"),"POST",headers,null,'grant_type=client_credentials',
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
resolve(
|
|
1000
|
-
if(error.response){
|
|
1009
|
+
*/},{key:"loginClientCredentialsGrant",value:function loginClientCredentialsGrant(clientId,clientSecret){var _this5=this;this.clientId=clientId;var authHeader=Buffer.from("".concat(clientId,":").concat(clientSecret)).toString('base64');var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){// Block browsers from using client credentials
|
|
1010
|
+
if(typeof window!=='undefined'){reject(new Error('The client credentials grant is not supported in a browser.'));return;}var headers={'Authorization':"Basic ".concat(authHeader)};var requestOptions=new HttpRequestOptions("".concat(loginBasePath,"/oauth/token"),"POST",headers,null,'grant_type=client_credentials',_this5.timeout);var httpClient=_this5.getHttpClient();httpClient.request(requestOptions).then(function(response){// Logging
|
|
1011
|
+
_this5.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,response.headers,{grant_type:'client_credentials'},undefined);_this5.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,undefined,{grant_type:'client_credentials'},undefined);// Save access token
|
|
1012
|
+
_this5.setAccessToken(response.data['access_token']);// Set expiry time
|
|
1013
|
+
_this5.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this5.authData.tokenExpiryTimeString=new Date(_this5.authData.tokenExpiryTime).toUTCString();// Return auth data
|
|
1014
|
+
resolve(_this5.authData);})["catch"](function(error){// Log error
|
|
1015
|
+
if(error.response){_this5.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),headers,error.response.headers,{grant_type:'client_credentials'},error.response.data);}reject(error);});});}/**
|
|
1001
1016
|
* @description Initiates the Saml2Bearerflow. Only available in node apps.
|
|
1002
1017
|
* @param {string} clientId - The client ID of an OAuth Implicit Grant client
|
|
1003
1018
|
* @param {string} clientSecret - The client secret of an OAuth Implicit Grant client
|
|
1004
1019
|
* @param {string} orgName - The orgName of an OAuth Implicit Grant client
|
|
1005
1020
|
* @param {string} assertion - The saml2bearer assertion
|
|
1006
|
-
*/},{key:"loginSaml2BearerGrant",value:function loginSaml2BearerGrant(clientId,clientSecret,orgName,assertion){var
|
|
1021
|
+
*/},{key:"loginSaml2BearerGrant",value:function loginSaml2BearerGrant(clientId,clientSecret,orgName,assertion){var _this6=this;this.clientId=clientId;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The saml2bearer grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this6._formAuthRequest(encodedData,{grant_type:'urn:ietf:params:oauth:grant-type:saml2-bearer',orgName:orgName,assertion:assertion});request.proxy=_this6.proxy;var bodyParam={grant_type:'urn:ietf:params:oauth:grant-type:saml2-bearer',orgName:orgName,assertion:assertion};// Handle response
|
|
1007
1022
|
request.then(function(response){// Logging
|
|
1008
|
-
|
|
1009
|
-
var access_token=response.data.access_token;
|
|
1010
|
-
resolve(
|
|
1011
|
-
if(error.response){
|
|
1023
|
+
_this6.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,response.headers,bodyParam,undefined);_this6.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,undefined,bodyParam,undefined);// Get access token from response
|
|
1024
|
+
var access_token=response.data.access_token;_this6.setAccessToken(access_token);_this6.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this6.authData.tokenExpiryTimeString=new Date(_this6.authData.tokenExpiryTime).toUTCString();// Return auth data
|
|
1025
|
+
resolve(_this6.authData);})["catch"](function(error){// Log error
|
|
1026
|
+
if(error.response){_this6.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});});}/**
|
|
1012
1027
|
* @description Completes the PKCE Code Authorization.
|
|
1013
1028
|
* @param {string} clientId - The client ID of an OAuth Code Authorization Grant client
|
|
1014
1029
|
* @param {string} codeVerifier - code verifier used to generate the code challenge
|
|
1015
1030
|
* @param {string} authCode - Authorization code
|
|
1016
1031
|
* @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
|
|
1017
|
-
*/},{key:"authorizePKCEGrant",value:function authorizePKCEGrant(clientId,codeVerifier,authCode,redirectUri){var
|
|
1032
|
+
*/},{key:"authorizePKCEGrant",value:function authorizePKCEGrant(clientId,codeVerifier,authCode,redirectUri){var _this7=this;this.clientId=clientId;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));return new Promise(function(resolve,reject){var headers={'Content-Type':'application/x-www-form-urlencoded'};var data=qs__default["default"].stringify({grant_type:'authorization_code',code:authCode,code_verifier:codeVerifier,client_id:clientId,redirect_uri:redirectUri});var requestOptions=new HttpRequestOptions("".concat(loginBasePath,"/oauth/token"),"POST",headers,null,data,_this7.timeout);var httpClient=_this7.getHttpClient();var bodyParam={grant_type:'authorization_code',code:authCode,code_verifier:codeVerifier,client_id:clientId,redirect_uri:redirectUri};// Handle response
|
|
1018
1033
|
httpClient.request(requestOptions).then(function(response){// Logging
|
|
1019
|
-
|
|
1020
|
-
var access_token=response.data.access_token;
|
|
1021
|
-
resolve(
|
|
1022
|
-
if(error.response){
|
|
1034
|
+
_this7.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),requestOptions.headers,response.headers,bodyParam,undefined);_this7.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),requestOptions.headers,undefined,bodyParam,undefined);// Get access token from response
|
|
1035
|
+
var access_token=response.data.access_token;_this7.setAccessToken(access_token);_this7.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this7.authData.tokenExpiryTimeString=new Date(_this7.authData.tokenExpiryTime).toUTCString();// Return auth data
|
|
1036
|
+
resolve(_this7.authData);})["catch"](function(error){// Log error
|
|
1037
|
+
if(error.response){_this7.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),requestOptions.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});});}/**
|
|
1023
1038
|
* @description Generate a random string used as PKCE Code Verifier - length = 43 to 128.
|
|
1024
1039
|
* @param {number} nChar - code length
|
|
1025
1040
|
*/},{key:"generatePKCECodeVerifier",value:function generatePKCECodeVerifier(nChar){if(nChar<43||nChar>128){throw new Error("PKCE Code Verifier (length) must be between 43 and 128 characters");}// Check for window
|
|
@@ -1038,23 +1053,23 @@ return reject(new Error("Code Challenge Error ".concat(error)));});});}}/**
|
|
|
1038
1053
|
* @param {string} opts.org - (optional) The organization name that would normally used when specifying an organization name when logging in. This is only used when a provider is also specified.
|
|
1039
1054
|
* @param {string} opts.provider - (optional) Authentication provider to log in with e.g. okta, adfs, salesforce, onelogin. This is only used when an org is also specified.
|
|
1040
1055
|
* @param {string} codeVerifier - (optional) code verifier used to generate the code challenge
|
|
1041
|
-
*/},{key:"loginPKCEGrant",value:function loginPKCEGrant(clientId,redirectUri,opts,codeVerifier){var
|
|
1056
|
+
*/},{key:"loginPKCEGrant",value:function loginPKCEGrant(clientId,redirectUri,opts,codeVerifier){var _this8=this;// Need Local Storage or non null codeVerifier as parameter
|
|
1042
1057
|
if(!this.hasLocalStorage&&!codeVerifier){throw new Error("loginPKCEGrant requires Local Storage or codeVerifier as input parameter");}// Check for auth code in query
|
|
1043
1058
|
var query=this._setValuesFromUrlQuery();this.clientId=clientId;this.redirectUri=redirectUri;this.codeVerifier=codeVerifier;if(!opts)opts={};return new Promise(function(resolve,reject){// Abort if org and provider are not set together
|
|
1044
1059
|
if(opts.org&&!opts.provider){reject(new Error('opts.provider must be set if opts.org is set'));}else if(opts.provider&&!opts.org){reject(new Error('opts.org must be set if opts.provider is set'));}// Abort on auth error
|
|
1045
1060
|
if(query&&query.error){// remove codeVerifier from session storage
|
|
1046
|
-
if(
|
|
1047
|
-
|
|
1048
|
-
if(query&&query.code){if(!
|
|
1049
|
-
if(
|
|
1050
|
-
|
|
1051
|
-
if(
|
|
1052
|
-
|
|
1053
|
-
if(
|
|
1054
|
-
|
|
1055
|
-
if(
|
|
1056
|
-
|
|
1057
|
-
if(
|
|
1061
|
+
if(_this8.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}// reset access token if any was stored
|
|
1062
|
+
_this8._saveSettings({accessToken:undefined});return reject(new Error("[".concat(query.error,"] ").concat(query.error_description)));}// Get token on auth code
|
|
1063
|
+
if(query&&query.code){if(!_this8.codeVerifier){// load codeVerifier from session storage
|
|
1064
|
+
if(_this8.hasLocalStorage){_this8.codeVerifier=sessionStorage.getItem("genesys_cloud_sdk_pkce_code_verifier");}}_this8.authorizePKCEGrant(_this8.clientId,_this8.codeVerifier,query.code,_this8.redirectUri).then(function(){// Do authenticated things
|
|
1065
|
+
_this8._testTokenAccess().then(function(){if(!_this8.authData.state&&query.state)_this8.authData.state=query.state;// remove codeVerifier from session storage
|
|
1066
|
+
if(_this8.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}resolve(_this8.authData);})["catch"](function(error){// Handle failure response
|
|
1067
|
+
_this8._saveSettings({accessToken:undefined});// remove codeVerifier from session storage
|
|
1068
|
+
if(_this8.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}return reject(new Error("[".concat(error.name,"] ").concat(error.msg)));});})["catch"](function(error){// Handle failure response
|
|
1069
|
+
_this8._saveSettings({accessToken:undefined});// remove codeVerifier from session storage
|
|
1070
|
+
if(_this8.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}return reject(new Error("[".concat(error.name,"] ").concat(error.msg)));});}else{// Test token (if previously stored) and proceed with login
|
|
1071
|
+
_this8._testTokenAccess().then(function(){if(!_this8.authData.state&&opts.state)_this8.authData.state=opts.state;resolve(_this8.authData);})["catch"](function(error){if(!_this8.codeVerifier){_this8.codeVerifier=_this8.generatePKCECodeVerifier(128);// save codeVerifier in session storage
|
|
1072
|
+
if(_this8.hasLocalStorage){sessionStorage.setItem("genesys_cloud_sdk_pkce_code_verifier",_this8.codeVerifier);}}_this8.computePKCECodeChallenge(_this8.codeVerifier).then(function(codeChallenge){var tokenQuery={client_id:encodeURIComponent(_this8.clientId),redirect_uri:encodeURIComponent(_this8.redirectUri),code_challenge:encodeURIComponent(codeChallenge),response_type:'code',code_challenge_method:'S256'};if(opts.state)tokenQuery.state=encodeURIComponent(opts.state);if(opts.org)tokenQuery.org=encodeURIComponent(opts.org);if(opts.provider)tokenQuery.provider=encodeURIComponent(opts.provider);var url=_this8._buildAuthUrl('oauth/authorize',tokenQuery);window.location.replace(url);})["catch"](function(err){return reject(new Error("[".concat(err.name,"]")));});});}});}/**
|
|
1058
1073
|
* @description Parses the URL Query, grabs the code, and clears the query param. If no code is found, no action is taken.
|
|
1059
1074
|
*/},{key:"_setValuesFromUrlQuery",value:function _setValuesFromUrlQuery(){// Check for window
|
|
1060
1075
|
if(!(typeof window!=='undefined'&&window.location.search))return;// Process query string
|
|
@@ -1071,42 +1086,42 @@ document.body.scrollTop=scrollV;document.body.scrollLeft=scrollH;}return query;}
|
|
|
1071
1086
|
* @param {string} clientSecret - The client secret of an OAuth Code Authorization Grant client
|
|
1072
1087
|
* @param {string} authCode - Authorization code
|
|
1073
1088
|
* @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
|
|
1074
|
-
*/},{key:"loginCodeAuthorizationGrant",value:function loginCodeAuthorizationGrant(clientId,clientSecret,authCode,redirectUri){var
|
|
1075
|
-
|
|
1089
|
+
*/},{key:"loginCodeAuthorizationGrant",value:function loginCodeAuthorizationGrant(clientId,clientSecret,authCode,redirectUri){var _this9=this;this.clientId=clientId;this.clientSecret=clientSecret;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The Code Authorization grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this9._formAuthRequest(encodedData,{grant_type:'authorization_code',code:authCode,redirect_uri:redirectUri});request.proxy=_this9.proxy;var bodyParam={grant_type:'authorization_code',code:authCode,redirect_uri:redirectUri};// Handle response
|
|
1090
|
+
_this9._handleCodeAuthorizationResponse(request,bodyParam,resolve,reject);});}/**
|
|
1076
1091
|
* @description Requests a new access token for Code Authorization. Only available in node apps.
|
|
1077
1092
|
* @param {string} clientId - The client ID of an OAuth Code Authorization Grant client
|
|
1078
1093
|
* @param {string} clientSecret - The client secret of an OAuth Code Authorization Grant client
|
|
1079
1094
|
* @param {string} authCode - Authorization code
|
|
1080
1095
|
* @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
|
|
1081
|
-
*/},{key:"refreshCodeAuthorizationGrant",value:function refreshCodeAuthorizationGrant(clientId,clientSecret,refreshToken){var
|
|
1082
|
-
|
|
1096
|
+
*/},{key:"refreshCodeAuthorizationGrant",value:function refreshCodeAuthorizationGrant(clientId,clientSecret,refreshToken){var _this10=this;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('The Code Authorization grant is not supported in a browser.'));return;}var encodedData=Buffer.from(clientId+':'+clientSecret).toString('base64');var request=_this10._formAuthRequest(encodedData,{grant_type:'refresh_token',refresh_token:refreshToken});request.proxy=_this10.proxy;var bodyParam={grant_type:'refresh_token',refresh_token:refreshToken};// Handle response
|
|
1097
|
+
_this10._handleCodeAuthorizationResponse(request,bodyParam,resolve,reject);});}/**
|
|
1083
1098
|
* @description Handles the response for code auth requests
|
|
1084
1099
|
* @param {object} request - Authorization request object
|
|
1085
1100
|
* @param {object} bodyParam - Input body data for authorization request
|
|
1086
1101
|
* @param {function} resolve - Promise resolve callback
|
|
1087
1102
|
* @param {function} reject - Promise reject callback
|
|
1088
|
-
*/},{key:"_handleCodeAuthorizationResponse",value:function _handleCodeAuthorizationResponse(request,bodyParam,resolve,reject){var
|
|
1089
|
-
|
|
1090
|
-
var access_token=response.data.access_token;var refresh_token=response.data.refresh_token;
|
|
1091
|
-
resolve(
|
|
1092
|
-
if(error.response){
|
|
1103
|
+
*/},{key:"_handleCodeAuthorizationResponse",value:function _handleCodeAuthorizationResponse(request,bodyParam,resolve,reject){var _this11=this;var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));request.then(function(response){// Logging
|
|
1104
|
+
_this11.config.logger.log('trace',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,response.headers,bodyParam,undefined);_this11.config.logger.log('debug',response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,undefined,bodyParam,undefined);// Get access token from response
|
|
1105
|
+
var access_token=response.data.access_token;var refresh_token=response.data.refresh_token;_this11.setAccessToken(access_token);_this11.authData.refreshToken=refresh_token;_this11.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this11.authData.tokenExpiryTimeString=new Date(_this11.authData.tokenExpiryTime).toUTCString();// Return auth data
|
|
1106
|
+
resolve(_this11.authData);})["catch"](function(error){// Log error
|
|
1107
|
+
if(error.response){_this11.config.logger.log('error',error.response.status,'POST',"".concat(loginBasePath,"/oauth/token"),request.headers,error.response.headers,bodyParam,error.response.data);}reject(error);});}/**
|
|
1093
1108
|
* @description Utility function to create the request for auth requests
|
|
1094
1109
|
* @param {string} encodedData - Base64 encoded client and clientSecret pair
|
|
1095
1110
|
* @param {object} data - data to url form encode
|
|
1096
1111
|
*/},{key:"_formAuthRequest",value:function _formAuthRequest(encodedData,data){var loginBasePath=this.config.getConfUrl('login',"https://login.".concat(this.config.environment));var headers={'Authorization':'Basic '+encodedData,'Content-Type':'application/x-www-form-urlencoded'};var requestOptions=new HttpRequestOptions("".concat(loginBasePath,"/oauth/token"),"POST",headers,null,qs__default["default"].stringify(data),this.timeout);var httpClient=this.getHttpClient();return httpClient.request(requestOptions);}/**
|
|
1097
1112
|
* @description Handles an expired access token. Only available in node apps.
|
|
1098
1113
|
* @param {string} statusCode - The status code of a request
|
|
1099
|
-
*/},{key:"_handleExpiredAccessToken",value:function _handleExpiredAccessToken(){var
|
|
1100
|
-
|
|
1101
|
-
|
|
1114
|
+
*/},{key:"_handleExpiredAccessToken",value:function _handleExpiredAccessToken(){var _this12=this;return new Promise(function(resolve,reject){if(typeof window!=='undefined'){reject(new Error('This method is not supported in a browser.'));return;}if(!_this12.refreshInProgress){_this12.refreshInProgress=true;_this12.refreshCodeAuthorizationGrant(_this12.clientId,_this12.clientSecret,_this12.authData.refreshToken).then(function(){_this12.refreshInProgress=false;resolve();})["catch"](function(err){// Handle failure response
|
|
1115
|
+
_this12.refreshInProgress=false;reject(err);});}else{// Wait refresh_token_wait_max seconds for other thread to complete refresh
|
|
1116
|
+
_this12._sleep(_this12.config.refresh_token_wait_max).then(function(){if(_this12.refreshInProgress)reject(new Error("Token refresh took longer than ".concat(_this12.config.refresh_token_wait_max," seconds")));else resolve();});}});}/**
|
|
1102
1117
|
* @description Sleeps for a defined length
|
|
1103
1118
|
* @param {int} millis - Length to sleep in milliseconds
|
|
1104
1119
|
*/},{key:"_sleep",value:function _sleep(millis){return new Promise(function(resolve){return setTimeout(resolve,millis);});}/**
|
|
1105
1120
|
* @description Loads token from storage, if enabled, and checks to ensure it works.
|
|
1106
|
-
*/},{key:"_testTokenAccess",value:function _testTokenAccess(){var
|
|
1107
|
-
|
|
1108
|
-
if(!
|
|
1109
|
-
|
|
1121
|
+
*/},{key:"_testTokenAccess",value:function _testTokenAccess(){var _this13=this;return new Promise(function(resolve,reject){// Load from storage
|
|
1122
|
+
_this13._loadSettings();// Check if there is a token to test
|
|
1123
|
+
if(!_this13.authentications['PureCloud OAuth'].accessToken){reject(new Error('Token is not set'));return;}// Test token
|
|
1124
|
+
_this13.callApi('/api/v2/tokens/me','GET',null,null,null,null,null,['PureCloud OAuth'],['application/json'],['application/json']).then(function(){resolve();})["catch"](function(error){_this13._saveSettings({accessToken:undefined});reject(error);});});}/**
|
|
1110
1125
|
* @description Parses the URL hash, grabs the access token, and clears the hash. If no access token is found, no action is taken.
|
|
1111
1126
|
*/},{key:"_setValuesFromUrlHash",value:function _setValuesFromUrlHash(){// Check for window
|
|
1112
1127
|
if(!(typeof window!=='undefined'&&window.location.hash))return;// Process hash string into object
|
|
@@ -1151,7 +1166,7 @@ this.setAccessToken(this.authentications['PureCloud OAuth'].accessToken);}/**
|
|
|
1151
1166
|
* @param {String} path The path to append to the base URL.
|
|
1152
1167
|
* @param {Object} pathParams The parameter values to append.
|
|
1153
1168
|
* @returns {String} The encoded path with parameter values substituted.
|
|
1154
|
-
*/},{key:"buildUrl",value:function buildUrl(path,pathParams){var
|
|
1169
|
+
*/},{key:"buildUrl",value:function buildUrl(path,pathParams){var _this14=this;if(!path.match(/^\//)){path="/".concat(path);}var url=this.config.getConfUrl('api',this.config.basePath)+path;url=url.replace(/\{([\w-]+)\}/g,function(fullMatch,key){var value;if(pathParams.hasOwnProperty(key)){value=_this14.paramToString(pathParams[key]);}else{value=fullMatch;}return encodeURIComponent(value);});return url;}/**
|
|
1155
1170
|
* Checks whether the given content type represents JSON.<br>
|
|
1156
1171
|
* JSON content type examples:<br>
|
|
1157
1172
|
* <ul>
|
|
@@ -1192,7 +1207,7 @@ return param.map(this.paramToString);default:throw new Error("Unknown collection
|
|
|
1192
1207
|
* Applies authentication headers to the request.
|
|
1193
1208
|
* @param {Object} request The axios request config object.
|
|
1194
1209
|
* @param {Array.<String>} authNames An array of authentication method names.
|
|
1195
|
-
*/},{key:"applyAuthToRequest",value:function applyAuthToRequest(request,authNames){var
|
|
1210
|
+
*/},{key:"applyAuthToRequest",value:function applyAuthToRequest(request,authNames){var _this15=this;authNames.forEach(function(authName){var auth=_this15.authentications[authName];switch(auth.type){case'basic':if(auth.username||auth.password){request.auth={username:auth.username||'',password:auth.password||''};}break;case'apiKey':if(auth.apiKey){var data={};if(auth.apiKeyPrefix){data[auth.name]="".concat(auth.apiKeyPrefix," ").concat(auth.apiKey);}else{data[auth.name]=auth.apiKey;}if(auth['in']==='header'){request.headers=_this15.addHeaders(request.headers,data);}else{request.setParams(_this15.serialize(data));}}break;case'oauth2':if(auth.accessToken){request.headers=_this15.addHeaders(request.headers,{'Authorization':"Bearer ".concat(auth.accessToken)});}break;default:throw new Error("Unknown authentication type: ".concat(auth.type));}});}/**
|
|
1196
1211
|
* @description Sets the proxy agent axios will use for requests
|
|
1197
1212
|
* @param {any} agent - The proxy agent
|
|
1198
1213
|
*/},{key:"setProxyAgent",value:function setProxyAgent(agent){this.proxyAgent=agent;var httpClient=this.getHttpClient();httpClient.setHttpsAgent(this.proxyAgent);}/**
|
|
@@ -1209,7 +1224,7 @@ return param.map(this.paramToString);default:throw new Error("Unknown collection
|
|
|
1209
1224
|
* @param {Array.<String>} accepts An array of acceptable response MIME types.types or the
|
|
1210
1225
|
* constructor for a complex type.
|
|
1211
1226
|
* @returns {Promise} A Promise object.
|
|
1212
|
-
*/},{key:"callApi",value:function callApi(path,httpMethod,pathParams,queryParams,headerParams,formParams,bodyParam,authNames,contentTypes,accepts){var
|
|
1227
|
+
*/},{key:"callApi",value:function callApi(path,httpMethod,pathParams,queryParams,headerParams,formParams,bodyParam,authNames,contentTypes,accepts){var _this16=this;return new Promise(function(resolve,reject){sendRequest(_this16);function sendRequest(that){var url=that.buildUrl(path,pathParams);var request=new HttpRequestOptions(url,httpMethod,null,that.serialize(queryParams),null,that.timeout);// apply authentications
|
|
1213
1228
|
that.applyAuthToRequest(request,authNames);// set header parameters
|
|
1214
1229
|
var defaultHeaders=that.defaultHeaders;var normalizedHeaderParams=that.normalizeParams(headerParams);request.headers=that.addHeaders(request.headers,defaultHeaders,normalizedHeaderParams);var contentType=that.jsonPreferredMime(contentTypes);if(contentType){request.headers['Content-Type']=contentType;}else if(!request.headers['Content-Type']){request.headers['Content-Type']='application/json';}if(contentType==='application/x-www-form-urlencoded'){request.setData(that.normalizeParams(formParams));}else if(contentType=='multipart/form-data'){var _formParams=that.normalizeParams(formParams);for(var key in _formParams){if(_formParams.hasOwnProperty(key)){// Looks like axios handles files and forms the same way
|
|
1215
1230
|
var formData=new FormData();formData.set(key,_formParams[key]);request.setData(formData);}}}else if(bodyParam){request.setData(bodyParam);}var accept=that.jsonPreferredMime(accepts);if(accept){request.headers['Accept']=accept;}var httpClient=that.getHttpClient();httpClient.request(request).then(function(response){// Build response object
|
|
@@ -1219,7 +1234,7 @@ resolve(data);})["catch"](function(error){var data=error;if(error.response&&erro
|
|
|
1219
1234
|
that.config.logger.log('error',error.response.status,httpMethod,url,request.headers,error.response.headers,bodyParam,error.response.data);data=that.returnExtended===true?{status:error.response.status,statusText:error.response.statusText,headers:error.response.headers,body:error.response.data,text:error.response.text,error:error}:error.response.data?error.response.data:error.response.text;}reject(data);});}});}}]);}();var AgentAssistantsApi=/*#__PURE__*/function(){/**
|
|
1220
1235
|
* AgentAssistants service.
|
|
1221
1236
|
* @module purecloud-platform-client-v2/api/AgentAssistantsApi
|
|
1222
|
-
* @version
|
|
1237
|
+
* @version 215.0.0
|
|
1223
1238
|
*//**
|
|
1224
1239
|
* Constructs a new AgentAssistantsApi.
|
|
1225
1240
|
* @alias module:purecloud-platform-client-v2/api/AgentAssistantsApi
|
|
@@ -1320,7 +1335,7 @@ if(queueId===undefined||queueId===null){throw'Missing the required parameter "qu
|
|
|
1320
1335
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAssistantQueue';}return this.apiClient.callApi('/api/v2/assistants/{assistantId}/queues/{queueId}','PUT',{'assistantId':assistantId,'queueId':queueId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AgentCopilotApi=/*#__PURE__*/function(){/**
|
|
1321
1336
|
* AgentCopilot service.
|
|
1322
1337
|
* @module purecloud-platform-client-v2/api/AgentCopilotApi
|
|
1323
|
-
* @version
|
|
1338
|
+
* @version 215.0.0
|
|
1324
1339
|
*//**
|
|
1325
1340
|
* Constructs a new AgentCopilotApi.
|
|
1326
1341
|
* @alias module:purecloud-platform-client-v2/api/AgentCopilotApi
|
|
@@ -1342,7 +1357,7 @@ if(assistantId===undefined||assistantId===null){throw'Missing the required param
|
|
|
1342
1357
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAssistantCopilot';}return this.apiClient.callApi('/api/v2/assistants/{assistantId}/copilot','PUT',{'assistantId':assistantId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AgentUIApi=/*#__PURE__*/function(){/**
|
|
1343
1358
|
* AgentUI service.
|
|
1344
1359
|
* @module purecloud-platform-client-v2/api/AgentUIApi
|
|
1345
|
-
* @version
|
|
1360
|
+
* @version 215.0.0
|
|
1346
1361
|
*//**
|
|
1347
1362
|
* Constructs a new AgentUIApi.
|
|
1348
1363
|
* @alias module:purecloud-platform-client-v2/api/AgentUIApi
|
|
@@ -1376,7 +1391,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
|
|
|
1376
1391
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUsersAgentuiAgentsAutoanswerAgentIdSettings';}return this.apiClient.callApi('/api/v2/users/agentui/agents/autoanswer/{agentId}/settings','PUT',{'agentId':agentId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AlertingApi=/*#__PURE__*/function(){/**
|
|
1377
1392
|
* Alerting service.
|
|
1378
1393
|
* @module purecloud-platform-client-v2/api/AlertingApi
|
|
1379
|
-
* @version
|
|
1394
|
+
* @version 215.0.0
|
|
1380
1395
|
*//**
|
|
1381
1396
|
* Constructs a new AlertingApi.
|
|
1382
1397
|
* @alias module:purecloud-platform-client-v2/api/AlertingApi
|
|
@@ -1389,6 +1404,9 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
1389
1404
|
* @param {String} alertId Alert ID
|
|
1390
1405
|
*/return _createClass(AlertingApi,[{key:"deleteAlertingAlert",value:function deleteAlertingAlert(alertId){// verify the required parameter 'alertId' is set
|
|
1391
1406
|
if(alertId===undefined||alertId===null){throw'Missing the required parameter "alertId" when calling deleteAlertingAlert';}return this.apiClient.callApi('/api/v2/alerting/alerts/{alertId}','DELETE',{'alertId':alertId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1407
|
+
* Delete all alerts for the user
|
|
1408
|
+
*
|
|
1409
|
+
*/},{key:"deleteAlertingAlertsAll",value:function deleteAlertingAlertsAll(){return this.apiClient.callApi('/api/v2/alerting/alerts/all','DELETE',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1392
1410
|
* Delete an interaction stats alert
|
|
1393
1411
|
* Apps should migrate to use DELETE /api/v2/alerting/alerts/{alertId}.
|
|
1394
1412
|
* @param {String} alertId Alert ID
|
|
@@ -1459,6 +1477,11 @@ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "rule
|
|
|
1459
1477
|
* @param {Object} opts.body
|
|
1460
1478
|
*/},{key:"patchAlertingAlert",value:function patchAlertingAlert(alertId,opts){opts=opts||{};// verify the required parameter 'alertId' is set
|
|
1461
1479
|
if(alertId===undefined||alertId===null){throw'Missing the required parameter "alertId" when calling patchAlertingAlert';}return this.apiClient.callApi('/api/v2/alerting/alerts/{alertId}','PATCH',{'alertId':alertId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1480
|
+
* Updates all alerts
|
|
1481
|
+
*
|
|
1482
|
+
* @param {Object} opts Optional parameters
|
|
1483
|
+
* @param {Object} opts.body
|
|
1484
|
+
*/},{key:"patchAlertingAlertsAll",value:function patchAlertingAlertsAll(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/alerting/alerts/all','PATCH',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
1462
1485
|
* Bulk alert updates
|
|
1463
1486
|
*
|
|
1464
1487
|
* @param {Object} body
|
|
@@ -1533,7 +1556,7 @@ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "rule
|
|
|
1533
1556
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAlertingRule';}return this.apiClient.callApi('/api/v2/alerting/rules/{ruleId}','PUT',{'ruleId':ruleId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AnalyticsApi=/*#__PURE__*/function(){/**
|
|
1534
1557
|
* Analytics service.
|
|
1535
1558
|
* @module purecloud-platform-client-v2/api/AnalyticsApi
|
|
1536
|
-
* @version
|
|
1559
|
+
* @version 215.0.0
|
|
1537
1560
|
*//**
|
|
1538
1561
|
* Constructs a new AnalyticsApi.
|
|
1539
1562
|
* @alias module:purecloud-platform-client-v2/api/AnalyticsApi
|
|
@@ -2205,7 +2228,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
2205
2228
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAnalyticsDataretentionSettings';}return this.apiClient.callApi('/api/v2/analytics/dataretention/settings','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ArchitectApi=/*#__PURE__*/function(){/**
|
|
2206
2229
|
* Architect service.
|
|
2207
2230
|
* @module purecloud-platform-client-v2/api/ArchitectApi
|
|
2208
|
-
* @version
|
|
2231
|
+
* @version 215.0.0
|
|
2209
2232
|
*//**
|
|
2210
2233
|
* Constructs a new ArchitectApi.
|
|
2211
2234
|
* @alias module:purecloud-platform-client-v2/api/ArchitectApi
|
|
@@ -3297,7 +3320,7 @@ if(milestoneId===undefined||milestoneId===null){throw'Missing the required param
|
|
|
3297
3320
|
if(flowOutcomeId===undefined||flowOutcomeId===null){throw'Missing the required parameter "flowOutcomeId" when calling putFlowsOutcome';}return this.apiClient.callApi('/api/v2/flows/outcomes/{flowOutcomeId}','PUT',{'flowOutcomeId':flowOutcomeId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AuditApi=/*#__PURE__*/function(){/**
|
|
3298
3321
|
* Audit service.
|
|
3299
3322
|
* @module purecloud-platform-client-v2/api/AuditApi
|
|
3300
|
-
* @version
|
|
3323
|
+
* @version 215.0.0
|
|
3301
3324
|
*//**
|
|
3302
3325
|
* Constructs a new AuditApi.
|
|
3303
3326
|
* @alias module:purecloud-platform-client-v2/api/AuditApi
|
|
@@ -3347,7 +3370,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3347
3370
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAuditsQueryRealtimeRelated';}return this.apiClient.callApi('/api/v2/audits/query/realtime/related','POST',{},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi')},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var AuthorizationApi=/*#__PURE__*/function(){/**
|
|
3348
3371
|
* Authorization service.
|
|
3349
3372
|
* @module purecloud-platform-client-v2/api/AuthorizationApi
|
|
3350
|
-
* @version
|
|
3373
|
+
* @version 215.0.0
|
|
3351
3374
|
*//**
|
|
3352
3375
|
* Constructs a new AuthorizationApi.
|
|
3353
3376
|
* @alias module:purecloud-platform-client-v2/api/AuthorizationApi
|
|
@@ -3670,7 +3693,7 @@ if(subjectId===undefined||subjectId===null){throw'Missing the required parameter
|
|
|
3670
3693
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserRoles';}return this.apiClient.callApi('/api/v2/users/{subjectId}/roles','PUT',{'subjectId':subjectId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var BillingApi=/*#__PURE__*/function(){/**
|
|
3671
3694
|
* Billing service.
|
|
3672
3695
|
* @module purecloud-platform-client-v2/api/BillingApi
|
|
3673
|
-
* @version
|
|
3696
|
+
* @version 215.0.0
|
|
3674
3697
|
*//**
|
|
3675
3698
|
* Constructs a new BillingApi.
|
|
3676
3699
|
* @alias module:purecloud-platform-client-v2/api/BillingApi
|
|
@@ -3694,7 +3717,7 @@ if(endDate===undefined||endDate===null){throw'Missing the required parameter "en
|
|
|
3694
3717
|
if(trustorOrgId===undefined||trustorOrgId===null){throw'Missing the required parameter "trustorOrgId" when calling getBillingTrusteebillingoverviewTrustorOrgId';}return this.apiClient.callApi('/api/v2/billing/trusteebillingoverview/{trustorOrgId}','GET',{'trustorOrgId':trustorOrgId},{'billingPeriodIndex':opts['billingPeriodIndex']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var CarrierServicesApi=/*#__PURE__*/function(){/**
|
|
3695
3718
|
* CarrierServices service.
|
|
3696
3719
|
* @module purecloud-platform-client-v2/api/CarrierServicesApi
|
|
3697
|
-
* @version
|
|
3720
|
+
* @version 215.0.0
|
|
3698
3721
|
*//**
|
|
3699
3722
|
* Constructs a new CarrierServicesApi.
|
|
3700
3723
|
* @alias module:purecloud-platform-client-v2/api/CarrierServicesApi
|
|
@@ -3714,7 +3737,7 @@ if(phoneNumber===undefined||phoneNumber===null){throw'Missing the required param
|
|
|
3714
3737
|
*/},{key:"postCarrierservicesIntegrationsEmergencylocationsMe",value:function postCarrierservicesIntegrationsEmergencylocationsMe(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/carrierservices/integrations/emergencylocations/me','POST',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ChatApi=/*#__PURE__*/function(){/**
|
|
3715
3738
|
* Chat service.
|
|
3716
3739
|
* @module purecloud-platform-client-v2/api/ChatApi
|
|
3717
|
-
* @version
|
|
3740
|
+
* @version 215.0.0
|
|
3718
3741
|
*//**
|
|
3719
3742
|
* Constructs a new ChatApi.
|
|
3720
3743
|
* @alias module:purecloud-platform-client-v2/api/ChatApi
|
|
@@ -3939,7 +3962,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3939
3962
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putChatsSettings';}return this.apiClient.callApi('/api/v2/chats/settings','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var CoachingApi=/*#__PURE__*/function(){/**
|
|
3940
3963
|
* Coaching service.
|
|
3941
3964
|
* @module purecloud-platform-client-v2/api/CoachingApi
|
|
3942
|
-
* @version
|
|
3965
|
+
* @version 215.0.0
|
|
3943
3966
|
*//**
|
|
3944
3967
|
* Constructs a new CoachingApi.
|
|
3945
3968
|
* @alias module:purecloud-platform-client-v2/api/CoachingApi
|
|
@@ -4092,7 +4115,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
4092
4115
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postCoachingScheduleslotsQuery';}return this.apiClient.callApi('/api/v2/coaching/scheduleslots/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ContentManagementApi=/*#__PURE__*/function(){/**
|
|
4093
4116
|
* ContentManagement service.
|
|
4094
4117
|
* @module purecloud-platform-client-v2/api/ContentManagementApi
|
|
4095
|
-
* @version
|
|
4118
|
+
* @version 215.0.0
|
|
4096
4119
|
*//**
|
|
4097
4120
|
* Constructs a new ContentManagementApi.
|
|
4098
4121
|
* @alias module:purecloud-platform-client-v2/api/ContentManagementApi
|
|
@@ -4374,7 +4397,7 @@ if(tagId===undefined||tagId===null){throw'Missing the required parameter "tagId"
|
|
|
4374
4397
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putContentmanagementWorkspaceTagvalue';}return this.apiClient.callApi('/api/v2/contentmanagement/workspaces/{workspaceId}/tagvalues/{tagId}','PUT',{'workspaceId':workspaceId,'tagId':tagId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ConversationsApi=/*#__PURE__*/function(){/**
|
|
4375
4398
|
* Conversations service.
|
|
4376
4399
|
* @module purecloud-platform-client-v2/api/ConversationsApi
|
|
4377
|
-
* @version
|
|
4400
|
+
* @version 215.0.0
|
|
4378
4401
|
*//**
|
|
4379
4402
|
* Constructs a new ConversationsApi.
|
|
4380
4403
|
* @alias module:purecloud-platform-client-v2/api/ConversationsApi
|
|
@@ -6121,7 +6144,7 @@ if(conversationId===undefined||conversationId===null){throw'Missing the required
|
|
|
6121
6144
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putConversationsVideoRecordingstate';}return this.apiClient.callApi('/api/v2/conversations/videos/{conversationId}/recordingstate','PUT',{'conversationId':conversationId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var DataExtensionsApi=/*#__PURE__*/function(){/**
|
|
6122
6145
|
* DataExtensions service.
|
|
6123
6146
|
* @module purecloud-platform-client-v2/api/DataExtensionsApi
|
|
6124
|
-
* @version
|
|
6147
|
+
* @version 215.0.0
|
|
6125
6148
|
*//**
|
|
6126
6149
|
* Constructs a new DataExtensionsApi.
|
|
6127
6150
|
* @alias module:purecloud-platform-client-v2/api/DataExtensionsApi
|
|
@@ -6142,7 +6165,7 @@ if(coretypeName===undefined||coretypeName===null){throw'Missing the required par
|
|
|
6142
6165
|
*/},{key:"getDataextensionsLimits",value:function getDataextensionsLimits(){return this.apiClient.callApi('/api/v2/dataextensions/limits','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var DataPrivacyApi=/*#__PURE__*/function(){/**
|
|
6143
6166
|
* DataPrivacy service.
|
|
6144
6167
|
* @module purecloud-platform-client-v2/api/DataPrivacyApi
|
|
6145
|
-
* @version
|
|
6168
|
+
* @version 215.0.0
|
|
6146
6169
|
*//**
|
|
6147
6170
|
* Constructs a new DataPrivacyApi.
|
|
6148
6171
|
* @alias module:purecloud-platform-client-v2/api/DataPrivacyApi
|
|
@@ -6182,7 +6205,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6182
6205
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postDataprivacyMaskingrulesValidate';}return this.apiClient.callApi('/api/v2/dataprivacy/maskingrules/validate','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var DownloadsApi=/*#__PURE__*/function(){/**
|
|
6183
6206
|
* Downloads service.
|
|
6184
6207
|
* @module purecloud-platform-client-v2/api/DownloadsApi
|
|
6185
|
-
* @version
|
|
6208
|
+
* @version 215.0.0
|
|
6186
6209
|
*//**
|
|
6187
6210
|
* Constructs a new DownloadsApi.
|
|
6188
6211
|
* @alias module:purecloud-platform-client-v2/api/DownloadsApi
|
|
@@ -6201,7 +6224,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6201
6224
|
if(downloadId===undefined||downloadId===null){throw'Missing the required parameter "downloadId" when calling getDownload';}return this.apiClient.callApi('/api/v2/downloads/{downloadId}','GET',{'downloadId':downloadId},{'contentDisposition':opts['contentDisposition'],'issueRedirect':opts['issueRedirect'],'redirectToAuth':opts['redirectToAuth']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var EmailsApi=/*#__PURE__*/function(){/**
|
|
6202
6225
|
* Emails service.
|
|
6203
6226
|
* @module purecloud-platform-client-v2/api/EmailsApi
|
|
6204
|
-
* @version
|
|
6227
|
+
* @version 215.0.0
|
|
6205
6228
|
*//**
|
|
6206
6229
|
* Constructs a new EmailsApi.
|
|
6207
6230
|
* @alias module:purecloud-platform-client-v2/api/EmailsApi
|
|
@@ -6219,7 +6242,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
6219
6242
|
*/},{key:"patchEmailsSettings",value:function patchEmailsSettings(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/emails/settings','PATCH',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var EmployeeEngagementApi=/*#__PURE__*/function(){/**
|
|
6220
6243
|
* EmployeeEngagement service.
|
|
6221
6244
|
* @module purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
6222
|
-
* @version
|
|
6245
|
+
* @version 215.0.0
|
|
6223
6246
|
*//**
|
|
6224
6247
|
* Constructs a new EmployeeEngagementApi.
|
|
6225
6248
|
* @alias module:purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
@@ -6257,7 +6280,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6257
6280
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postEmployeeengagementRecognitions';}return this.apiClient.callApi('/api/v2/employeeengagement/recognitions','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var EventsApi=/*#__PURE__*/function(){/**
|
|
6258
6281
|
* Events service.
|
|
6259
6282
|
* @module purecloud-platform-client-v2/api/EventsApi
|
|
6260
|
-
* @version
|
|
6283
|
+
* @version 215.0.0
|
|
6261
6284
|
*//**
|
|
6262
6285
|
* Constructs a new EventsApi.
|
|
6263
6286
|
* @alias module:purecloud-platform-client-v2/api/EventsApi
|
|
@@ -6282,7 +6305,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6282
6305
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postEventsUsersRoutingstatus';}return this.apiClient.callApi('/api/v2/events/users/routingstatus','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ExternalContactsApi=/*#__PURE__*/function(){/**
|
|
6283
6306
|
* ExternalContacts service.
|
|
6284
6307
|
* @module purecloud-platform-client-v2/api/ExternalContactsApi
|
|
6285
|
-
* @version
|
|
6308
|
+
* @version 215.0.0
|
|
6286
6309
|
*//**
|
|
6287
6310
|
* Constructs a new ExternalContactsApi.
|
|
6288
6311
|
* @alias module:purecloud-platform-client-v2/api/ExternalContactsApi
|
|
@@ -6874,7 +6897,7 @@ if(relationshipId===undefined||relationshipId===null){throw'Missing the required
|
|
|
6874
6897
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putExternalcontactsRelationship';}return this.apiClient.callApi('/api/v2/externalcontacts/relationships/{relationshipId}','PUT',{'relationshipId':relationshipId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var FaxApi=/*#__PURE__*/function(){/**
|
|
6875
6898
|
* Fax service.
|
|
6876
6899
|
* @module purecloud-platform-client-v2/api/FaxApi
|
|
6877
|
-
* @version
|
|
6900
|
+
* @version 215.0.0
|
|
6878
6901
|
*//**
|
|
6879
6902
|
* Constructs a new FaxApi.
|
|
6880
6903
|
* @alias module:purecloud-platform-client-v2/api/FaxApi
|
|
@@ -6923,7 +6946,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6923
6946
|
*/},{key:"putFaxSettings",value:function putFaxSettings(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/fax/settings','PUT',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var FlowsApi=/*#__PURE__*/function(){/**
|
|
6924
6947
|
* Flows service.
|
|
6925
6948
|
* @module purecloud-platform-client-v2/api/FlowsApi
|
|
6926
|
-
* @version
|
|
6949
|
+
* @version 215.0.0
|
|
6927
6950
|
*//**
|
|
6928
6951
|
* Constructs a new FlowsApi.
|
|
6929
6952
|
* @alias module:purecloud-platform-client-v2/api/FlowsApi
|
|
@@ -6971,7 +6994,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6971
6994
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsFlowsObservationsQuery';}return this.apiClient.callApi('/api/v2/analytics/flows/observations/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GamificationApi=/*#__PURE__*/function(){/**
|
|
6972
6995
|
* Gamification service.
|
|
6973
6996
|
* @module purecloud-platform-client-v2/api/GamificationApi
|
|
6974
|
-
* @version
|
|
6997
|
+
* @version 215.0.0
|
|
6975
6998
|
*//**
|
|
6976
6999
|
* Constructs a new GamificationApi.
|
|
6977
7000
|
* @alias module:purecloud-platform-client-v2/api/GamificationApi
|
|
@@ -7530,7 +7553,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
7530
7553
|
if(status===undefined||status===null){throw'Missing the required parameter "status" when calling putGamificationStatus';}return this.apiClient.callApi('/api/v2/gamification/status','PUT',{},{},{},{},status,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GeneralDataProtectionRegulationApi=/*#__PURE__*/function(){/**
|
|
7531
7554
|
* GeneralDataProtectionRegulation service.
|
|
7532
7555
|
* @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
7533
|
-
* @version
|
|
7556
|
+
* @version 215.0.0
|
|
7534
7557
|
*//**
|
|
7535
7558
|
* Constructs a new GeneralDataProtectionRegulationApi.
|
|
7536
7559
|
* @alias module:purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
@@ -7565,7 +7588,7 @@ if(searchValue===undefined||searchValue===null){throw'Missing the required param
|
|
|
7565
7588
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postGdprRequests';}return this.apiClient.callApi('/api/v2/gdpr/requests','POST',{},{'deleteConfirmed':opts['deleteConfirmed']},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GeolocationApi=/*#__PURE__*/function(){/**
|
|
7566
7589
|
* Geolocation service.
|
|
7567
7590
|
* @module purecloud-platform-client-v2/api/GeolocationApi
|
|
7568
|
-
* @version
|
|
7591
|
+
* @version 215.0.0
|
|
7569
7592
|
*//**
|
|
7570
7593
|
* Constructs a new GeolocationApi.
|
|
7571
7594
|
* @alias module:purecloud-platform-client-v2/api/GeolocationApi
|
|
@@ -7599,7 +7622,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
7599
7622
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchUserGeolocation';}return this.apiClient.callApi('/api/v2/users/{userId}/geolocations/{clientId}','PATCH',{'userId':userId,'clientId':clientId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GreetingsApi=/*#__PURE__*/function(){/**
|
|
7600
7623
|
* Greetings service.
|
|
7601
7624
|
* @module purecloud-platform-client-v2/api/GreetingsApi
|
|
7602
|
-
* @version
|
|
7625
|
+
* @version 215.0.0
|
|
7603
7626
|
*//**
|
|
7604
7627
|
* Constructs a new GreetingsApi.
|
|
7605
7628
|
* @alias module:purecloud-platform-client-v2/api/GreetingsApi
|
|
@@ -7706,7 +7729,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
7706
7729
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserGreetingsDefaults';}return this.apiClient.callApi('/api/v2/users/{userId}/greetings/defaults','PUT',{'userId':userId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var GroupsApi=/*#__PURE__*/function(){/**
|
|
7707
7730
|
* Groups service.
|
|
7708
7731
|
* @module purecloud-platform-client-v2/api/GroupsApi
|
|
7709
|
-
* @version
|
|
7732
|
+
* @version 215.0.0
|
|
7710
7733
|
*//**
|
|
7711
7734
|
* Constructs a new GroupsApi.
|
|
7712
7735
|
* @alias module:purecloud-platform-client-v2/api/GroupsApi
|
|
@@ -7839,7 +7862,7 @@ if(groupId===undefined||groupId===null){throw'Missing the required parameter "gr
|
|
|
7839
7862
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putGroupDynamicsettings';}return this.apiClient.callApi('/api/v2/groups/{groupId}/dynamicsettings','PUT',{'groupId':groupId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var IdentityProviderApi=/*#__PURE__*/function(){/**
|
|
7840
7863
|
* IdentityProvider service.
|
|
7841
7864
|
* @module purecloud-platform-client-v2/api/IdentityProviderApi
|
|
7842
|
-
* @version
|
|
7865
|
+
* @version 215.0.0
|
|
7843
7866
|
*//**
|
|
7844
7867
|
* Constructs a new IdentityProviderApi.
|
|
7845
7868
|
* @alias module:purecloud-platform-client-v2/api/IdentityProviderApi
|
|
@@ -7995,7 +8018,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
7995
8018
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putIdentityprovidersSalesforce';}return this.apiClient.callApi('/api/v2/identityproviders/salesforce','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var InfrastructureAsCodeApi=/*#__PURE__*/function(){/**
|
|
7996
8019
|
* InfrastructureAsCode service.
|
|
7997
8020
|
* @module purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
7998
|
-
* @version
|
|
8021
|
+
* @version 215.0.0
|
|
7999
8022
|
*//**
|
|
8000
8023
|
* Constructs a new InfrastructureAsCodeApi.
|
|
8001
8024
|
* @alias module:purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
@@ -8049,7 +8072,7 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
8049
8072
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postInfrastructureascodeJobs';}return this.apiClient.callApi('/api/v2/infrastructureascode/jobs','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var IntegrationsApi=/*#__PURE__*/function(){/**
|
|
8050
8073
|
* Integrations service.
|
|
8051
8074
|
* @module purecloud-platform-client-v2/api/IntegrationsApi
|
|
8052
|
-
* @version
|
|
8075
|
+
* @version 215.0.0
|
|
8053
8076
|
*//**
|
|
8054
8077
|
* Constructs a new IntegrationsApi.
|
|
8055
8078
|
* @alias module:purecloud-platform-client-v2/api/IntegrationsApi
|
|
@@ -8123,7 +8146,6 @@ if(actionId===undefined||actionId===null){throw'Missing the required parameter "
|
|
|
8123
8146
|
* Get draft function settings for Action
|
|
8124
8147
|
*
|
|
8125
8148
|
* @param {String} actionId actionId
|
|
8126
|
-
* getIntegrationsActionDraftFunction is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
8127
8149
|
*/},{key:"getIntegrationsActionDraftFunction",value:function getIntegrationsActionDraftFunction(actionId){// verify the required parameter 'actionId' is set
|
|
8128
8150
|
if(actionId===undefined||actionId===null){throw'Missing the required parameter "actionId" when calling getIntegrationsActionDraftFunction';}return this.apiClient.callApi('/api/v2/integrations/actions/{actionId}/draft/function','GET',{'actionId':actionId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
8129
8151
|
* Retrieve schema for a Draft based on filename.
|
|
@@ -8150,7 +8172,6 @@ if(actionId===undefined||actionId===null){throw'Missing the required parameter "
|
|
|
8150
8172
|
* Get published function settings for Action
|
|
8151
8173
|
*
|
|
8152
8174
|
* @param {String} actionId actionId
|
|
8153
|
-
* getIntegrationsActionFunction is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
8154
8175
|
*/},{key:"getIntegrationsActionFunction",value:function getIntegrationsActionFunction(actionId){// verify the required parameter 'actionId' is set
|
|
8155
8176
|
if(actionId===undefined||actionId===null){throw'Missing the required parameter "actionId" when calling getIntegrationsActionFunction';}return this.apiClient.callApi('/api/v2/integrations/actions/{actionId}/function','GET',{'actionId':actionId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
8156
8177
|
* Retrieve schema for an action based on filename.
|
|
@@ -8221,7 +8242,6 @@ if(fileName===undefined||fileName===null){throw'Missing the required parameter "
|
|
|
8221
8242
|
*/},{key:"getIntegrationsActionsDrafts",value:function getIntegrationsActionsDrafts(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/integrations/actions/drafts','GET',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber'],'nextPage':opts['nextPage'],'previousPage':opts['previousPage'],'sortBy':opts['sortBy'],'sortOrder':opts['sortOrder'],'category':opts['category'],'name':opts['name'],'ids':opts['ids'],'secure':opts['secure'],'includeAuthActions':opts['includeAuthActions']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
8222
8243
|
* Get action function settings for Action
|
|
8223
8244
|
*
|
|
8224
|
-
* getIntegrationsActionsFunctionsRuntimes is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
8225
8245
|
*/},{key:"getIntegrationsActionsFunctionsRuntimes",value:function getIntegrationsActionsFunctionsRuntimes(){return this.apiClient.callApi('/api/v2/integrations/actions/functions/runtimes','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
8226
8246
|
* Get a specific botConnector bot, plus versions, for this integration
|
|
8227
8247
|
*
|
|
@@ -8555,7 +8575,6 @@ if(actionId===undefined||actionId===null){throw'Missing the required parameter "
|
|
|
8555
8575
|
*
|
|
8556
8576
|
* @param {String} actionId actionId
|
|
8557
8577
|
* @param {Object} body Input used to request URL upload.
|
|
8558
|
-
* postIntegrationsActionDraftFunctionUpload is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
8559
8578
|
*/},{key:"postIntegrationsActionDraftFunctionUpload",value:function postIntegrationsActionDraftFunctionUpload(actionId,body){// verify the required parameter 'actionId' is set
|
|
8560
8579
|
if(actionId===undefined||actionId===null){throw'Missing the required parameter "actionId" when calling postIntegrationsActionDraftFunctionUpload';}// verify the required parameter 'body' is set
|
|
8561
8580
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postIntegrationsActionDraftFunctionUpload';}return this.apiClient.callApi('/api/v2/integrations/actions/{actionId}/draft/function/upload','POST',{'actionId':actionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -8645,7 +8664,6 @@ if(integrationId===undefined||integrationId===null){throw'Missing the required p
|
|
|
8645
8664
|
*
|
|
8646
8665
|
* @param {String} actionId actionId
|
|
8647
8666
|
* @param {Object} body Input used to update function settings.
|
|
8648
|
-
* putIntegrationsActionDraftFunction is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
8649
8667
|
*/},{key:"putIntegrationsActionDraftFunction",value:function putIntegrationsActionDraftFunction(actionId,body){// verify the required parameter 'actionId' is set
|
|
8650
8668
|
if(actionId===undefined||actionId===null){throw'Missing the required parameter "actionId" when calling putIntegrationsActionDraftFunction';}// verify the required parameter 'body' is set
|
|
8651
8669
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putIntegrationsActionDraftFunction';}return this.apiClient.callApi('/api/v2/integrations/actions/{actionId}/draft/function','PUT',{'actionId':actionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -8684,7 +8702,7 @@ if(ucIntegrationId===undefined||ucIntegrationId===null){throw'Missing the requir
|
|
|
8684
8702
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putIntegrationsUnifiedcommunicationThirdpartypresences';}return this.apiClient.callApi('/api/v2/integrations/unifiedcommunications/{ucIntegrationId}/thirdpartypresences','PUT',{'ucIntegrationId':ucIntegrationId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var JourneyApi=/*#__PURE__*/function(){/**
|
|
8685
8703
|
* Journey service.
|
|
8686
8704
|
* @module purecloud-platform-client-v2/api/JourneyApi
|
|
8687
|
-
* @version
|
|
8705
|
+
* @version 215.0.0
|
|
8688
8706
|
*//**
|
|
8689
8707
|
* Constructs a new JourneyApi.
|
|
8690
8708
|
* @alias module:purecloud-platform-client-v2/api/JourneyApi
|
|
@@ -9161,7 +9179,7 @@ if(versionId===undefined||versionId===null){throw'Missing the required parameter
|
|
|
9161
9179
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putJourneyViewVersion';}return this.apiClient.callApi('/api/v2/journey/views/{viewId}/versions/{versionId}','PUT',{'viewId':viewId,'versionId':versionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var KnowledgeApi=/*#__PURE__*/function(){/**
|
|
9162
9180
|
* Knowledge service.
|
|
9163
9181
|
* @module purecloud-platform-client-v2/api/KnowledgeApi
|
|
9164
|
-
* @version
|
|
9182
|
+
* @version 215.0.0
|
|
9165
9183
|
*//**
|
|
9166
9184
|
* Constructs a new KnowledgeApi.
|
|
9167
9185
|
* @alias module:purecloud-platform-client-v2/api/KnowledgeApi
|
|
@@ -10231,7 +10249,7 @@ if(sourceId===undefined||sourceId===null){throw'Missing the required parameter "
|
|
|
10231
10249
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putKnowledgeKnowledgebaseSourcesServicenowSourceId';}return this.apiClient.callApi('/api/v2/knowledge/knowledgebases/{knowledgeBaseId}/sources/servicenow/{sourceId}','PUT',{'knowledgeBaseId':knowledgeBaseId,'sourceId':sourceId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LanguageUnderstandingApi=/*#__PURE__*/function(){/**
|
|
10232
10250
|
* LanguageUnderstanding service.
|
|
10233
10251
|
* @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
10234
|
-
* @version
|
|
10252
|
+
* @version 215.0.0
|
|
10235
10253
|
*//**
|
|
10236
10254
|
* Constructs a new LanguageUnderstandingApi.
|
|
10237
10255
|
* @alias module:purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
@@ -10490,7 +10508,7 @@ if(domainVersionId===undefined||domainVersionId===null){throw'Missing the requir
|
|
|
10490
10508
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putLanguageunderstandingDomainVersion';}return this.apiClient.callApi('/api/v2/languageunderstanding/domains/{domainId}/versions/{domainVersionId}','PUT',{'domainId':domainId,'domainVersionId':domainVersionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LanguagesApi=/*#__PURE__*/function(){/**
|
|
10491
10509
|
* Languages service.
|
|
10492
10510
|
* @module purecloud-platform-client-v2/api/LanguagesApi
|
|
10493
|
-
* @version
|
|
10511
|
+
* @version 215.0.0
|
|
10494
10512
|
*//**
|
|
10495
10513
|
* Constructs a new LanguagesApi.
|
|
10496
10514
|
* @alias module:purecloud-platform-client-v2/api/LanguagesApi
|
|
@@ -10545,7 +10563,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
10545
10563
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postLanguages';}return this.apiClient.callApi('/api/v2/languages','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LearningApi=/*#__PURE__*/function(){/**
|
|
10546
10564
|
* Learning service.
|
|
10547
10565
|
* @module purecloud-platform-client-v2/api/LearningApi
|
|
10548
|
-
* @version
|
|
10566
|
+
* @version 215.0.0
|
|
10549
10567
|
*//**
|
|
10550
10568
|
* Constructs a new LearningApi.
|
|
10551
10569
|
* @alias module:purecloud-platform-client-v2/api/LearningApi
|
|
@@ -10816,7 +10834,7 @@ if(moduleId===undefined||moduleId===null){throw'Missing the required parameter "
|
|
|
10816
10834
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putLearningModuleRule';}return this.apiClient.callApi('/api/v2/learning/modules/{moduleId}/rule','PUT',{'moduleId':moduleId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LicenseApi=/*#__PURE__*/function(){/**
|
|
10817
10835
|
* License service.
|
|
10818
10836
|
* @module purecloud-platform-client-v2/api/LicenseApi
|
|
10819
|
-
* @version
|
|
10837
|
+
* @version 215.0.0
|
|
10820
10838
|
*//**
|
|
10821
10839
|
* Constructs a new LicenseApi.
|
|
10822
10840
|
* @alias module:purecloud-platform-client-v2/api/LicenseApi
|
|
@@ -10870,7 +10888,7 @@ if(featureName===undefined||featureName===null){throw'Missing the required param
|
|
|
10870
10888
|
*/},{key:"postLicenseUsers",value:function postLicenseUsers(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/license/users','POST',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LocationsApi=/*#__PURE__*/function(){/**
|
|
10871
10889
|
* Locations service.
|
|
10872
10890
|
* @module purecloud-platform-client-v2/api/LocationsApi
|
|
10873
|
-
* @version
|
|
10891
|
+
* @version 215.0.0
|
|
10874
10892
|
*//**
|
|
10875
10893
|
* Constructs a new LocationsApi.
|
|
10876
10894
|
* @alias module:purecloud-platform-client-v2/api/LocationsApi
|
|
@@ -10929,7 +10947,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
10929
10947
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postLocationsSearch';}return this.apiClient.callApi('/api/v2/locations/search','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var LogCaptureApi=/*#__PURE__*/function(){/**
|
|
10930
10948
|
* LogCapture service.
|
|
10931
10949
|
* @module purecloud-platform-client-v2/api/LogCaptureApi
|
|
10932
|
-
* @version
|
|
10950
|
+
* @version 215.0.0
|
|
10933
10951
|
*//**
|
|
10934
10952
|
* Constructs a new LogCaptureApi.
|
|
10935
10953
|
* @alias module:purecloud-platform-client-v2/api/LogCaptureApi
|
|
@@ -10979,7 +10997,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
10979
10997
|
if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling postDiagnosticsLogcaptureBrowserUser';}return this.apiClient.callApi('/api/v2/diagnostics/logcapture/browser/users/{userId}','POST',{'userId':userId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var MessagingApi=/*#__PURE__*/function(){/**
|
|
10980
10998
|
* Messaging service.
|
|
10981
10999
|
* @module purecloud-platform-client-v2/api/MessagingApi
|
|
10982
|
-
* @version
|
|
11000
|
+
* @version 215.0.0
|
|
10983
11001
|
*//**
|
|
10984
11002
|
* Constructs a new MessagingApi.
|
|
10985
11003
|
* @alias module:purecloud-platform-client-v2/api/MessagingApi
|
|
@@ -11069,7 +11087,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11069
11087
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putMessagingSettingsDefault';}return this.apiClient.callApi('/api/v2/messaging/settings/default','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var MobileDevicesApi=/*#__PURE__*/function(){/**
|
|
11070
11088
|
* MobileDevices service.
|
|
11071
11089
|
* @module purecloud-platform-client-v2/api/MobileDevicesApi
|
|
11072
|
-
* @version
|
|
11090
|
+
* @version 215.0.0
|
|
11073
11091
|
*//**
|
|
11074
11092
|
* Constructs a new MobileDevicesApi.
|
|
11075
11093
|
* @alias module:purecloud-platform-client-v2/api/MobileDevicesApi
|
|
@@ -11108,7 +11126,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11108
11126
|
if(deviceId===undefined||deviceId===null){throw'Missing the required parameter "deviceId" when calling putMobiledevice';}return this.apiClient.callApi('/api/v2/mobiledevices/{deviceId}','PUT',{'deviceId':deviceId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var NotificationsApi=/*#__PURE__*/function(){/**
|
|
11109
11127
|
* Notifications service.
|
|
11110
11128
|
* @module purecloud-platform-client-v2/api/NotificationsApi
|
|
11111
|
-
* @version
|
|
11129
|
+
* @version 215.0.0
|
|
11112
11130
|
*//**
|
|
11113
11131
|
* Constructs a new NotificationsApi.
|
|
11114
11132
|
* @alias module:purecloud-platform-client-v2/api/NotificationsApi
|
|
@@ -11165,7 +11183,7 @@ if(channelId===undefined||channelId===null){throw'Missing the required parameter
|
|
|
11165
11183
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putNotificationsChannelSubscriptions';}return this.apiClient.callApi('/api/v2/notifications/channels/{channelId}/subscriptions','PUT',{'channelId':channelId},{'ignoreErrors':opts['ignoreErrors']},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OAuthApi=/*#__PURE__*/function(){/**
|
|
11166
11184
|
* OAuth service.
|
|
11167
11185
|
* @module purecloud-platform-client-v2/api/OAuthApi
|
|
11168
|
-
* @version
|
|
11186
|
+
* @version 215.0.0
|
|
11169
11187
|
*//**
|
|
11170
11188
|
* Constructs a new OAuthApi.
|
|
11171
11189
|
* @alias module:purecloud-platform-client-v2/api/OAuthApi
|
|
@@ -11250,7 +11268,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
11250
11268
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putOauthClient';}return this.apiClient.callApi('/api/v2/oauth/clients/{clientId}','PUT',{'clientId':clientId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ObjectsApi=/*#__PURE__*/function(){/**
|
|
11251
11269
|
* Objects service.
|
|
11252
11270
|
* @module purecloud-platform-client-v2/api/ObjectsApi
|
|
11253
|
-
* @version
|
|
11271
|
+
* @version 215.0.0
|
|
11254
11272
|
*//**
|
|
11255
11273
|
* Constructs a new ObjectsApi.
|
|
11256
11274
|
* @alias module:purecloud-platform-client-v2/api/ObjectsApi
|
|
@@ -11321,7 +11339,7 @@ if(divisionId===undefined||divisionId===null){throw'Missing the required paramet
|
|
|
11321
11339
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAuthorizationDivision';}return this.apiClient.callApi('/api/v2/authorization/divisions/{divisionId}','PUT',{'divisionId':divisionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OperationalEventsApi=/*#__PURE__*/function(){/**
|
|
11322
11340
|
* OperationalEvents service.
|
|
11323
11341
|
* @module purecloud-platform-client-v2/api/OperationalEventsApi
|
|
11324
|
-
* @version
|
|
11342
|
+
* @version 215.0.0
|
|
11325
11343
|
*//**
|
|
11326
11344
|
* Constructs a new OperationalEventsApi.
|
|
11327
11345
|
* @alias module:purecloud-platform-client-v2/api/OperationalEventsApi
|
|
@@ -11352,7 +11370,7 @@ if(eventDefinitionId===undefined||eventDefinitionId===null){throw'Missing the re
|
|
|
11352
11370
|
*/},{key:"postUsageEventsQuery",value:function postUsageEventsQuery(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/usage/events/query','POST',{},{'before':opts['before'],'after':opts['after'],'pageSize':opts['pageSize']},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OrganizationApi=/*#__PURE__*/function(){/**
|
|
11353
11371
|
* Organization service.
|
|
11354
11372
|
* @module purecloud-platform-client-v2/api/OrganizationApi
|
|
11355
|
-
* @version
|
|
11373
|
+
* @version 215.0.0
|
|
11356
11374
|
*//**
|
|
11357
11375
|
* Constructs a new OrganizationApi.
|
|
11358
11376
|
* @alias module:purecloud-platform-client-v2/api/OrganizationApi
|
|
@@ -11477,7 +11495,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11477
11495
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putOrganizationsWhitelist';}return this.apiClient.callApi('/api/v2/organizations/whitelist','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OrganizationAuthorizationApi=/*#__PURE__*/function(){/**
|
|
11478
11496
|
* OrganizationAuthorization service.
|
|
11479
11497
|
* @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
11480
|
-
* @version
|
|
11498
|
+
* @version 215.0.0
|
|
11481
11499
|
*//**
|
|
11482
11500
|
* Constructs a new OrganizationAuthorizationApi.
|
|
11483
11501
|
* @alias module:purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
@@ -11811,7 +11829,7 @@ if(trustorOrgId===undefined||trustorOrgId===null){throw'Missing the required par
|
|
|
11811
11829
|
if(trusteeUserId===undefined||trusteeUserId===null){throw'Missing the required parameter "trusteeUserId" when calling putOrgauthorizationTrustorUser';}return this.apiClient.callApi('/api/v2/orgauthorization/trustors/{trustorOrgId}/users/{trusteeUserId}','PUT',{'trustorOrgId':trustorOrgId,'trusteeUserId':trusteeUserId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var OutboundApi=/*#__PURE__*/function(){/**
|
|
11812
11830
|
* Outbound service.
|
|
11813
11831
|
* @module purecloud-platform-client-v2/api/OutboundApi
|
|
11814
|
-
* @version
|
|
11832
|
+
* @version 215.0.0
|
|
11815
11833
|
*//**
|
|
11816
11834
|
* Constructs a new OutboundApi.
|
|
11817
11835
|
* @alias module:purecloud-platform-client-v2/api/OutboundApi
|
|
@@ -12922,7 +12940,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
12922
12940
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putOutboundWrapupcodemappings';}return this.apiClient.callApi('/api/v2/outbound/wrapupcodemappings','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var PresenceApi=/*#__PURE__*/function(){/**
|
|
12923
12941
|
* Presence service.
|
|
12924
12942
|
* @module purecloud-platform-client-v2/api/PresenceApi
|
|
12925
|
-
* @version
|
|
12943
|
+
* @version 215.0.0
|
|
12926
12944
|
*//**
|
|
12927
12945
|
* Constructs a new PresenceApi.
|
|
12928
12946
|
* @alias module:purecloud-platform-client-v2/api/PresenceApi
|
|
@@ -13095,7 +13113,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
13095
13113
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUsersPresencesBulk';}return this.apiClient.callApi('/api/v2/users/presences/bulk','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ProcessAutomationApi=/*#__PURE__*/function(){/**
|
|
13096
13114
|
* ProcessAutomation service.
|
|
13097
13115
|
* @module purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
13098
|
-
* @version
|
|
13116
|
+
* @version 215.0.0
|
|
13099
13117
|
*//**
|
|
13100
13118
|
* Constructs a new ProcessAutomationApi.
|
|
13101
13119
|
* @alias module:purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
@@ -13158,7 +13176,7 @@ if(triggerId===undefined||triggerId===null){throw'Missing the required parameter
|
|
|
13158
13176
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putProcessautomationTrigger';}return this.apiClient.callApi('/api/v2/processautomation/triggers/{triggerId}','PUT',{'triggerId':triggerId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var QualityApi=/*#__PURE__*/function(){/**
|
|
13159
13177
|
* Quality service.
|
|
13160
13178
|
* @module purecloud-platform-client-v2/api/QualityApi
|
|
13161
|
-
* @version
|
|
13179
|
+
* @version 215.0.0
|
|
13162
13180
|
*//**
|
|
13163
13181
|
* Constructs a new QualityApi.
|
|
13164
13182
|
* @alias module:purecloud-platform-client-v2/api/QualityApi
|
|
@@ -13637,7 +13655,7 @@ if(customerSurveyUrl===undefined||customerSurveyUrl===null){throw'Missing the re
|
|
|
13637
13655
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putQualitySurveysScorable';}return this.apiClient.callApi('/api/v2/quality/surveys/scorable','PUT',{},{'customerSurveyUrl':customerSurveyUrl},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var RecordingApi=/*#__PURE__*/function(){/**
|
|
13638
13656
|
* Recording service.
|
|
13639
13657
|
* @module purecloud-platform-client-v2/api/RecordingApi
|
|
13640
|
-
* @version
|
|
13658
|
+
* @version 215.0.0
|
|
13641
13659
|
*//**
|
|
13642
13660
|
* Constructs a new RecordingApi.
|
|
13643
13661
|
* @alias module:purecloud-platform-client-v2/api/RecordingApi
|
|
@@ -14049,7 +14067,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
14049
14067
|
*/},{key:"putRecordingsDeletionprotection",value:function putRecordingsDeletionprotection(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/recordings/deletionprotection','PUT',{},{'protect':opts['protect']},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ResponseManagementApi=/*#__PURE__*/function(){/**
|
|
14050
14068
|
* ResponseManagement service.
|
|
14051
14069
|
* @module purecloud-platform-client-v2/api/ResponseManagementApi
|
|
14052
|
-
* @version
|
|
14070
|
+
* @version 215.0.0
|
|
14053
14071
|
*//**
|
|
14054
14072
|
* Constructs a new ResponseManagementApi.
|
|
14055
14073
|
* @alias module:purecloud-platform-client-v2/api/ResponseManagementApi
|
|
@@ -14170,7 +14188,7 @@ if(responseAssetId===undefined||responseAssetId===null){throw'Missing the requir
|
|
|
14170
14188
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putResponsemanagementResponseasset';}return this.apiClient.callApi('/api/v2/responsemanagement/responseassets/{responseAssetId}','PUT',{'responseAssetId':responseAssetId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var RoutingApi=/*#__PURE__*/function(){/**
|
|
14171
14189
|
* Routing service.
|
|
14172
14190
|
* @module purecloud-platform-client-v2/api/RoutingApi
|
|
14173
|
-
* @version
|
|
14191
|
+
* @version 215.0.0
|
|
14174
14192
|
*//**
|
|
14175
14193
|
* Constructs a new RoutingApi.
|
|
14176
14194
|
* @alias module:purecloud-platform-client-v2/api/RoutingApi
|
|
@@ -15118,13 +15136,6 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15118
15136
|
* @param {Object} body Organization Settings
|
|
15119
15137
|
*/},{key:"putRoutingSettingsTranscription",value:function putRoutingSettingsTranscription(body){// verify the required parameter 'body' is set
|
|
15120
15138
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putRoutingSettingsTranscription';}return this.apiClient.callApi('/api/v2/routing/settings/transcription','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
15121
|
-
* Update a phone number provisioned for SMS.
|
|
15122
|
-
*
|
|
15123
|
-
* @param {String} phoneNumberId phone number
|
|
15124
|
-
* @param {Object} body SmsPhoneNumber
|
|
15125
|
-
*/},{key:"putRoutingSmsPhonenumber",value:function putRoutingSmsPhonenumber(phoneNumberId,body){// verify the required parameter 'phoneNumberId' is set
|
|
15126
|
-
if(phoneNumberId===undefined||phoneNumberId===null){throw'Missing the required parameter "phoneNumberId" when calling putRoutingSmsPhonenumber';}// verify the required parameter 'body' is set
|
|
15127
|
-
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putRoutingSmsPhonenumber';}return this.apiClient.callApi('/api/v2/routing/sms/phonenumbers/{phoneNumberId}','PUT',{'phoneNumberId':phoneNumberId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
15128
15139
|
* Update the user's Direct Routing Backup settings.
|
|
15129
15140
|
*
|
|
15130
15141
|
* @param {String} userId User ID
|
|
@@ -15176,7 +15187,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
15176
15187
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserRoutingskillsBulk';}return this.apiClient.callApi('/api/v2/users/{userId}/routingskills/bulk','PUT',{'userId':userId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SCIMApi=/*#__PURE__*/function(){/**
|
|
15177
15188
|
* SCIM service.
|
|
15178
15189
|
* @module purecloud-platform-client-v2/api/SCIMApi
|
|
15179
|
-
* @version
|
|
15190
|
+
* @version 215.0.0
|
|
15180
15191
|
*//**
|
|
15181
15192
|
* Constructs a new SCIMApi.
|
|
15182
15193
|
* @alias module:purecloud-platform-client-v2/api/SCIMApi
|
|
@@ -15401,7 +15412,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
15401
15412
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putScimV2User';}return this.apiClient.callApi('/api/v2/scim/v2/users/{userId}','PUT',{'userId':userId},{},{'If-Match':opts['ifMatch']},{},body,['PureCloud OAuth'],['application/scim+json','application/json'],['application/scim+json','application/json']);}}]);}();var ScreenRecordingApi=/*#__PURE__*/function(){/**
|
|
15402
15413
|
* ScreenRecording service.
|
|
15403
15414
|
* @module purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
15404
|
-
* @version
|
|
15415
|
+
* @version 215.0.0
|
|
15405
15416
|
*//**
|
|
15406
15417
|
* Constructs a new ScreenRecordingApi.
|
|
15407
15418
|
* @alias module:purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
@@ -15416,7 +15427,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15416
15427
|
*/return _createClass(ScreenRecordingApi,[{key:"postScreenrecordingToken",value:function postScreenrecordingToken(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/screenrecording/token','POST',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var ScriptsApi=/*#__PURE__*/function(){/**
|
|
15417
15428
|
* Scripts service.
|
|
15418
15429
|
* @module purecloud-platform-client-v2/api/ScriptsApi
|
|
15419
|
-
* @version
|
|
15430
|
+
* @version 215.0.0
|
|
15420
15431
|
*//**
|
|
15421
15432
|
* Constructs a new ScriptsApi.
|
|
15422
15433
|
* @alias module:purecloud-platform-client-v2/api/ScriptsApi
|
|
@@ -15552,7 +15563,7 @@ if(scriptId===undefined||scriptId===null){throw'Missing the required parameter "
|
|
|
15552
15563
|
*/},{key:"postScriptsPublished",value:function postScriptsPublished(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/scripts/published','POST',{},{'scriptDataVersion':opts['scriptDataVersion']},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SearchApi=/*#__PURE__*/function(){/**
|
|
15553
15564
|
* Search service.
|
|
15554
15565
|
* @module purecloud-platform-client-v2/api/SearchApi
|
|
15555
|
-
* @version
|
|
15566
|
+
* @version 215.0.0
|
|
15556
15567
|
*//**
|
|
15557
15568
|
* Constructs a new SearchApi.
|
|
15558
15569
|
* @alias module:purecloud-platform-client-v2/api/SearchApi
|
|
@@ -15724,7 +15735,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15724
15735
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postVoicemailSearch';}return this.apiClient.callApi('/api/v2/voicemail/search','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SettingsApi=/*#__PURE__*/function(){/**
|
|
15725
15736
|
* Settings service.
|
|
15726
15737
|
* @module purecloud-platform-client-v2/api/SettingsApi
|
|
15727
|
-
* @version
|
|
15738
|
+
* @version 215.0.0
|
|
15728
15739
|
*//**
|
|
15729
15740
|
* Constructs a new SettingsApi.
|
|
15730
15741
|
* @alias module:purecloud-platform-client-v2/api/SettingsApi
|
|
@@ -15774,7 +15785,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
|
|
|
15774
15785
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUsersAgentuiAgentsAutoanswerAgentIdSettings';}return this.apiClient.callApi('/api/v2/users/agentui/agents/autoanswer/{agentId}/settings','PUT',{'agentId':agentId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SocialMediaApi=/*#__PURE__*/function(){/**
|
|
15775
15786
|
* SocialMedia service.
|
|
15776
15787
|
* @module purecloud-platform-client-v2/api/SocialMediaApi
|
|
15777
|
-
* @version
|
|
15788
|
+
* @version 215.0.0
|
|
15778
15789
|
*//**
|
|
15779
15790
|
* Constructs a new SocialMediaApi.
|
|
15780
15791
|
* @alias module:purecloud-platform-client-v2/api/SocialMediaApi
|
|
@@ -16039,7 +16050,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
16039
16050
|
if(twitterIngestionRuleId===undefined||twitterIngestionRuleId===null){throw'Missing the required parameter "twitterIngestionRuleId" when calling putSocialmediaTopicDataingestionrulesTwitterTwitterIngestionRuleId';}return this.apiClient.callApi('/api/v2/socialmedia/topics/{topicId}/dataingestionrules/twitter/{twitterIngestionRuleId}','PUT',{'topicId':topicId,'twitterIngestionRuleId':twitterIngestionRuleId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SpeechTextAnalyticsApi=/*#__PURE__*/function(){/**
|
|
16040
16051
|
* SpeechTextAnalytics service.
|
|
16041
16052
|
* @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
16042
|
-
* @version
|
|
16053
|
+
* @version 215.0.0
|
|
16043
16054
|
*//**
|
|
16044
16055
|
* Constructs a new SpeechTextAnalyticsApi.
|
|
16045
16056
|
* @alias module:purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
@@ -16119,6 +16130,11 @@ if(communicationId===undefined||communicationId===null){throw'Missing the requir
|
|
|
16119
16130
|
*/},{key:"getSpeechandtextanalyticsConversationCommunicationTranscripturls",value:function getSpeechandtextanalyticsConversationCommunicationTranscripturls(conversationId,communicationId){// verify the required parameter 'conversationId' is set
|
|
16120
16131
|
if(conversationId===undefined||conversationId===null){throw'Missing the required parameter "conversationId" when calling getSpeechandtextanalyticsConversationCommunicationTranscripturls';}// verify the required parameter 'communicationId' is set
|
|
16121
16132
|
if(communicationId===undefined||communicationId===null){throw'Missing the required parameter "communicationId" when calling getSpeechandtextanalyticsConversationCommunicationTranscripturls';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/conversations/{conversationId}/communications/{communicationId}/transcripturls','GET',{'conversationId':conversationId,'communicationId':communicationId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16133
|
+
* Get conversation summaries by conversation id.
|
|
16134
|
+
*
|
|
16135
|
+
* @param {String} conversationId The conversation ID of the summaries
|
|
16136
|
+
*/},{key:"getSpeechandtextanalyticsConversationSummaries",value:function getSpeechandtextanalyticsConversationSummaries(conversationId){// verify the required parameter 'conversationId' is set
|
|
16137
|
+
if(conversationId===undefined||conversationId===null){throw'Missing the required parameter "conversationId" when calling getSpeechandtextanalyticsConversationSummaries';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/conversations/{conversationId}/summaries','GET',{'conversationId':conversationId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16122
16138
|
* Get the list of Speech and Text Analytics dictionary feedbacks
|
|
16123
16139
|
*
|
|
16124
16140
|
* @param {Object} opts Optional parameters
|
|
@@ -16141,6 +16157,11 @@ if(programId===undefined||programId===null){throw'Missing the required parameter
|
|
|
16141
16157
|
* @param {String} programId The id of the program
|
|
16142
16158
|
*/},{key:"getSpeechandtextanalyticsProgramMappings",value:function getSpeechandtextanalyticsProgramMappings(programId){// verify the required parameter 'programId' is set
|
|
16143
16159
|
if(programId===undefined||programId===null){throw'Missing the required parameter "programId" when calling getSpeechandtextanalyticsProgramMappings';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/programs/{programId}/mappings','GET',{'programId':programId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16160
|
+
* Get AI Insights settings of a program
|
|
16161
|
+
*
|
|
16162
|
+
* @param {String} programId The id of the program
|
|
16163
|
+
*/},{key:"getSpeechandtextanalyticsProgramSettingsInsights",value:function getSpeechandtextanalyticsProgramSettingsInsights(programId){// verify the required parameter 'programId' is set
|
|
16164
|
+
if(programId===undefined||programId===null){throw'Missing the required parameter "programId" when calling getSpeechandtextanalyticsProgramSettingsInsights';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/programs/{programId}/settings/insights','GET',{'programId':programId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16144
16165
|
* Get transcription engine settings of a program
|
|
16145
16166
|
*
|
|
16146
16167
|
* @param {String} programId The id of the program
|
|
@@ -16169,6 +16190,13 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
16169
16190
|
* @param {String} jobId The id of the publish programs job
|
|
16170
16191
|
*/},{key:"getSpeechandtextanalyticsProgramsPublishjob",value:function getSpeechandtextanalyticsProgramsPublishjob(jobId){// verify the required parameter 'jobId' is set
|
|
16171
16192
|
if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getSpeechandtextanalyticsProgramsPublishjob';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/programs/publishjobs/{jobId}','GET',{'jobId':jobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16193
|
+
* Get the list of program AI Insights settings for the organization
|
|
16194
|
+
*
|
|
16195
|
+
* @param {Object} opts Optional parameters
|
|
16196
|
+
* @param {Number} opts.pageSize The page size for the listing. The max that will be returned is 100. (default to 100)
|
|
16197
|
+
* @param {Number} opts.pageNumber The page number for the listing (default to 1)
|
|
16198
|
+
* @param {Array.<String>} opts.programIds Comma separated Program IDs to filter by. Maximum of 50 IDs allowed.
|
|
16199
|
+
*/},{key:"getSpeechandtextanalyticsProgramsSettingsInsights",value:function getSpeechandtextanalyticsProgramsSettingsInsights(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/speechandtextanalytics/programs/settings/insights','GET',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber'],'programIds':this.apiClient.buildCollectionParam(opts['programIds'],'multi')},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16172
16200
|
* Get supported dialects for each transcription engine
|
|
16173
16201
|
*
|
|
16174
16202
|
*/},{key:"getSpeechandtextanalyticsProgramsTranscriptionenginesDialects",value:function getSpeechandtextanalyticsProgramsTranscriptionenginesDialects(){return this.apiClient.callApi('/api/v2/speechandtextanalytics/programs/transcriptionengines/dialects','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -16317,6 +16345,13 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16317
16345
|
*/},{key:"putSpeechandtextanalyticsProgramMappings",value:function putSpeechandtextanalyticsProgramMappings(programId,body){// verify the required parameter 'programId' is set
|
|
16318
16346
|
if(programId===undefined||programId===null){throw'Missing the required parameter "programId" when calling putSpeechandtextanalyticsProgramMappings';}// verify the required parameter 'body' is set
|
|
16319
16347
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putSpeechandtextanalyticsProgramMappings';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/programs/{programId}/mappings','PUT',{'programId':programId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16348
|
+
* Update AI Insights settings of a program
|
|
16349
|
+
*
|
|
16350
|
+
* @param {String} programId The id of the program
|
|
16351
|
+
* @param {Object} body Program AI Insights setting
|
|
16352
|
+
*/},{key:"putSpeechandtextanalyticsProgramSettingsInsights",value:function putSpeechandtextanalyticsProgramSettingsInsights(programId,body){// verify the required parameter 'programId' is set
|
|
16353
|
+
if(programId===undefined||programId===null){throw'Missing the required parameter "programId" when calling putSpeechandtextanalyticsProgramSettingsInsights';}// verify the required parameter 'body' is set
|
|
16354
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putSpeechandtextanalyticsProgramSettingsInsights';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/programs/{programId}/settings/insights','PUT',{'programId':programId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16320
16355
|
* Update transcription engine settings of a program
|
|
16321
16356
|
*
|
|
16322
16357
|
* @param {String} programId The id of the program
|
|
@@ -16338,7 +16373,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
16338
16373
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putSpeechandtextanalyticsTopic';}return this.apiClient.callApi('/api/v2/speechandtextanalytics/topics/{topicId}','PUT',{'topicId':topicId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var StationsApi=/*#__PURE__*/function(){/**
|
|
16339
16374
|
* Stations service.
|
|
16340
16375
|
* @module purecloud-platform-client-v2/api/StationsApi
|
|
16341
|
-
* @version
|
|
16376
|
+
* @version 215.0.0
|
|
16342
16377
|
*//**
|
|
16343
16378
|
* Constructs a new StationsApi.
|
|
16344
16379
|
* @alias module:purecloud-platform-client-v2/api/StationsApi
|
|
@@ -16370,7 +16405,7 @@ if(stationId===undefined||stationId===null){throw'Missing the required parameter
|
|
|
16370
16405
|
*/},{key:"getStations",value:function getStations(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/stations','GET',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber'],'sortBy':opts['sortBy'],'name':opts['name'],'userSelectable':opts['userSelectable'],'webRtcUserId':opts['webRtcUserId'],'id':opts['id'],'lineAppearanceId':opts['lineAppearanceId']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var SuggestApi=/*#__PURE__*/function(){/**
|
|
16371
16406
|
* Suggest service.
|
|
16372
16407
|
* @module purecloud-platform-client-v2/api/SuggestApi
|
|
16373
|
-
* @version
|
|
16408
|
+
* @version 215.0.0
|
|
16374
16409
|
*//**
|
|
16375
16410
|
* Constructs a new SuggestApi.
|
|
16376
16411
|
* @alias module:purecloud-platform-client-v2/api/SuggestApi
|
|
@@ -16410,7 +16445,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16410
16445
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postSearchSuggest';}return this.apiClient.callApi('/api/v2/search/suggest','POST',{},{'profile':opts['profile']},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TaskManagementApi=/*#__PURE__*/function(){/**
|
|
16411
16446
|
* TaskManagement service.
|
|
16412
16447
|
* @module purecloud-platform-client-v2/api/TaskManagementApi
|
|
16413
|
-
* @version
|
|
16448
|
+
* @version 215.0.0
|
|
16414
16449
|
*//**
|
|
16415
16450
|
* Constructs a new TaskManagementApi.
|
|
16416
16451
|
* @alias module:purecloud-platform-client-v2/api/TaskManagementApi
|
|
@@ -16916,7 +16951,7 @@ if(schemaId===undefined||schemaId===null){throw'Missing the required parameter "
|
|
|
16916
16951
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putTaskmanagementWorkitemsSchema';}return this.apiClient.callApi('/api/v2/taskmanagement/workitems/schemas/{schemaId}','PUT',{'schemaId':schemaId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TeamsApi=/*#__PURE__*/function(){/**
|
|
16917
16952
|
* Teams service.
|
|
16918
16953
|
* @module purecloud-platform-client-v2/api/TeamsApi
|
|
16919
|
-
* @version
|
|
16954
|
+
* @version 215.0.0
|
|
16920
16955
|
*//**
|
|
16921
16956
|
* Constructs a new TeamsApi.
|
|
16922
16957
|
* @alias module:purecloud-platform-client-v2/api/TeamsApi
|
|
@@ -16996,7 +17031,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16996
17031
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postTeamsSearch';}return this.apiClient.callApi('/api/v2/teams/search','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TelephonyApi=/*#__PURE__*/function(){/**
|
|
16997
17032
|
* Telephony service.
|
|
16998
17033
|
* @module purecloud-platform-client-v2/api/TelephonyApi
|
|
16999
|
-
* @version
|
|
17034
|
+
* @version 215.0.0
|
|
17000
17035
|
*//**
|
|
17001
17036
|
* Constructs a new TelephonyApi.
|
|
17002
17037
|
* @alias module:purecloud-platform-client-v2/api/TelephonyApi
|
|
@@ -17043,7 +17078,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
17043
17078
|
if(sIPSearchPublicRequest===undefined||sIPSearchPublicRequest===null){throw'Missing the required parameter "sIPSearchPublicRequest" when calling postTelephonySiptracesDownload';}return this.apiClient.callApi('/api/v2/telephony/siptraces/download','POST',{},{},{},{},sIPSearchPublicRequest,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TelephonyProvidersEdgeApi=/*#__PURE__*/function(){/**
|
|
17044
17079
|
* TelephonyProvidersEdge service.
|
|
17045
17080
|
* @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
17046
|
-
* @version
|
|
17081
|
+
* @version 215.0.0
|
|
17047
17082
|
*//**
|
|
17048
17083
|
* Constructs a new TelephonyProvidersEdgeApi.
|
|
17049
17084
|
* @alias module:purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
@@ -17878,7 +17913,7 @@ if(trunkBaseSettingsId===undefined||trunkBaseSettingsId===null){throw'Missing th
|
|
|
17878
17913
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putTelephonyProvidersEdgesTrunkbasesetting';}return this.apiClient.callApi('/api/v2/telephony/providers/edges/trunkbasesettings/{trunkBaseSettingsId}','PUT',{'trunkBaseSettingsId':trunkBaseSettingsId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TextbotsApi=/*#__PURE__*/function(){/**
|
|
17879
17914
|
* Textbots service.
|
|
17880
17915
|
* @module purecloud-platform-client-v2/api/TextbotsApi
|
|
17881
|
-
* @version
|
|
17916
|
+
* @version 215.0.0
|
|
17882
17917
|
*//**
|
|
17883
17918
|
* Constructs a new TextbotsApi.
|
|
17884
17919
|
* @alias module:purecloud-platform-client-v2/api/TextbotsApi
|
|
@@ -17913,7 +17948,7 @@ if(launchRequest===undefined||launchRequest===null){throw'Missing the required p
|
|
|
17913
17948
|
if(postTextRequest===undefined||postTextRequest===null){throw'Missing the required parameter "postTextRequest" when calling postTextbotsBotsExecute';}return this.apiClient.callApi('/api/v2/textbots/bots/execute','POST',{},{},{},{},postTextRequest,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var TokensApi=/*#__PURE__*/function(){/**
|
|
17914
17949
|
* Tokens service.
|
|
17915
17950
|
* @module purecloud-platform-client-v2/api/TokensApi
|
|
17916
|
-
* @version
|
|
17951
|
+
* @version 215.0.0
|
|
17917
17952
|
*//**
|
|
17918
17953
|
* Constructs a new TokensApi.
|
|
17919
17954
|
* @alias module:purecloud-platform-client-v2/api/TokensApi
|
|
@@ -17947,7 +17982,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
17947
17982
|
*/},{key:"putTokensTimeout",value:function putTokensTimeout(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/tokens/timeout','PUT',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UploadsApi=/*#__PURE__*/function(){/**
|
|
17948
17983
|
* Uploads service.
|
|
17949
17984
|
* @module purecloud-platform-client-v2/api/UploadsApi
|
|
17950
|
-
* @version
|
|
17985
|
+
* @version 215.0.0
|
|
17951
17986
|
*//**
|
|
17952
17987
|
* Constructs a new UploadsApi.
|
|
17953
17988
|
* @alias module:purecloud-platform-client-v2/api/UploadsApi
|
|
@@ -17967,7 +18002,6 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
17967
18002
|
*
|
|
17968
18003
|
* @param {String} actionId actionId
|
|
17969
18004
|
* @param {Object} body Input used to request URL upload.
|
|
17970
|
-
* postIntegrationsActionDraftFunctionUpload is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
17971
18005
|
*/},{key:"postIntegrationsActionDraftFunctionUpload",value:function postIntegrationsActionDraftFunctionUpload(actionId,body){// verify the required parameter 'actionId' is set
|
|
17972
18006
|
if(actionId===undefined||actionId===null){throw'Missing the required parameter "actionId" when calling postIntegrationsActionDraftFunctionUpload';}// verify the required parameter 'body' is set
|
|
17973
18007
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postIntegrationsActionDraftFunctionUpload';}return this.apiClient.callApi('/api/v2/integrations/actions/{actionId}/draft/function/upload','POST',{'actionId':actionId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -18013,7 +18047,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18013
18047
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postUploadsWorkforcemanagementHistoricaldataCsv';}return this.apiClient.callApi('/api/v2/uploads/workforcemanagement/historicaldata/csv','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UsageApi=/*#__PURE__*/function(){/**
|
|
18014
18048
|
* Usage service.
|
|
18015
18049
|
* @module purecloud-platform-client-v2/api/UsageApi
|
|
18016
|
-
* @version
|
|
18050
|
+
* @version 215.0.0
|
|
18017
18051
|
*//**
|
|
18018
18052
|
* Constructs a new UsageApi.
|
|
18019
18053
|
* @alias module:purecloud-platform-client-v2/api/UsageApi
|
|
@@ -18067,7 +18101,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18067
18101
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postUsageSimplesearch';}return this.apiClient.callApi('/api/v2/usage/simplesearch','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UserRecordingsApi=/*#__PURE__*/function(){/**
|
|
18068
18102
|
* UserRecordings service.
|
|
18069
18103
|
* @module purecloud-platform-client-v2/api/UserRecordingsApi
|
|
18070
|
-
* @version
|
|
18104
|
+
* @version 215.0.0
|
|
18071
18105
|
*//**
|
|
18072
18106
|
* Constructs a new UserRecordingsApi.
|
|
18073
18107
|
* @alias module:purecloud-platform-client-v2/api/UserRecordingsApi
|
|
@@ -18124,7 +18158,7 @@ if(recordingId===undefined||recordingId===null){throw'Missing the required param
|
|
|
18124
18158
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserrecording';}return this.apiClient.callApi('/api/v2/userrecordings/{recordingId}','PUT',{'recordingId':recordingId},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi')},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UsersApi=/*#__PURE__*/function(){/**
|
|
18125
18159
|
* Users service.
|
|
18126
18160
|
* @module purecloud-platform-client-v2/api/UsersApi
|
|
18127
|
-
* @version
|
|
18161
|
+
* @version 215.0.0
|
|
18128
18162
|
*//**
|
|
18129
18163
|
* Constructs a new UsersApi.
|
|
18130
18164
|
* @alias module:purecloud-platform-client-v2/api/UsersApi
|
|
@@ -18164,6 +18198,15 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
18164
18198
|
* @param {String} userId User ID
|
|
18165
18199
|
*/},{key:"deleteUser",value:function deleteUser(userId){// verify the required parameter 'userId' is set
|
|
18166
18200
|
if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling deleteUser';}return this.apiClient.callApi('/api/v2/users/{userId}','DELETE',{'userId':userId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
18201
|
+
* Delete the external identifier for user.
|
|
18202
|
+
*
|
|
18203
|
+
* @param {String} userId User ID
|
|
18204
|
+
* @param {String} authorityName Authority Name
|
|
18205
|
+
* @param {String} externalKey External Key
|
|
18206
|
+
*/},{key:"deleteUserExternalidAuthorityNameExternalKey",value:function deleteUserExternalidAuthorityNameExternalKey(userId,authorityName,externalKey){// verify the required parameter 'userId' is set
|
|
18207
|
+
if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling deleteUserExternalidAuthorityNameExternalKey';}// verify the required parameter 'authorityName' is set
|
|
18208
|
+
if(authorityName===undefined||authorityName===null){throw'Missing the required parameter "authorityName" when calling deleteUserExternalidAuthorityNameExternalKey';}// verify the required parameter 'externalKey' is set
|
|
18209
|
+
if(externalKey===undefined||externalKey===null){throw'Missing the required parameter "externalKey" when calling deleteUserExternalidAuthorityNameExternalKey';}return this.apiClient.callApi('/api/v2/users/{userId}/externalid/{authorityName}/{externalKey}','DELETE',{'userId':userId,'authorityName':authorityName,'externalKey':externalKey},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
18167
18210
|
* Remove a routing language from a user
|
|
18168
18211
|
*
|
|
18169
18212
|
* @param {String} userId User ID
|
|
@@ -18323,6 +18366,18 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
18323
18366
|
* @param {Array.<String>} opts.expand Which fields, if any, to expand
|
|
18324
18367
|
*/},{key:"getUserDirectreports",value:function getUserDirectreports(userId,opts){opts=opts||{};// verify the required parameter 'userId' is set
|
|
18325
18368
|
if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling getUserDirectreports';}return this.apiClient.callApi('/api/v2/users/{userId}/directreports','GET',{'userId':userId},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi')},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
18369
|
+
* Get the external identifiers for a user.
|
|
18370
|
+
*
|
|
18371
|
+
* @param {String} userId User ID
|
|
18372
|
+
*/},{key:"getUserExternalid",value:function getUserExternalid(userId){// verify the required parameter 'userId' is set
|
|
18373
|
+
if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling getUserExternalid';}return this.apiClient.callApi('/api/v2/users/{userId}/externalid','GET',{'userId':userId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
18374
|
+
* Get the external identifier of user for an authority.
|
|
18375
|
+
* Authority name and external key are case sensitive.
|
|
18376
|
+
* @param {String} userId User ID
|
|
18377
|
+
* @param {String} authorityName Authority Name
|
|
18378
|
+
*/},{key:"getUserExternalidAuthorityName",value:function getUserExternalidAuthorityName(userId,authorityName){// verify the required parameter 'userId' is set
|
|
18379
|
+
if(userId===undefined||userId===null){throw'Missing the required parameter "userId" when calling getUserExternalidAuthorityName';}// verify the required parameter 'authorityName' is set
|
|
18380
|
+
if(authorityName===undefined||authorityName===null){throw'Missing the required parameter "authorityName" when calling getUserExternalidAuthorityName';}return this.apiClient.callApi('/api/v2/users/{userId}/externalid/{authorityName}','GET',{'userId':userId,'authorityName':authorityName},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
18326
18381
|
* Deprecated; will be revived with new contract
|
|
18327
18382
|
*
|
|
18328
18383
|
* @param {String} userId User ID
|
|
@@ -18494,6 +18549,15 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
18494
18549
|
*/},{key:"getUsersDevelopmentActivity",value:function getUsersDevelopmentActivity(activityId,type){// verify the required parameter 'activityId' is set
|
|
18495
18550
|
if(activityId===undefined||activityId===null){throw'Missing the required parameter "activityId" when calling getUsersDevelopmentActivity';}// verify the required parameter 'type' is set
|
|
18496
18551
|
if(type===undefined||type===null){throw'Missing the required parameter "type" when calling getUsersDevelopmentActivity';}return this.apiClient.callApi('/api/v2/users/development/activities/{activityId}','GET',{'activityId':activityId},{'type':type},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
18552
|
+
* Get the user associated with external identifier.
|
|
18553
|
+
* Authority name and external key are case sensitive.
|
|
18554
|
+
* @param {String} authorityName Authority Name
|
|
18555
|
+
* @param {String} externalKey External Key
|
|
18556
|
+
* @param {Object} opts Optional parameters
|
|
18557
|
+
* @param {Array.<String>} opts.expand Which fields, if any, to expand
|
|
18558
|
+
*/},{key:"getUsersExternalidAuthorityNameExternalKey",value:function getUsersExternalidAuthorityNameExternalKey(authorityName,externalKey,opts){opts=opts||{};// verify the required parameter 'authorityName' is set
|
|
18559
|
+
if(authorityName===undefined||authorityName===null){throw'Missing the required parameter "authorityName" when calling getUsersExternalidAuthorityNameExternalKey';}// verify the required parameter 'externalKey' is set
|
|
18560
|
+
if(externalKey===undefined||externalKey===null){throw'Missing the required parameter "externalKey" when calling getUsersExternalidAuthorityNameExternalKey';}return this.apiClient.callApi('/api/v2/users/externalid/{authorityName}/{externalKey}','GET',{'authorityName':authorityName,'externalKey':externalKey},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi')},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
18497
18561
|
* Get current user details.
|
|
18498
18562
|
* This request is not valid when using the Client Credentials OAuth grant.
|
|
18499
18563
|
* @param {Object} opts Optional parameters
|
|
@@ -18821,7 +18885,7 @@ if(verifierId===undefined||verifierId===null){throw'Missing the required paramet
|
|
|
18821
18885
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putUserVerifier';}return this.apiClient.callApi('/api/v2/users/{userId}/verifiers/{verifierId}','PUT',{'userId':userId,'verifierId':verifierId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var UtilitiesApi=/*#__PURE__*/function(){/**
|
|
18822
18886
|
* Utilities service.
|
|
18823
18887
|
* @module purecloud-platform-client-v2/api/UtilitiesApi
|
|
18824
|
-
* @version
|
|
18888
|
+
* @version 215.0.0
|
|
18825
18889
|
*//**
|
|
18826
18890
|
* Constructs a new UtilitiesApi.
|
|
18827
18891
|
* @alias module:purecloud-platform-client-v2/api/UtilitiesApi
|
|
@@ -18848,7 +18912,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18848
18912
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postCertificateDetails';}return this.apiClient.callApi('/api/v2/certificate/details','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var VoicemailApi=/*#__PURE__*/function(){/**
|
|
18849
18913
|
* Voicemail service.
|
|
18850
18914
|
* @module purecloud-platform-client-v2/api/VoicemailApi
|
|
18851
|
-
* @version
|
|
18915
|
+
* @version 215.0.0
|
|
18852
18916
|
*//**
|
|
18853
18917
|
* Constructs a new VoicemailApi.
|
|
18854
18918
|
* @alias module:purecloud-platform-client-v2/api/VoicemailApi
|
|
@@ -19010,7 +19074,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
19010
19074
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putVoicemailUserpolicy';}return this.apiClient.callApi('/api/v2/voicemail/userpolicies/{userId}','PUT',{'userId':userId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WebChatApi=/*#__PURE__*/function(){/**
|
|
19011
19075
|
* WebChat service.
|
|
19012
19076
|
* @module purecloud-platform-client-v2/api/WebChatApi
|
|
19013
|
-
* @version
|
|
19077
|
+
* @version 215.0.0
|
|
19014
19078
|
*//**
|
|
19015
19079
|
* Constructs a new WebChatApi.
|
|
19016
19080
|
* @alias module:purecloud-platform-client-v2/api/WebChatApi
|
|
@@ -19145,7 +19209,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
19145
19209
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putWebchatSettings';}return this.apiClient.callApi('/api/v2/webchat/settings','PUT',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WebDeploymentsApi=/*#__PURE__*/function(){/**
|
|
19146
19210
|
* WebDeployments service.
|
|
19147
19211
|
* @module purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
19148
|
-
* @version
|
|
19212
|
+
* @version 215.0.0
|
|
19149
19213
|
*//**
|
|
19150
19214
|
* Constructs a new WebDeploymentsApi.
|
|
19151
19215
|
* @alias module:purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
@@ -19266,7 +19330,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
19266
19330
|
if(deployment===undefined||deployment===null){throw'Missing the required parameter "deployment" when calling putWebdeploymentsDeployment';}return this.apiClient.callApi('/api/v2/webdeployments/deployments/{deploymentId}','PUT',{'deploymentId':deploymentId},{},{},{},deployment,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WebMessagingApi=/*#__PURE__*/function(){/**
|
|
19267
19331
|
* WebMessaging service.
|
|
19268
19332
|
* @module purecloud-platform-client-v2/api/WebMessagingApi
|
|
19269
|
-
* @version
|
|
19333
|
+
* @version 215.0.0
|
|
19270
19334
|
*//**
|
|
19271
19335
|
* Constructs a new WebMessagingApi.
|
|
19272
19336
|
* @alias module:purecloud-platform-client-v2/api/WebMessagingApi
|
|
@@ -19282,7 +19346,7 @@ if(deployment===undefined||deployment===null){throw'Missing the required paramet
|
|
|
19282
19346
|
*/return _createClass(WebMessagingApi,[{key:"getWebmessagingMessages",value:function getWebmessagingMessages(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/webmessaging/messages','GET',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WidgetsApi=/*#__PURE__*/function(){/**
|
|
19283
19347
|
* Widgets service.
|
|
19284
19348
|
* @module purecloud-platform-client-v2/api/WidgetsApi
|
|
19285
|
-
* @version
|
|
19349
|
+
* @version 215.0.0
|
|
19286
19350
|
*//**
|
|
19287
19351
|
* Constructs a new WidgetsApi.
|
|
19288
19352
|
* @alias module:purecloud-platform-client-v2/api/WidgetsApi
|
|
@@ -19317,7 +19381,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
19317
19381
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putWidgetsDeployment';}return this.apiClient.callApi('/api/v2/widgets/deployments/{deploymentId}','PUT',{'deploymentId':deploymentId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}}]);}();var WorkforceManagementApi=/*#__PURE__*/function(){/**
|
|
19318
19382
|
* WorkforceManagement service.
|
|
19319
19383
|
* @module purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
19320
|
-
* @version
|
|
19384
|
+
* @version 215.0.0
|
|
19321
19385
|
*//**
|
|
19322
19386
|
* Constructs a new WorkforceManagementApi.
|
|
19323
19387
|
* @alias module:purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
@@ -21123,7 +21187,7 @@ if(timeOffLimitId===undefined||timeOffLimitId===null){throw'Missing the required
|
|
|
21123
21187
|
* </pre>
|
|
21124
21188
|
* </p>
|
|
21125
21189
|
* @module purecloud-platform-client-v2/index
|
|
21126
|
-
* @version
|
|
21190
|
+
* @version 215.0.0
|
|
21127
21191
|
*/var platformClient=/*#__PURE__*/_createClass(function platformClient(){_classCallCheck(this,platformClient);/**
|
|
21128
21192
|
* The ApiClient constructor.
|
|
21129
21193
|
* @property {module:purecloud-platform-client-v2/ApiClient}
|