purecloud-platform-client-v2 214.0.0 → 216.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 +649 -118
- package/dist/web-amd/purecloud-platform-client-v2.js +649 -118
- package/dist/web-amd/purecloud-platform-client-v2.min.js +1 -1
- package/dist/web-cjs/bundle.js +272 -150
- package/dist/web-cjs/purecloud-platform-client-v2.js +283 -158
- package/dist/web-cjs/purecloud-platform-client-v2.min.js +1 -1
- package/index.d.ts +490 -255
- 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 -2
- 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 +379 -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 +9 -4
- 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 +21 -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 -31
- 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 +3 -3
- 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 +70 -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 216.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 216.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 216.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 216.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 216.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 216.0.0
|
|
1545
1560
|
*//**
|
|
1546
1561
|
* Constructs a new AnalyticsApi.
|
|
1547
1562
|
* @alias module:purecloud-platform-client-v2/api/AnalyticsApi
|
|
@@ -2128,7 +2143,6 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
2128
2143
|
* Query for summary aggregates
|
|
2129
2144
|
*
|
|
2130
2145
|
* @param {Object} body query
|
|
2131
|
-
* postAnalyticsSummariesAggregatesQuery is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
2132
2146
|
*/},{key:"postAnalyticsSummariesAggregatesQuery",value:function postAnalyticsSummariesAggregatesQuery(body){// verify the required parameter 'body' is set
|
|
2133
2147
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAnalyticsSummariesAggregatesQuery';}return this.apiClient.callApi('/api/v2/analytics/summaries/aggregates/query','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
2134
2148
|
* Query for survey aggregates asynchronously
|
|
@@ -2213,7 +2227,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
2213
2227
|
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
2228
|
* Architect service.
|
|
2215
2229
|
* @module purecloud-platform-client-v2/api/ArchitectApi
|
|
2216
|
-
* @version
|
|
2230
|
+
* @version 216.0.0
|
|
2217
2231
|
*//**
|
|
2218
2232
|
* Constructs a new ArchitectApi.
|
|
2219
2233
|
* @alias module:purecloud-platform-client-v2/api/ArchitectApi
|
|
@@ -3305,7 +3319,7 @@ if(milestoneId===undefined||milestoneId===null){throw'Missing the required param
|
|
|
3305
3319
|
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
3320
|
* Audit service.
|
|
3307
3321
|
* @module purecloud-platform-client-v2/api/AuditApi
|
|
3308
|
-
* @version
|
|
3322
|
+
* @version 216.0.0
|
|
3309
3323
|
*//**
|
|
3310
3324
|
* Constructs a new AuditApi.
|
|
3311
3325
|
* @alias module:purecloud-platform-client-v2/api/AuditApi
|
|
@@ -3355,7 +3369,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3355
3369
|
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
3370
|
* Authorization service.
|
|
3357
3371
|
* @module purecloud-platform-client-v2/api/AuthorizationApi
|
|
3358
|
-
* @version
|
|
3372
|
+
* @version 216.0.0
|
|
3359
3373
|
*//**
|
|
3360
3374
|
* Constructs a new AuthorizationApi.
|
|
3361
3375
|
* @alias module:purecloud-platform-client-v2/api/AuthorizationApi
|
|
@@ -3370,6 +3384,14 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3370
3384
|
* @param {Boolean} opts.force Force delete this division as well as the grants and objects associated with it (default to false)
|
|
3371
3385
|
*/return _createClass(AuthorizationApi,[{key:"deleteAuthorizationDivision",value:function deleteAuthorizationDivision(divisionId,opts){opts=opts||{};// verify the required parameter 'divisionId' is set
|
|
3372
3386
|
if(divisionId===undefined||divisionId===null){throw'Missing the required parameter "divisionId" when calling deleteAuthorizationDivision';}return this.apiClient.callApi('/api/v2/authorization/divisions/{divisionId}','DELETE',{'divisionId':divisionId},{'force':opts['force']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3387
|
+
* Delete an access control policy
|
|
3388
|
+
*
|
|
3389
|
+
* @param {String} targetName The domain:entity:action target to which the policy is applied
|
|
3390
|
+
* @param {String} subjectId The ID of the subject to which the policy is applied
|
|
3391
|
+
* deleteAuthorizationPoliciesTargetSubjectSubjectId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3392
|
+
*/},{key:"deleteAuthorizationPoliciesTargetSubjectSubjectId",value:function deleteAuthorizationPoliciesTargetSubjectSubjectId(targetName,subjectId){// verify the required parameter 'targetName' is set
|
|
3393
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling deleteAuthorizationPoliciesTargetSubjectSubjectId';}// verify the required parameter 'subjectId' is set
|
|
3394
|
+
if(subjectId===undefined||subjectId===null){throw'Missing the required parameter "subjectId" when calling deleteAuthorizationPoliciesTargetSubjectSubjectId';}return this.apiClient.callApi('/api/v2/authorization/policies/targets/{targetName}/subject/{subjectId}','DELETE',{'targetName':targetName,'subjectId':subjectId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3373
3395
|
* Delete an organization role.
|
|
3374
3396
|
*
|
|
3375
3397
|
* @param {String} roleId Role ID
|
|
@@ -3453,6 +3475,55 @@ if(permission===undefined||permission===null){throw'Missing the required paramet
|
|
|
3453
3475
|
* @param {Object} opts.queryType Query filter type
|
|
3454
3476
|
* @param {String} opts.query Comma-separated list of permissions or domains to query
|
|
3455
3477
|
*/},{key:"getAuthorizationPermissions",value:function getAuthorizationPermissions(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/authorization/permissions','GET',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber'],'queryType':opts['queryType'],'query':opts['query']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3478
|
+
* Get a page of access policies for an organization
|
|
3479
|
+
*
|
|
3480
|
+
* @param {Object} opts Optional parameters
|
|
3481
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
3482
|
+
* @param {Number} opts.pageSize Number of entities to return. Maximum of 200. (default to 25)
|
|
3483
|
+
* getAuthorizationPolicies is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3484
|
+
*/},{key:"getAuthorizationPolicies",value:function getAuthorizationPolicies(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/authorization/policies','GET',{},{'after':opts['after'],'pageSize':opts['pageSize']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3485
|
+
* Get a page of access policies for a given subject
|
|
3486
|
+
*
|
|
3487
|
+
* @param {String} subjectId The ID of the subject to which policies are applied
|
|
3488
|
+
* @param {Object} opts Optional parameters
|
|
3489
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
3490
|
+
* @param {Number} opts.pageSize Number of entities to return. Maximum of 200. (default to 25)
|
|
3491
|
+
* getAuthorizationPoliciesSubjectSubjectId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3492
|
+
*/},{key:"getAuthorizationPoliciesSubjectSubjectId",value:function getAuthorizationPoliciesSubjectSubjectId(subjectId,opts){opts=opts||{};// verify the required parameter 'subjectId' is set
|
|
3493
|
+
if(subjectId===undefined||subjectId===null){throw'Missing the required parameter "subjectId" when calling getAuthorizationPoliciesSubjectSubjectId';}return this.apiClient.callApi('/api/v2/authorization/policies/subject/{subjectId}','GET',{'subjectId':subjectId},{'after':opts['after'],'pageSize':opts['pageSize']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3494
|
+
* Get a page of access policies for a given policy target
|
|
3495
|
+
*
|
|
3496
|
+
* @param {String} targetName The domain:entity:action resource target to which policies are applied
|
|
3497
|
+
* @param {Object} opts Optional parameters
|
|
3498
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
3499
|
+
* @param {Number} opts.pageSize Number of entities to return. Maximum of 200. (default to 25)
|
|
3500
|
+
* getAuthorizationPoliciesTarget is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3501
|
+
*/},{key:"getAuthorizationPoliciesTarget",value:function getAuthorizationPoliciesTarget(targetName,opts){opts=opts||{};// verify the required parameter 'targetName' is set
|
|
3502
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling getAuthorizationPoliciesTarget';}return this.apiClient.callApi('/api/v2/authorization/policies/targets/{targetName}','GET',{'targetName':targetName},{'after':opts['after'],'pageSize':opts['pageSize']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3503
|
+
* Get an access control policy for a specified resource target and subject
|
|
3504
|
+
*
|
|
3505
|
+
* @param {String} targetName The domain:entity:action resource target to which the policy is applied
|
|
3506
|
+
* @param {String} subjectId The ID of the subject to which the policy is applied
|
|
3507
|
+
* getAuthorizationPoliciesTargetSubjectSubjectId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3508
|
+
*/},{key:"getAuthorizationPoliciesTargetSubjectSubjectId",value:function getAuthorizationPoliciesTargetSubjectSubjectId(targetName,subjectId){// verify the required parameter 'targetName' is set
|
|
3509
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling getAuthorizationPoliciesTargetSubjectSubjectId';}// verify the required parameter 'subjectId' is set
|
|
3510
|
+
if(subjectId===undefined||subjectId===null){throw'Missing the required parameter "subjectId" when calling getAuthorizationPoliciesTargetSubjectSubjectId';}return this.apiClient.callApi('/api/v2/authorization/policies/targets/{targetName}/subject/{subjectId}','GET',{'targetName':targetName,'subjectId':subjectId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3511
|
+
* Get a map of policy targets to valid attributes for those targets
|
|
3512
|
+
*
|
|
3513
|
+
* getAuthorizationPoliciesTargets is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3514
|
+
*/},{key:"getAuthorizationPoliciesTargets",value:function getAuthorizationPoliciesTargets(){return this.apiClient.callApi('/api/v2/authorization/policies/targets','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3515
|
+
* Get an access control policy with the specified policy ID
|
|
3516
|
+
*
|
|
3517
|
+
* @param {String} policyId The ID of the policy to retrieve
|
|
3518
|
+
* getAuthorizationPolicy is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3519
|
+
*/},{key:"getAuthorizationPolicy",value:function getAuthorizationPolicy(policyId){// verify the required parameter 'policyId' is set
|
|
3520
|
+
if(policyId===undefined||policyId===null){throw'Missing the required parameter "policyId" when calling getAuthorizationPolicy';}return this.apiClient.callApi('/api/v2/authorization/policies/{policyId}','GET',{'policyId':policyId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3521
|
+
* Get the list of attributes used to evaluate an access control policy with the specified policy ID
|
|
3522
|
+
*
|
|
3523
|
+
* @param {String} policyId The ID of the policy to retrieve attributes
|
|
3524
|
+
* getAuthorizationPolicyAttributes is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3525
|
+
*/},{key:"getAuthorizationPolicyAttributes",value:function getAuthorizationPolicyAttributes(policyId){// verify the required parameter 'policyId' is set
|
|
3526
|
+
if(policyId===undefined||policyId===null){throw'Missing the required parameter "policyId" when calling getAuthorizationPolicyAttributes';}return this.apiClient.callApi('/api/v2/authorization/policies/{policyId}/attributes','GET',{'policyId':policyId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3456
3527
|
* Get the list of enabled products
|
|
3457
3528
|
* Gets the list of enabled products. Some example product names are: collaborateFree, collaboratePro, communicate, and engage.
|
|
3458
3529
|
*/},{key:"getAuthorizationProducts",value:function getAuthorizationProducts(){return this.apiClient.callApi('/api/v2/authorization/products','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -3567,6 +3638,30 @@ if(divisionId===undefined||divisionId===null){throw'Missing the required paramet
|
|
|
3567
3638
|
* @param {Object} body Division
|
|
3568
3639
|
*/},{key:"postAuthorizationDivisions",value:function postAuthorizationDivisions(body){// verify the required parameter 'body' is set
|
|
3569
3640
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAuthorizationDivisions';}return this.apiClient.callApi('/api/v2/authorization/divisions','POST',{},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3641
|
+
* Add an access control policy for a specified resource target and subject
|
|
3642
|
+
*
|
|
3643
|
+
* @param {String} targetName The domain:entity:action target to which the policy will be applied
|
|
3644
|
+
* @param {Object} body Access control policy
|
|
3645
|
+
* postAuthorizationPoliciesTarget is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3646
|
+
*/},{key:"postAuthorizationPoliciesTarget",value:function postAuthorizationPoliciesTarget(targetName,body){// verify the required parameter 'targetName' is set
|
|
3647
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling postAuthorizationPoliciesTarget';}// verify the required parameter 'body' is set
|
|
3648
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAuthorizationPoliciesTarget';}return this.apiClient.callApi('/api/v2/authorization/policies/targets/{targetName}','POST',{'targetName':targetName},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3649
|
+
* Validate the conditions and attributes of an access control policy for a specified resource target
|
|
3650
|
+
*
|
|
3651
|
+
* @param {String} targetName The domain:entity:action target to which the policy will be applied
|
|
3652
|
+
* @param {Object} body Access control policy
|
|
3653
|
+
* postAuthorizationPoliciesTargetValidate is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3654
|
+
*/},{key:"postAuthorizationPoliciesTargetValidate",value:function postAuthorizationPoliciesTargetValidate(targetName,body){// verify the required parameter 'targetName' is set
|
|
3655
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling postAuthorizationPoliciesTargetValidate';}// verify the required parameter 'body' is set
|
|
3656
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAuthorizationPoliciesTargetValidate';}return this.apiClient.callApi('/api/v2/authorization/policies/targets/{targetName}/validate','POST',{'targetName':targetName},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3657
|
+
* Simulate a request and evaluate the specified policy ID against the provided values
|
|
3658
|
+
*
|
|
3659
|
+
* @param {String} policyId The ID of the policy to test the simulated data against
|
|
3660
|
+
* @param {Object} body A map of attribute names to type and simulated data value
|
|
3661
|
+
* postAuthorizationPolicySimulate is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3662
|
+
*/},{key:"postAuthorizationPolicySimulate",value:function postAuthorizationPolicySimulate(policyId,body){// verify the required parameter 'policyId' is set
|
|
3663
|
+
if(policyId===undefined||policyId===null){throw'Missing the required parameter "policyId" when calling postAuthorizationPolicySimulate';}// verify the required parameter 'body' is set
|
|
3664
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling postAuthorizationPolicySimulate';}return this.apiClient.callApi('/api/v2/authorization/policies/{policyId}/simulate','POST',{'policyId':policyId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3570
3665
|
* Bulk-grant subjects and divisions with an organization role.
|
|
3571
3666
|
*
|
|
3572
3667
|
* @param {String} roleId Role ID
|
|
@@ -3638,6 +3733,22 @@ if(roleId===undefined||roleId===null){throw'Missing the required parameter "role
|
|
|
3638
3733
|
*/},{key:"putAuthorizationDivision",value:function putAuthorizationDivision(divisionId,body){// verify the required parameter 'divisionId' is set
|
|
3639
3734
|
if(divisionId===undefined||divisionId===null){throw'Missing the required parameter "divisionId" when calling putAuthorizationDivision';}// verify the required parameter 'body' is set
|
|
3640
3735
|
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']);}/**
|
|
3736
|
+
* Add an access control policy for a specified resource target and subject, overwriting any existing policy
|
|
3737
|
+
*
|
|
3738
|
+
* @param {String} targetName The domain:entity:action target to which the policy will be applied
|
|
3739
|
+
* @param {Object} body Access control policy
|
|
3740
|
+
* putAuthorizationPoliciesTarget is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3741
|
+
*/},{key:"putAuthorizationPoliciesTarget",value:function putAuthorizationPoliciesTarget(targetName,body){// verify the required parameter 'targetName' is set
|
|
3742
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling putAuthorizationPoliciesTarget';}// verify the required parameter 'body' is set
|
|
3743
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAuthorizationPoliciesTarget';}return this.apiClient.callApi('/api/v2/authorization/policies/targets/{targetName}','PUT',{'targetName':targetName},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3744
|
+
* Update an access control policy with a given ID
|
|
3745
|
+
*
|
|
3746
|
+
* @param {String} policyId The ID of the policy to update
|
|
3747
|
+
* @param {Object} body Access control policy
|
|
3748
|
+
* putAuthorizationPolicy is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
3749
|
+
*/},{key:"putAuthorizationPolicy",value:function putAuthorizationPolicy(policyId,body){// verify the required parameter 'policyId' is set
|
|
3750
|
+
if(policyId===undefined||policyId===null){throw'Missing the required parameter "policyId" when calling putAuthorizationPolicy';}// verify the required parameter 'body' is set
|
|
3751
|
+
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling putAuthorizationPolicy';}return this.apiClient.callApi('/api/v2/authorization/policies/{policyId}','PUT',{'policyId':policyId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
3641
3752
|
* Update an organization role.
|
|
3642
3753
|
* Update
|
|
3643
3754
|
* @param {String} roleId Role ID
|
|
@@ -3678,7 +3789,7 @@ if(subjectId===undefined||subjectId===null){throw'Missing the required parameter
|
|
|
3678
3789
|
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
3790
|
* Billing service.
|
|
3680
3791
|
* @module purecloud-platform-client-v2/api/BillingApi
|
|
3681
|
-
* @version
|
|
3792
|
+
* @version 216.0.0
|
|
3682
3793
|
*//**
|
|
3683
3794
|
* Constructs a new BillingApi.
|
|
3684
3795
|
* @alias module:purecloud-platform-client-v2/api/BillingApi
|
|
@@ -3702,7 +3813,7 @@ if(endDate===undefined||endDate===null){throw'Missing the required parameter "en
|
|
|
3702
3813
|
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
3814
|
* CarrierServices service.
|
|
3704
3815
|
* @module purecloud-platform-client-v2/api/CarrierServicesApi
|
|
3705
|
-
* @version
|
|
3816
|
+
* @version 216.0.0
|
|
3706
3817
|
*//**
|
|
3707
3818
|
* Constructs a new CarrierServicesApi.
|
|
3708
3819
|
* @alias module:purecloud-platform-client-v2/api/CarrierServicesApi
|
|
@@ -3722,7 +3833,7 @@ if(phoneNumber===undefined||phoneNumber===null){throw'Missing the required param
|
|
|
3722
3833
|
*/},{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
3834
|
* Chat service.
|
|
3724
3835
|
* @module purecloud-platform-client-v2/api/ChatApi
|
|
3725
|
-
* @version
|
|
3836
|
+
* @version 216.0.0
|
|
3726
3837
|
*//**
|
|
3727
3838
|
* Constructs a new ChatApi.
|
|
3728
3839
|
* @alias module:purecloud-platform-client-v2/api/ChatApi
|
|
@@ -3947,7 +4058,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
3947
4058
|
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
4059
|
* Coaching service.
|
|
3949
4060
|
* @module purecloud-platform-client-v2/api/CoachingApi
|
|
3950
|
-
* @version
|
|
4061
|
+
* @version 216.0.0
|
|
3951
4062
|
*//**
|
|
3952
4063
|
* Constructs a new CoachingApi.
|
|
3953
4064
|
* @alias module:purecloud-platform-client-v2/api/CoachingApi
|
|
@@ -4100,7 +4211,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
4100
4211
|
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
4212
|
* ContentManagement service.
|
|
4102
4213
|
* @module purecloud-platform-client-v2/api/ContentManagementApi
|
|
4103
|
-
* @version
|
|
4214
|
+
* @version 216.0.0
|
|
4104
4215
|
*//**
|
|
4105
4216
|
* Constructs a new ContentManagementApi.
|
|
4106
4217
|
* @alias module:purecloud-platform-client-v2/api/ContentManagementApi
|
|
@@ -4382,7 +4493,7 @@ if(tagId===undefined||tagId===null){throw'Missing the required parameter "tagId"
|
|
|
4382
4493
|
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
4494
|
* Conversations service.
|
|
4384
4495
|
* @module purecloud-platform-client-v2/api/ConversationsApi
|
|
4385
|
-
* @version
|
|
4496
|
+
* @version 216.0.0
|
|
4386
4497
|
*//**
|
|
4387
4498
|
* Constructs a new ConversationsApi.
|
|
4388
4499
|
* @alias module:purecloud-platform-client-v2/api/ConversationsApi
|
|
@@ -6129,7 +6240,7 @@ if(conversationId===undefined||conversationId===null){throw'Missing the required
|
|
|
6129
6240
|
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
6241
|
* DataExtensions service.
|
|
6131
6242
|
* @module purecloud-platform-client-v2/api/DataExtensionsApi
|
|
6132
|
-
* @version
|
|
6243
|
+
* @version 216.0.0
|
|
6133
6244
|
*//**
|
|
6134
6245
|
* Constructs a new DataExtensionsApi.
|
|
6135
6246
|
* @alias module:purecloud-platform-client-v2/api/DataExtensionsApi
|
|
@@ -6150,7 +6261,7 @@ if(coretypeName===undefined||coretypeName===null){throw'Missing the required par
|
|
|
6150
6261
|
*/},{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
6262
|
* DataPrivacy service.
|
|
6152
6263
|
* @module purecloud-platform-client-v2/api/DataPrivacyApi
|
|
6153
|
-
* @version
|
|
6264
|
+
* @version 216.0.0
|
|
6154
6265
|
*//**
|
|
6155
6266
|
* Constructs a new DataPrivacyApi.
|
|
6156
6267
|
* @alias module:purecloud-platform-client-v2/api/DataPrivacyApi
|
|
@@ -6190,7 +6301,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6190
6301
|
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
6302
|
* Downloads service.
|
|
6192
6303
|
* @module purecloud-platform-client-v2/api/DownloadsApi
|
|
6193
|
-
* @version
|
|
6304
|
+
* @version 216.0.0
|
|
6194
6305
|
*//**
|
|
6195
6306
|
* Constructs a new DownloadsApi.
|
|
6196
6307
|
* @alias module:purecloud-platform-client-v2/api/DownloadsApi
|
|
@@ -6209,7 +6320,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6209
6320
|
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
6321
|
* Emails service.
|
|
6211
6322
|
* @module purecloud-platform-client-v2/api/EmailsApi
|
|
6212
|
-
* @version
|
|
6323
|
+
* @version 216.0.0
|
|
6213
6324
|
*//**
|
|
6214
6325
|
* Constructs a new EmailsApi.
|
|
6215
6326
|
* @alias module:purecloud-platform-client-v2/api/EmailsApi
|
|
@@ -6227,7 +6338,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
6227
6338
|
*/},{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
6339
|
* EmployeeEngagement service.
|
|
6229
6340
|
* @module purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
6230
|
-
* @version
|
|
6341
|
+
* @version 216.0.0
|
|
6231
6342
|
*//**
|
|
6232
6343
|
* Constructs a new EmployeeEngagementApi.
|
|
6233
6344
|
* @alias module:purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
@@ -6265,7 +6376,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6265
6376
|
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
6377
|
* Events service.
|
|
6267
6378
|
* @module purecloud-platform-client-v2/api/EventsApi
|
|
6268
|
-
* @version
|
|
6379
|
+
* @version 216.0.0
|
|
6269
6380
|
*//**
|
|
6270
6381
|
* Constructs a new EventsApi.
|
|
6271
6382
|
* @alias module:purecloud-platform-client-v2/api/EventsApi
|
|
@@ -6290,7 +6401,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6290
6401
|
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
6402
|
* ExternalContacts service.
|
|
6292
6403
|
* @module purecloud-platform-client-v2/api/ExternalContactsApi
|
|
6293
|
-
* @version
|
|
6404
|
+
* @version 216.0.0
|
|
6294
6405
|
*//**
|
|
6295
6406
|
* Constructs a new ExternalContactsApi.
|
|
6296
6407
|
* @alias module:purecloud-platform-client-v2/api/ExternalContactsApi
|
|
@@ -6466,16 +6577,19 @@ if(uploadId===undefined||uploadId===null){throw'Missing the required parameter "
|
|
|
6466
6577
|
* Get job based on id
|
|
6467
6578
|
*
|
|
6468
6579
|
* @param {String} jobId Job id
|
|
6469
|
-
|
|
6470
|
-
|
|
6580
|
+
* @param {Object} opts Optional parameters
|
|
6581
|
+
* @param {Array.<String>} opts.expand which fields, if any, to expand
|
|
6582
|
+
*/},{key:"getExternalcontactsImportJob",value:function getExternalcontactsImportJob(jobId,opts){opts=opts||{};// verify the required parameter 'jobId' is set
|
|
6583
|
+
if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getExternalcontactsImportJob';}return this.apiClient.callApi('/api/v2/externalcontacts/import/jobs/{jobId}','GET',{'jobId':jobId},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi')},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
6471
6584
|
* List jobs for organization
|
|
6472
6585
|
*
|
|
6473
6586
|
* @param {Object} opts Optional parameters
|
|
6587
|
+
* @param {Array.<String>} opts.expand which fields, if any, to expand
|
|
6474
6588
|
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
6475
6589
|
* @param {String} opts.pageSize Number of entities to return. Maximum of 100. (default to 25)
|
|
6476
6590
|
* @param {Object} opts.sortOrder Direction of sorting. (default to Ascending)
|
|
6477
6591
|
* @param {Object} opts.jobStatus Search term to filter by jobStatus
|
|
6478
|
-
*/},{key:"getExternalcontactsImportJobs",value:function getExternalcontactsImportJobs(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/externalcontacts/import/jobs','GET',{},{'after':opts['after'],'pageSize':opts['pageSize'],'sortOrder':opts['sortOrder'],'jobStatus':opts['jobStatus']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
6592
|
+
*/},{key:"getExternalcontactsImportJobs",value:function getExternalcontactsImportJobs(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/externalcontacts/import/jobs','GET',{},{'expand':this.apiClient.buildCollectionParam(opts['expand'],'multi'),'after':opts['after'],'pageSize':opts['pageSize'],'sortOrder':opts['sortOrder'],'jobStatus':opts['jobStatus']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
6479
6593
|
* Get setting based on id
|
|
6480
6594
|
*
|
|
6481
6595
|
* @param {String} settingsId Settings id
|
|
@@ -6882,7 +6996,7 @@ if(relationshipId===undefined||relationshipId===null){throw'Missing the required
|
|
|
6882
6996
|
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
6997
|
* Fax service.
|
|
6884
6998
|
* @module purecloud-platform-client-v2/api/FaxApi
|
|
6885
|
-
* @version
|
|
6999
|
+
* @version 216.0.0
|
|
6886
7000
|
*//**
|
|
6887
7001
|
* Constructs a new FaxApi.
|
|
6888
7002
|
* @alias module:purecloud-platform-client-v2/api/FaxApi
|
|
@@ -6931,7 +7045,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6931
7045
|
*/},{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
7046
|
* Flows service.
|
|
6933
7047
|
* @module purecloud-platform-client-v2/api/FlowsApi
|
|
6934
|
-
* @version
|
|
7048
|
+
* @version 216.0.0
|
|
6935
7049
|
*//**
|
|
6936
7050
|
* Constructs a new FlowsApi.
|
|
6937
7051
|
* @alias module:purecloud-platform-client-v2/api/FlowsApi
|
|
@@ -6979,7 +7093,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
6979
7093
|
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
7094
|
* Gamification service.
|
|
6981
7095
|
* @module purecloud-platform-client-v2/api/GamificationApi
|
|
6982
|
-
* @version
|
|
7096
|
+
* @version 216.0.0
|
|
6983
7097
|
*//**
|
|
6984
7098
|
* Constructs a new GamificationApi.
|
|
6985
7099
|
* @alias module:purecloud-platform-client-v2/api/GamificationApi
|
|
@@ -7538,7 +7652,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
7538
7652
|
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
7653
|
* GeneralDataProtectionRegulation service.
|
|
7540
7654
|
* @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
7541
|
-
* @version
|
|
7655
|
+
* @version 216.0.0
|
|
7542
7656
|
*//**
|
|
7543
7657
|
* Constructs a new GeneralDataProtectionRegulationApi.
|
|
7544
7658
|
* @alias module:purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
@@ -7573,7 +7687,7 @@ if(searchValue===undefined||searchValue===null){throw'Missing the required param
|
|
|
7573
7687
|
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
7688
|
* Geolocation service.
|
|
7575
7689
|
* @module purecloud-platform-client-v2/api/GeolocationApi
|
|
7576
|
-
* @version
|
|
7690
|
+
* @version 216.0.0
|
|
7577
7691
|
*//**
|
|
7578
7692
|
* Constructs a new GeolocationApi.
|
|
7579
7693
|
* @alias module:purecloud-platform-client-v2/api/GeolocationApi
|
|
@@ -7607,7 +7721,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
7607
7721
|
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
7722
|
* Greetings service.
|
|
7609
7723
|
* @module purecloud-platform-client-v2/api/GreetingsApi
|
|
7610
|
-
* @version
|
|
7724
|
+
* @version 216.0.0
|
|
7611
7725
|
*//**
|
|
7612
7726
|
* Constructs a new GreetingsApi.
|
|
7613
7727
|
* @alias module:purecloud-platform-client-v2/api/GreetingsApi
|
|
@@ -7714,7 +7828,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
7714
7828
|
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
7829
|
* Groups service.
|
|
7716
7830
|
* @module purecloud-platform-client-v2/api/GroupsApi
|
|
7717
|
-
* @version
|
|
7831
|
+
* @version 216.0.0
|
|
7718
7832
|
*//**
|
|
7719
7833
|
* Constructs a new GroupsApi.
|
|
7720
7834
|
* @alias module:purecloud-platform-client-v2/api/GroupsApi
|
|
@@ -7847,7 +7961,7 @@ if(groupId===undefined||groupId===null){throw'Missing the required parameter "gr
|
|
|
7847
7961
|
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
7962
|
* IdentityProvider service.
|
|
7849
7963
|
* @module purecloud-platform-client-v2/api/IdentityProviderApi
|
|
7850
|
-
* @version
|
|
7964
|
+
* @version 216.0.0
|
|
7851
7965
|
*//**
|
|
7852
7966
|
* Constructs a new IdentityProviderApi.
|
|
7853
7967
|
* @alias module:purecloud-platform-client-v2/api/IdentityProviderApi
|
|
@@ -8003,7 +8117,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
8003
8117
|
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
8118
|
* InfrastructureAsCode service.
|
|
8005
8119
|
* @module purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
8006
|
-
* @version
|
|
8120
|
+
* @version 216.0.0
|
|
8007
8121
|
*//**
|
|
8008
8122
|
* Constructs a new InfrastructureAsCodeApi.
|
|
8009
8123
|
* @alias module:purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
@@ -8057,7 +8171,7 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
8057
8171
|
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
8172
|
* Integrations service.
|
|
8059
8173
|
* @module purecloud-platform-client-v2/api/IntegrationsApi
|
|
8060
|
-
* @version
|
|
8174
|
+
* @version 216.0.0
|
|
8061
8175
|
*//**
|
|
8062
8176
|
* Constructs a new IntegrationsApi.
|
|
8063
8177
|
* @alias module:purecloud-platform-client-v2/api/IntegrationsApi
|
|
@@ -8687,7 +8801,7 @@ if(ucIntegrationId===undefined||ucIntegrationId===null){throw'Missing the requir
|
|
|
8687
8801
|
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
8802
|
* Journey service.
|
|
8689
8803
|
* @module purecloud-platform-client-v2/api/JourneyApi
|
|
8690
|
-
* @version
|
|
8804
|
+
* @version 216.0.0
|
|
8691
8805
|
*//**
|
|
8692
8806
|
* Constructs a new JourneyApi.
|
|
8693
8807
|
* @alias module:purecloud-platform-client-v2/api/JourneyApi
|
|
@@ -8974,6 +9088,9 @@ if(journeyVersionId===undefined||journeyVersionId===null){throw'Missing the requ
|
|
|
8974
9088
|
* @param {Object} opts.expand Parameter to request additional data to return in Journey payload
|
|
8975
9089
|
* @param {String} opts.id Parameter to request a list of Journey Views by id, separated by commas. Limit of 100 items.
|
|
8976
9090
|
*/},{key:"getJourneyViews",value:function getJourneyViews(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/journey/views','GET',{},{'pageNumber':opts['pageNumber'],'pageSize':opts['pageSize'],'nameOrCreatedBy':opts['nameOrCreatedBy'],'expand':opts['expand'],'id':opts['id']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
9091
|
+
* Get details about the data available for journey queries including oldest and newest event dates
|
|
9092
|
+
*
|
|
9093
|
+
*/},{key:"getJourneyViewsDataDetails",value:function getJourneyViewsDataDetails(){return this.apiClient.callApi('/api/v2/journey/views/data/details','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
8977
9094
|
* Get an Event Definition
|
|
8978
9095
|
*
|
|
8979
9096
|
* @param {String} eventDefinitionId Event Definition ID
|
|
@@ -9164,7 +9281,7 @@ if(versionId===undefined||versionId===null){throw'Missing the required parameter
|
|
|
9164
9281
|
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
9282
|
* Knowledge service.
|
|
9166
9283
|
* @module purecloud-platform-client-v2/api/KnowledgeApi
|
|
9167
|
-
* @version
|
|
9284
|
+
* @version 216.0.0
|
|
9168
9285
|
*//**
|
|
9169
9286
|
* Constructs a new KnowledgeApi.
|
|
9170
9287
|
* @alias module:purecloud-platform-client-v2/api/KnowledgeApi
|
|
@@ -10234,7 +10351,7 @@ if(sourceId===undefined||sourceId===null){throw'Missing the required parameter "
|
|
|
10234
10351
|
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
10352
|
* LanguageUnderstanding service.
|
|
10236
10353
|
* @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
10237
|
-
* @version
|
|
10354
|
+
* @version 216.0.0
|
|
10238
10355
|
*//**
|
|
10239
10356
|
* Constructs a new LanguageUnderstandingApi.
|
|
10240
10357
|
* @alias module:purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
@@ -10493,7 +10610,7 @@ if(domainVersionId===undefined||domainVersionId===null){throw'Missing the requir
|
|
|
10493
10610
|
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
10611
|
* Languages service.
|
|
10495
10612
|
* @module purecloud-platform-client-v2/api/LanguagesApi
|
|
10496
|
-
* @version
|
|
10613
|
+
* @version 216.0.0
|
|
10497
10614
|
*//**
|
|
10498
10615
|
* Constructs a new LanguagesApi.
|
|
10499
10616
|
* @alias module:purecloud-platform-client-v2/api/LanguagesApi
|
|
@@ -10548,7 +10665,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
10548
10665
|
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
10666
|
* Learning service.
|
|
10550
10667
|
* @module purecloud-platform-client-v2/api/LearningApi
|
|
10551
|
-
* @version
|
|
10668
|
+
* @version 216.0.0
|
|
10552
10669
|
*//**
|
|
10553
10670
|
* Constructs a new LearningApi.
|
|
10554
10671
|
* @alias module:purecloud-platform-client-v2/api/LearningApi
|
|
@@ -10819,7 +10936,7 @@ if(moduleId===undefined||moduleId===null){throw'Missing the required parameter "
|
|
|
10819
10936
|
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
10937
|
* License service.
|
|
10821
10938
|
* @module purecloud-platform-client-v2/api/LicenseApi
|
|
10822
|
-
* @version
|
|
10939
|
+
* @version 216.0.0
|
|
10823
10940
|
*//**
|
|
10824
10941
|
* Constructs a new LicenseApi.
|
|
10825
10942
|
* @alias module:purecloud-platform-client-v2/api/LicenseApi
|
|
@@ -10873,7 +10990,7 @@ if(featureName===undefined||featureName===null){throw'Missing the required param
|
|
|
10873
10990
|
*/},{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
10991
|
* Locations service.
|
|
10875
10992
|
* @module purecloud-platform-client-v2/api/LocationsApi
|
|
10876
|
-
* @version
|
|
10993
|
+
* @version 216.0.0
|
|
10877
10994
|
*//**
|
|
10878
10995
|
* Constructs a new LocationsApi.
|
|
10879
10996
|
* @alias module:purecloud-platform-client-v2/api/LocationsApi
|
|
@@ -10932,7 +11049,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
10932
11049
|
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
11050
|
* LogCapture service.
|
|
10934
11051
|
* @module purecloud-platform-client-v2/api/LogCaptureApi
|
|
10935
|
-
* @version
|
|
11052
|
+
* @version 216.0.0
|
|
10936
11053
|
*//**
|
|
10937
11054
|
* Constructs a new LogCaptureApi.
|
|
10938
11055
|
* @alias module:purecloud-platform-client-v2/api/LogCaptureApi
|
|
@@ -10982,7 +11099,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
10982
11099
|
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
11100
|
* Messaging service.
|
|
10984
11101
|
* @module purecloud-platform-client-v2/api/MessagingApi
|
|
10985
|
-
* @version
|
|
11102
|
+
* @version 216.0.0
|
|
10986
11103
|
*//**
|
|
10987
11104
|
* Constructs a new MessagingApi.
|
|
10988
11105
|
* @alias module:purecloud-platform-client-v2/api/MessagingApi
|
|
@@ -11072,7 +11189,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11072
11189
|
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
11190
|
* MobileDevices service.
|
|
11074
11191
|
* @module purecloud-platform-client-v2/api/MobileDevicesApi
|
|
11075
|
-
* @version
|
|
11192
|
+
* @version 216.0.0
|
|
11076
11193
|
*//**
|
|
11077
11194
|
* Constructs a new MobileDevicesApi.
|
|
11078
11195
|
* @alias module:purecloud-platform-client-v2/api/MobileDevicesApi
|
|
@@ -11111,7 +11228,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11111
11228
|
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
11229
|
* Notifications service.
|
|
11113
11230
|
* @module purecloud-platform-client-v2/api/NotificationsApi
|
|
11114
|
-
* @version
|
|
11231
|
+
* @version 216.0.0
|
|
11115
11232
|
*//**
|
|
11116
11233
|
* Constructs a new NotificationsApi.
|
|
11117
11234
|
* @alias module:purecloud-platform-client-v2/api/NotificationsApi
|
|
@@ -11168,7 +11285,7 @@ if(channelId===undefined||channelId===null){throw'Missing the required parameter
|
|
|
11168
11285
|
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
11286
|
* OAuth service.
|
|
11170
11287
|
* @module purecloud-platform-client-v2/api/OAuthApi
|
|
11171
|
-
* @version
|
|
11288
|
+
* @version 216.0.0
|
|
11172
11289
|
*//**
|
|
11173
11290
|
* Constructs a new OAuthApi.
|
|
11174
11291
|
* @alias module:purecloud-platform-client-v2/api/OAuthApi
|
|
@@ -11253,7 +11370,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
11253
11370
|
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
11371
|
* Objects service.
|
|
11255
11372
|
* @module purecloud-platform-client-v2/api/ObjectsApi
|
|
11256
|
-
* @version
|
|
11373
|
+
* @version 216.0.0
|
|
11257
11374
|
*//**
|
|
11258
11375
|
* Constructs a new ObjectsApi.
|
|
11259
11376
|
* @alias module:purecloud-platform-client-v2/api/ObjectsApi
|
|
@@ -11324,7 +11441,7 @@ if(divisionId===undefined||divisionId===null){throw'Missing the required paramet
|
|
|
11324
11441
|
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
11442
|
* OperationalEvents service.
|
|
11326
11443
|
* @module purecloud-platform-client-v2/api/OperationalEventsApi
|
|
11327
|
-
* @version
|
|
11444
|
+
* @version 216.0.0
|
|
11328
11445
|
*//**
|
|
11329
11446
|
* Constructs a new OperationalEventsApi.
|
|
11330
11447
|
* @alias module:purecloud-platform-client-v2/api/OperationalEventsApi
|
|
@@ -11355,7 +11472,7 @@ if(eventDefinitionId===undefined||eventDefinitionId===null){throw'Missing the re
|
|
|
11355
11472
|
*/},{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
11473
|
* Organization service.
|
|
11357
11474
|
* @module purecloud-platform-client-v2/api/OrganizationApi
|
|
11358
|
-
* @version
|
|
11475
|
+
* @version 216.0.0
|
|
11359
11476
|
*//**
|
|
11360
11477
|
* Constructs a new OrganizationApi.
|
|
11361
11478
|
* @alias module:purecloud-platform-client-v2/api/OrganizationApi
|
|
@@ -11480,7 +11597,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11480
11597
|
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
11598
|
* OrganizationAuthorization service.
|
|
11482
11599
|
* @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
11483
|
-
* @version
|
|
11600
|
+
* @version 216.0.0
|
|
11484
11601
|
*//**
|
|
11485
11602
|
* Constructs a new OrganizationAuthorizationApi.
|
|
11486
11603
|
* @alias module:purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
@@ -11814,7 +11931,7 @@ if(trustorOrgId===undefined||trustorOrgId===null){throw'Missing the required par
|
|
|
11814
11931
|
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
11932
|
* Outbound service.
|
|
11816
11933
|
* @module purecloud-platform-client-v2/api/OutboundApi
|
|
11817
|
-
* @version
|
|
11934
|
+
* @version 216.0.0
|
|
11818
11935
|
*//**
|
|
11819
11936
|
* Constructs a new OutboundApi.
|
|
11820
11937
|
* @alias module:purecloud-platform-client-v2/api/OutboundApi
|
|
@@ -12925,7 +13042,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
12925
13042
|
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
13043
|
* Presence service.
|
|
12927
13044
|
* @module purecloud-platform-client-v2/api/PresenceApi
|
|
12928
|
-
* @version
|
|
13045
|
+
* @version 216.0.0
|
|
12929
13046
|
*//**
|
|
12930
13047
|
* Constructs a new PresenceApi.
|
|
12931
13048
|
* @alias module:purecloud-platform-client-v2/api/PresenceApi
|
|
@@ -13098,7 +13215,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
13098
13215
|
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
13216
|
* ProcessAutomation service.
|
|
13100
13217
|
* @module purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
13101
|
-
* @version
|
|
13218
|
+
* @version 216.0.0
|
|
13102
13219
|
*//**
|
|
13103
13220
|
* Constructs a new ProcessAutomationApi.
|
|
13104
13221
|
* @alias module:purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
@@ -13161,7 +13278,7 @@ if(triggerId===undefined||triggerId===null){throw'Missing the required parameter
|
|
|
13161
13278
|
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
13279
|
* Quality service.
|
|
13163
13280
|
* @module purecloud-platform-client-v2/api/QualityApi
|
|
13164
|
-
* @version
|
|
13281
|
+
* @version 216.0.0
|
|
13165
13282
|
*//**
|
|
13166
13283
|
* Constructs a new QualityApi.
|
|
13167
13284
|
* @alias module:purecloud-platform-client-v2/api/QualityApi
|
|
@@ -13640,7 +13757,7 @@ if(customerSurveyUrl===undefined||customerSurveyUrl===null){throw'Missing the re
|
|
|
13640
13757
|
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
13758
|
* Recording service.
|
|
13642
13759
|
* @module purecloud-platform-client-v2/api/RecordingApi
|
|
13643
|
-
* @version
|
|
13760
|
+
* @version 216.0.0
|
|
13644
13761
|
*//**
|
|
13645
13762
|
* Constructs a new RecordingApi.
|
|
13646
13763
|
* @alias module:purecloud-platform-client-v2/api/RecordingApi
|
|
@@ -13902,14 +14019,6 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
13902
14019
|
*/},{key:"patchRecordingMediaretentionpolicy",value:function patchRecordingMediaretentionpolicy(policyId,body){// verify the required parameter 'policyId' is set
|
|
13903
14020
|
if(policyId===undefined||policyId===null){throw'Missing the required parameter "policyId" when calling patchRecordingMediaretentionpolicy';}// verify the required parameter 'body' is set
|
|
13904
14021
|
if(body===undefined||body===null){throw'Missing the required parameter "body" when calling patchRecordingMediaretentionpolicy';}return this.apiClient.callApi('/api/v2/recording/mediaretentionpolicies/{policyId}','PATCH',{'policyId':policyId},{},{},{},body,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
13905
|
-
* Update a screen recording session
|
|
13906
|
-
* This API is deprecated and the functionality to stop screen recording will be no longer supported.
|
|
13907
|
-
* @param {String} recordingSessionId Screen recording session ID
|
|
13908
|
-
* @param {Object} opts Optional parameters
|
|
13909
|
-
* @param {Object} opts.body
|
|
13910
|
-
* @deprecated
|
|
13911
|
-
*/},{key:"patchRecordingsScreensession",value:function patchRecordingsScreensession(recordingSessionId,opts){opts=opts||{};// verify the required parameter 'recordingSessionId' is set
|
|
13912
|
-
if(recordingSessionId===undefined||recordingSessionId===null){throw'Missing the required parameter "recordingSessionId" when calling patchRecordingsScreensession';}return this.apiClient.callApi('/api/v2/recordings/screensessions/{recordingSessionId}','PATCH',{'recordingSessionId':recordingSessionId},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
13913
14022
|
* Create annotation
|
|
13914
14023
|
*
|
|
13915
14024
|
* @param {String} conversationId Conversation ID
|
|
@@ -14052,7 +14161,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
14052
14161
|
*/},{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
14162
|
* ResponseManagement service.
|
|
14054
14163
|
* @module purecloud-platform-client-v2/api/ResponseManagementApi
|
|
14055
|
-
* @version
|
|
14164
|
+
* @version 216.0.0
|
|
14056
14165
|
*//**
|
|
14057
14166
|
* Constructs a new ResponseManagementApi.
|
|
14058
14167
|
* @alias module:purecloud-platform-client-v2/api/ResponseManagementApi
|
|
@@ -14173,7 +14282,7 @@ if(responseAssetId===undefined||responseAssetId===null){throw'Missing the requir
|
|
|
14173
14282
|
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
14283
|
* Routing service.
|
|
14175
14284
|
* @module purecloud-platform-client-v2/api/RoutingApi
|
|
14176
|
-
* @version
|
|
14285
|
+
* @version 216.0.0
|
|
14177
14286
|
*//**
|
|
14178
14287
|
* Constructs a new RoutingApi.
|
|
14179
14288
|
* @alias module:purecloud-platform-client-v2/api/RoutingApi
|
|
@@ -15172,7 +15281,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
15172
15281
|
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
15282
|
* SCIM service.
|
|
15174
15283
|
* @module purecloud-platform-client-v2/api/SCIMApi
|
|
15175
|
-
* @version
|
|
15284
|
+
* @version 216.0.0
|
|
15176
15285
|
*//**
|
|
15177
15286
|
* Constructs a new SCIMApi.
|
|
15178
15287
|
* @alias module:purecloud-platform-client-v2/api/SCIMApi
|
|
@@ -15397,7 +15506,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
15397
15506
|
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
15507
|
* ScreenRecording service.
|
|
15399
15508
|
* @module purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
15400
|
-
* @version
|
|
15509
|
+
* @version 216.0.0
|
|
15401
15510
|
*//**
|
|
15402
15511
|
* Constructs a new ScreenRecordingApi.
|
|
15403
15512
|
* @alias module:purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
@@ -15412,7 +15521,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15412
15521
|
*/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
15522
|
* Scripts service.
|
|
15414
15523
|
* @module purecloud-platform-client-v2/api/ScriptsApi
|
|
15415
|
-
* @version
|
|
15524
|
+
* @version 216.0.0
|
|
15416
15525
|
*//**
|
|
15417
15526
|
* Constructs a new ScriptsApi.
|
|
15418
15527
|
* @alias module:purecloud-platform-client-v2/api/ScriptsApi
|
|
@@ -15548,7 +15657,7 @@ if(scriptId===undefined||scriptId===null){throw'Missing the required parameter "
|
|
|
15548
15657
|
*/},{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
15658
|
* Search service.
|
|
15550
15659
|
* @module purecloud-platform-client-v2/api/SearchApi
|
|
15551
|
-
* @version
|
|
15660
|
+
* @version 216.0.0
|
|
15552
15661
|
*//**
|
|
15553
15662
|
* Constructs a new SearchApi.
|
|
15554
15663
|
* @alias module:purecloud-platform-client-v2/api/SearchApi
|
|
@@ -15720,7 +15829,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
15720
15829
|
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
15830
|
* Settings service.
|
|
15722
15831
|
* @module purecloud-platform-client-v2/api/SettingsApi
|
|
15723
|
-
* @version
|
|
15832
|
+
* @version 216.0.0
|
|
15724
15833
|
*//**
|
|
15725
15834
|
* Constructs a new SettingsApi.
|
|
15726
15835
|
* @alias module:purecloud-platform-client-v2/api/SettingsApi
|
|
@@ -15770,7 +15879,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
|
|
|
15770
15879
|
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
15880
|
* SocialMedia service.
|
|
15772
15881
|
* @module purecloud-platform-client-v2/api/SocialMediaApi
|
|
15773
|
-
* @version
|
|
15882
|
+
* @version 216.0.0
|
|
15774
15883
|
*//**
|
|
15775
15884
|
* Constructs a new SocialMediaApi.
|
|
15776
15885
|
* @alias module:purecloud-platform-client-v2/api/SocialMediaApi
|
|
@@ -16035,7 +16144,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
16035
16144
|
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
16145
|
* SpeechTextAnalytics service.
|
|
16037
16146
|
* @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
16038
|
-
* @version
|
|
16147
|
+
* @version 216.0.0
|
|
16039
16148
|
*//**
|
|
16040
16149
|
* Constructs a new SpeechTextAnalyticsApi.
|
|
16041
16150
|
* @alias module:purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
@@ -16076,12 +16185,12 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
16076
16185
|
* Get the list of Speech and Text Analytics categories
|
|
16077
16186
|
*
|
|
16078
16187
|
* @param {Object} opts Optional parameters
|
|
16079
|
-
* @param {Number} opts.pageSize The page size for the listing. The max that will be returned is
|
|
16188
|
+
* @param {Number} opts.pageSize The page size for the listing. The max that will be returned is 25. (default to 25)
|
|
16080
16189
|
* @param {Number} opts.pageNumber The page number for the listing (default to 1)
|
|
16081
16190
|
* @param {String} opts.name The category name filter applied to the listing
|
|
16082
16191
|
* @param {Object} opts.sortOrder The sort order for the listing (default to asc)
|
|
16083
16192
|
* @param {Object} opts.sortBy The field to sort by for the listing (default to name)
|
|
16084
|
-
* @param {Array.<String>} opts.ids Comma separated Category IDs to filter by. Cannot be used with other filters. Maximum of
|
|
16193
|
+
* @param {Array.<String>} opts.ids Comma separated Category IDs to filter by. Cannot be used with other filters. Maximum of 25 IDs allowed.
|
|
16085
16194
|
*/},{key:"getSpeechandtextanalyticsCategories",value:function getSpeechandtextanalyticsCategories(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/speechandtextanalytics/categories','GET',{},{'pageSize':opts['pageSize'],'pageNumber':opts['pageNumber'],'name':opts['name'],'sortOrder':opts['sortOrder'],'sortBy':opts['sortBy'],'ids':this.apiClient.buildCollectionParam(opts['ids'],'multi')},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
16086
16195
|
* Get a Speech and Text Analytics Category by ID
|
|
16087
16196
|
*
|
|
@@ -16358,7 +16467,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
16358
16467
|
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
16468
|
* Stations service.
|
|
16360
16469
|
* @module purecloud-platform-client-v2/api/StationsApi
|
|
16361
|
-
* @version
|
|
16470
|
+
* @version 216.0.0
|
|
16362
16471
|
*//**
|
|
16363
16472
|
* Constructs a new StationsApi.
|
|
16364
16473
|
* @alias module:purecloud-platform-client-v2/api/StationsApi
|
|
@@ -16390,7 +16499,7 @@ if(stationId===undefined||stationId===null){throw'Missing the required parameter
|
|
|
16390
16499
|
*/},{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
16500
|
* Suggest service.
|
|
16392
16501
|
* @module purecloud-platform-client-v2/api/SuggestApi
|
|
16393
|
-
* @version
|
|
16502
|
+
* @version 216.0.0
|
|
16394
16503
|
*//**
|
|
16395
16504
|
* Constructs a new SuggestApi.
|
|
16396
16505
|
* @alias module:purecloud-platform-client-v2/api/SuggestApi
|
|
@@ -16430,7 +16539,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16430
16539
|
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
16540
|
* TaskManagement service.
|
|
16432
16541
|
* @module purecloud-platform-client-v2/api/TaskManagementApi
|
|
16433
|
-
* @version
|
|
16542
|
+
* @version 216.0.0
|
|
16434
16543
|
*//**
|
|
16435
16544
|
* Constructs a new TaskManagementApi.
|
|
16436
16545
|
* @alias module:purecloud-platform-client-v2/api/TaskManagementApi
|
|
@@ -16936,7 +17045,7 @@ if(schemaId===undefined||schemaId===null){throw'Missing the required parameter "
|
|
|
16936
17045
|
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
17046
|
* Teams service.
|
|
16938
17047
|
* @module purecloud-platform-client-v2/api/TeamsApi
|
|
16939
|
-
* @version
|
|
17048
|
+
* @version 216.0.0
|
|
16940
17049
|
*//**
|
|
16941
17050
|
* Constructs a new TeamsApi.
|
|
16942
17051
|
* @alias module:purecloud-platform-client-v2/api/TeamsApi
|
|
@@ -17016,7 +17125,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
17016
17125
|
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
17126
|
* Telephony service.
|
|
17018
17127
|
* @module purecloud-platform-client-v2/api/TelephonyApi
|
|
17019
|
-
* @version
|
|
17128
|
+
* @version 216.0.0
|
|
17020
17129
|
*//**
|
|
17021
17130
|
* Constructs a new TelephonyApi.
|
|
17022
17131
|
* @alias module:purecloud-platform-client-v2/api/TelephonyApi
|
|
@@ -17063,7 +17172,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
17063
17172
|
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
17173
|
* TelephonyProvidersEdge service.
|
|
17065
17174
|
* @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
17066
|
-
* @version
|
|
17175
|
+
* @version 216.0.0
|
|
17067
17176
|
*//**
|
|
17068
17177
|
* Constructs a new TelephonyProvidersEdgeApi.
|
|
17069
17178
|
* @alias module:purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
@@ -17898,7 +18007,7 @@ if(trunkBaseSettingsId===undefined||trunkBaseSettingsId===null){throw'Missing th
|
|
|
17898
18007
|
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
18008
|
* Textbots service.
|
|
17900
18009
|
* @module purecloud-platform-client-v2/api/TextbotsApi
|
|
17901
|
-
* @version
|
|
18010
|
+
* @version 216.0.0
|
|
17902
18011
|
*//**
|
|
17903
18012
|
* Constructs a new TextbotsApi.
|
|
17904
18013
|
* @alias module:purecloud-platform-client-v2/api/TextbotsApi
|
|
@@ -17933,7 +18042,7 @@ if(launchRequest===undefined||launchRequest===null){throw'Missing the required p
|
|
|
17933
18042
|
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
18043
|
* Tokens service.
|
|
17935
18044
|
* @module purecloud-platform-client-v2/api/TokensApi
|
|
17936
|
-
* @version
|
|
18045
|
+
* @version 216.0.0
|
|
17937
18046
|
*//**
|
|
17938
18047
|
* Constructs a new TokensApi.
|
|
17939
18048
|
* @alias module:purecloud-platform-client-v2/api/TokensApi
|
|
@@ -17967,7 +18076,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
17967
18076
|
*/},{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
18077
|
* Uploads service.
|
|
17969
18078
|
* @module purecloud-platform-client-v2/api/UploadsApi
|
|
17970
|
-
* @version
|
|
18079
|
+
* @version 216.0.0
|
|
17971
18080
|
*//**
|
|
17972
18081
|
* Constructs a new UploadsApi.
|
|
17973
18082
|
* @alias module:purecloud-platform-client-v2/api/UploadsApi
|
|
@@ -18032,7 +18141,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18032
18141
|
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
18142
|
* Usage service.
|
|
18034
18143
|
* @module purecloud-platform-client-v2/api/UsageApi
|
|
18035
|
-
* @version
|
|
18144
|
+
* @version 216.0.0
|
|
18036
18145
|
*//**
|
|
18037
18146
|
* Constructs a new UsageApi.
|
|
18038
18147
|
* @alias module:purecloud-platform-client-v2/api/UsageApi
|
|
@@ -18086,7 +18195,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18086
18195
|
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
18196
|
* UserRecordings service.
|
|
18088
18197
|
* @module purecloud-platform-client-v2/api/UserRecordingsApi
|
|
18089
|
-
* @version
|
|
18198
|
+
* @version 216.0.0
|
|
18090
18199
|
*//**
|
|
18091
18200
|
* Constructs a new UserRecordingsApi.
|
|
18092
18201
|
* @alias module:purecloud-platform-client-v2/api/UserRecordingsApi
|
|
@@ -18143,7 +18252,7 @@ if(recordingId===undefined||recordingId===null){throw'Missing the required param
|
|
|
18143
18252
|
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
18253
|
* Users service.
|
|
18145
18254
|
* @module purecloud-platform-client-v2/api/UsersApi
|
|
18146
|
-
* @version
|
|
18255
|
+
* @version 216.0.0
|
|
18147
18256
|
*//**
|
|
18148
18257
|
* Constructs a new UsersApi.
|
|
18149
18258
|
* @alias module:purecloud-platform-client-v2/api/UsersApi
|
|
@@ -18870,7 +18979,7 @@ if(verifierId===undefined||verifierId===null){throw'Missing the required paramet
|
|
|
18870
18979
|
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
18980
|
* Utilities service.
|
|
18872
18981
|
* @module purecloud-platform-client-v2/api/UtilitiesApi
|
|
18873
|
-
* @version
|
|
18982
|
+
* @version 216.0.0
|
|
18874
18983
|
*//**
|
|
18875
18984
|
* Constructs a new UtilitiesApi.
|
|
18876
18985
|
* @alias module:purecloud-platform-client-v2/api/UtilitiesApi
|
|
@@ -18897,7 +19006,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18897
19006
|
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
19007
|
* Voicemail service.
|
|
18899
19008
|
* @module purecloud-platform-client-v2/api/VoicemailApi
|
|
18900
|
-
* @version
|
|
19009
|
+
* @version 216.0.0
|
|
18901
19010
|
*//**
|
|
18902
19011
|
* Constructs a new VoicemailApi.
|
|
18903
19012
|
* @alias module:purecloud-platform-client-v2/api/VoicemailApi
|
|
@@ -19059,7 +19168,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
19059
19168
|
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
19169
|
* WebChat service.
|
|
19061
19170
|
* @module purecloud-platform-client-v2/api/WebChatApi
|
|
19062
|
-
* @version
|
|
19171
|
+
* @version 216.0.0
|
|
19063
19172
|
*//**
|
|
19064
19173
|
* Constructs a new WebChatApi.
|
|
19065
19174
|
* @alias module:purecloud-platform-client-v2/api/WebChatApi
|
|
@@ -19194,7 +19303,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
19194
19303
|
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
19304
|
* WebDeployments service.
|
|
19196
19305
|
* @module purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
19197
|
-
* @version
|
|
19306
|
+
* @version 216.0.0
|
|
19198
19307
|
*//**
|
|
19199
19308
|
* Constructs a new WebDeploymentsApi.
|
|
19200
19309
|
* @alias module:purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
@@ -19315,7 +19424,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
19315
19424
|
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
19425
|
* WebMessaging service.
|
|
19317
19426
|
* @module purecloud-platform-client-v2/api/WebMessagingApi
|
|
19318
|
-
* @version
|
|
19427
|
+
* @version 216.0.0
|
|
19319
19428
|
*//**
|
|
19320
19429
|
* Constructs a new WebMessagingApi.
|
|
19321
19430
|
* @alias module:purecloud-platform-client-v2/api/WebMessagingApi
|
|
@@ -19331,7 +19440,7 @@ if(deployment===undefined||deployment===null){throw'Missing the required paramet
|
|
|
19331
19440
|
*/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
19441
|
* Widgets service.
|
|
19333
19442
|
* @module purecloud-platform-client-v2/api/WidgetsApi
|
|
19334
|
-
* @version
|
|
19443
|
+
* @version 216.0.0
|
|
19335
19444
|
*//**
|
|
19336
19445
|
* Constructs a new WidgetsApi.
|
|
19337
19446
|
* @alias module:purecloud-platform-client-v2/api/WidgetsApi
|
|
@@ -19366,7 +19475,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
19366
19475
|
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
19476
|
* WorkforceManagement service.
|
|
19368
19477
|
* @module purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
19369
|
-
* @version
|
|
19478
|
+
* @version 216.0.0
|
|
19370
19479
|
*//**
|
|
19371
19480
|
* Constructs a new WorkforceManagementApi.
|
|
19372
19481
|
* @alias module:purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
@@ -19970,6 +20079,14 @@ if(calendarId===undefined||calendarId===null){throw'Missing the required paramet
|
|
|
19970
20079
|
* Get existing calendar link for the current user
|
|
19971
20080
|
*
|
|
19972
20081
|
*/},{key:"getWorkforcemanagementCalendarUrlIcs",value:function getWorkforcemanagementCalendarUrlIcs(){return this.apiClient.callApi('/api/v2/workforcemanagement/calendar/url/ics','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
20082
|
+
* Retrieves delete job status for historical data imports associated with the job id
|
|
20083
|
+
*
|
|
20084
|
+
* @param {String} jobId The job ID of the historical data delete request
|
|
20085
|
+
*/},{key:"getWorkforcemanagementHistoricaldataBulkRemoveJob",value:function getWorkforcemanagementHistoricaldataBulkRemoveJob(jobId){// verify the required parameter 'jobId' is set
|
|
20086
|
+
if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId" when calling getWorkforcemanagementHistoricaldataBulkRemoveJob';}return this.apiClient.callApi('/api/v2/workforcemanagement/historicaldata/bulk/remove/jobs/{jobId}','GET',{'jobId':jobId},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
20087
|
+
* Retrieves all delete job status for historical data
|
|
20088
|
+
*
|
|
20089
|
+
*/},{key:"getWorkforcemanagementHistoricaldataBulkRemoveJobs",value:function getWorkforcemanagementHistoricaldataBulkRemoveJobs(){return this.apiClient.callApi('/api/v2/workforcemanagement/historicaldata/bulk/remove/jobs','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
19973
20090
|
* Retrieves delete job status for historical data imports of the organization
|
|
19974
20091
|
*
|
|
19975
20092
|
*/},{key:"getWorkforcemanagementHistoricaldataDeletejob",value:function getWorkforcemanagementHistoricaldataDeletejob(){return this.apiClient.callApi('/api/v2/workforcemanagement/historicaldata/deletejob','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -20843,6 +20960,11 @@ if(businessUnitId===undefined||businessUnitId===null){throw'Missing the required
|
|
|
20843
20960
|
* @param {Object} opts Optional parameters
|
|
20844
20961
|
* @param {String} opts.language A language tag (which is sometimes referred to as a locale identifier) to use to localize default activity code names in the ics-formatted calendar (default to en-US)
|
|
20845
20962
|
*/},{key:"postWorkforcemanagementCalendarUrlIcs",value:function postWorkforcemanagementCalendarUrlIcs(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/workforcemanagement/calendar/url/ics','POST',{},{'language':opts['language']},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
20963
|
+
* Delete the list of the historical data import entries
|
|
20964
|
+
*
|
|
20965
|
+
* @param {Object} opts Optional parameters
|
|
20966
|
+
* @param {Object} opts.body body
|
|
20967
|
+
*/},{key:"postWorkforcemanagementHistoricaldataBulkRemoveJobs",value:function postWorkforcemanagementHistoricaldataBulkRemoveJobs(opts){opts=opts||{};return this.apiClient.callApi('/api/v2/workforcemanagement/historicaldata/bulk/remove/jobs','POST',{},{},{},{},opts['body'],['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
20846
20968
|
* Delete the entries of the historical data imports in the organization
|
|
20847
20969
|
*
|
|
20848
20970
|
*/},{key:"postWorkforcemanagementHistoricaldataDeletejob",value:function postWorkforcemanagementHistoricaldataDeletejob(){return this.apiClient.callApi('/api/v2/workforcemanagement/historicaldata/deletejob','POST',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -21172,7 +21294,7 @@ if(timeOffLimitId===undefined||timeOffLimitId===null){throw'Missing the required
|
|
|
21172
21294
|
* </pre>
|
|
21173
21295
|
* </p>
|
|
21174
21296
|
* @module purecloud-platform-client-v2/index
|
|
21175
|
-
* @version
|
|
21297
|
+
* @version 216.0.0
|
|
21176
21298
|
*/var platformClient=/*#__PURE__*/_createClass(function platformClient(){_classCallCheck(this,platformClient);/**
|
|
21177
21299
|
* The ApiClient constructor.
|
|
21178
21300
|
* @property {module:purecloud-platform-client-v2/ApiClient}
|