UNPKG

purecloud-platform-client-v2

Version:

A JavaScript library to interface with the PureCloud Platform API

1,809 lines (1,647 loc) 119 kB
import ApiClient from '../ApiClient.js'; class RoutingApi { /** * Routing service. * @module purecloud-platform-client-v2/api/RoutingApi * @version 223.0.0 */ /** * Constructs a new RoutingApi. * @alias module:purecloud-platform-client-v2/api/RoutingApi * @class * @param {module:purecloud-platform-client-v2/ApiClient} apiClient Optional API client implementation to use, * default to {@link module:purecloud-platform-client-v2/ApiClient#instance} if unspecified. */ constructor(apiClient) { this.apiClient = apiClient || ApiClient.instance; } /** * Delete single benefit assessment. * * @param {String} assessmentId Benefit Assessment ID */ deleteRoutingAssessment(assessmentId) { // verify the required parameter 'assessmentId' is set if (assessmentId === undefined || assessmentId === null) { throw 'Missing the required parameter "assessmentId" when calling deleteRoutingAssessment'; } return this.apiClient.callApi( '/api/v2/routing/assessments/{assessmentId}', 'DELETE', { 'assessmentId': assessmentId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete the user's Direct Routing Backup settings and revert to the Direct Routing Queue default. * */ deleteRoutingDirectroutingbackupSettingsMe() { return this.apiClient.callApi( '/api/v2/routing/directroutingbackup/settings/me', 'DELETE', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a domain * * @param {String} domainId domain ID */ deleteRoutingEmailDomain(domainId) { // verify the required parameter 'domainId' is set if (domainId === undefined || domainId === null) { throw 'Missing the required parameter "domainId" when calling deleteRoutingEmailDomain'; } return this.apiClient.callApi( '/api/v2/routing/email/domains/{domainId}', 'DELETE', { 'domainId': domainId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a route * * @param {String} domainName email domain * @param {String} routeId route ID */ deleteRoutingEmailDomainRoute(domainName, routeId) { // verify the required parameter 'domainName' is set if (domainName === undefined || domainName === null) { throw 'Missing the required parameter "domainName" when calling deleteRoutingEmailDomainRoute'; } // verify the required parameter 'routeId' is set if (routeId === undefined || routeId === null) { throw 'Missing the required parameter "routeId" when calling deleteRoutingEmailDomainRoute'; } return this.apiClient.callApi( '/api/v2/routing/email/domains/{domainName}/routes/{routeId}', 'DELETE', { 'domainName': domainName,'routeId': routeId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete an outbound domain * * @param {String} domainId domain ID */ deleteRoutingEmailOutboundDomain(domainId) { // verify the required parameter 'domainId' is set if (domainId === undefined || domainId === null) { throw 'Missing the required parameter "domainId" when calling deleteRoutingEmailOutboundDomain'; } return this.apiClient.callApi( '/api/v2/routing/email/outbound/domains/{domainId}', 'DELETE', { 'domainId': domainId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a routing language * * @param {String} languageId Language ID */ deleteRoutingLanguage(languageId) { // verify the required parameter 'languageId' is set if (languageId === undefined || languageId === null) { throw 'Missing the required parameter "languageId" when calling deleteRoutingLanguage'; } return this.apiClient.callApi( '/api/v2/routing/languages/{languageId}', 'DELETE', { 'languageId': languageId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete single predictor. * * @param {String} predictorId Predictor ID */ deleteRoutingPredictor(predictorId) { // verify the required parameter 'predictorId' is set if (predictorId === undefined || predictorId === null) { throw 'Missing the required parameter "predictorId" when calling deleteRoutingPredictor'; } return this.apiClient.callApi( '/api/v2/routing/predictors/{predictorId}', 'DELETE', { 'predictorId': predictorId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a queue * * @param {String} queueId Queue ID * @param {Object} opts Optional parameters * @param {Boolean} opts.forceDelete forceDelete */ deleteRoutingQueue(queueId, opts) { opts = opts || {}; // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling deleteRoutingQueue'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}', 'DELETE', { 'queueId': queueId }, { 'forceDelete': opts['forceDelete'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a queue member. * * @param {String} queueId Queue ID * @param {String} memberId Member ID */ deleteRoutingQueueMember(queueId, memberId) { // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling deleteRoutingQueueMember'; } // verify the required parameter 'memberId' is set if (memberId === undefined || memberId === null) { throw 'Missing the required parameter "memberId" when calling deleteRoutingQueueMember'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/members/{memberId}', 'DELETE', { 'queueId': queueId,'memberId': memberId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * DEPRECATED: use DELETE /routing/queues/{queueId}/members/{memberId}. Delete queue member. * * @param {String} queueId Queue ID * @param {String} memberId Member ID * @deprecated */ deleteRoutingQueueUser(queueId, memberId) { // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling deleteRoutingQueueUser'; } // verify the required parameter 'memberId' is set if (memberId === undefined || memberId === null) { throw 'Missing the required parameter "memberId" when calling deleteRoutingQueueUser'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/users/{memberId}', 'DELETE', { 'queueId': queueId,'memberId': memberId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a wrap-up code from a queue * * @param {String} queueId Queue ID * @param {String} codeId Code ID */ deleteRoutingQueueWrapupcode(queueId, codeId) { // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling deleteRoutingQueueWrapupcode'; } // verify the required parameter 'codeId' is set if (codeId === undefined || codeId === null) { throw 'Missing the required parameter "codeId" when calling deleteRoutingQueueWrapupcode'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/wrapupcodes/{codeId}', 'DELETE', { 'queueId': queueId,'codeId': codeId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete an organization's routing settings * */ deleteRoutingSettings() { return this.apiClient.callApi( '/api/v2/routing/settings', 'DELETE', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete Routing Skill * * @param {String} skillId Skill ID */ deleteRoutingSkill(skillId) { // verify the required parameter 'skillId' is set if (skillId === undefined || skillId === null) { throw 'Missing the required parameter "skillId" when calling deleteRoutingSkill'; } return this.apiClient.callApi( '/api/v2/routing/skills/{skillId}', 'DELETE', { 'skillId': skillId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Remove skill group definition * * @param {String} skillGroupId Skill Group ID */ deleteRoutingSkillgroup(skillGroupId) { // verify the required parameter 'skillGroupId' is set if (skillGroupId === undefined || skillGroupId === null) { throw 'Missing the required parameter "skillGroupId" when calling deleteRoutingSkillgroup'; } return this.apiClient.callApi( '/api/v2/routing/skillgroups/{skillGroupId}', 'DELETE', { 'skillGroupId': skillGroupId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete an Address by Id for SMS * * @param {String} addressId Address ID */ deleteRoutingSmsAddress(addressId) { // verify the required parameter 'addressId' is set if (addressId === undefined || addressId === null) { throw 'Missing the required parameter "addressId" when calling deleteRoutingSmsAddress'; } return this.apiClient.callApi( '/api/v2/routing/sms/addresses/{addressId}', 'DELETE', { 'addressId': addressId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a phone number provisioned for SMS. * * @param {String} phoneNumberId phone number */ deleteRoutingSmsPhonenumber(phoneNumberId) { // verify the required parameter 'phoneNumberId' is set if (phoneNumberId === undefined || phoneNumberId === null) { throw 'Missing the required parameter "phoneNumberId" when calling deleteRoutingSmsPhonenumber'; } return this.apiClient.callApi( '/api/v2/routing/sms/phonenumbers/{phoneNumberId}', 'DELETE', { 'phoneNumberId': phoneNumberId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete the user's Direct Routing Backup settings and revert to the Direct Routing Queue default. * * @param {String} userId User ID */ deleteRoutingUserDirectroutingbackupSettings(userId) { // verify the required parameter 'userId' is set if (userId === undefined || userId === null) { throw 'Missing the required parameter "userId" when calling deleteRoutingUserDirectroutingbackupSettings'; } return this.apiClient.callApi( '/api/v2/routing/users/{userId}/directroutingbackup/settings', 'DELETE', { 'userId': userId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete the user's max utilization settings and revert to the organization-wide default. * * @param {String} userId User ID */ deleteRoutingUserUtilization(userId) { // verify the required parameter 'userId' is set if (userId === undefined || userId === null) { throw 'Missing the required parameter "userId" when calling deleteRoutingUserUtilization'; } return this.apiClient.callApi( '/api/v2/routing/users/{userId}/utilization', 'DELETE', { 'userId': userId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete the organization-wide max utilization settings and revert to the system default. * */ deleteRoutingUtilization() { return this.apiClient.callApi( '/api/v2/routing/utilization', 'DELETE', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a utilization label * * @param {String} labelId Utilization Label ID * @param {Object} opts Optional parameters * @param {Boolean} opts.forceDelete Remove all label usages (if found) without warning (default to false) */ deleteRoutingUtilizationLabel(labelId, opts) { opts = opts || {}; // verify the required parameter 'labelId' is set if (labelId === undefined || labelId === null) { throw 'Missing the required parameter "labelId" when calling deleteRoutingUtilizationLabel'; } return this.apiClient.callApi( '/api/v2/routing/utilization/labels/{labelId}', 'DELETE', { 'labelId': labelId }, { 'forceDelete': opts['forceDelete'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete an utilization tag * * @param {String} tagId Utilization Tag ID * @param {Object} opts Optional parameters * @param {Boolean} opts.forceDelete Remove all tag usages (if found) without warning (default to false) * deleteRoutingUtilizationTag is a preview method and is subject to both breaking and non-breaking changes at any time without notice */ deleteRoutingUtilizationTag(tagId, opts) { opts = opts || {}; // verify the required parameter 'tagId' is set if (tagId === undefined || tagId === null) { throw 'Missing the required parameter "tagId" when calling deleteRoutingUtilizationTag'; } return this.apiClient.callApi( '/api/v2/routing/utilization/tags/{tagId}', 'DELETE', { 'tagId': tagId }, { 'forceDelete': opts['forceDelete'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete wrap-up code * * @param {String} codeId Wrapup Code ID */ deleteRoutingWrapupcode(codeId) { // verify the required parameter 'codeId' is set if (codeId === undefined || codeId === null) { throw 'Missing the required parameter "codeId" when calling deleteRoutingWrapupcode'; } return this.apiClient.callApi( '/api/v2/routing/wrapupcodes/{codeId}', 'DELETE', { 'codeId': codeId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Remove a routing language from a user * * @param {String} userId User ID * @param {String} languageId languageId */ deleteUserRoutinglanguage(userId, languageId) { // verify the required parameter 'userId' is set if (userId === undefined || userId === null) { throw 'Missing the required parameter "userId" when calling deleteUserRoutinglanguage'; } // verify the required parameter 'languageId' is set if (languageId === undefined || languageId === null) { throw 'Missing the required parameter "languageId" when calling deleteUserRoutinglanguage'; } return this.apiClient.callApi( '/api/v2/users/{userId}/routinglanguages/{languageId}', 'DELETE', { 'userId': userId,'languageId': languageId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Remove a routing skill from a user * * @param {String} userId User ID * @param {String} skillId skillId */ deleteUserRoutingskill(userId, skillId) { // verify the required parameter 'userId' is set if (userId === undefined || userId === null) { throw 'Missing the required parameter "userId" when calling deleteUserRoutingskill'; } // verify the required parameter 'skillId' is set if (skillId === undefined || skillId === null) { throw 'Missing the required parameter "skillId" when calling deleteUserRoutingskill'; } return this.apiClient.callApi( '/api/v2/users/{userId}/routingskills/{skillId}', 'DELETE', { 'userId': userId,'skillId': skillId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Retrieve a single benefit assessment. * * @param {String} assessmentId Benefit Assessment ID */ getRoutingAssessment(assessmentId) { // verify the required parameter 'assessmentId' is set if (assessmentId === undefined || assessmentId === null) { throw 'Missing the required parameter "assessmentId" when calling getRoutingAssessment'; } return this.apiClient.callApi( '/api/v2/routing/assessments/{assessmentId}', 'GET', { 'assessmentId': assessmentId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Retrieve all benefit assessments. * * @param {Object} opts Optional parameters * @param {String} opts.before The cursor that points to the start of the set of entities that has been returned. * @param {String} opts.after The cursor that points to the end of the set of entities that has been returned. * @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize * @param {String} opts.pageSize Number of entities to return. Maximum of 200. * @param {Array.<String>} opts.queueId Queue ID(s) to filter assessments by. */ getRoutingAssessments(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/assessments', 'GET', { }, { 'before': opts['before'],'after': opts['after'],'limit': opts['limit'],'pageSize': opts['pageSize'],'queueId': this.apiClient.buildCollectionParam(opts['queueId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Retrieve a single benefit assessments job. * * @param {String} jobId Benefit Assessment Job ID */ getRoutingAssessmentsJob(jobId) { // verify the required parameter 'jobId' is set if (jobId === undefined || jobId === null) { throw 'Missing the required parameter "jobId" when calling getRoutingAssessmentsJob'; } return this.apiClient.callApi( '/api/v2/routing/assessments/jobs/{jobId}', 'GET', { 'jobId': jobId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Retrieve all benefit assessment jobs. * * @param {Object} opts Optional parameters * @param {Array.<String>} opts.divisionId Division ID(s) to filter assessment jobs by. */ getRoutingAssessmentsJobs(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/assessments/jobs', 'GET', { }, { 'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get available media types * */ getRoutingAvailablemediatypes() { return this.apiClient.callApi( '/api/v2/routing/availablemediatypes', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the user's Direct Routing Backup settings. * */ getRoutingDirectroutingbackupSettingsMe() { return this.apiClient.callApi( '/api/v2/routing/directroutingbackup/settings/me', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get domain * * @param {String} domainId domain ID */ getRoutingEmailDomain(domainId) { // verify the required parameter 'domainId' is set if (domainId === undefined || domainId === null) { throw 'Missing the required parameter "domainId" when calling getRoutingEmailDomain'; } return this.apiClient.callApi( '/api/v2/routing/email/domains/{domainId}', 'GET', { 'domainId': domainId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a route * * @param {String} domainName email domain * @param {String} routeId route ID * @param {Object} opts Optional parameters * @param {Array.<String>} opts.expand Which fields, if any, to expand */ getRoutingEmailDomainRoute(domainName, routeId, opts) { opts = opts || {}; // verify the required parameter 'domainName' is set if (domainName === undefined || domainName === null) { throw 'Missing the required parameter "domainName" when calling getRoutingEmailDomainRoute'; } // verify the required parameter 'routeId' is set if (routeId === undefined || routeId === null) { throw 'Missing the required parameter "routeId" when calling getRoutingEmailDomainRoute'; } return this.apiClient.callApi( '/api/v2/routing/email/domains/{domainName}/routes/{routeId}', 'GET', { 'domainName': domainName,'routeId': routeId }, { 'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a route identity resolution setting. * * @param {String} domainName email domain * @param {String} routeId route ID */ getRoutingEmailDomainRouteIdentityresolution(domainName, routeId) { // verify the required parameter 'domainName' is set if (domainName === undefined || domainName === null) { throw 'Missing the required parameter "domainName" when calling getRoutingEmailDomainRouteIdentityresolution'; } // verify the required parameter 'routeId' is set if (routeId === undefined || routeId === null) { throw 'Missing the required parameter "routeId" when calling getRoutingEmailDomainRouteIdentityresolution'; } return this.apiClient.callApi( '/api/v2/routing/email/domains/{domainName}/routes/{routeId}/identityresolution', 'GET', { 'domainName': domainName,'routeId': routeId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get routes * * @param {String} domainName email domain * @param {Object} opts Optional parameters * @param {Number} opts.pageSize Page size (default to 25) * @param {Number} opts.pageNumber Page number (default to 1) * @param {String} opts.pattern Filter routes by the route's pattern property * @param {Array.<String>} opts.expand Which fields, if any, to expand */ getRoutingEmailDomainRoutes(domainName, opts) { opts = opts || {}; // verify the required parameter 'domainName' is set if (domainName === undefined || domainName === null) { throw 'Missing the required parameter "domainName" when calling getRoutingEmailDomainRoutes'; } return this.apiClient.callApi( '/api/v2/routing/email/domains/{domainName}/routes', 'GET', { 'domainName': domainName }, { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'pattern': opts['pattern'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get domains * * @param {Object} opts Optional parameters * @param {Number} opts.pageSize Page size (default to 25) * @param {Number} opts.pageNumber Page number (default to 1) * @param {Boolean} opts.excludeStatus Exclude MX record data (default to false) * @param {String} opts.filter Optional search filter that, if defined, use the **filter** syntax, eg: **mySearchedPattern**. Note that **** is considered no filter. */ getRoutingEmailDomains(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/email/domains', 'GET', { }, { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'excludeStatus': opts['excludeStatus'],'filter': opts['filter'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get domain * * @param {String} domainId domain ID */ getRoutingEmailOutboundDomain(domainId) { // verify the required parameter 'domainId' is set if (domainId === undefined || domainId === null) { throw 'Missing the required parameter "domainId" when calling getRoutingEmailOutboundDomain'; } return this.apiClient.callApi( '/api/v2/routing/email/outbound/domains/{domainId}', 'GET', { 'domainId': domainId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get activation status (cname + dkim) of an outbound domain * * @param {String} domainId domain ID */ getRoutingEmailOutboundDomainActivation(domainId) { // verify the required parameter 'domainId' is set if (domainId === undefined || domainId === null) { throw 'Missing the required parameter "domainId" when calling getRoutingEmailOutboundDomainActivation'; } return this.apiClient.callApi( '/api/v2/routing/email/outbound/domains/{domainId}/activation', 'GET', { 'domainId': domainId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Search a domain across organizations * * @param {String} domainId domain ID */ getRoutingEmailOutboundDomainSearch(domainId) { // verify the required parameter 'domainId' is set if (domainId === undefined || domainId === null) { throw 'Missing the required parameter "domainId" when calling getRoutingEmailOutboundDomainSearch'; } return this.apiClient.callApi( '/api/v2/routing/email/outbound/domains/{domainId}/search', 'GET', { 'domainId': domainId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get outbound domains * * @param {Object} opts Optional parameters * @param {Number} opts.pageSize Page size (default to 25) * @param {Number} opts.pageNumber Page number (default to 1) * @param {String} opts.filter Optional search filter that, if defined, use the **filter** syntax, eg: **mySearchedPattern**. Note that **** is considered no filter. */ getRoutingEmailOutboundDomains(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/email/outbound/domains', 'GET', { }, { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'filter': opts['filter'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get email setup * */ getRoutingEmailSetup() { return this.apiClient.callApi( '/api/v2/routing/email/setup', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a routing language * * @param {String} languageId Language ID */ getRoutingLanguage(languageId) { // verify the required parameter 'languageId' is set if (languageId === undefined || languageId === null) { throw 'Missing the required parameter "languageId" when calling getRoutingLanguage'; } return this.apiClient.callApi( '/api/v2/routing/languages/{languageId}', 'GET', { 'languageId': languageId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the list of supported languages. * * @param {Object} opts Optional parameters * @param {Number} opts.pageSize Page size (default to 25) * @param {Number} opts.pageNumber Page number (default to 1) * @param {Object} opts.sortOrder Ascending or descending sort order (default to ASC) * @param {String} opts.name Name * @param {Array.<String>} opts.id id */ getRoutingLanguages(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/languages', 'GET', { }, { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortOrder': opts['sortOrder'],'name': opts['name'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a recipient * * @param {String} recipientId Recipient ID */ getRoutingMessageRecipient(recipientId) { // verify the required parameter 'recipientId' is set if (recipientId === undefined || recipientId === null) { throw 'Missing the required parameter "recipientId" when calling getRoutingMessageRecipient'; } return this.apiClient.callApi( '/api/v2/routing/message/recipients/{recipientId}', 'GET', { 'recipientId': recipientId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get recipients * * @param {Object} opts Optional parameters * @param {Object} opts.messengerType Messenger Type * @param {String} opts.name Recipient Name * @param {Number} opts.pageSize Page size (default to 25) * @param {Number} opts.pageNumber Page number (default to 1) */ getRoutingMessageRecipients(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/message/recipients', 'GET', { }, { 'messengerType': opts['messengerType'],'name': opts['name'],'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Retrieve a single predictor. * * @param {String} predictorId Predictor ID */ getRoutingPredictor(predictorId) { // verify the required parameter 'predictorId' is set if (predictorId === undefined || predictorId === null) { throw 'Missing the required parameter "predictorId" when calling getRoutingPredictor'; } return this.apiClient.callApi( '/api/v2/routing/predictors/{predictorId}', 'GET', { 'predictorId': predictorId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Retrieve Predictor Model Features. * * @param {String} predictorId Predictor ID * @param {String} modelId Model ID */ getRoutingPredictorModelFeatures(predictorId, modelId) { // verify the required parameter 'predictorId' is set if (predictorId === undefined || predictorId === null) { throw 'Missing the required parameter "predictorId" when calling getRoutingPredictorModelFeatures'; } // verify the required parameter 'modelId' is set if (modelId === undefined || modelId === null) { throw 'Missing the required parameter "modelId" when calling getRoutingPredictorModelFeatures'; } return this.apiClient.callApi( '/api/v2/routing/predictors/{predictorId}/models/{modelId}/features', 'GET', { 'predictorId': predictorId,'modelId': modelId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Retrieve Predictor Models and Top Features. * * @param {String} predictorId Predictor ID */ getRoutingPredictorModels(predictorId) { // verify the required parameter 'predictorId' is set if (predictorId === undefined || predictorId === null) { throw 'Missing the required parameter "predictorId" when calling getRoutingPredictorModels'; } return this.apiClient.callApi( '/api/v2/routing/predictors/{predictorId}/models', 'GET', { 'predictorId': predictorId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Retrieve all predictors. * * @param {Object} opts Optional parameters * @param {String} opts.before The cursor that points to the start of the set of entities that has been returned. * @param {String} opts.after The cursor that points to the end of the set of entities that has been returned. * @param {String} opts.limit Number of entities to return. Maximum of 200. Deprecated in favour of pageSize * @param {String} opts.pageSize Number of entities to return. Maximum of 200. * @param {Array.<String>} opts.queueId Comma-separated list of queue Ids to filter by. */ getRoutingPredictors(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/predictors', 'GET', { }, { 'before': opts['before'],'after': opts['after'],'limit': opts['limit'],'pageSize': opts['pageSize'],'queueId': this.apiClient.buildCollectionParam(opts['queueId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a list of Key Performance Indicators * * @param {Object} opts Optional parameters * @param {Object} opts.kpiGroup The Group of Key Performance Indicators to return * @param {Array.<String>} opts.expand Parameter to request additional data to return in KPI payload */ getRoutingPredictorsKeyperformanceindicators(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/predictors/keyperformanceindicators', 'GET', { }, { 'kpiGroup': opts['kpiGroup'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get details about this queue. * * @param {String} queueId Queue ID * @param {Object} opts Optional parameters * @param {Array.<String>} opts.expand Which fields, if any, to expand */ getRoutingQueue(queueId, opts) { opts = opts || {}; // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueue'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}', 'GET', { 'queueId': queueId }, { 'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get an assistant associated with a queue. * * @param {String} queueId Queue ID * @param {Object} opts Optional parameters * @param {Object} opts.expand Which fields, if any, to expand. */ getRoutingQueueAssistant(queueId, opts) { opts = opts || {}; // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueAssistant'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/assistant', 'GET', { 'queueId': queueId }, { 'expand': opts['expand'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a Comparison Period. * * @param {String} queueId Queue id * @param {String} comparisonPeriodId ComparisonPeriod id */ getRoutingQueueComparisonperiod(queueId, comparisonPeriodId) { // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueComparisonperiod'; } // verify the required parameter 'comparisonPeriodId' is set if (comparisonPeriodId === undefined || comparisonPeriodId === null) { throw 'Missing the required parameter "comparisonPeriodId" when calling getRoutingQueueComparisonperiod'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/comparisonperiods/{comparisonPeriodId}', 'GET', { 'queueId': queueId,'comparisonPeriodId': comparisonPeriodId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get list of comparison periods * * @param {String} queueId Queue id */ getRoutingQueueComparisonperiods(queueId) { // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueComparisonperiods'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/comparisonperiods', 'GET', { 'queueId': queueId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Estimated Wait Time * * @param {String} queueId queueId * @param {Object} opts Optional parameters * @param {String} opts.conversationId conversationId */ getRoutingQueueEstimatedwaittime(queueId, opts) { opts = opts || {}; // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueEstimatedwaittime'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/estimatedwaittime', 'GET', { 'queueId': queueId }, { 'conversationId': opts['conversationId'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Queue IdentityResolution Settings. * * @param {String} queueId Queue ID */ getRoutingQueueIdentityresolution(queueId) { // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueIdentityresolution'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/identityresolution', 'GET', { 'queueId': queueId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Estimated Wait Time * * @param {String} queueId queueId * @param {Object} mediaType mediaType * @param {Object} opts Optional parameters * @param {String} opts.labelId Unique id that represents the interaction label used with media type for EWT calculation */ getRoutingQueueMediatypeEstimatedwaittime(queueId, mediaType, opts) { opts = opts || {}; // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueMediatypeEstimatedwaittime'; } // verify the required parameter 'mediaType' is set if (mediaType === undefined || mediaType === null) { throw 'Missing the required parameter "mediaType" when calling getRoutingQueueMediatypeEstimatedwaittime'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/mediatypes/{mediaType}/estimatedwaittime', 'GET', { 'queueId': queueId,'mediaType': mediaType }, { 'labelId': opts['labelId'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the members of this queue. * * @param {String} queueId Queue ID * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber (default to 1) * @param {Number} opts.pageSize Max value is 100 (default to 25) * @param {Object} opts.sortOrder Note: results are sorted by name. (default to asc) * @param {Array.<String>} opts.expand Which fields, if any, to expand. * @param {String} opts.name Filter by queue member name (contains-style search) * @param {Array.<String>} opts.profileSkills Filter by profile skill (contains-style search) * @param {Array.<String>} opts.skills Filter by skill (contains-style search) * @param {Array.<String>} opts.languages Filter by language (contains-style search) * @param {Array.<String>} opts.routingStatus Filter by routing status * @param {Array.<String>} opts.presence Filter by presence * @param {Object} opts.memberBy Filter by member type * @param {Object} opts.joined Filter by joined status */ getRoutingQueueMembers(queueId, opts) { opts = opts || {}; // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueMembers'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/members', 'GET', { 'queueId': queueId }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortOrder': opts['sortOrder'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'name': opts['name'],'profileSkills': this.apiClient.buildCollectionParam(opts['profileSkills'], 'multi'),'skills': this.apiClient.buildCollectionParam(opts['skills'], 'multi'),'languages': this.apiClient.buildCollectionParam(opts['languages'], 'multi'),'routingStatus': this.apiClient.buildCollectionParam(opts['routingStatus'], 'multi'),'presence': this.apiClient.buildCollectionParam(opts['presence'], 'multi'),'memberBy': opts['memberBy'],'joined': opts['joined'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * DEPRECATED: use GET /routing/queues/{queueId}/members. Get the members of this queue. * * @param {String} queueId Queue ID * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber (default to 1) * @param {Number} opts.pageSize Max value is 100 (default to 25) * @param {Object} opts.sortOrder Note: results are sorted by name. (default to asc) * @param {Array.<String>} opts.expand Which fields, if any, to expand. * @param {Boolean} opts.joined Filter by joined status * @param {String} opts.name Filter by queue member name * @param {Array.<String>} opts.profileSkills Filter by profile skill * @param {Array.<String>} opts.skills Filter by skill * @param {Array.<String>} opts.languages Filter by language * @param {Array.<String>} opts.routingStatus Filter by routing status * @param {Array.<String>} opts.presence Filter by presence * @deprecated */ getRoutingQueueUsers(queueId, opts) { opts = opts || {}; // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueUsers'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/users', 'GET', { 'queueId': queueId }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortOrder': opts['sortOrder'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'joined': opts['joined'],'name': opts['name'],'profileSkills': this.apiClient.buildCollectionParam(opts['profileSkills'], 'multi'),'skills': this.apiClient.buildCollectionParam(opts['skills'], 'multi'),'languages': this.apiClient.buildCollectionParam(opts['languages'], 'multi'),'routingStatus': this.apiClient.buildCollectionParam(opts['routingStatus'], 'multi'),'presence': this.apiClient.buildCollectionParam(opts['presence'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up codes for a queue * * @param {String} queueId Queue ID * @param {Object} opts Optional parameters * @param {Number} opts.pageSize Page size (default to 25) * @param {Number} opts.pageNumber Page number (default to 1) */ getRoutingQueueWrapupcodes(queueId, opts) { opts = opts || {}; // verify the required parameter 'queueId' is set if (queueId === undefined || queueId === null) { throw 'Missing the required parameter "queueId" when calling getRoutingQueueWrapupcodes'; } return this.apiClient.callApi( '/api/v2/routing/queues/{queueId}/wrapupcodes', 'GET', { 'queueId': queueId }, { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get list of queues. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {Object} opts.sortOrder Note: results are sorted by name. (default to asc) * @param {String} opts.name Include only queues with the given name (leading and trailing asterisks allowed) * @param {Array.<String>} opts.id Include only queues with the specified ID(s) * @param {Array.<String>} opts.divisionId Include only queues in the specified division ID(s) * @param {Array.<String>} opts.peerId Include only queues with the specified peer ID(s) * @param {String} opts.cannedResponseLibraryId Include only queues explicitly associated with the specified canned response library ID * @param {Boolean} opts.hasPeer Include only queues with a peer ID * @param {Array.<String>} opts.expand Which fields, if any, to expand */ getRoutingQueues(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/queues', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'sortOrder': opts['sortOrder'],'name': opts['name'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi'),'peerId': this.apiClient.buildCollectionParam(opts['peerId'], 'multi'),'cannedResponseLibraryId': opts['cannedResponseLibraryId'],'hasPeer': opts['hasPeer'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a paged listing of simplified queue objects, filterable by name, queue ID(s), or division ID(s). * * @param {Object} opts Optional parameters * @param {Number} opts.pageSize Page size [max value is 100] (default to 25) * @param {Number} opts.pageNumber Page number [max value is 5] (default to 1) * @param {Object} opts.sortBy Sort by (default to name) * @param {Object} opts.sortOrder Sort order (default to asc) * @param {String} opts.name Name * @param {Array.<String>} opts.id Queue ID(s) * @param {Array.<String>} opts.divisionId Division ID(s) */ getRoutingQueuesDivisionviews(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/queues/divisionviews', 'GET', { }, { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'name': opts['name'],'id': this.apiClient.buildCollectionParam(opts['id'], 'multi'),'divisionId': this.apiClient.buildCollectionParam(opts['divisionId'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a paged listing of simplified queue objects, sorted by name. Can be used to get a digest of all queues in an organization. * * @param {Object} opts Optional parameters * @param {Number} opts.pageSize Page size [max value is 500] (default to 25) * @param {Number} opts.pageNumber Page number (default to 1) * @param {Object} opts.sortOrder Sort order (default to asc) */ getRoutingQueuesDivisionviewsAll(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/queues/divisionviews/all', 'GET', { }, { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortOrder': opts['sortOrder'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a paged listing of queues the user is a member of. * * @param {Object} opts Optional parameters * @param {Number} opts.pageNumber Page number (default to 1) * @param {Number} opts.pageSize Page size (default to 25) * @param {Object} opts.joined Filter by joined status. * @param {Object} opts.sortOrder Note: results are sorted by name. (default to asc) */ getRoutingQueuesMe(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/routing/queues/me', 'GET', { }, { 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'joined': opts['joined'],'sortOrder': opts['sortOrder'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get an organization's routing settings * */ getRoutingSettings() { return this.apiClient.callApi( '/api/v2/routing/settings', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Contact Center Settings * */ getRoutingSettingsContactcenter() { return this.apiClient.callApi( '/api/v2/routing/settings/contactcenter', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Transcription Settings * */ getRoutingSettingsTranscription() { return this.apiClient.callApi( '/api/v2/routing/settings/transcription', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Routing Skill * * @param {String} skillId Skill ID */ getRoutingSkill(skillId) { // verify the required parameter 'skillId' is set if (skillId === undefined || skillId === null) { throw 'Missing the required parameter "skillId" when calling getRoutingSkill'; } return this.apiClient.callApi( '/api/v2/routing/skills/{skillId}', 'GET', { 'skillId': skillId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['app