purecloud-platform-client-v2 214.0.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 +172 -82
- package/dist/web-amd/purecloud-platform-client-v2.js +172 -82
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +151 -136
- package/dist/web-cjs/purecloud-platform-client-v2.js +161 -143
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +6 -0
- 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 +1 -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 -1
- 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 -1
- 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 +1 -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 -1
- 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 +1 -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
|
|
@@ -1541,7 +1556,7 @@ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "rule
|
|
|
1541
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(){/**
|
|
1542
1557
|
* Analytics service.
|
|
1543
1558
|
* @module purecloud-platform-client-v2/api/AnalyticsApi
|
|
1544
|
-
* @version
|
|
1559
|
+
* @version 215.0.0
|
|
1545
1560
|
*//**
|
|
1546
1561
|
* Constructs a new AnalyticsApi.
|
|
1547
1562
|
* @alias module:purecloud-platform-client-v2/api/AnalyticsApi
|
|
@@ -2213,7 +2228,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
2213
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(){/**
|
|
2214
2229
|
* Architect service.
|
|
2215
2230
|
* @module purecloud-platform-client-v2/api/ArchitectApi
|
|
2216
|
-
* @version
|
|
2231
|
+
* @version 215.0.0
|
|
2217
2232
|
*//**
|
|
2218
2233
|
* Constructs a new ArchitectApi.
|
|
2219
2234
|
* @alias module:purecloud-platform-client-v2/api/ArchitectApi
|
|
@@ -3305,7 +3320,7 @@ if(milestoneId===undefined||milestoneId===null){throw'Missing the required param
|
|
|
3305
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(){/**
|
|
3306
3321
|
* Audit service.
|
|
3307
3322
|
* @module purecloud-platform-client-v2/api/AuditApi
|
|
3308
|
-
* @version
|
|
3323
|
+
* @version 215.0.0
|
|
3309
3324
|
*//**
|
|
3310
3325
|
* Constructs a new AuditApi.
|
|
3311
3326
|
* @alias module:purecloud-platform-client-v2/api/AuditApi
|
|
@@ -3355,7 +3370,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3355
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(){/**
|
|
3356
3371
|
* Authorization service.
|
|
3357
3372
|
* @module purecloud-platform-client-v2/api/AuthorizationApi
|
|
3358
|
-
* @version
|
|
3373
|
+
* @version 215.0.0
|
|
3359
3374
|
*//**
|
|
3360
3375
|
* Constructs a new AuthorizationApi.
|
|
3361
3376
|
* @alias module:purecloud-platform-client-v2/api/AuthorizationApi
|
|
@@ -3678,7 +3693,7 @@ if(subjectId===undefined||subjectId===null){throw'Missing the required parameter
|
|
|
3678
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(){/**
|
|
3679
3694
|
* Billing service.
|
|
3680
3695
|
* @module purecloud-platform-client-v2/api/BillingApi
|
|
3681
|
-
* @version
|
|
3696
|
+
* @version 215.0.0
|
|
3682
3697
|
*//**
|
|
3683
3698
|
* Constructs a new BillingApi.
|
|
3684
3699
|
* @alias module:purecloud-platform-client-v2/api/BillingApi
|
|
@@ -3702,7 +3717,7 @@ if(endDate===undefined||endDate===null){throw'Missing the required parameter "en
|
|
|
3702
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(){/**
|
|
3703
3718
|
* CarrierServices service.
|
|
3704
3719
|
* @module purecloud-platform-client-v2/api/CarrierServicesApi
|
|
3705
|
-
* @version
|
|
3720
|
+
* @version 215.0.0
|
|
3706
3721
|
*//**
|
|
3707
3722
|
* Constructs a new CarrierServicesApi.
|
|
3708
3723
|
* @alias module:purecloud-platform-client-v2/api/CarrierServicesApi
|
|
@@ -3722,7 +3737,7 @@ if(phoneNumber===undefined||phoneNumber===null){throw'Missing the required param
|
|
|
3722
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(){/**
|
|
3723
3738
|
* Chat service.
|
|
3724
3739
|
* @module purecloud-platform-client-v2/api/ChatApi
|
|
3725
|
-
* @version
|
|
3740
|
+
* @version 215.0.0
|
|
3726
3741
|
*//**
|
|
3727
3742
|
* Constructs a new ChatApi.
|
|
3728
3743
|
* @alias module:purecloud-platform-client-v2/api/ChatApi
|
|
@@ -3947,7 +3962,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3947
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(){/**
|
|
3948
3963
|
* Coaching service.
|
|
3949
3964
|
* @module purecloud-platform-client-v2/api/CoachingApi
|
|
3950
|
-
* @version
|
|
3965
|
+
* @version 215.0.0
|
|
3951
3966
|
*//**
|
|
3952
3967
|
* Constructs a new CoachingApi.
|
|
3953
3968
|
* @alias module:purecloud-platform-client-v2/api/CoachingApi
|
|
@@ -4100,7 +4115,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
4100
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(){/**
|
|
4101
4116
|
* ContentManagement service.
|
|
4102
4117
|
* @module purecloud-platform-client-v2/api/ContentManagementApi
|
|
4103
|
-
* @version
|
|
4118
|
+
* @version 215.0.0
|
|
4104
4119
|
*//**
|
|
4105
4120
|
* Constructs a new ContentManagementApi.
|
|
4106
4121
|
* @alias module:purecloud-platform-client-v2/api/ContentManagementApi
|
|
@@ -4382,7 +4397,7 @@ if(tagId===undefined||tagId===null){throw'Missing the required parameter "tagId"
|
|
|
4382
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(){/**
|
|
4383
4398
|
* Conversations service.
|
|
4384
4399
|
* @module purecloud-platform-client-v2/api/ConversationsApi
|
|
4385
|
-
* @version
|
|
4400
|
+
* @version 215.0.0
|
|
4386
4401
|
*//**
|
|
4387
4402
|
* Constructs a new ConversationsApi.
|
|
4388
4403
|
* @alias module:purecloud-platform-client-v2/api/ConversationsApi
|
|
@@ -6129,7 +6144,7 @@ if(conversationId===undefined||conversationId===null){throw'Missing the required
|
|
|
6129
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(){/**
|
|
6130
6145
|
* DataExtensions service.
|
|
6131
6146
|
* @module purecloud-platform-client-v2/api/DataExtensionsApi
|
|
6132
|
-
* @version
|
|
6147
|
+
* @version 215.0.0
|
|
6133
6148
|
*//**
|
|
6134
6149
|
* Constructs a new DataExtensionsApi.
|
|
6135
6150
|
* @alias module:purecloud-platform-client-v2/api/DataExtensionsApi
|
|
@@ -6150,7 +6165,7 @@ if(coretypeName===undefined||coretypeName===null){throw'Missing the required par
|
|
|
6150
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(){/**
|
|
6151
6166
|
* DataPrivacy service.
|
|
6152
6167
|
* @module purecloud-platform-client-v2/api/DataPrivacyApi
|
|
6153
|
-
* @version
|
|
6168
|
+
* @version 215.0.0
|
|
6154
6169
|
*//**
|
|
6155
6170
|
* Constructs a new DataPrivacyApi.
|
|
6156
6171
|
* @alias module:purecloud-platform-client-v2/api/DataPrivacyApi
|
|
@@ -6190,7 +6205,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6190
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(){/**
|
|
6191
6206
|
* Downloads service.
|
|
6192
6207
|
* @module purecloud-platform-client-v2/api/DownloadsApi
|
|
6193
|
-
* @version
|
|
6208
|
+
* @version 215.0.0
|
|
6194
6209
|
*//**
|
|
6195
6210
|
* Constructs a new DownloadsApi.
|
|
6196
6211
|
* @alias module:purecloud-platform-client-v2/api/DownloadsApi
|
|
@@ -6209,7 +6224,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6209
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(){/**
|
|
6210
6225
|
* Emails service.
|
|
6211
6226
|
* @module purecloud-platform-client-v2/api/EmailsApi
|
|
6212
|
-
* @version
|
|
6227
|
+
* @version 215.0.0
|
|
6213
6228
|
*//**
|
|
6214
6229
|
* Constructs a new EmailsApi.
|
|
6215
6230
|
* @alias module:purecloud-platform-client-v2/api/EmailsApi
|
|
@@ -6227,7 +6242,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
6227
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(){/**
|
|
6228
6243
|
* EmployeeEngagement service.
|
|
6229
6244
|
* @module purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
6230
|
-
* @version
|
|
6245
|
+
* @version 215.0.0
|
|
6231
6246
|
*//**
|
|
6232
6247
|
* Constructs a new EmployeeEngagementApi.
|
|
6233
6248
|
* @alias module:purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
@@ -6265,7 +6280,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6265
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(){/**
|
|
6266
6281
|
* Events service.
|
|
6267
6282
|
* @module purecloud-platform-client-v2/api/EventsApi
|
|
6268
|
-
* @version
|
|
6283
|
+
* @version 215.0.0
|
|
6269
6284
|
*//**
|
|
6270
6285
|
* Constructs a new EventsApi.
|
|
6271
6286
|
* @alias module:purecloud-platform-client-v2/api/EventsApi
|
|
@@ -6290,7 +6305,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6290
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(){/**
|
|
6291
6306
|
* ExternalContacts service.
|
|
6292
6307
|
* @module purecloud-platform-client-v2/api/ExternalContactsApi
|
|
6293
|
-
* @version
|
|
6308
|
+
* @version 215.0.0
|
|
6294
6309
|
*//**
|
|
6295
6310
|
* Constructs a new ExternalContactsApi.
|
|
6296
6311
|
* @alias module:purecloud-platform-client-v2/api/ExternalContactsApi
|
|
@@ -6882,7 +6897,7 @@ if(relationshipId===undefined||relationshipId===null){throw'Missing the required
|
|
|
6882
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(){/**
|
|
6883
6898
|
* Fax service.
|
|
6884
6899
|
* @module purecloud-platform-client-v2/api/FaxApi
|
|
6885
|
-
* @version
|
|
6900
|
+
* @version 215.0.0
|
|
6886
6901
|
*//**
|
|
6887
6902
|
* Constructs a new FaxApi.
|
|
6888
6903
|
* @alias module:purecloud-platform-client-v2/api/FaxApi
|
|
@@ -6931,7 +6946,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6931
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(){/**
|
|
6932
6947
|
* Flows service.
|
|
6933
6948
|
* @module purecloud-platform-client-v2/api/FlowsApi
|
|
6934
|
-
* @version
|
|
6949
|
+
* @version 215.0.0
|
|
6935
6950
|
*//**
|
|
6936
6951
|
* Constructs a new FlowsApi.
|
|
6937
6952
|
* @alias module:purecloud-platform-client-v2/api/FlowsApi
|
|
@@ -6979,7 +6994,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6979
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(){/**
|
|
6980
6995
|
* Gamification service.
|
|
6981
6996
|
* @module purecloud-platform-client-v2/api/GamificationApi
|
|
6982
|
-
* @version
|
|
6997
|
+
* @version 215.0.0
|
|
6983
6998
|
*//**
|
|
6984
6999
|
* Constructs a new GamificationApi.
|
|
6985
7000
|
* @alias module:purecloud-platform-client-v2/api/GamificationApi
|
|
@@ -7538,7 +7553,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
7538
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(){/**
|
|
7539
7554
|
* GeneralDataProtectionRegulation service.
|
|
7540
7555
|
* @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
7541
|
-
* @version
|
|
7556
|
+
* @version 215.0.0
|
|
7542
7557
|
*//**
|
|
7543
7558
|
* Constructs a new GeneralDataProtectionRegulationApi.
|
|
7544
7559
|
* @alias module:purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
@@ -7573,7 +7588,7 @@ if(searchValue===undefined||searchValue===null){throw'Missing the required param
|
|
|
7573
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(){/**
|
|
7574
7589
|
* Geolocation service.
|
|
7575
7590
|
* @module purecloud-platform-client-v2/api/GeolocationApi
|
|
7576
|
-
* @version
|
|
7591
|
+
* @version 215.0.0
|
|
7577
7592
|
*//**
|
|
7578
7593
|
* Constructs a new GeolocationApi.
|
|
7579
7594
|
* @alias module:purecloud-platform-client-v2/api/GeolocationApi
|
|
@@ -7607,7 +7622,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
7607
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(){/**
|
|
7608
7623
|
* Greetings service.
|
|
7609
7624
|
* @module purecloud-platform-client-v2/api/GreetingsApi
|
|
7610
|
-
* @version
|
|
7625
|
+
* @version 215.0.0
|
|
7611
7626
|
*//**
|
|
7612
7627
|
* Constructs a new GreetingsApi.
|
|
7613
7628
|
* @alias module:purecloud-platform-client-v2/api/GreetingsApi
|
|
@@ -7714,7 +7729,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
7714
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(){/**
|
|
7715
7730
|
* Groups service.
|
|
7716
7731
|
* @module purecloud-platform-client-v2/api/GroupsApi
|
|
7717
|
-
* @version
|
|
7732
|
+
* @version 215.0.0
|
|
7718
7733
|
*//**
|
|
7719
7734
|
* Constructs a new GroupsApi.
|
|
7720
7735
|
* @alias module:purecloud-platform-client-v2/api/GroupsApi
|
|
@@ -7847,7 +7862,7 @@ if(groupId===undefined||groupId===null){throw'Missing the required parameter "gr
|
|
|
7847
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(){/**
|
|
7848
7863
|
* IdentityProvider service.
|
|
7849
7864
|
* @module purecloud-platform-client-v2/api/IdentityProviderApi
|
|
7850
|
-
* @version
|
|
7865
|
+
* @version 215.0.0
|
|
7851
7866
|
*//**
|
|
7852
7867
|
* Constructs a new IdentityProviderApi.
|
|
7853
7868
|
* @alias module:purecloud-platform-client-v2/api/IdentityProviderApi
|
|
@@ -8003,7 +8018,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
8003
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(){/**
|
|
8004
8019
|
* InfrastructureAsCode service.
|
|
8005
8020
|
* @module purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
8006
|
-
* @version
|
|
8021
|
+
* @version 215.0.0
|
|
8007
8022
|
*//**
|
|
8008
8023
|
* Constructs a new InfrastructureAsCodeApi.
|
|
8009
8024
|
* @alias module:purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
@@ -8057,7 +8072,7 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
8057
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(){/**
|
|
8058
8073
|
* Integrations service.
|
|
8059
8074
|
* @module purecloud-platform-client-v2/api/IntegrationsApi
|
|
8060
|
-
* @version
|
|
8075
|
+
* @version 215.0.0
|
|
8061
8076
|
*//**
|
|
8062
8077
|
* Constructs a new IntegrationsApi.
|
|
8063
8078
|
* @alias module:purecloud-platform-client-v2/api/IntegrationsApi
|
|
@@ -8687,7 +8702,7 @@ if(ucIntegrationId===undefined||ucIntegrationId===null){throw'Missing the requir
|
|
|
8687
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(){/**
|
|
8688
8703
|
* Journey service.
|
|
8689
8704
|
* @module purecloud-platform-client-v2/api/JourneyApi
|
|
8690
|
-
* @version
|
|
8705
|
+
* @version 215.0.0
|
|
8691
8706
|
*//**
|
|
8692
8707
|
* Constructs a new JourneyApi.
|
|
8693
8708
|
* @alias module:purecloud-platform-client-v2/api/JourneyApi
|
|
@@ -9164,7 +9179,7 @@ if(versionId===undefined||versionId===null){throw'Missing the required parameter
|
|
|
9164
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(){/**
|
|
9165
9180
|
* Knowledge service.
|
|
9166
9181
|
* @module purecloud-platform-client-v2/api/KnowledgeApi
|
|
9167
|
-
* @version
|
|
9182
|
+
* @version 215.0.0
|
|
9168
9183
|
*//**
|
|
9169
9184
|
* Constructs a new KnowledgeApi.
|
|
9170
9185
|
* @alias module:purecloud-platform-client-v2/api/KnowledgeApi
|
|
@@ -10234,7 +10249,7 @@ if(sourceId===undefined||sourceId===null){throw'Missing the required parameter "
|
|
|
10234
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(){/**
|
|
10235
10250
|
* LanguageUnderstanding service.
|
|
10236
10251
|
* @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
10237
|
-
* @version
|
|
10252
|
+
* @version 215.0.0
|
|
10238
10253
|
*//**
|
|
10239
10254
|
* Constructs a new LanguageUnderstandingApi.
|
|
10240
10255
|
* @alias module:purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
@@ -10493,7 +10508,7 @@ if(domainVersionId===undefined||domainVersionId===null){throw'Missing the requir
|
|
|
10493
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(){/**
|
|
10494
10509
|
* Languages service.
|
|
10495
10510
|
* @module purecloud-platform-client-v2/api/LanguagesApi
|
|
10496
|
-
* @version
|
|
10511
|
+
* @version 215.0.0
|
|
10497
10512
|
*//**
|
|
10498
10513
|
* Constructs a new LanguagesApi.
|
|
10499
10514
|
* @alias module:purecloud-platform-client-v2/api/LanguagesApi
|
|
@@ -10548,7 +10563,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
10548
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(){/**
|
|
10549
10564
|
* Learning service.
|
|
10550
10565
|
* @module purecloud-platform-client-v2/api/LearningApi
|
|
10551
|
-
* @version
|
|
10566
|
+
* @version 215.0.0
|
|
10552
10567
|
*//**
|
|
10553
10568
|
* Constructs a new LearningApi.
|
|
10554
10569
|
* @alias module:purecloud-platform-client-v2/api/LearningApi
|
|
@@ -10819,7 +10834,7 @@ if(moduleId===undefined||moduleId===null){throw'Missing the required parameter "
|
|
|
10819
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(){/**
|
|
10820
10835
|
* License service.
|
|
10821
10836
|
* @module purecloud-platform-client-v2/api/LicenseApi
|
|
10822
|
-
* @version
|
|
10837
|
+
* @version 215.0.0
|
|
10823
10838
|
*//**
|
|
10824
10839
|
* Constructs a new LicenseApi.
|
|
10825
10840
|
* @alias module:purecloud-platform-client-v2/api/LicenseApi
|
|
@@ -10873,7 +10888,7 @@ if(featureName===undefined||featureName===null){throw'Missing the required param
|
|
|
10873
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(){/**
|
|
10874
10889
|
* Locations service.
|
|
10875
10890
|
* @module purecloud-platform-client-v2/api/LocationsApi
|
|
10876
|
-
* @version
|
|
10891
|
+
* @version 215.0.0
|
|
10877
10892
|
*//**
|
|
10878
10893
|
* Constructs a new LocationsApi.
|
|
10879
10894
|
* @alias module:purecloud-platform-client-v2/api/LocationsApi
|
|
@@ -10932,7 +10947,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
10932
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(){/**
|
|
10933
10948
|
* LogCapture service.
|
|
10934
10949
|
* @module purecloud-platform-client-v2/api/LogCaptureApi
|
|
10935
|
-
* @version
|
|
10950
|
+
* @version 215.0.0
|
|
10936
10951
|
*//**
|
|
10937
10952
|
* Constructs a new LogCaptureApi.
|
|
10938
10953
|
* @alias module:purecloud-platform-client-v2/api/LogCaptureApi
|
|
@@ -10982,7 +10997,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
10982
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(){/**
|
|
10983
10998
|
* Messaging service.
|
|
10984
10999
|
* @module purecloud-platform-client-v2/api/MessagingApi
|
|
10985
|
-
* @version
|
|
11000
|
+
* @version 215.0.0
|
|
10986
11001
|
*//**
|
|
10987
11002
|
* Constructs a new MessagingApi.
|
|
10988
11003
|
* @alias module:purecloud-platform-client-v2/api/MessagingApi
|
|
@@ -11072,7 +11087,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11072
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(){/**
|
|
11073
11088
|
* MobileDevices service.
|
|
11074
11089
|
* @module purecloud-platform-client-v2/api/MobileDevicesApi
|
|
11075
|
-
* @version
|
|
11090
|
+
* @version 215.0.0
|
|
11076
11091
|
*//**
|
|
11077
11092
|
* Constructs a new MobileDevicesApi.
|
|
11078
11093
|
* @alias module:purecloud-platform-client-v2/api/MobileDevicesApi
|
|
@@ -11111,7 +11126,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11111
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(){/**
|
|
11112
11127
|
* Notifications service.
|
|
11113
11128
|
* @module purecloud-platform-client-v2/api/NotificationsApi
|
|
11114
|
-
* @version
|
|
11129
|
+
* @version 215.0.0
|
|
11115
11130
|
*//**
|
|
11116
11131
|
* Constructs a new NotificationsApi.
|
|
11117
11132
|
* @alias module:purecloud-platform-client-v2/api/NotificationsApi
|
|
@@ -11168,7 +11183,7 @@ if(channelId===undefined||channelId===null){throw'Missing the required parameter
|
|
|
11168
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(){/**
|
|
11169
11184
|
* OAuth service.
|
|
11170
11185
|
* @module purecloud-platform-client-v2/api/OAuthApi
|
|
11171
|
-
* @version
|
|
11186
|
+
* @version 215.0.0
|
|
11172
11187
|
*//**
|
|
11173
11188
|
* Constructs a new OAuthApi.
|
|
11174
11189
|
* @alias module:purecloud-platform-client-v2/api/OAuthApi
|
|
@@ -11253,7 +11268,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
11253
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(){/**
|
|
11254
11269
|
* Objects service.
|
|
11255
11270
|
* @module purecloud-platform-client-v2/api/ObjectsApi
|
|
11256
|
-
* @version
|
|
11271
|
+
* @version 215.0.0
|
|
11257
11272
|
*//**
|
|
11258
11273
|
* Constructs a new ObjectsApi.
|
|
11259
11274
|
* @alias module:purecloud-platform-client-v2/api/ObjectsApi
|
|
@@ -11324,7 +11339,7 @@ if(divisionId===undefined||divisionId===null){throw'Missing the required paramet
|
|
|
11324
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(){/**
|
|
11325
11340
|
* OperationalEvents service.
|
|
11326
11341
|
* @module purecloud-platform-client-v2/api/OperationalEventsApi
|
|
11327
|
-
* @version
|
|
11342
|
+
* @version 215.0.0
|
|
11328
11343
|
*//**
|
|
11329
11344
|
* Constructs a new OperationalEventsApi.
|
|
11330
11345
|
* @alias module:purecloud-platform-client-v2/api/OperationalEventsApi
|
|
@@ -11355,7 +11370,7 @@ if(eventDefinitionId===undefined||eventDefinitionId===null){throw'Missing the re
|
|
|
11355
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(){/**
|
|
11356
11371
|
* Organization service.
|
|
11357
11372
|
* @module purecloud-platform-client-v2/api/OrganizationApi
|
|
11358
|
-
* @version
|
|
11373
|
+
* @version 215.0.0
|
|
11359
11374
|
*//**
|
|
11360
11375
|
* Constructs a new OrganizationApi.
|
|
11361
11376
|
* @alias module:purecloud-platform-client-v2/api/OrganizationApi
|
|
@@ -11480,7 +11495,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11480
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(){/**
|
|
11481
11496
|
* OrganizationAuthorization service.
|
|
11482
11497
|
* @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
11483
|
-
* @version
|
|
11498
|
+
* @version 215.0.0
|
|
11484
11499
|
*//**
|
|
11485
11500
|
* Constructs a new OrganizationAuthorizationApi.
|
|
11486
11501
|
* @alias module:purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
@@ -11814,7 +11829,7 @@ if(trustorOrgId===undefined||trustorOrgId===null){throw'Missing the required par
|
|
|
11814
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(){/**
|
|
11815
11830
|
* Outbound service.
|
|
11816
11831
|
* @module purecloud-platform-client-v2/api/OutboundApi
|
|
11817
|
-
* @version
|
|
11832
|
+
* @version 215.0.0
|
|
11818
11833
|
*//**
|
|
11819
11834
|
* Constructs a new OutboundApi.
|
|
11820
11835
|
* @alias module:purecloud-platform-client-v2/api/OutboundApi
|
|
@@ -12925,7 +12940,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
12925
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(){/**
|
|
12926
12941
|
* Presence service.
|
|
12927
12942
|
* @module purecloud-platform-client-v2/api/PresenceApi
|
|
12928
|
-
* @version
|
|
12943
|
+
* @version 215.0.0
|
|
12929
12944
|
*//**
|
|
12930
12945
|
* Constructs a new PresenceApi.
|
|
12931
12946
|
* @alias module:purecloud-platform-client-v2/api/PresenceApi
|
|
@@ -13098,7 +13113,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
13098
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(){/**
|
|
13099
13114
|
* ProcessAutomation service.
|
|
13100
13115
|
* @module purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
13101
|
-
* @version
|
|
13116
|
+
* @version 215.0.0
|
|
13102
13117
|
*//**
|
|
13103
13118
|
* Constructs a new ProcessAutomationApi.
|
|
13104
13119
|
* @alias module:purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
@@ -13161,7 +13176,7 @@ if(triggerId===undefined||triggerId===null){throw'Missing the required parameter
|
|
|
13161
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(){/**
|
|
13162
13177
|
* Quality service.
|
|
13163
13178
|
* @module purecloud-platform-client-v2/api/QualityApi
|
|
13164
|
-
* @version
|
|
13179
|
+
* @version 215.0.0
|
|
13165
13180
|
*//**
|
|
13166
13181
|
* Constructs a new QualityApi.
|
|
13167
13182
|
* @alias module:purecloud-platform-client-v2/api/QualityApi
|
|
@@ -13640,7 +13655,7 @@ if(customerSurveyUrl===undefined||customerSurveyUrl===null){throw'Missing the re
|
|
|
13640
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(){/**
|
|
13641
13656
|
* Recording service.
|
|
13642
13657
|
* @module purecloud-platform-client-v2/api/RecordingApi
|
|
13643
|
-
* @version
|
|
13658
|
+
* @version 215.0.0
|
|
13644
13659
|
*//**
|
|
13645
13660
|
* Constructs a new RecordingApi.
|
|
13646
13661
|
* @alias module:purecloud-platform-client-v2/api/RecordingApi
|
|
@@ -14052,7 +14067,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
14052
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(){/**
|
|
14053
14068
|
* ResponseManagement service.
|
|
14054
14069
|
* @module purecloud-platform-client-v2/api/ResponseManagementApi
|
|
14055
|
-
* @version
|
|
14070
|
+
* @version 215.0.0
|
|
14056
14071
|
*//**
|
|
14057
14072
|
* Constructs a new ResponseManagementApi.
|
|
14058
14073
|
* @alias module:purecloud-platform-client-v2/api/ResponseManagementApi
|
|
@@ -14173,7 +14188,7 @@ if(responseAssetId===undefined||responseAssetId===null){throw'Missing the requir
|
|
|
14173
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(){/**
|
|
14174
14189
|
* Routing service.
|
|
14175
14190
|
* @module purecloud-platform-client-v2/api/RoutingApi
|
|
14176
|
-
* @version
|
|
14191
|
+
* @version 215.0.0
|
|
14177
14192
|
*//**
|
|
14178
14193
|
* Constructs a new RoutingApi.
|
|
14179
14194
|
* @alias module:purecloud-platform-client-v2/api/RoutingApi
|
|
@@ -15172,7 +15187,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
15172
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(){/**
|
|
15173
15188
|
* SCIM service.
|
|
15174
15189
|
* @module purecloud-platform-client-v2/api/SCIMApi
|
|
15175
|
-
* @version
|
|
15190
|
+
* @version 215.0.0
|
|
15176
15191
|
*//**
|
|
15177
15192
|
* Constructs a new SCIMApi.
|
|
15178
15193
|
* @alias module:purecloud-platform-client-v2/api/SCIMApi
|
|
@@ -15397,7 +15412,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
15397
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(){/**
|
|
15398
15413
|
* ScreenRecording service.
|
|
15399
15414
|
* @module purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
15400
|
-
* @version
|
|
15415
|
+
* @version 215.0.0
|
|
15401
15416
|
*//**
|
|
15402
15417
|
* Constructs a new ScreenRecordingApi.
|
|
15403
15418
|
* @alias module:purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
@@ -15412,7 +15427,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15412
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(){/**
|
|
15413
15428
|
* Scripts service.
|
|
15414
15429
|
* @module purecloud-platform-client-v2/api/ScriptsApi
|
|
15415
|
-
* @version
|
|
15430
|
+
* @version 215.0.0
|
|
15416
15431
|
*//**
|
|
15417
15432
|
* Constructs a new ScriptsApi.
|
|
15418
15433
|
* @alias module:purecloud-platform-client-v2/api/ScriptsApi
|
|
@@ -15548,7 +15563,7 @@ if(scriptId===undefined||scriptId===null){throw'Missing the required parameter "
|
|
|
15548
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(){/**
|
|
15549
15564
|
* Search service.
|
|
15550
15565
|
* @module purecloud-platform-client-v2/api/SearchApi
|
|
15551
|
-
* @version
|
|
15566
|
+
* @version 215.0.0
|
|
15552
15567
|
*//**
|
|
15553
15568
|
* Constructs a new SearchApi.
|
|
15554
15569
|
* @alias module:purecloud-platform-client-v2/api/SearchApi
|
|
@@ -15720,7 +15735,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15720
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(){/**
|
|
15721
15736
|
* Settings service.
|
|
15722
15737
|
* @module purecloud-platform-client-v2/api/SettingsApi
|
|
15723
|
-
* @version
|
|
15738
|
+
* @version 215.0.0
|
|
15724
15739
|
*//**
|
|
15725
15740
|
* Constructs a new SettingsApi.
|
|
15726
15741
|
* @alias module:purecloud-platform-client-v2/api/SettingsApi
|
|
@@ -15770,7 +15785,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
|
|
|
15770
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(){/**
|
|
15771
15786
|
* SocialMedia service.
|
|
15772
15787
|
* @module purecloud-platform-client-v2/api/SocialMediaApi
|
|
15773
|
-
* @version
|
|
15788
|
+
* @version 215.0.0
|
|
15774
15789
|
*//**
|
|
15775
15790
|
* Constructs a new SocialMediaApi.
|
|
15776
15791
|
* @alias module:purecloud-platform-client-v2/api/SocialMediaApi
|
|
@@ -16035,7 +16050,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
16035
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(){/**
|
|
16036
16051
|
* SpeechTextAnalytics service.
|
|
16037
16052
|
* @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
16038
|
-
* @version
|
|
16053
|
+
* @version 215.0.0
|
|
16039
16054
|
*//**
|
|
16040
16055
|
* Constructs a new SpeechTextAnalyticsApi.
|
|
16041
16056
|
* @alias module:purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
@@ -16358,7 +16373,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
16358
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(){/**
|
|
16359
16374
|
* Stations service.
|
|
16360
16375
|
* @module purecloud-platform-client-v2/api/StationsApi
|
|
16361
|
-
* @version
|
|
16376
|
+
* @version 215.0.0
|
|
16362
16377
|
*//**
|
|
16363
16378
|
* Constructs a new StationsApi.
|
|
16364
16379
|
* @alias module:purecloud-platform-client-v2/api/StationsApi
|
|
@@ -16390,7 +16405,7 @@ if(stationId===undefined||stationId===null){throw'Missing the required parameter
|
|
|
16390
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(){/**
|
|
16391
16406
|
* Suggest service.
|
|
16392
16407
|
* @module purecloud-platform-client-v2/api/SuggestApi
|
|
16393
|
-
* @version
|
|
16408
|
+
* @version 215.0.0
|
|
16394
16409
|
*//**
|
|
16395
16410
|
* Constructs a new SuggestApi.
|
|
16396
16411
|
* @alias module:purecloud-platform-client-v2/api/SuggestApi
|
|
@@ -16430,7 +16445,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16430
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(){/**
|
|
16431
16446
|
* TaskManagement service.
|
|
16432
16447
|
* @module purecloud-platform-client-v2/api/TaskManagementApi
|
|
16433
|
-
* @version
|
|
16448
|
+
* @version 215.0.0
|
|
16434
16449
|
*//**
|
|
16435
16450
|
* Constructs a new TaskManagementApi.
|
|
16436
16451
|
* @alias module:purecloud-platform-client-v2/api/TaskManagementApi
|
|
@@ -16936,7 +16951,7 @@ if(schemaId===undefined||schemaId===null){throw'Missing the required parameter "
|
|
|
16936
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(){/**
|
|
16937
16952
|
* Teams service.
|
|
16938
16953
|
* @module purecloud-platform-client-v2/api/TeamsApi
|
|
16939
|
-
* @version
|
|
16954
|
+
* @version 215.0.0
|
|
16940
16955
|
*//**
|
|
16941
16956
|
* Constructs a new TeamsApi.
|
|
16942
16957
|
* @alias module:purecloud-platform-client-v2/api/TeamsApi
|
|
@@ -17016,7 +17031,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
17016
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(){/**
|
|
17017
17032
|
* Telephony service.
|
|
17018
17033
|
* @module purecloud-platform-client-v2/api/TelephonyApi
|
|
17019
|
-
* @version
|
|
17034
|
+
* @version 215.0.0
|
|
17020
17035
|
*//**
|
|
17021
17036
|
* Constructs a new TelephonyApi.
|
|
17022
17037
|
* @alias module:purecloud-platform-client-v2/api/TelephonyApi
|
|
@@ -17063,7 +17078,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
17063
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(){/**
|
|
17064
17079
|
* TelephonyProvidersEdge service.
|
|
17065
17080
|
* @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
17066
|
-
* @version
|
|
17081
|
+
* @version 215.0.0
|
|
17067
17082
|
*//**
|
|
17068
17083
|
* Constructs a new TelephonyProvidersEdgeApi.
|
|
17069
17084
|
* @alias module:purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
@@ -17898,7 +17913,7 @@ if(trunkBaseSettingsId===undefined||trunkBaseSettingsId===null){throw'Missing th
|
|
|
17898
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(){/**
|
|
17899
17914
|
* Textbots service.
|
|
17900
17915
|
* @module purecloud-platform-client-v2/api/TextbotsApi
|
|
17901
|
-
* @version
|
|
17916
|
+
* @version 215.0.0
|
|
17902
17917
|
*//**
|
|
17903
17918
|
* Constructs a new TextbotsApi.
|
|
17904
17919
|
* @alias module:purecloud-platform-client-v2/api/TextbotsApi
|
|
@@ -17933,7 +17948,7 @@ if(launchRequest===undefined||launchRequest===null){throw'Missing the required p
|
|
|
17933
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(){/**
|
|
17934
17949
|
* Tokens service.
|
|
17935
17950
|
* @module purecloud-platform-client-v2/api/TokensApi
|
|
17936
|
-
* @version
|
|
17951
|
+
* @version 215.0.0
|
|
17937
17952
|
*//**
|
|
17938
17953
|
* Constructs a new TokensApi.
|
|
17939
17954
|
* @alias module:purecloud-platform-client-v2/api/TokensApi
|
|
@@ -17967,7 +17982,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
17967
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(){/**
|
|
17968
17983
|
* Uploads service.
|
|
17969
17984
|
* @module purecloud-platform-client-v2/api/UploadsApi
|
|
17970
|
-
* @version
|
|
17985
|
+
* @version 215.0.0
|
|
17971
17986
|
*//**
|
|
17972
17987
|
* Constructs a new UploadsApi.
|
|
17973
17988
|
* @alias module:purecloud-platform-client-v2/api/UploadsApi
|
|
@@ -18032,7 +18047,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18032
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(){/**
|
|
18033
18048
|
* Usage service.
|
|
18034
18049
|
* @module purecloud-platform-client-v2/api/UsageApi
|
|
18035
|
-
* @version
|
|
18050
|
+
* @version 215.0.0
|
|
18036
18051
|
*//**
|
|
18037
18052
|
* Constructs a new UsageApi.
|
|
18038
18053
|
* @alias module:purecloud-platform-client-v2/api/UsageApi
|
|
@@ -18086,7 +18101,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18086
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(){/**
|
|
18087
18102
|
* UserRecordings service.
|
|
18088
18103
|
* @module purecloud-platform-client-v2/api/UserRecordingsApi
|
|
18089
|
-
* @version
|
|
18104
|
+
* @version 215.0.0
|
|
18090
18105
|
*//**
|
|
18091
18106
|
* Constructs a new UserRecordingsApi.
|
|
18092
18107
|
* @alias module:purecloud-platform-client-v2/api/UserRecordingsApi
|
|
@@ -18143,7 +18158,7 @@ if(recordingId===undefined||recordingId===null){throw'Missing the required param
|
|
|
18143
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(){/**
|
|
18144
18159
|
* Users service.
|
|
18145
18160
|
* @module purecloud-platform-client-v2/api/UsersApi
|
|
18146
|
-
* @version
|
|
18161
|
+
* @version 215.0.0
|
|
18147
18162
|
*//**
|
|
18148
18163
|
* Constructs a new UsersApi.
|
|
18149
18164
|
* @alias module:purecloud-platform-client-v2/api/UsersApi
|
|
@@ -18870,7 +18885,7 @@ if(verifierId===undefined||verifierId===null){throw'Missing the required paramet
|
|
|
18870
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(){/**
|
|
18871
18886
|
* Utilities service.
|
|
18872
18887
|
* @module purecloud-platform-client-v2/api/UtilitiesApi
|
|
18873
|
-
* @version
|
|
18888
|
+
* @version 215.0.0
|
|
18874
18889
|
*//**
|
|
18875
18890
|
* Constructs a new UtilitiesApi.
|
|
18876
18891
|
* @alias module:purecloud-platform-client-v2/api/UtilitiesApi
|
|
@@ -18897,7 +18912,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18897
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(){/**
|
|
18898
18913
|
* Voicemail service.
|
|
18899
18914
|
* @module purecloud-platform-client-v2/api/VoicemailApi
|
|
18900
|
-
* @version
|
|
18915
|
+
* @version 215.0.0
|
|
18901
18916
|
*//**
|
|
18902
18917
|
* Constructs a new VoicemailApi.
|
|
18903
18918
|
* @alias module:purecloud-platform-client-v2/api/VoicemailApi
|
|
@@ -19059,7 +19074,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
19059
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(){/**
|
|
19060
19075
|
* WebChat service.
|
|
19061
19076
|
* @module purecloud-platform-client-v2/api/WebChatApi
|
|
19062
|
-
* @version
|
|
19077
|
+
* @version 215.0.0
|
|
19063
19078
|
*//**
|
|
19064
19079
|
* Constructs a new WebChatApi.
|
|
19065
19080
|
* @alias module:purecloud-platform-client-v2/api/WebChatApi
|
|
@@ -19194,7 +19209,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
19194
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(){/**
|
|
19195
19210
|
* WebDeployments service.
|
|
19196
19211
|
* @module purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
19197
|
-
* @version
|
|
19212
|
+
* @version 215.0.0
|
|
19198
19213
|
*//**
|
|
19199
19214
|
* Constructs a new WebDeploymentsApi.
|
|
19200
19215
|
* @alias module:purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
@@ -19315,7 +19330,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
19315
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(){/**
|
|
19316
19331
|
* WebMessaging service.
|
|
19317
19332
|
* @module purecloud-platform-client-v2/api/WebMessagingApi
|
|
19318
|
-
* @version
|
|
19333
|
+
* @version 215.0.0
|
|
19319
19334
|
*//**
|
|
19320
19335
|
* Constructs a new WebMessagingApi.
|
|
19321
19336
|
* @alias module:purecloud-platform-client-v2/api/WebMessagingApi
|
|
@@ -19331,7 +19346,7 @@ if(deployment===undefined||deployment===null){throw'Missing the required paramet
|
|
|
19331
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(){/**
|
|
19332
19347
|
* Widgets service.
|
|
19333
19348
|
* @module purecloud-platform-client-v2/api/WidgetsApi
|
|
19334
|
-
* @version
|
|
19349
|
+
* @version 215.0.0
|
|
19335
19350
|
*//**
|
|
19336
19351
|
* Constructs a new WidgetsApi.
|
|
19337
19352
|
* @alias module:purecloud-platform-client-v2/api/WidgetsApi
|
|
@@ -19366,7 +19381,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
19366
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(){/**
|
|
19367
19382
|
* WorkforceManagement service.
|
|
19368
19383
|
* @module purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
19369
|
-
* @version
|
|
19384
|
+
* @version 215.0.0
|
|
19370
19385
|
*//**
|
|
19371
19386
|
* Constructs a new WorkforceManagementApi.
|
|
19372
19387
|
* @alias module:purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
@@ -21172,7 +21187,7 @@ if(timeOffLimitId===undefined||timeOffLimitId===null){throw'Missing the required
|
|
|
21172
21187
|
* </pre>
|
|
21173
21188
|
* </p>
|
|
21174
21189
|
* @module purecloud-platform-client-v2/index
|
|
21175
|
-
* @version
|
|
21190
|
+
* @version 215.0.0
|
|
21176
21191
|
*/var platformClient=/*#__PURE__*/_createClass(function platformClient(){_classCallCheck(this,platformClient);/**
|
|
21177
21192
|
* The ApiClient constructor.
|
|
21178
21193
|
* @property {module:purecloud-platform-client-v2/ApiClient}
|