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
|
@@ -1966,7 +1966,7 @@ var $TypeError = require('es-errors/type');
|
|
|
1966
1966
|
var $call = require('./functionCall');
|
|
1967
1967
|
var $actualApply = require('./actualApply');
|
|
1968
1968
|
|
|
1969
|
-
/** @type {import('.')
|
|
1969
|
+
/** @type {(args: [Function, thisArg?: unknown, ...args: unknown[]]) => Function} TODO FIXME, find a way to use import('.') */
|
|
1970
1970
|
module.exports = function callBindBasic(args) {
|
|
1971
1971
|
if (args.length < 1 || typeof args[0] !== 'function') {
|
|
1972
1972
|
throw new $TypeError('a function is required');
|
|
@@ -3142,13 +3142,16 @@ function quote(s) {
|
|
|
3142
3142
|
return $replace.call(String(s), /"/g, '"');
|
|
3143
3143
|
}
|
|
3144
3144
|
|
|
3145
|
-
function
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
function
|
|
3149
|
-
function
|
|
3150
|
-
function
|
|
3151
|
-
function
|
|
3145
|
+
function canTrustToString(obj) {
|
|
3146
|
+
return !toStringTag || !(typeof obj === 'object' && (toStringTag in obj || typeof obj[toStringTag] !== 'undefined'));
|
|
3147
|
+
}
|
|
3148
|
+
function isArray(obj) { return toStr(obj) === '[object Array]' && canTrustToString(obj); }
|
|
3149
|
+
function isDate(obj) { return toStr(obj) === '[object Date]' && canTrustToString(obj); }
|
|
3150
|
+
function isRegExp(obj) { return toStr(obj) === '[object RegExp]' && canTrustToString(obj); }
|
|
3151
|
+
function isError(obj) { return toStr(obj) === '[object Error]' && canTrustToString(obj); }
|
|
3152
|
+
function isString(obj) { return toStr(obj) === '[object String]' && canTrustToString(obj); }
|
|
3153
|
+
function isNumber(obj) { return toStr(obj) === '[object Number]' && canTrustToString(obj); }
|
|
3154
|
+
function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && canTrustToString(obj); }
|
|
3152
3155
|
|
|
3153
3156
|
// Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
|
|
3154
3157
|
function isSymbol(obj) {
|
|
@@ -6415,11 +6418,20 @@ axios.Cancel=axios.CanceledError;// Expose all/spread
|
|
|
6415
6418
|
axios.all=function all(promises){return Promise.all(promises);};axios.spread=spread;// Expose isAxiosError
|
|
6416
6419
|
axios.isAxiosError=isAxiosError;// Expose mergeConfig
|
|
6417
6420
|
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
|
|
6418
|
-
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");}}
|
|
6421
|
+
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");}/**
|
|
6422
|
+
* Set a PreHook function that modifies the request config before execution.
|
|
6423
|
+
* @param {(config: object) => object | Promise<object> | void} hookFunction
|
|
6424
|
+
*/},{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();}/**
|
|
6425
|
+
* Set a PostHook function that processes the response or error after execution.
|
|
6426
|
+
* @param {(response: object | null, error: Error | null) => object | Promise<object> | void} hookFunction
|
|
6427
|
+
*/},{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
|
|
6419
6428
|
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
|
|
6420
6429
|
},{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
|
|
6421
6430
|
},{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
|
|
6422
|
-
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:"
|
|
6431
|
+
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
|
|
6432
|
+
console.error('Request Pre-Hook Error:',error.message);return Promise.reject(error);});}if(this.postHook&&typeof this.postHook==='function'){// Response interceptor (for post-hooks)
|
|
6433
|
+
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
|
|
6434
|
+
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
|
|
6423
6435
|
},{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:/**
|
|
6424
6436
|
* Singleton getter
|
|
6425
6437
|
*/function get(){return Configuration.instance;}/**
|
|
@@ -6443,7 +6455,7 @@ if(env)this.environment=env;else this.environment=this.host?this.host:'mypureclo
|
|
|
6443
6455
|
this.environment=this.environment.replace(/\/+$/,'');// Strip protocol and subdomain
|
|
6444
6456
|
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];}}}]);}();/**
|
|
6445
6457
|
* @module purecloud-platform-client-v2/ApiClient
|
|
6446
|
-
* @version
|
|
6458
|
+
* @version 216.0.0
|
|
6447
6459
|
*/var ApiClient=/*#__PURE__*/function(){/**
|
|
6448
6460
|
* Manages low level client-server communications, parameter marshalling, etc. There should not be any need for an
|
|
6449
6461
|
* application to use this class directly - the *Api and model classes provide the public API for the service. The
|
|
@@ -6522,6 +6534,12 @@ var tempState=this.authData.state;this.authData=localStorage.getItem("".concat(t
|
|
|
6522
6534
|
* @param {string} keyPath - path for key
|
|
6523
6535
|
* @param {string} caPath - path for public certs
|
|
6524
6536
|
*/},{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.");}}/**
|
|
6537
|
+
* @description Sets preHook functions for the httpClient
|
|
6538
|
+
* @param {string} preHook - method definition for prehook
|
|
6539
|
+
*/},{key:"setPreHook",value:function setPreHook(preHook){var httpClient=this.getHttpClient();httpClient.setPreHook(preHook);}/**
|
|
6540
|
+
* @description Sets postHook functions for the httpClient
|
|
6541
|
+
* @param {string} postHook - method definition for posthook
|
|
6542
|
+
*/},{key:"setPostHook",value:function setPostHook(postHook){var httpClient=this.getHttpClient();httpClient.setPostHook(postHook);}/**
|
|
6525
6543
|
* @description Sets the certificate content if MTLS authentication is needed
|
|
6526
6544
|
* @param {string} certContent - content for certs
|
|
6527
6545
|
* @param {string} keyContent - content for key
|
|
@@ -6544,43 +6562,43 @@ var tempState=this.authData.state;this.authData=localStorage.getItem("".concat(t
|
|
|
6544
6562
|
* @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.
|
|
6545
6563
|
* @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.
|
|
6546
6564
|
* @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.
|
|
6547
|
-
*/},{key:"loginImplicitGrant",value:function loginImplicitGrant(clientId,redirectUri,opts){var
|
|
6565
|
+
*/},{key:"loginImplicitGrant",value:function loginImplicitGrant(clientId,redirectUri,opts){var _this4=this;// Check for auth token in hash
|
|
6548
6566
|
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
|
|
6549
6567
|
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
|
|
6550
|
-
if(hash&&hash.error){hash.accessToken=undefined;
|
|
6551
|
-
|
|
6568
|
+
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
|
|
6569
|
+
_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);});});}/**
|
|
6552
6570
|
* @description Initiates the client credentials login flow. Only available in node apps.
|
|
6553
6571
|
* @param {string} clientId - The client ID of an OAuth Implicit Grant client
|
|
6554
6572
|
* @param {string} clientSecret - The client secret of an OAuth Implicit Grant client
|
|
6555
|
-
*/},{key:"loginClientCredentialsGrant",value:function loginClientCredentialsGrant(clientId,clientSecret){var
|
|
6556
|
-
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',
|
|
6557
|
-
|
|
6558
|
-
|
|
6559
|
-
|
|
6560
|
-
resolve(
|
|
6561
|
-
if(error.response){
|
|
6573
|
+
*/},{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
|
|
6574
|
+
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
|
|
6575
|
+
_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
|
|
6576
|
+
_this5.setAccessToken(response.data['access_token']);// Set expiry time
|
|
6577
|
+
_this5.authData.tokenExpiryTime=new Date().getTime()+response.data['expires_in']*1000;_this5.authData.tokenExpiryTimeString=new Date(_this5.authData.tokenExpiryTime).toUTCString();// Return auth data
|
|
6578
|
+
resolve(_this5.authData);})["catch"](function(error){// Log error
|
|
6579
|
+
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);});});}/**
|
|
6562
6580
|
* @description Initiates the Saml2Bearerflow. Only available in node apps.
|
|
6563
6581
|
* @param {string} clientId - The client ID of an OAuth Implicit Grant client
|
|
6564
6582
|
* @param {string} clientSecret - The client secret of an OAuth Implicit Grant client
|
|
6565
6583
|
* @param {string} orgName - The orgName of an OAuth Implicit Grant client
|
|
6566
6584
|
* @param {string} assertion - The saml2bearer assertion
|
|
6567
|
-
*/},{key:"loginSaml2BearerGrant",value:function loginSaml2BearerGrant(clientId,clientSecret,orgName,assertion){var
|
|
6585
|
+
*/},{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
|
|
6568
6586
|
request.then(function(response){// Logging
|
|
6569
|
-
|
|
6570
|
-
var access_token=response.data.access_token;
|
|
6571
|
-
resolve(
|
|
6572
|
-
if(error.response){
|
|
6587
|
+
_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
|
|
6588
|
+
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
|
|
6589
|
+
resolve(_this6.authData);})["catch"](function(error){// Log error
|
|
6590
|
+
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);});});}/**
|
|
6573
6591
|
* @description Completes the PKCE Code Authorization.
|
|
6574
6592
|
* @param {string} clientId - The client ID of an OAuth Code Authorization Grant client
|
|
6575
6593
|
* @param {string} codeVerifier - code verifier used to generate the code challenge
|
|
6576
6594
|
* @param {string} authCode - Authorization code
|
|
6577
6595
|
* @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
|
|
6578
|
-
*/},{key:"authorizePKCEGrant",value:function authorizePKCEGrant(clientId,codeVerifier,authCode,redirectUri){var
|
|
6596
|
+
*/},{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
|
|
6579
6597
|
httpClient.request(requestOptions).then(function(response){// Logging
|
|
6580
|
-
|
|
6581
|
-
var access_token=response.data.access_token;
|
|
6582
|
-
resolve(
|
|
6583
|
-
if(error.response){
|
|
6598
|
+
_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
|
|
6599
|
+
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
|
|
6600
|
+
resolve(_this7.authData);})["catch"](function(error){// Log error
|
|
6601
|
+
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);});});}/**
|
|
6584
6602
|
* @description Generate a random string used as PKCE Code Verifier - length = 43 to 128.
|
|
6585
6603
|
* @param {number} nChar - code length
|
|
6586
6604
|
*/},{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
|
|
@@ -6599,23 +6617,23 @@ return reject(new Error("Code Challenge Error ".concat(error)));});});}}/**
|
|
|
6599
6617
|
* @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.
|
|
6600
6618
|
* @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.
|
|
6601
6619
|
* @param {string} codeVerifier - (optional) code verifier used to generate the code challenge
|
|
6602
|
-
*/},{key:"loginPKCEGrant",value:function loginPKCEGrant(clientId,redirectUri,opts,codeVerifier){var
|
|
6620
|
+
*/},{key:"loginPKCEGrant",value:function loginPKCEGrant(clientId,redirectUri,opts,codeVerifier){var _this8=this;// Need Local Storage or non null codeVerifier as parameter
|
|
6603
6621
|
if(!this.hasLocalStorage&&!codeVerifier){throw new Error("loginPKCEGrant requires Local Storage or codeVerifier as input parameter");}// Check for auth code in query
|
|
6604
6622
|
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
|
|
6605
6623
|
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
|
|
6606
6624
|
if(query&&query.error){// remove codeVerifier from session storage
|
|
6607
|
-
if(
|
|
6608
|
-
|
|
6609
|
-
if(query&&query.code){if(!
|
|
6610
|
-
if(
|
|
6611
|
-
|
|
6612
|
-
if(
|
|
6613
|
-
|
|
6614
|
-
if(
|
|
6615
|
-
|
|
6616
|
-
if(
|
|
6617
|
-
|
|
6618
|
-
if(
|
|
6625
|
+
if(_this8.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}// reset access token if any was stored
|
|
6626
|
+
_this8._saveSettings({accessToken:undefined});return reject(new Error("[".concat(query.error,"] ").concat(query.error_description)));}// Get token on auth code
|
|
6627
|
+
if(query&&query.code){if(!_this8.codeVerifier){// load codeVerifier from session storage
|
|
6628
|
+
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
|
|
6629
|
+
_this8._testTokenAccess().then(function(){if(!_this8.authData.state&&query.state)_this8.authData.state=query.state;// remove codeVerifier from session storage
|
|
6630
|
+
if(_this8.hasLocalStorage){sessionStorage.removeItem("genesys_cloud_sdk_pkce_code_verifier");}resolve(_this8.authData);})["catch"](function(error){// Handle failure response
|
|
6631
|
+
_this8._saveSettings({accessToken:undefined});// remove codeVerifier from session storage
|
|
6632
|
+
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
|
|
6633
|
+
_this8._saveSettings({accessToken:undefined});// remove codeVerifier from session storage
|
|
6634
|
+
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
|
|
6635
|
+
_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
|
|
6636
|
+
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,"]")));});});}});}/**
|
|
6619
6637
|
* @description Parses the URL Query, grabs the code, and clears the query param. If no code is found, no action is taken.
|
|
6620
6638
|
*/},{key:"_setValuesFromUrlQuery",value:function _setValuesFromUrlQuery(){// Check for window
|
|
6621
6639
|
if(!(typeof window!=='undefined'&&window.location.search))return;// Process query string
|
|
@@ -6632,42 +6650,42 @@ document.body.scrollTop=scrollV;document.body.scrollLeft=scrollH;}return query;}
|
|
|
6632
6650
|
* @param {string} clientSecret - The client secret of an OAuth Code Authorization Grant client
|
|
6633
6651
|
* @param {string} authCode - Authorization code
|
|
6634
6652
|
* @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
|
|
6635
|
-
*/},{key:"loginCodeAuthorizationGrant",value:function loginCodeAuthorizationGrant(clientId,clientSecret,authCode,redirectUri){var
|
|
6636
|
-
|
|
6653
|
+
*/},{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
|
|
6654
|
+
_this9._handleCodeAuthorizationResponse(request,bodyParam,resolve,reject);});}/**
|
|
6637
6655
|
* @description Requests a new access token for Code Authorization. Only available in node apps.
|
|
6638
6656
|
* @param {string} clientId - The client ID of an OAuth Code Authorization Grant client
|
|
6639
6657
|
* @param {string} clientSecret - The client secret of an OAuth Code Authorization Grant client
|
|
6640
6658
|
* @param {string} authCode - Authorization code
|
|
6641
6659
|
* @param {string} redirectUri - Authorized redirect URI for your Code Authorization client
|
|
6642
|
-
*/},{key:"refreshCodeAuthorizationGrant",value:function refreshCodeAuthorizationGrant(clientId,clientSecret,refreshToken){var
|
|
6643
|
-
|
|
6660
|
+
*/},{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
|
|
6661
|
+
_this10._handleCodeAuthorizationResponse(request,bodyParam,resolve,reject);});}/**
|
|
6644
6662
|
* @description Handles the response for code auth requests
|
|
6645
6663
|
* @param {object} request - Authorization request object
|
|
6646
6664
|
* @param {object} bodyParam - Input body data for authorization request
|
|
6647
6665
|
* @param {function} resolve - Promise resolve callback
|
|
6648
6666
|
* @param {function} reject - Promise reject callback
|
|
6649
|
-
*/},{key:"_handleCodeAuthorizationResponse",value:function _handleCodeAuthorizationResponse(request,bodyParam,resolve,reject){var
|
|
6650
|
-
|
|
6651
|
-
var access_token=response.data.access_token;var refresh_token=response.data.refresh_token;
|
|
6652
|
-
resolve(
|
|
6653
|
-
if(error.response){
|
|
6667
|
+
*/},{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
|
|
6668
|
+
_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
|
|
6669
|
+
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
|
|
6670
|
+
resolve(_this11.authData);})["catch"](function(error){// Log error
|
|
6671
|
+
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);});}/**
|
|
6654
6672
|
* @description Utility function to create the request for auth requests
|
|
6655
6673
|
* @param {string} encodedData - Base64 encoded client and clientSecret pair
|
|
6656
6674
|
* @param {object} data - data to url form encode
|
|
6657
6675
|
*/},{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);}/**
|
|
6658
6676
|
* @description Handles an expired access token. Only available in node apps.
|
|
6659
6677
|
* @param {string} statusCode - The status code of a request
|
|
6660
|
-
*/},{key:"_handleExpiredAccessToken",value:function _handleExpiredAccessToken(){var
|
|
6661
|
-
|
|
6662
|
-
|
|
6678
|
+
*/},{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
|
|
6679
|
+
_this12.refreshInProgress=false;reject(err);});}else{// Wait refresh_token_wait_max seconds for other thread to complete refresh
|
|
6680
|
+
_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();});}});}/**
|
|
6663
6681
|
* @description Sleeps for a defined length
|
|
6664
6682
|
* @param {int} millis - Length to sleep in milliseconds
|
|
6665
6683
|
*/},{key:"_sleep",value:function _sleep(millis){return new Promise(function(resolve){return setTimeout(resolve,millis);});}/**
|
|
6666
6684
|
* @description Loads token from storage, if enabled, and checks to ensure it works.
|
|
6667
|
-
*/},{key:"_testTokenAccess",value:function _testTokenAccess(){var
|
|
6668
|
-
|
|
6669
|
-
if(!
|
|
6670
|
-
|
|
6685
|
+
*/},{key:"_testTokenAccess",value:function _testTokenAccess(){var _this13=this;return new Promise(function(resolve,reject){// Load from storage
|
|
6686
|
+
_this13._loadSettings();// Check if there is a token to test
|
|
6687
|
+
if(!_this13.authentications['PureCloud OAuth'].accessToken){reject(new Error('Token is not set'));return;}// Test token
|
|
6688
|
+
_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);});});}/**
|
|
6671
6689
|
* @description Parses the URL hash, grabs the access token, and clears the hash. If no access token is found, no action is taken.
|
|
6672
6690
|
*/},{key:"_setValuesFromUrlHash",value:function _setValuesFromUrlHash(){// Check for window
|
|
6673
6691
|
if(!(typeof window!=='undefined'&&window.location.hash))return;// Process hash string into object
|
|
@@ -6712,7 +6730,7 @@ this.setAccessToken(this.authentications['PureCloud OAuth'].accessToken);}/**
|
|
|
6712
6730
|
* @param {String} path The path to append to the base URL.
|
|
6713
6731
|
* @param {Object} pathParams The parameter values to append.
|
|
6714
6732
|
* @returns {String} The encoded path with parameter values substituted.
|
|
6715
|
-
*/},{key:"buildUrl",value:function buildUrl(path,pathParams){var
|
|
6733
|
+
*/},{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;}/**
|
|
6716
6734
|
* Checks whether the given content type represents JSON.<br>
|
|
6717
6735
|
* JSON content type examples:<br>
|
|
6718
6736
|
* <ul>
|
|
@@ -6753,7 +6771,7 @@ return param.map(this.paramToString);default:throw new Error("Unknown collection
|
|
|
6753
6771
|
* Applies authentication headers to the request.
|
|
6754
6772
|
* @param {Object} request The axios request config object.
|
|
6755
6773
|
* @param {Array.<String>} authNames An array of authentication method names.
|
|
6756
|
-
*/},{key:"applyAuthToRequest",value:function applyAuthToRequest(request,authNames){var
|
|
6774
|
+
*/},{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));}});}/**
|
|
6757
6775
|
* @description Sets the proxy agent axios will use for requests
|
|
6758
6776
|
* @param {any} agent - The proxy agent
|
|
6759
6777
|
*/},{key:"setProxyAgent",value:function setProxyAgent(agent){this.proxyAgent=agent;var httpClient=this.getHttpClient();httpClient.setHttpsAgent(this.proxyAgent);}/**
|
|
@@ -6770,7 +6788,7 @@ return param.map(this.paramToString);default:throw new Error("Unknown collection
|
|
|
6770
6788
|
* @param {Array.<String>} accepts An array of acceptable response MIME types.types or the
|
|
6771
6789
|
* constructor for a complex type.
|
|
6772
6790
|
* @returns {Promise} A Promise object.
|
|
6773
|
-
*/},{key:"callApi",value:function callApi(path,httpMethod,pathParams,queryParams,headerParams,formParams,bodyParam,authNames,contentTypes,accepts){var
|
|
6791
|
+
*/},{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
|
|
6774
6792
|
that.applyAuthToRequest(request,authNames);// set header parameters
|
|
6775
6793
|
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
|
|
6776
6794
|
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
|
|
@@ -6780,7 +6798,7 @@ resolve(data);})["catch"](function(error){var data=error;if(error.response&&erro
|
|
|
6780
6798
|
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(){/**
|
|
6781
6799
|
* AgentAssistants service.
|
|
6782
6800
|
* @module purecloud-platform-client-v2/api/AgentAssistantsApi
|
|
6783
|
-
* @version
|
|
6801
|
+
* @version 216.0.0
|
|
6784
6802
|
*//**
|
|
6785
6803
|
* Constructs a new AgentAssistantsApi.
|
|
6786
6804
|
* @alias module:purecloud-platform-client-v2/api/AgentAssistantsApi
|
|
@@ -6881,7 +6899,7 @@ if(queueId===undefined||queueId===null){throw'Missing the required parameter "qu
|
|
|
6881
6899
|
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(){/**
|
|
6882
6900
|
* AgentCopilot service.
|
|
6883
6901
|
* @module purecloud-platform-client-v2/api/AgentCopilotApi
|
|
6884
|
-
* @version
|
|
6902
|
+
* @version 216.0.0
|
|
6885
6903
|
*//**
|
|
6886
6904
|
* Constructs a new AgentCopilotApi.
|
|
6887
6905
|
* @alias module:purecloud-platform-client-v2/api/AgentCopilotApi
|
|
@@ -6903,7 +6921,7 @@ if(assistantId===undefined||assistantId===null){throw'Missing the required param
|
|
|
6903
6921
|
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(){/**
|
|
6904
6922
|
* AgentUI service.
|
|
6905
6923
|
* @module purecloud-platform-client-v2/api/AgentUIApi
|
|
6906
|
-
* @version
|
|
6924
|
+
* @version 216.0.0
|
|
6907
6925
|
*//**
|
|
6908
6926
|
* Constructs a new AgentUIApi.
|
|
6909
6927
|
* @alias module:purecloud-platform-client-v2/api/AgentUIApi
|
|
@@ -6937,7 +6955,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
|
|
|
6937
6955
|
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(){/**
|
|
6938
6956
|
* Alerting service.
|
|
6939
6957
|
* @module purecloud-platform-client-v2/api/AlertingApi
|
|
6940
|
-
* @version
|
|
6958
|
+
* @version 216.0.0
|
|
6941
6959
|
*//**
|
|
6942
6960
|
* Constructs a new AlertingApi.
|
|
6943
6961
|
* @alias module:purecloud-platform-client-v2/api/AlertingApi
|
|
@@ -7102,7 +7120,7 @@ if(ruleId===undefined||ruleId===null){throw'Missing the required parameter "rule
|
|
|
7102
7120
|
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(){/**
|
|
7103
7121
|
* Analytics service.
|
|
7104
7122
|
* @module purecloud-platform-client-v2/api/AnalyticsApi
|
|
7105
|
-
* @version
|
|
7123
|
+
* @version 216.0.0
|
|
7106
7124
|
*//**
|
|
7107
7125
|
* Constructs a new AnalyticsApi.
|
|
7108
7126
|
* @alias module:purecloud-platform-client-v2/api/AnalyticsApi
|
|
@@ -7689,7 +7707,6 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
7689
7707
|
* Query for summary aggregates
|
|
7690
7708
|
*
|
|
7691
7709
|
* @param {Object} body query
|
|
7692
|
-
* postAnalyticsSummariesAggregatesQuery is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
7693
7710
|
*/},{key:"postAnalyticsSummariesAggregatesQuery",value:function postAnalyticsSummariesAggregatesQuery(body){// verify the required parameter 'body' is set
|
|
7694
7711
|
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']);}/**
|
|
7695
7712
|
* Query for survey aggregates asynchronously
|
|
@@ -7774,7 +7791,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
7774
7791
|
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(){/**
|
|
7775
7792
|
* Architect service.
|
|
7776
7793
|
* @module purecloud-platform-client-v2/api/ArchitectApi
|
|
7777
|
-
* @version
|
|
7794
|
+
* @version 216.0.0
|
|
7778
7795
|
*//**
|
|
7779
7796
|
* Constructs a new ArchitectApi.
|
|
7780
7797
|
* @alias module:purecloud-platform-client-v2/api/ArchitectApi
|
|
@@ -8866,7 +8883,7 @@ if(milestoneId===undefined||milestoneId===null){throw'Missing the required param
|
|
|
8866
8883
|
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(){/**
|
|
8867
8884
|
* Audit service.
|
|
8868
8885
|
* @module purecloud-platform-client-v2/api/AuditApi
|
|
8869
|
-
* @version
|
|
8886
|
+
* @version 216.0.0
|
|
8870
8887
|
*//**
|
|
8871
8888
|
* Constructs a new AuditApi.
|
|
8872
8889
|
* @alias module:purecloud-platform-client-v2/api/AuditApi
|
|
@@ -8916,7 +8933,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
8916
8933
|
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(){/**
|
|
8917
8934
|
* Authorization service.
|
|
8918
8935
|
* @module purecloud-platform-client-v2/api/AuthorizationApi
|
|
8919
|
-
* @version
|
|
8936
|
+
* @version 216.0.0
|
|
8920
8937
|
*//**
|
|
8921
8938
|
* Constructs a new AuthorizationApi.
|
|
8922
8939
|
* @alias module:purecloud-platform-client-v2/api/AuthorizationApi
|
|
@@ -8931,6 +8948,14 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
8931
8948
|
* @param {Boolean} opts.force Force delete this division as well as the grants and objects associated with it (default to false)
|
|
8932
8949
|
*/return _createClass(AuthorizationApi,[{key:"deleteAuthorizationDivision",value:function deleteAuthorizationDivision(divisionId,opts){opts=opts||{};// verify the required parameter 'divisionId' is set
|
|
8933
8950
|
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']);}/**
|
|
8951
|
+
* Delete an access control policy
|
|
8952
|
+
*
|
|
8953
|
+
* @param {String} targetName The domain:entity:action target to which the policy is applied
|
|
8954
|
+
* @param {String} subjectId The ID of the subject to which the policy is applied
|
|
8955
|
+
* deleteAuthorizationPoliciesTargetSubjectSubjectId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
8956
|
+
*/},{key:"deleteAuthorizationPoliciesTargetSubjectSubjectId",value:function deleteAuthorizationPoliciesTargetSubjectSubjectId(targetName,subjectId){// verify the required parameter 'targetName' is set
|
|
8957
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling deleteAuthorizationPoliciesTargetSubjectSubjectId';}// verify the required parameter 'subjectId' is set
|
|
8958
|
+
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']);}/**
|
|
8934
8959
|
* Delete an organization role.
|
|
8935
8960
|
*
|
|
8936
8961
|
* @param {String} roleId Role ID
|
|
@@ -9014,6 +9039,55 @@ if(permission===undefined||permission===null){throw'Missing the required paramet
|
|
|
9014
9039
|
* @param {Object} opts.queryType Query filter type
|
|
9015
9040
|
* @param {String} opts.query Comma-separated list of permissions or domains to query
|
|
9016
9041
|
*/},{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']);}/**
|
|
9042
|
+
* Get a page of access policies for an organization
|
|
9043
|
+
*
|
|
9044
|
+
* @param {Object} opts Optional parameters
|
|
9045
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
9046
|
+
* @param {Number} opts.pageSize Number of entities to return. Maximum of 200. (default to 25)
|
|
9047
|
+
* getAuthorizationPolicies is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9048
|
+
*/},{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']);}/**
|
|
9049
|
+
* Get a page of access policies for a given subject
|
|
9050
|
+
*
|
|
9051
|
+
* @param {String} subjectId The ID of the subject to which policies are applied
|
|
9052
|
+
* @param {Object} opts Optional parameters
|
|
9053
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
9054
|
+
* @param {Number} opts.pageSize Number of entities to return. Maximum of 200. (default to 25)
|
|
9055
|
+
* getAuthorizationPoliciesSubjectSubjectId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9056
|
+
*/},{key:"getAuthorizationPoliciesSubjectSubjectId",value:function getAuthorizationPoliciesSubjectSubjectId(subjectId,opts){opts=opts||{};// verify the required parameter 'subjectId' is set
|
|
9057
|
+
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']);}/**
|
|
9058
|
+
* Get a page of access policies for a given policy target
|
|
9059
|
+
*
|
|
9060
|
+
* @param {String} targetName The domain:entity:action resource target to which policies are applied
|
|
9061
|
+
* @param {Object} opts Optional parameters
|
|
9062
|
+
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
9063
|
+
* @param {Number} opts.pageSize Number of entities to return. Maximum of 200. (default to 25)
|
|
9064
|
+
* getAuthorizationPoliciesTarget is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9065
|
+
*/},{key:"getAuthorizationPoliciesTarget",value:function getAuthorizationPoliciesTarget(targetName,opts){opts=opts||{};// verify the required parameter 'targetName' is set
|
|
9066
|
+
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']);}/**
|
|
9067
|
+
* Get an access control policy for a specified resource target and subject
|
|
9068
|
+
*
|
|
9069
|
+
* @param {String} targetName The domain:entity:action resource target to which the policy is applied
|
|
9070
|
+
* @param {String} subjectId The ID of the subject to which the policy is applied
|
|
9071
|
+
* getAuthorizationPoliciesTargetSubjectSubjectId is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9072
|
+
*/},{key:"getAuthorizationPoliciesTargetSubjectSubjectId",value:function getAuthorizationPoliciesTargetSubjectSubjectId(targetName,subjectId){// verify the required parameter 'targetName' is set
|
|
9073
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling getAuthorizationPoliciesTargetSubjectSubjectId';}// verify the required parameter 'subjectId' is set
|
|
9074
|
+
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']);}/**
|
|
9075
|
+
* Get a map of policy targets to valid attributes for those targets
|
|
9076
|
+
*
|
|
9077
|
+
* getAuthorizationPoliciesTargets is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9078
|
+
*/},{key:"getAuthorizationPoliciesTargets",value:function getAuthorizationPoliciesTargets(){return this.apiClient.callApi('/api/v2/authorization/policies/targets','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
9079
|
+
* Get an access control policy with the specified policy ID
|
|
9080
|
+
*
|
|
9081
|
+
* @param {String} policyId The ID of the policy to retrieve
|
|
9082
|
+
* getAuthorizationPolicy is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9083
|
+
*/},{key:"getAuthorizationPolicy",value:function getAuthorizationPolicy(policyId){// verify the required parameter 'policyId' is set
|
|
9084
|
+
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']);}/**
|
|
9085
|
+
* Get the list of attributes used to evaluate an access control policy with the specified policy ID
|
|
9086
|
+
*
|
|
9087
|
+
* @param {String} policyId The ID of the policy to retrieve attributes
|
|
9088
|
+
* getAuthorizationPolicyAttributes is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9089
|
+
*/},{key:"getAuthorizationPolicyAttributes",value:function getAuthorizationPolicyAttributes(policyId){// verify the required parameter 'policyId' is set
|
|
9090
|
+
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']);}/**
|
|
9017
9091
|
* Get the list of enabled products
|
|
9018
9092
|
* Gets the list of enabled products. Some example product names are: collaborateFree, collaboratePro, communicate, and engage.
|
|
9019
9093
|
*/},{key:"getAuthorizationProducts",value:function getAuthorizationProducts(){return this.apiClient.callApi('/api/v2/authorization/products','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -9128,6 +9202,30 @@ if(divisionId===undefined||divisionId===null){throw'Missing the required paramet
|
|
|
9128
9202
|
* @param {Object} body Division
|
|
9129
9203
|
*/},{key:"postAuthorizationDivisions",value:function postAuthorizationDivisions(body){// verify the required parameter 'body' is set
|
|
9130
9204
|
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']);}/**
|
|
9205
|
+
* Add an access control policy for a specified resource target and subject
|
|
9206
|
+
*
|
|
9207
|
+
* @param {String} targetName The domain:entity:action target to which the policy will be applied
|
|
9208
|
+
* @param {Object} body Access control policy
|
|
9209
|
+
* postAuthorizationPoliciesTarget is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9210
|
+
*/},{key:"postAuthorizationPoliciesTarget",value:function postAuthorizationPoliciesTarget(targetName,body){// verify the required parameter 'targetName' is set
|
|
9211
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling postAuthorizationPoliciesTarget';}// verify the required parameter 'body' is set
|
|
9212
|
+
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']);}/**
|
|
9213
|
+
* Validate the conditions and attributes of an access control policy for a specified resource target
|
|
9214
|
+
*
|
|
9215
|
+
* @param {String} targetName The domain:entity:action target to which the policy will be applied
|
|
9216
|
+
* @param {Object} body Access control policy
|
|
9217
|
+
* postAuthorizationPoliciesTargetValidate is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9218
|
+
*/},{key:"postAuthorizationPoliciesTargetValidate",value:function postAuthorizationPoliciesTargetValidate(targetName,body){// verify the required parameter 'targetName' is set
|
|
9219
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling postAuthorizationPoliciesTargetValidate';}// verify the required parameter 'body' is set
|
|
9220
|
+
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']);}/**
|
|
9221
|
+
* Simulate a request and evaluate the specified policy ID against the provided values
|
|
9222
|
+
*
|
|
9223
|
+
* @param {String} policyId The ID of the policy to test the simulated data against
|
|
9224
|
+
* @param {Object} body A map of attribute names to type and simulated data value
|
|
9225
|
+
* postAuthorizationPolicySimulate is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9226
|
+
*/},{key:"postAuthorizationPolicySimulate",value:function postAuthorizationPolicySimulate(policyId,body){// verify the required parameter 'policyId' is set
|
|
9227
|
+
if(policyId===undefined||policyId===null){throw'Missing the required parameter "policyId" when calling postAuthorizationPolicySimulate';}// verify the required parameter 'body' is set
|
|
9228
|
+
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']);}/**
|
|
9131
9229
|
* Bulk-grant subjects and divisions with an organization role.
|
|
9132
9230
|
*
|
|
9133
9231
|
* @param {String} roleId Role ID
|
|
@@ -9199,6 +9297,22 @@ if(roleId===undefined||roleId===null){throw'Missing the required parameter "role
|
|
|
9199
9297
|
*/},{key:"putAuthorizationDivision",value:function putAuthorizationDivision(divisionId,body){// verify the required parameter 'divisionId' is set
|
|
9200
9298
|
if(divisionId===undefined||divisionId===null){throw'Missing the required parameter "divisionId" when calling putAuthorizationDivision';}// verify the required parameter 'body' is set
|
|
9201
9299
|
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']);}/**
|
|
9300
|
+
* Add an access control policy for a specified resource target and subject, overwriting any existing policy
|
|
9301
|
+
*
|
|
9302
|
+
* @param {String} targetName The domain:entity:action target to which the policy will be applied
|
|
9303
|
+
* @param {Object} body Access control policy
|
|
9304
|
+
* putAuthorizationPoliciesTarget is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9305
|
+
*/},{key:"putAuthorizationPoliciesTarget",value:function putAuthorizationPoliciesTarget(targetName,body){// verify the required parameter 'targetName' is set
|
|
9306
|
+
if(targetName===undefined||targetName===null){throw'Missing the required parameter "targetName" when calling putAuthorizationPoliciesTarget';}// verify the required parameter 'body' is set
|
|
9307
|
+
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']);}/**
|
|
9308
|
+
* Update an access control policy with a given ID
|
|
9309
|
+
*
|
|
9310
|
+
* @param {String} policyId The ID of the policy to update
|
|
9311
|
+
* @param {Object} body Access control policy
|
|
9312
|
+
* putAuthorizationPolicy is a preview method and is subject to both breaking and non-breaking changes at any time without notice
|
|
9313
|
+
*/},{key:"putAuthorizationPolicy",value:function putAuthorizationPolicy(policyId,body){// verify the required parameter 'policyId' is set
|
|
9314
|
+
if(policyId===undefined||policyId===null){throw'Missing the required parameter "policyId" when calling putAuthorizationPolicy';}// verify the required parameter 'body' is set
|
|
9315
|
+
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']);}/**
|
|
9202
9316
|
* Update an organization role.
|
|
9203
9317
|
* Update
|
|
9204
9318
|
* @param {String} roleId Role ID
|
|
@@ -9239,7 +9353,7 @@ if(subjectId===undefined||subjectId===null){throw'Missing the required parameter
|
|
|
9239
9353
|
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(){/**
|
|
9240
9354
|
* Billing service.
|
|
9241
9355
|
* @module purecloud-platform-client-v2/api/BillingApi
|
|
9242
|
-
* @version
|
|
9356
|
+
* @version 216.0.0
|
|
9243
9357
|
*//**
|
|
9244
9358
|
* Constructs a new BillingApi.
|
|
9245
9359
|
* @alias module:purecloud-platform-client-v2/api/BillingApi
|
|
@@ -9263,7 +9377,7 @@ if(endDate===undefined||endDate===null){throw'Missing the required parameter "en
|
|
|
9263
9377
|
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(){/**
|
|
9264
9378
|
* CarrierServices service.
|
|
9265
9379
|
* @module purecloud-platform-client-v2/api/CarrierServicesApi
|
|
9266
|
-
* @version
|
|
9380
|
+
* @version 216.0.0
|
|
9267
9381
|
*//**
|
|
9268
9382
|
* Constructs a new CarrierServicesApi.
|
|
9269
9383
|
* @alias module:purecloud-platform-client-v2/api/CarrierServicesApi
|
|
@@ -9283,7 +9397,7 @@ if(phoneNumber===undefined||phoneNumber===null){throw'Missing the required param
|
|
|
9283
9397
|
*/},{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(){/**
|
|
9284
9398
|
* Chat service.
|
|
9285
9399
|
* @module purecloud-platform-client-v2/api/ChatApi
|
|
9286
|
-
* @version
|
|
9400
|
+
* @version 216.0.0
|
|
9287
9401
|
*//**
|
|
9288
9402
|
* Constructs a new ChatApi.
|
|
9289
9403
|
* @alias module:purecloud-platform-client-v2/api/ChatApi
|
|
@@ -9508,7 +9622,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
9508
9622
|
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(){/**
|
|
9509
9623
|
* Coaching service.
|
|
9510
9624
|
* @module purecloud-platform-client-v2/api/CoachingApi
|
|
9511
|
-
* @version
|
|
9625
|
+
* @version 216.0.0
|
|
9512
9626
|
*//**
|
|
9513
9627
|
* Constructs a new CoachingApi.
|
|
9514
9628
|
* @alias module:purecloud-platform-client-v2/api/CoachingApi
|
|
@@ -9661,7 +9775,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
9661
9775
|
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(){/**
|
|
9662
9776
|
* ContentManagement service.
|
|
9663
9777
|
* @module purecloud-platform-client-v2/api/ContentManagementApi
|
|
9664
|
-
* @version
|
|
9778
|
+
* @version 216.0.0
|
|
9665
9779
|
*//**
|
|
9666
9780
|
* Constructs a new ContentManagementApi.
|
|
9667
9781
|
* @alias module:purecloud-platform-client-v2/api/ContentManagementApi
|
|
@@ -9943,7 +10057,7 @@ if(tagId===undefined||tagId===null){throw'Missing the required parameter "tagId"
|
|
|
9943
10057
|
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(){/**
|
|
9944
10058
|
* Conversations service.
|
|
9945
10059
|
* @module purecloud-platform-client-v2/api/ConversationsApi
|
|
9946
|
-
* @version
|
|
10060
|
+
* @version 216.0.0
|
|
9947
10061
|
*//**
|
|
9948
10062
|
* Constructs a new ConversationsApi.
|
|
9949
10063
|
* @alias module:purecloud-platform-client-v2/api/ConversationsApi
|
|
@@ -11690,7 +11804,7 @@ if(conversationId===undefined||conversationId===null){throw'Missing the required
|
|
|
11690
11804
|
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(){/**
|
|
11691
11805
|
* DataExtensions service.
|
|
11692
11806
|
* @module purecloud-platform-client-v2/api/DataExtensionsApi
|
|
11693
|
-
* @version
|
|
11807
|
+
* @version 216.0.0
|
|
11694
11808
|
*//**
|
|
11695
11809
|
* Constructs a new DataExtensionsApi.
|
|
11696
11810
|
* @alias module:purecloud-platform-client-v2/api/DataExtensionsApi
|
|
@@ -11711,7 +11825,7 @@ if(coretypeName===undefined||coretypeName===null){throw'Missing the required par
|
|
|
11711
11825
|
*/},{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(){/**
|
|
11712
11826
|
* DataPrivacy service.
|
|
11713
11827
|
* @module purecloud-platform-client-v2/api/DataPrivacyApi
|
|
11714
|
-
* @version
|
|
11828
|
+
* @version 216.0.0
|
|
11715
11829
|
*//**
|
|
11716
11830
|
* Constructs a new DataPrivacyApi.
|
|
11717
11831
|
* @alias module:purecloud-platform-client-v2/api/DataPrivacyApi
|
|
@@ -11751,7 +11865,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11751
11865
|
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(){/**
|
|
11752
11866
|
* Downloads service.
|
|
11753
11867
|
* @module purecloud-platform-client-v2/api/DownloadsApi
|
|
11754
|
-
* @version
|
|
11868
|
+
* @version 216.0.0
|
|
11755
11869
|
*//**
|
|
11756
11870
|
* Constructs a new DownloadsApi.
|
|
11757
11871
|
* @alias module:purecloud-platform-client-v2/api/DownloadsApi
|
|
@@ -11770,7 +11884,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11770
11884
|
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(){/**
|
|
11771
11885
|
* Emails service.
|
|
11772
11886
|
* @module purecloud-platform-client-v2/api/EmailsApi
|
|
11773
|
-
* @version
|
|
11887
|
+
* @version 216.0.0
|
|
11774
11888
|
*//**
|
|
11775
11889
|
* Constructs a new EmailsApi.
|
|
11776
11890
|
* @alias module:purecloud-platform-client-v2/api/EmailsApi
|
|
@@ -11788,7 +11902,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
11788
11902
|
*/},{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(){/**
|
|
11789
11903
|
* EmployeeEngagement service.
|
|
11790
11904
|
* @module purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
11791
|
-
* @version
|
|
11905
|
+
* @version 216.0.0
|
|
11792
11906
|
*//**
|
|
11793
11907
|
* Constructs a new EmployeeEngagementApi.
|
|
11794
11908
|
* @alias module:purecloud-platform-client-v2/api/EmployeeEngagementApi
|
|
@@ -11826,7 +11940,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11826
11940
|
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(){/**
|
|
11827
11941
|
* Events service.
|
|
11828
11942
|
* @module purecloud-platform-client-v2/api/EventsApi
|
|
11829
|
-
* @version
|
|
11943
|
+
* @version 216.0.0
|
|
11830
11944
|
*//**
|
|
11831
11945
|
* Constructs a new EventsApi.
|
|
11832
11946
|
* @alias module:purecloud-platform-client-v2/api/EventsApi
|
|
@@ -11851,7 +11965,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
11851
11965
|
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(){/**
|
|
11852
11966
|
* ExternalContacts service.
|
|
11853
11967
|
* @module purecloud-platform-client-v2/api/ExternalContactsApi
|
|
11854
|
-
* @version
|
|
11968
|
+
* @version 216.0.0
|
|
11855
11969
|
*//**
|
|
11856
11970
|
* Constructs a new ExternalContactsApi.
|
|
11857
11971
|
* @alias module:purecloud-platform-client-v2/api/ExternalContactsApi
|
|
@@ -12027,16 +12141,19 @@ if(uploadId===undefined||uploadId===null){throw'Missing the required parameter "
|
|
|
12027
12141
|
* Get job based on id
|
|
12028
12142
|
*
|
|
12029
12143
|
* @param {String} jobId Job id
|
|
12030
|
-
|
|
12031
|
-
|
|
12144
|
+
* @param {Object} opts Optional parameters
|
|
12145
|
+
* @param {Array.<String>} opts.expand which fields, if any, to expand
|
|
12146
|
+
*/},{key:"getExternalcontactsImportJob",value:function getExternalcontactsImportJob(jobId,opts){opts=opts||{};// verify the required parameter 'jobId' is set
|
|
12147
|
+
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']);}/**
|
|
12032
12148
|
* List jobs for organization
|
|
12033
12149
|
*
|
|
12034
12150
|
* @param {Object} opts Optional parameters
|
|
12151
|
+
* @param {Array.<String>} opts.expand which fields, if any, to expand
|
|
12035
12152
|
* @param {String} opts.after The cursor that points to the end of the set of entities that has been returned.
|
|
12036
12153
|
* @param {String} opts.pageSize Number of entities to return. Maximum of 100. (default to 25)
|
|
12037
12154
|
* @param {Object} opts.sortOrder Direction of sorting. (default to Ascending)
|
|
12038
12155
|
* @param {Object} opts.jobStatus Search term to filter by jobStatus
|
|
12039
|
-
*/},{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']);}/**
|
|
12156
|
+
*/},{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']);}/**
|
|
12040
12157
|
* Get setting based on id
|
|
12041
12158
|
*
|
|
12042
12159
|
* @param {String} settingsId Settings id
|
|
@@ -12443,7 +12560,7 @@ if(relationshipId===undefined||relationshipId===null){throw'Missing the required
|
|
|
12443
12560
|
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(){/**
|
|
12444
12561
|
* Fax service.
|
|
12445
12562
|
* @module purecloud-platform-client-v2/api/FaxApi
|
|
12446
|
-
* @version
|
|
12563
|
+
* @version 216.0.0
|
|
12447
12564
|
*//**
|
|
12448
12565
|
* Constructs a new FaxApi.
|
|
12449
12566
|
* @alias module:purecloud-platform-client-v2/api/FaxApi
|
|
@@ -12492,7 +12609,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
12492
12609
|
*/},{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(){/**
|
|
12493
12610
|
* Flows service.
|
|
12494
12611
|
* @module purecloud-platform-client-v2/api/FlowsApi
|
|
12495
|
-
* @version
|
|
12612
|
+
* @version 216.0.0
|
|
12496
12613
|
*//**
|
|
12497
12614
|
* Constructs a new FlowsApi.
|
|
12498
12615
|
* @alias module:purecloud-platform-client-v2/api/FlowsApi
|
|
@@ -12540,7 +12657,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
12540
12657
|
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(){/**
|
|
12541
12658
|
* Gamification service.
|
|
12542
12659
|
* @module purecloud-platform-client-v2/api/GamificationApi
|
|
12543
|
-
* @version
|
|
12660
|
+
* @version 216.0.0
|
|
12544
12661
|
*//**
|
|
12545
12662
|
* Constructs a new GamificationApi.
|
|
12546
12663
|
* @alias module:purecloud-platform-client-v2/api/GamificationApi
|
|
@@ -13099,7 +13216,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
13099
13216
|
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(){/**
|
|
13100
13217
|
* GeneralDataProtectionRegulation service.
|
|
13101
13218
|
* @module purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
13102
|
-
* @version
|
|
13219
|
+
* @version 216.0.0
|
|
13103
13220
|
*//**
|
|
13104
13221
|
* Constructs a new GeneralDataProtectionRegulationApi.
|
|
13105
13222
|
* @alias module:purecloud-platform-client-v2/api/GeneralDataProtectionRegulationApi
|
|
@@ -13134,7 +13251,7 @@ if(searchValue===undefined||searchValue===null){throw'Missing the required param
|
|
|
13134
13251
|
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(){/**
|
|
13135
13252
|
* Geolocation service.
|
|
13136
13253
|
* @module purecloud-platform-client-v2/api/GeolocationApi
|
|
13137
|
-
* @version
|
|
13254
|
+
* @version 216.0.0
|
|
13138
13255
|
*//**
|
|
13139
13256
|
* Constructs a new GeolocationApi.
|
|
13140
13257
|
* @alias module:purecloud-platform-client-v2/api/GeolocationApi
|
|
@@ -13168,7 +13285,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
13168
13285
|
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(){/**
|
|
13169
13286
|
* Greetings service.
|
|
13170
13287
|
* @module purecloud-platform-client-v2/api/GreetingsApi
|
|
13171
|
-
* @version
|
|
13288
|
+
* @version 216.0.0
|
|
13172
13289
|
*//**
|
|
13173
13290
|
* Constructs a new GreetingsApi.
|
|
13174
13291
|
* @alias module:purecloud-platform-client-v2/api/GreetingsApi
|
|
@@ -13275,7 +13392,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
13275
13392
|
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(){/**
|
|
13276
13393
|
* Groups service.
|
|
13277
13394
|
* @module purecloud-platform-client-v2/api/GroupsApi
|
|
13278
|
-
* @version
|
|
13395
|
+
* @version 216.0.0
|
|
13279
13396
|
*//**
|
|
13280
13397
|
* Constructs a new GroupsApi.
|
|
13281
13398
|
* @alias module:purecloud-platform-client-v2/api/GroupsApi
|
|
@@ -13408,7 +13525,7 @@ if(groupId===undefined||groupId===null){throw'Missing the required parameter "gr
|
|
|
13408
13525
|
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(){/**
|
|
13409
13526
|
* IdentityProvider service.
|
|
13410
13527
|
* @module purecloud-platform-client-v2/api/IdentityProviderApi
|
|
13411
|
-
* @version
|
|
13528
|
+
* @version 216.0.0
|
|
13412
13529
|
*//**
|
|
13413
13530
|
* Constructs a new IdentityProviderApi.
|
|
13414
13531
|
* @alias module:purecloud-platform-client-v2/api/IdentityProviderApi
|
|
@@ -13564,7 +13681,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
13564
13681
|
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(){/**
|
|
13565
13682
|
* InfrastructureAsCode service.
|
|
13566
13683
|
* @module purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
13567
|
-
* @version
|
|
13684
|
+
* @version 216.0.0
|
|
13568
13685
|
*//**
|
|
13569
13686
|
* Constructs a new InfrastructureAsCodeApi.
|
|
13570
13687
|
* @alias module:purecloud-platform-client-v2/api/InfrastructureAsCodeApi
|
|
@@ -13618,7 +13735,7 @@ if(jobId===undefined||jobId===null){throw'Missing the required parameter "jobId"
|
|
|
13618
13735
|
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(){/**
|
|
13619
13736
|
* Integrations service.
|
|
13620
13737
|
* @module purecloud-platform-client-v2/api/IntegrationsApi
|
|
13621
|
-
* @version
|
|
13738
|
+
* @version 216.0.0
|
|
13622
13739
|
*//**
|
|
13623
13740
|
* Constructs a new IntegrationsApi.
|
|
13624
13741
|
* @alias module:purecloud-platform-client-v2/api/IntegrationsApi
|
|
@@ -14248,7 +14365,7 @@ if(ucIntegrationId===undefined||ucIntegrationId===null){throw'Missing the requir
|
|
|
14248
14365
|
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(){/**
|
|
14249
14366
|
* Journey service.
|
|
14250
14367
|
* @module purecloud-platform-client-v2/api/JourneyApi
|
|
14251
|
-
* @version
|
|
14368
|
+
* @version 216.0.0
|
|
14252
14369
|
*//**
|
|
14253
14370
|
* Constructs a new JourneyApi.
|
|
14254
14371
|
* @alias module:purecloud-platform-client-v2/api/JourneyApi
|
|
@@ -14535,6 +14652,9 @@ if(journeyVersionId===undefined||journeyVersionId===null){throw'Missing the requ
|
|
|
14535
14652
|
* @param {Object} opts.expand Parameter to request additional data to return in Journey payload
|
|
14536
14653
|
* @param {String} opts.id Parameter to request a list of Journey Views by id, separated by commas. Limit of 100 items.
|
|
14537
14654
|
*/},{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']);}/**
|
|
14655
|
+
* Get details about the data available for journey queries including oldest and newest event dates
|
|
14656
|
+
*
|
|
14657
|
+
*/},{key:"getJourneyViewsDataDetails",value:function getJourneyViewsDataDetails(){return this.apiClient.callApi('/api/v2/journey/views/data/details','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
14538
14658
|
* Get an Event Definition
|
|
14539
14659
|
*
|
|
14540
14660
|
* @param {String} eventDefinitionId Event Definition ID
|
|
@@ -14725,7 +14845,7 @@ if(versionId===undefined||versionId===null){throw'Missing the required parameter
|
|
|
14725
14845
|
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(){/**
|
|
14726
14846
|
* Knowledge service.
|
|
14727
14847
|
* @module purecloud-platform-client-v2/api/KnowledgeApi
|
|
14728
|
-
* @version
|
|
14848
|
+
* @version 216.0.0
|
|
14729
14849
|
*//**
|
|
14730
14850
|
* Constructs a new KnowledgeApi.
|
|
14731
14851
|
* @alias module:purecloud-platform-client-v2/api/KnowledgeApi
|
|
@@ -15795,7 +15915,7 @@ if(sourceId===undefined||sourceId===null){throw'Missing the required parameter "
|
|
|
15795
15915
|
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(){/**
|
|
15796
15916
|
* LanguageUnderstanding service.
|
|
15797
15917
|
* @module purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
15798
|
-
* @version
|
|
15918
|
+
* @version 216.0.0
|
|
15799
15919
|
*//**
|
|
15800
15920
|
* Constructs a new LanguageUnderstandingApi.
|
|
15801
15921
|
* @alias module:purecloud-platform-client-v2/api/LanguageUnderstandingApi
|
|
@@ -16054,7 +16174,7 @@ if(domainVersionId===undefined||domainVersionId===null){throw'Missing the requir
|
|
|
16054
16174
|
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(){/**
|
|
16055
16175
|
* Languages service.
|
|
16056
16176
|
* @module purecloud-platform-client-v2/api/LanguagesApi
|
|
16057
|
-
* @version
|
|
16177
|
+
* @version 216.0.0
|
|
16058
16178
|
*//**
|
|
16059
16179
|
* Constructs a new LanguagesApi.
|
|
16060
16180
|
* @alias module:purecloud-platform-client-v2/api/LanguagesApi
|
|
@@ -16109,7 +16229,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
16109
16229
|
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(){/**
|
|
16110
16230
|
* Learning service.
|
|
16111
16231
|
* @module purecloud-platform-client-v2/api/LearningApi
|
|
16112
|
-
* @version
|
|
16232
|
+
* @version 216.0.0
|
|
16113
16233
|
*//**
|
|
16114
16234
|
* Constructs a new LearningApi.
|
|
16115
16235
|
* @alias module:purecloud-platform-client-v2/api/LearningApi
|
|
@@ -16380,7 +16500,7 @@ if(moduleId===undefined||moduleId===null){throw'Missing the required parameter "
|
|
|
16380
16500
|
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(){/**
|
|
16381
16501
|
* License service.
|
|
16382
16502
|
* @module purecloud-platform-client-v2/api/LicenseApi
|
|
16383
|
-
* @version
|
|
16503
|
+
* @version 216.0.0
|
|
16384
16504
|
*//**
|
|
16385
16505
|
* Constructs a new LicenseApi.
|
|
16386
16506
|
* @alias module:purecloud-platform-client-v2/api/LicenseApi
|
|
@@ -16434,7 +16554,7 @@ if(featureName===undefined||featureName===null){throw'Missing the required param
|
|
|
16434
16554
|
*/},{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(){/**
|
|
16435
16555
|
* Locations service.
|
|
16436
16556
|
* @module purecloud-platform-client-v2/api/LocationsApi
|
|
16437
|
-
* @version
|
|
16557
|
+
* @version 216.0.0
|
|
16438
16558
|
*//**
|
|
16439
16559
|
* Constructs a new LocationsApi.
|
|
16440
16560
|
* @alias module:purecloud-platform-client-v2/api/LocationsApi
|
|
@@ -16493,7 +16613,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16493
16613
|
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(){/**
|
|
16494
16614
|
* LogCapture service.
|
|
16495
16615
|
* @module purecloud-platform-client-v2/api/LogCaptureApi
|
|
16496
|
-
* @version
|
|
16616
|
+
* @version 216.0.0
|
|
16497
16617
|
*//**
|
|
16498
16618
|
* Constructs a new LogCaptureApi.
|
|
16499
16619
|
* @alias module:purecloud-platform-client-v2/api/LogCaptureApi
|
|
@@ -16543,7 +16663,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
16543
16663
|
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(){/**
|
|
16544
16664
|
* Messaging service.
|
|
16545
16665
|
* @module purecloud-platform-client-v2/api/MessagingApi
|
|
16546
|
-
* @version
|
|
16666
|
+
* @version 216.0.0
|
|
16547
16667
|
*//**
|
|
16548
16668
|
* Constructs a new MessagingApi.
|
|
16549
16669
|
* @alias module:purecloud-platform-client-v2/api/MessagingApi
|
|
@@ -16633,7 +16753,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16633
16753
|
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(){/**
|
|
16634
16754
|
* MobileDevices service.
|
|
16635
16755
|
* @module purecloud-platform-client-v2/api/MobileDevicesApi
|
|
16636
|
-
* @version
|
|
16756
|
+
* @version 216.0.0
|
|
16637
16757
|
*//**
|
|
16638
16758
|
* Constructs a new MobileDevicesApi.
|
|
16639
16759
|
* @alias module:purecloud-platform-client-v2/api/MobileDevicesApi
|
|
@@ -16672,7 +16792,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
16672
16792
|
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(){/**
|
|
16673
16793
|
* Notifications service.
|
|
16674
16794
|
* @module purecloud-platform-client-v2/api/NotificationsApi
|
|
16675
|
-
* @version
|
|
16795
|
+
* @version 216.0.0
|
|
16676
16796
|
*//**
|
|
16677
16797
|
* Constructs a new NotificationsApi.
|
|
16678
16798
|
* @alias module:purecloud-platform-client-v2/api/NotificationsApi
|
|
@@ -16729,7 +16849,7 @@ if(channelId===undefined||channelId===null){throw'Missing the required parameter
|
|
|
16729
16849
|
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(){/**
|
|
16730
16850
|
* OAuth service.
|
|
16731
16851
|
* @module purecloud-platform-client-v2/api/OAuthApi
|
|
16732
|
-
* @version
|
|
16852
|
+
* @version 216.0.0
|
|
16733
16853
|
*//**
|
|
16734
16854
|
* Constructs a new OAuthApi.
|
|
16735
16855
|
* @alias module:purecloud-platform-client-v2/api/OAuthApi
|
|
@@ -16814,7 +16934,7 @@ if(clientId===undefined||clientId===null){throw'Missing the required parameter "
|
|
|
16814
16934
|
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(){/**
|
|
16815
16935
|
* Objects service.
|
|
16816
16936
|
* @module purecloud-platform-client-v2/api/ObjectsApi
|
|
16817
|
-
* @version
|
|
16937
|
+
* @version 216.0.0
|
|
16818
16938
|
*//**
|
|
16819
16939
|
* Constructs a new ObjectsApi.
|
|
16820
16940
|
* @alias module:purecloud-platform-client-v2/api/ObjectsApi
|
|
@@ -16885,7 +17005,7 @@ if(divisionId===undefined||divisionId===null){throw'Missing the required paramet
|
|
|
16885
17005
|
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(){/**
|
|
16886
17006
|
* OperationalEvents service.
|
|
16887
17007
|
* @module purecloud-platform-client-v2/api/OperationalEventsApi
|
|
16888
|
-
* @version
|
|
17008
|
+
* @version 216.0.0
|
|
16889
17009
|
*//**
|
|
16890
17010
|
* Constructs a new OperationalEventsApi.
|
|
16891
17011
|
* @alias module:purecloud-platform-client-v2/api/OperationalEventsApi
|
|
@@ -16916,7 +17036,7 @@ if(eventDefinitionId===undefined||eventDefinitionId===null){throw'Missing the re
|
|
|
16916
17036
|
*/},{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(){/**
|
|
16917
17037
|
* Organization service.
|
|
16918
17038
|
* @module purecloud-platform-client-v2/api/OrganizationApi
|
|
16919
|
-
* @version
|
|
17039
|
+
* @version 216.0.0
|
|
16920
17040
|
*//**
|
|
16921
17041
|
* Constructs a new OrganizationApi.
|
|
16922
17042
|
* @alias module:purecloud-platform-client-v2/api/OrganizationApi
|
|
@@ -17041,7 +17161,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
17041
17161
|
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(){/**
|
|
17042
17162
|
* OrganizationAuthorization service.
|
|
17043
17163
|
* @module purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
17044
|
-
* @version
|
|
17164
|
+
* @version 216.0.0
|
|
17045
17165
|
*//**
|
|
17046
17166
|
* Constructs a new OrganizationAuthorizationApi.
|
|
17047
17167
|
* @alias module:purecloud-platform-client-v2/api/OrganizationAuthorizationApi
|
|
@@ -17375,7 +17495,7 @@ if(trustorOrgId===undefined||trustorOrgId===null){throw'Missing the required par
|
|
|
17375
17495
|
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(){/**
|
|
17376
17496
|
* Outbound service.
|
|
17377
17497
|
* @module purecloud-platform-client-v2/api/OutboundApi
|
|
17378
|
-
* @version
|
|
17498
|
+
* @version 216.0.0
|
|
17379
17499
|
*//**
|
|
17380
17500
|
* Constructs a new OutboundApi.
|
|
17381
17501
|
* @alias module:purecloud-platform-client-v2/api/OutboundApi
|
|
@@ -18486,7 +18606,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18486
18606
|
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(){/**
|
|
18487
18607
|
* Presence service.
|
|
18488
18608
|
* @module purecloud-platform-client-v2/api/PresenceApi
|
|
18489
|
-
* @version
|
|
18609
|
+
* @version 216.0.0
|
|
18490
18610
|
*//**
|
|
18491
18611
|
* Constructs a new PresenceApi.
|
|
18492
18612
|
* @alias module:purecloud-platform-client-v2/api/PresenceApi
|
|
@@ -18659,7 +18779,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
18659
18779
|
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(){/**
|
|
18660
18780
|
* ProcessAutomation service.
|
|
18661
18781
|
* @module purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
18662
|
-
* @version
|
|
18782
|
+
* @version 216.0.0
|
|
18663
18783
|
*//**
|
|
18664
18784
|
* Constructs a new ProcessAutomationApi.
|
|
18665
18785
|
* @alias module:purecloud-platform-client-v2/api/ProcessAutomationApi
|
|
@@ -18722,7 +18842,7 @@ if(triggerId===undefined||triggerId===null){throw'Missing the required parameter
|
|
|
18722
18842
|
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(){/**
|
|
18723
18843
|
* Quality service.
|
|
18724
18844
|
* @module purecloud-platform-client-v2/api/QualityApi
|
|
18725
|
-
* @version
|
|
18845
|
+
* @version 216.0.0
|
|
18726
18846
|
*//**
|
|
18727
18847
|
* Constructs a new QualityApi.
|
|
18728
18848
|
* @alias module:purecloud-platform-client-v2/api/QualityApi
|
|
@@ -19201,7 +19321,7 @@ if(customerSurveyUrl===undefined||customerSurveyUrl===null){throw'Missing the re
|
|
|
19201
19321
|
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(){/**
|
|
19202
19322
|
* Recording service.
|
|
19203
19323
|
* @module purecloud-platform-client-v2/api/RecordingApi
|
|
19204
|
-
* @version
|
|
19324
|
+
* @version 216.0.0
|
|
19205
19325
|
*//**
|
|
19206
19326
|
* Constructs a new RecordingApi.
|
|
19207
19327
|
* @alias module:purecloud-platform-client-v2/api/RecordingApi
|
|
@@ -19463,14 +19583,6 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
19463
19583
|
*/},{key:"patchRecordingMediaretentionpolicy",value:function patchRecordingMediaretentionpolicy(policyId,body){// verify the required parameter 'policyId' is set
|
|
19464
19584
|
if(policyId===undefined||policyId===null){throw'Missing the required parameter "policyId" when calling patchRecordingMediaretentionpolicy';}// verify the required parameter 'body' is set
|
|
19465
19585
|
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']);}/**
|
|
19466
|
-
* Update a screen recording session
|
|
19467
|
-
* This API is deprecated and the functionality to stop screen recording will be no longer supported.
|
|
19468
|
-
* @param {String} recordingSessionId Screen recording session ID
|
|
19469
|
-
* @param {Object} opts Optional parameters
|
|
19470
|
-
* @param {Object} opts.body
|
|
19471
|
-
* @deprecated
|
|
19472
|
-
*/},{key:"patchRecordingsScreensession",value:function patchRecordingsScreensession(recordingSessionId,opts){opts=opts||{};// verify the required parameter 'recordingSessionId' is set
|
|
19473
|
-
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']);}/**
|
|
19474
19586
|
* Create annotation
|
|
19475
19587
|
*
|
|
19476
19588
|
* @param {String} conversationId Conversation ID
|
|
@@ -19613,7 +19725,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
19613
19725
|
*/},{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(){/**
|
|
19614
19726
|
* ResponseManagement service.
|
|
19615
19727
|
* @module purecloud-platform-client-v2/api/ResponseManagementApi
|
|
19616
|
-
* @version
|
|
19728
|
+
* @version 216.0.0
|
|
19617
19729
|
*//**
|
|
19618
19730
|
* Constructs a new ResponseManagementApi.
|
|
19619
19731
|
* @alias module:purecloud-platform-client-v2/api/ResponseManagementApi
|
|
@@ -19734,7 +19846,7 @@ if(responseAssetId===undefined||responseAssetId===null){throw'Missing the requir
|
|
|
19734
19846
|
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(){/**
|
|
19735
19847
|
* Routing service.
|
|
19736
19848
|
* @module purecloud-platform-client-v2/api/RoutingApi
|
|
19737
|
-
* @version
|
|
19849
|
+
* @version 216.0.0
|
|
19738
19850
|
*//**
|
|
19739
19851
|
* Constructs a new RoutingApi.
|
|
19740
19852
|
* @alias module:purecloud-platform-client-v2/api/RoutingApi
|
|
@@ -20733,7 +20845,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
20733
20845
|
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(){/**
|
|
20734
20846
|
* SCIM service.
|
|
20735
20847
|
* @module purecloud-platform-client-v2/api/SCIMApi
|
|
20736
|
-
* @version
|
|
20848
|
+
* @version 216.0.0
|
|
20737
20849
|
*//**
|
|
20738
20850
|
* Constructs a new SCIMApi.
|
|
20739
20851
|
* @alias module:purecloud-platform-client-v2/api/SCIMApi
|
|
@@ -20958,7 +21070,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
20958
21070
|
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(){/**
|
|
20959
21071
|
* ScreenRecording service.
|
|
20960
21072
|
* @module purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
20961
|
-
* @version
|
|
21073
|
+
* @version 216.0.0
|
|
20962
21074
|
*//**
|
|
20963
21075
|
* Constructs a new ScreenRecordingApi.
|
|
20964
21076
|
* @alias module:purecloud-platform-client-v2/api/ScreenRecordingApi
|
|
@@ -20973,7 +21085,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
20973
21085
|
*/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(){/**
|
|
20974
21086
|
* Scripts service.
|
|
20975
21087
|
* @module purecloud-platform-client-v2/api/ScriptsApi
|
|
20976
|
-
* @version
|
|
21088
|
+
* @version 216.0.0
|
|
20977
21089
|
*//**
|
|
20978
21090
|
* Constructs a new ScriptsApi.
|
|
20979
21091
|
* @alias module:purecloud-platform-client-v2/api/ScriptsApi
|
|
@@ -21109,7 +21221,7 @@ if(scriptId===undefined||scriptId===null){throw'Missing the required parameter "
|
|
|
21109
21221
|
*/},{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(){/**
|
|
21110
21222
|
* Search service.
|
|
21111
21223
|
* @module purecloud-platform-client-v2/api/SearchApi
|
|
21112
|
-
* @version
|
|
21224
|
+
* @version 216.0.0
|
|
21113
21225
|
*//**
|
|
21114
21226
|
* Constructs a new SearchApi.
|
|
21115
21227
|
* @alias module:purecloud-platform-client-v2/api/SearchApi
|
|
@@ -21281,7 +21393,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
21281
21393
|
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(){/**
|
|
21282
21394
|
* Settings service.
|
|
21283
21395
|
* @module purecloud-platform-client-v2/api/SettingsApi
|
|
21284
|
-
* @version
|
|
21396
|
+
* @version 216.0.0
|
|
21285
21397
|
*//**
|
|
21286
21398
|
* Constructs a new SettingsApi.
|
|
21287
21399
|
* @alias module:purecloud-platform-client-v2/api/SettingsApi
|
|
@@ -21331,7 +21443,7 @@ if(agentId===undefined||agentId===null){throw'Missing the required parameter "ag
|
|
|
21331
21443
|
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(){/**
|
|
21332
21444
|
* SocialMedia service.
|
|
21333
21445
|
* @module purecloud-platform-client-v2/api/SocialMediaApi
|
|
21334
|
-
* @version
|
|
21446
|
+
* @version 216.0.0
|
|
21335
21447
|
*//**
|
|
21336
21448
|
* Constructs a new SocialMediaApi.
|
|
21337
21449
|
* @alias module:purecloud-platform-client-v2/api/SocialMediaApi
|
|
@@ -21596,7 +21708,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
21596
21708
|
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(){/**
|
|
21597
21709
|
* SpeechTextAnalytics service.
|
|
21598
21710
|
* @module purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
21599
|
-
* @version
|
|
21711
|
+
* @version 216.0.0
|
|
21600
21712
|
*//**
|
|
21601
21713
|
* Constructs a new SpeechTextAnalyticsApi.
|
|
21602
21714
|
* @alias module:purecloud-platform-client-v2/api/SpeechTextAnalyticsApi
|
|
@@ -21637,12 +21749,12 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
21637
21749
|
* Get the list of Speech and Text Analytics categories
|
|
21638
21750
|
*
|
|
21639
21751
|
* @param {Object} opts Optional parameters
|
|
21640
|
-
* @param {Number} opts.pageSize The page size for the listing. The max that will be returned is
|
|
21752
|
+
* @param {Number} opts.pageSize The page size for the listing. The max that will be returned is 25. (default to 25)
|
|
21641
21753
|
* @param {Number} opts.pageNumber The page number for the listing (default to 1)
|
|
21642
21754
|
* @param {String} opts.name The category name filter applied to the listing
|
|
21643
21755
|
* @param {Object} opts.sortOrder The sort order for the listing (default to asc)
|
|
21644
21756
|
* @param {Object} opts.sortBy The field to sort by for the listing (default to name)
|
|
21645
|
-
* @param {Array.<String>} opts.ids Comma separated Category IDs to filter by. Cannot be used with other filters. Maximum of
|
|
21757
|
+
* @param {Array.<String>} opts.ids Comma separated Category IDs to filter by. Cannot be used with other filters. Maximum of 25 IDs allowed.
|
|
21646
21758
|
*/},{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']);}/**
|
|
21647
21759
|
* Get a Speech and Text Analytics Category by ID
|
|
21648
21760
|
*
|
|
@@ -21919,7 +22031,7 @@ if(topicId===undefined||topicId===null){throw'Missing the required parameter "to
|
|
|
21919
22031
|
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(){/**
|
|
21920
22032
|
* Stations service.
|
|
21921
22033
|
* @module purecloud-platform-client-v2/api/StationsApi
|
|
21922
|
-
* @version
|
|
22034
|
+
* @version 216.0.0
|
|
21923
22035
|
*//**
|
|
21924
22036
|
* Constructs a new StationsApi.
|
|
21925
22037
|
* @alias module:purecloud-platform-client-v2/api/StationsApi
|
|
@@ -21951,7 +22063,7 @@ if(stationId===undefined||stationId===null){throw'Missing the required parameter
|
|
|
21951
22063
|
*/},{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(){/**
|
|
21952
22064
|
* Suggest service.
|
|
21953
22065
|
* @module purecloud-platform-client-v2/api/SuggestApi
|
|
21954
|
-
* @version
|
|
22066
|
+
* @version 216.0.0
|
|
21955
22067
|
*//**
|
|
21956
22068
|
* Constructs a new SuggestApi.
|
|
21957
22069
|
* @alias module:purecloud-platform-client-v2/api/SuggestApi
|
|
@@ -21991,7 +22103,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
21991
22103
|
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(){/**
|
|
21992
22104
|
* TaskManagement service.
|
|
21993
22105
|
* @module purecloud-platform-client-v2/api/TaskManagementApi
|
|
21994
|
-
* @version
|
|
22106
|
+
* @version 216.0.0
|
|
21995
22107
|
*//**
|
|
21996
22108
|
* Constructs a new TaskManagementApi.
|
|
21997
22109
|
* @alias module:purecloud-platform-client-v2/api/TaskManagementApi
|
|
@@ -22497,7 +22609,7 @@ if(schemaId===undefined||schemaId===null){throw'Missing the required parameter "
|
|
|
22497
22609
|
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(){/**
|
|
22498
22610
|
* Teams service.
|
|
22499
22611
|
* @module purecloud-platform-client-v2/api/TeamsApi
|
|
22500
|
-
* @version
|
|
22612
|
+
* @version 216.0.0
|
|
22501
22613
|
*//**
|
|
22502
22614
|
* Constructs a new TeamsApi.
|
|
22503
22615
|
* @alias module:purecloud-platform-client-v2/api/TeamsApi
|
|
@@ -22577,7 +22689,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
22577
22689
|
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(){/**
|
|
22578
22690
|
* Telephony service.
|
|
22579
22691
|
* @module purecloud-platform-client-v2/api/TelephonyApi
|
|
22580
|
-
* @version
|
|
22692
|
+
* @version 216.0.0
|
|
22581
22693
|
*//**
|
|
22582
22694
|
* Constructs a new TelephonyApi.
|
|
22583
22695
|
* @alias module:purecloud-platform-client-v2/api/TelephonyApi
|
|
@@ -22624,7 +22736,7 @@ if(downloadId===undefined||downloadId===null){throw'Missing the required paramet
|
|
|
22624
22736
|
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(){/**
|
|
22625
22737
|
* TelephonyProvidersEdge service.
|
|
22626
22738
|
* @module purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
22627
|
-
* @version
|
|
22739
|
+
* @version 216.0.0
|
|
22628
22740
|
*//**
|
|
22629
22741
|
* Constructs a new TelephonyProvidersEdgeApi.
|
|
22630
22742
|
* @alias module:purecloud-platform-client-v2/api/TelephonyProvidersEdgeApi
|
|
@@ -23459,7 +23571,7 @@ if(trunkBaseSettingsId===undefined||trunkBaseSettingsId===null){throw'Missing th
|
|
|
23459
23571
|
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(){/**
|
|
23460
23572
|
* Textbots service.
|
|
23461
23573
|
* @module purecloud-platform-client-v2/api/TextbotsApi
|
|
23462
|
-
* @version
|
|
23574
|
+
* @version 216.0.0
|
|
23463
23575
|
*//**
|
|
23464
23576
|
* Constructs a new TextbotsApi.
|
|
23465
23577
|
* @alias module:purecloud-platform-client-v2/api/TextbotsApi
|
|
@@ -23494,7 +23606,7 @@ if(launchRequest===undefined||launchRequest===null){throw'Missing the required p
|
|
|
23494
23606
|
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(){/**
|
|
23495
23607
|
* Tokens service.
|
|
23496
23608
|
* @module purecloud-platform-client-v2/api/TokensApi
|
|
23497
|
-
* @version
|
|
23609
|
+
* @version 216.0.0
|
|
23498
23610
|
*//**
|
|
23499
23611
|
* Constructs a new TokensApi.
|
|
23500
23612
|
* @alias module:purecloud-platform-client-v2/api/TokensApi
|
|
@@ -23528,7 +23640,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
23528
23640
|
*/},{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(){/**
|
|
23529
23641
|
* Uploads service.
|
|
23530
23642
|
* @module purecloud-platform-client-v2/api/UploadsApi
|
|
23531
|
-
* @version
|
|
23643
|
+
* @version 216.0.0
|
|
23532
23644
|
*//**
|
|
23533
23645
|
* Constructs a new UploadsApi.
|
|
23534
23646
|
* @alias module:purecloud-platform-client-v2/api/UploadsApi
|
|
@@ -23593,7 +23705,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
23593
23705
|
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(){/**
|
|
23594
23706
|
* Usage service.
|
|
23595
23707
|
* @module purecloud-platform-client-v2/api/UsageApi
|
|
23596
|
-
* @version
|
|
23708
|
+
* @version 216.0.0
|
|
23597
23709
|
*//**
|
|
23598
23710
|
* Constructs a new UsageApi.
|
|
23599
23711
|
* @alias module:purecloud-platform-client-v2/api/UsageApi
|
|
@@ -23647,7 +23759,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
23647
23759
|
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(){/**
|
|
23648
23760
|
* UserRecordings service.
|
|
23649
23761
|
* @module purecloud-platform-client-v2/api/UserRecordingsApi
|
|
23650
|
-
* @version
|
|
23762
|
+
* @version 216.0.0
|
|
23651
23763
|
*//**
|
|
23652
23764
|
* Constructs a new UserRecordingsApi.
|
|
23653
23765
|
* @alias module:purecloud-platform-client-v2/api/UserRecordingsApi
|
|
@@ -23704,7 +23816,7 @@ if(recordingId===undefined||recordingId===null){throw'Missing the required param
|
|
|
23704
23816
|
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(){/**
|
|
23705
23817
|
* Users service.
|
|
23706
23818
|
* @module purecloud-platform-client-v2/api/UsersApi
|
|
23707
|
-
* @version
|
|
23819
|
+
* @version 216.0.0
|
|
23708
23820
|
*//**
|
|
23709
23821
|
* Constructs a new UsersApi.
|
|
23710
23822
|
* @alias module:purecloud-platform-client-v2/api/UsersApi
|
|
@@ -24431,7 +24543,7 @@ if(verifierId===undefined||verifierId===null){throw'Missing the required paramet
|
|
|
24431
24543
|
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(){/**
|
|
24432
24544
|
* Utilities service.
|
|
24433
24545
|
* @module purecloud-platform-client-v2/api/UtilitiesApi
|
|
24434
|
-
* @version
|
|
24546
|
+
* @version 216.0.0
|
|
24435
24547
|
*//**
|
|
24436
24548
|
* Constructs a new UtilitiesApi.
|
|
24437
24549
|
* @alias module:purecloud-platform-client-v2/api/UtilitiesApi
|
|
@@ -24458,7 +24570,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
24458
24570
|
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(){/**
|
|
24459
24571
|
* Voicemail service.
|
|
24460
24572
|
* @module purecloud-platform-client-v2/api/VoicemailApi
|
|
24461
|
-
* @version
|
|
24573
|
+
* @version 216.0.0
|
|
24462
24574
|
*//**
|
|
24463
24575
|
* Constructs a new VoicemailApi.
|
|
24464
24576
|
* @alias module:purecloud-platform-client-v2/api/VoicemailApi
|
|
@@ -24620,7 +24732,7 @@ if(userId===undefined||userId===null){throw'Missing the required parameter "user
|
|
|
24620
24732
|
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(){/**
|
|
24621
24733
|
* WebChat service.
|
|
24622
24734
|
* @module purecloud-platform-client-v2/api/WebChatApi
|
|
24623
|
-
* @version
|
|
24735
|
+
* @version 216.0.0
|
|
24624
24736
|
*//**
|
|
24625
24737
|
* Constructs a new WebChatApi.
|
|
24626
24738
|
* @alias module:purecloud-platform-client-v2/api/WebChatApi
|
|
@@ -24755,7 +24867,7 @@ if(body===undefined||body===null){throw'Missing the required parameter "body" wh
|
|
|
24755
24867
|
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(){/**
|
|
24756
24868
|
* WebDeployments service.
|
|
24757
24869
|
* @module purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
24758
|
-
* @version
|
|
24870
|
+
* @version 216.0.0
|
|
24759
24871
|
*//**
|
|
24760
24872
|
* Constructs a new WebDeploymentsApi.
|
|
24761
24873
|
* @alias module:purecloud-platform-client-v2/api/WebDeploymentsApi
|
|
@@ -24876,7 +24988,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
24876
24988
|
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(){/**
|
|
24877
24989
|
* WebMessaging service.
|
|
24878
24990
|
* @module purecloud-platform-client-v2/api/WebMessagingApi
|
|
24879
|
-
* @version
|
|
24991
|
+
* @version 216.0.0
|
|
24880
24992
|
*//**
|
|
24881
24993
|
* Constructs a new WebMessagingApi.
|
|
24882
24994
|
* @alias module:purecloud-platform-client-v2/api/WebMessagingApi
|
|
@@ -24892,7 +25004,7 @@ if(deployment===undefined||deployment===null){throw'Missing the required paramet
|
|
|
24892
25004
|
*/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(){/**
|
|
24893
25005
|
* Widgets service.
|
|
24894
25006
|
* @module purecloud-platform-client-v2/api/WidgetsApi
|
|
24895
|
-
* @version
|
|
25007
|
+
* @version 216.0.0
|
|
24896
25008
|
*//**
|
|
24897
25009
|
* Constructs a new WidgetsApi.
|
|
24898
25010
|
* @alias module:purecloud-platform-client-v2/api/WidgetsApi
|
|
@@ -24927,7 +25039,7 @@ if(deploymentId===undefined||deploymentId===null){throw'Missing the required par
|
|
|
24927
25039
|
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(){/**
|
|
24928
25040
|
* WorkforceManagement service.
|
|
24929
25041
|
* @module purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
24930
|
-
* @version
|
|
25042
|
+
* @version 216.0.0
|
|
24931
25043
|
*//**
|
|
24932
25044
|
* Constructs a new WorkforceManagementApi.
|
|
24933
25045
|
* @alias module:purecloud-platform-client-v2/api/WorkforceManagementApi
|
|
@@ -25531,6 +25643,14 @@ if(calendarId===undefined||calendarId===null){throw'Missing the required paramet
|
|
|
25531
25643
|
* Get existing calendar link for the current user
|
|
25532
25644
|
*
|
|
25533
25645
|
*/},{key:"getWorkforcemanagementCalendarUrlIcs",value:function getWorkforcemanagementCalendarUrlIcs(){return this.apiClient.callApi('/api/v2/workforcemanagement/calendar/url/ics','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
25646
|
+
* Retrieves delete job status for historical data imports associated with the job id
|
|
25647
|
+
*
|
|
25648
|
+
* @param {String} jobId The job ID of the historical data delete request
|
|
25649
|
+
*/},{key:"getWorkforcemanagementHistoricaldataBulkRemoveJob",value:function getWorkforcemanagementHistoricaldataBulkRemoveJob(jobId){// verify the required parameter 'jobId' is set
|
|
25650
|
+
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']);}/**
|
|
25651
|
+
* Retrieves all delete job status for historical data
|
|
25652
|
+
*
|
|
25653
|
+
*/},{key:"getWorkforcemanagementHistoricaldataBulkRemoveJobs",value:function getWorkforcemanagementHistoricaldataBulkRemoveJobs(){return this.apiClient.callApi('/api/v2/workforcemanagement/historicaldata/bulk/remove/jobs','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
25534
25654
|
* Retrieves delete job status for historical data imports of the organization
|
|
25535
25655
|
*
|
|
25536
25656
|
*/},{key:"getWorkforcemanagementHistoricaldataDeletejob",value:function getWorkforcemanagementHistoricaldataDeletejob(){return this.apiClient.callApi('/api/v2/workforcemanagement/historicaldata/deletejob','GET',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -26404,6 +26524,11 @@ if(businessUnitId===undefined||businessUnitId===null){throw'Missing the required
|
|
|
26404
26524
|
* @param {Object} opts Optional parameters
|
|
26405
26525
|
* @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)
|
|
26406
26526
|
*/},{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']);}/**
|
|
26527
|
+
* Delete the list of the historical data import entries
|
|
26528
|
+
*
|
|
26529
|
+
* @param {Object} opts Optional parameters
|
|
26530
|
+
* @param {Object} opts.body body
|
|
26531
|
+
*/},{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']);}/**
|
|
26407
26532
|
* Delete the entries of the historical data imports in the organization
|
|
26408
26533
|
*
|
|
26409
26534
|
*/},{key:"postWorkforcemanagementHistoricaldataDeletejob",value:function postWorkforcemanagementHistoricaldataDeletejob(){return this.apiClient.callApi('/api/v2/workforcemanagement/historicaldata/deletejob','POST',{},{},{},{},null,['PureCloud OAuth'],['application/json'],['application/json']);}/**
|
|
@@ -26733,7 +26858,7 @@ if(timeOffLimitId===undefined||timeOffLimitId===null){throw'Missing the required
|
|
|
26733
26858
|
* </pre>
|
|
26734
26859
|
* </p>
|
|
26735
26860
|
* @module purecloud-platform-client-v2/index
|
|
26736
|
-
* @version
|
|
26861
|
+
* @version 216.0.0
|
|
26737
26862
|
*/var platformClient=/*#__PURE__*/_createClass(function platformClient(){_classCallCheck(this,platformClient);/**
|
|
26738
26863
|
* The ApiClient constructor.
|
|
26739
26864
|
* @property {module:purecloud-platform-client-v2/ApiClient}
|