purecloud-platform-client-v2
Version:
A JavaScript library to interface with the PureCloud Platform API
1,566 lines (1,423 loc) • 82.8 kB
JavaScript
import ApiClient from '../ApiClient.js';
class IntegrationsApi {
/**
* Integrations service.
* @module purecloud-platform-client-v2/api/IntegrationsApi
* @version 223.0.0
*/
/**
* Constructs a new IntegrationsApi.
* @alias module:purecloud-platform-client-v2/api/IntegrationsApi
* @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 integration.
*
* @param {String} integrationId Integration Id
*/
deleteIntegration(integrationId) {
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling deleteIntegration';
}
return this.apiClient.callApi(
'/api/v2/integrations/{integrationId}',
'DELETE',
{ 'integrationId': integrationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete an Action
*
* @param {String} actionId actionId
*/
deleteIntegrationsAction(actionId) {
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling deleteIntegrationsAction';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}',
'DELETE',
{ 'actionId': actionId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a Draft
*
* @param {String} actionId actionId
*/
deleteIntegrationsActionDraft(actionId) {
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling deleteIntegrationsActionDraft';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/draft',
'DELETE',
{ 'actionId': actionId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Delete a set of credentials
*
* @param {String} credentialId Credential ID
*/
deleteIntegrationsCredential(credentialId) {
// verify the required parameter 'credentialId' is set
if (credentialId === undefined || credentialId === null) {
throw 'Missing the required parameter "credentialId" when calling deleteIntegrationsCredential';
}
return this.apiClient.callApi(
'/api/v2/integrations/credentials/{credentialId}',
'DELETE',
{ 'credentialId': credentialId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get integration.
*
* @param {String} integrationId Integration Id
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.sortBy variable name requested to sort by
* @param {Array.<String>} opts.expand variable name requested by expand list
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
*/
getIntegration(integrationId, opts) {
opts = opts || {};
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegration';
}
return this.apiClient.callApi(
'/api/v2/integrations/{integrationId}',
'GET',
{ 'integrationId': integrationId },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get integration configuration.
*
* @param {String} integrationId Integration Id
*/
getIntegrationConfigCurrent(integrationId) {
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationConfigCurrent';
}
return this.apiClient.callApi(
'/api/v2/integrations/{integrationId}/config/current',
'GET',
{ 'integrationId': integrationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* List integrations
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.sortBy variable name requested to sort by
* @param {Array.<String>} opts.expand variable name requested by expand list
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
*/
getIntegrations(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieves a single Action matching id.
*
* @param {String} actionId actionId
* @param {Object} opts Optional parameters
* @param {Object} opts.expand Indicates a field in the response which should be expanded.
* @param {Object} opts.flatten Indicates the response should be reformatted, based on Architect's flattening format. (default to false)
* @param {Object} opts.includeConfig Return config in response. (default to false)
*/
getIntegrationsAction(actionId, opts) {
opts = opts || {};
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsAction';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}',
'GET',
{ 'actionId': actionId },
{ 'expand': opts['expand'],'flatten': opts['flatten'],'includeConfig': opts['includeConfig'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieve a Draft
*
* @param {String} actionId actionId
* @param {Object} opts Optional parameters
* @param {Object} opts.expand Indicates a field in the response which should be expanded.
* @param {Object} opts.flatten Indicates the response should be reformatted, based on Architect's flattening format. (default to false)
* @param {Object} opts.includeConfig Return config in response. (default to false)
*/
getIntegrationsActionDraft(actionId, opts) {
opts = opts || {};
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsActionDraft';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/draft',
'GET',
{ 'actionId': actionId },
{ 'expand': opts['expand'],'flatten': opts['flatten'],'includeConfig': opts['includeConfig'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get draft function settings for Action
*
* @param {String} actionId actionId
*/
getIntegrationsActionDraftFunction(actionId) {
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsActionDraftFunction';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/draft/function',
'GET',
{ 'actionId': actionId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieve schema for a Draft based on filename.
*
* @param {String} actionId actionId
* @param {String} fileName Name of schema file to be retrieved for this draft.
* @param {Object} opts Optional parameters
* @param {Boolean} opts.flatten Indicates the response should be reformatted, based on Architect's flattening format. (default to false)
*/
getIntegrationsActionDraftSchema(actionId, fileName, opts) {
opts = opts || {};
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsActionDraftSchema';
}
// verify the required parameter 'fileName' is set
if (fileName === undefined || fileName === null) {
throw 'Missing the required parameter "fileName" when calling getIntegrationsActionDraftSchema';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/draft/schemas/{fileName}',
'GET',
{ 'actionId': actionId,'fileName': fileName },
{ 'flatten': opts['flatten'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieve templates for a Draft based on filename.
*
* @param {String} actionId actionId
* @param {String} fileName Name of template file to be retrieved for this action draft.
*/
getIntegrationsActionDraftTemplate(actionId, fileName) {
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsActionDraftTemplate';
}
// verify the required parameter 'fileName' is set
if (fileName === undefined || fileName === null) {
throw 'Missing the required parameter "fileName" when calling getIntegrationsActionDraftTemplate';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/draft/templates/{fileName}',
'GET',
{ 'actionId': actionId,'fileName': fileName },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['text/plain']
);
}
/**
* Validate current Draft configuration.
*
* @param {String} actionId actionId
*/
getIntegrationsActionDraftValidation(actionId) {
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsActionDraftValidation';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/draft/validation',
'GET',
{ 'actionId': actionId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get published function settings for Action
*
* @param {String} actionId actionId
*/
getIntegrationsActionFunction(actionId) {
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsActionFunction';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/function',
'GET',
{ 'actionId': actionId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieve schema for an action based on filename.
*
* @param {String} actionId actionId
* @param {String} fileName Name of schema file to be retrieved for this action.
* @param {Object} opts Optional parameters
* @param {Boolean} opts.flatten Indicates the response should be reformatted, based on Architect's flattening format. (default to false)
*/
getIntegrationsActionSchema(actionId, fileName, opts) {
opts = opts || {};
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsActionSchema';
}
// verify the required parameter 'fileName' is set
if (fileName === undefined || fileName === null) {
throw 'Missing the required parameter "fileName" when calling getIntegrationsActionSchema';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/schemas/{fileName}',
'GET',
{ 'actionId': actionId,'fileName': fileName },
{ 'flatten': opts['flatten'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieve text of templates for an action based on filename.
*
* @param {String} actionId actionId
* @param {String} fileName Name of template file to be retrieved for this action.
*/
getIntegrationsActionTemplate(actionId, fileName) {
// verify the required parameter 'actionId' is set
if (actionId === undefined || actionId === null) {
throw 'Missing the required parameter "actionId" when calling getIntegrationsActionTemplate';
}
// verify the required parameter 'fileName' is set
if (fileName === undefined || fileName === null) {
throw 'Missing the required parameter "fileName" when calling getIntegrationsActionTemplate';
}
return this.apiClient.callApi(
'/api/v2/integrations/actions/{actionId}/templates/{fileName}',
'GET',
{ 'actionId': actionId,'fileName': fileName },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['text/plain']
);
}
/**
* Retrieves all actions associated with filters passed in via query param.
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
* @param {String} opts.sortBy Root level field name to sort on.
* @param {Object} opts.sortOrder Direction to sort 'sortBy' field. (default to asc)
* @param {String} opts.category Filter by category name.
* @param {String} opts.name Filter by partial or complete action name.
* @param {String} opts.ids Filter by action Id. Can be a comma separated list to request multiple actions. Limit of 50 Ids.
* @param {Object} opts.secure Filter based on 'secure' configuration option. True will only return actions marked as secure. False will return only non-secure actions. Do not use filter if you want all Actions.
* @param {Object} opts.includeAuthActions Whether or not to include authentication actions in the response. These actions are not directly executable. Some integrations create them and will run them as needed to refresh authentication information for other actions. (default to false)
*/
getIntegrationsActions(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/actions',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'category': opts['category'],'name': opts['name'],'ids': opts['ids'],'secure': opts['secure'],'includeAuthActions': opts['includeAuthActions'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieves all categories of available Actions
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
* @param {String} opts.sortBy Root level field name to sort on. Only 'name' is supported on this endpoint.
* @param {Object} opts.sortOrder Direction to sort 'sortBy' field. (default to asc)
* @param {Object} opts.secure Filter to only include secure actions. True will only include actions marked secured. False will include only unsecure actions. Do not use filter if you want all Actions.
*/
getIntegrationsActionsCategories(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/actions/categories',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'secure': opts['secure'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieves the available mTLS client certificates in use. This endpoint will return inconsistent results while a certificate rotation is in progress.
*
* @param {Object} opts Optional parameters
* @param {Object} opts.status Indicates the validity of the certificate in question.
* @param {Object} opts.type Indicates the type of the certificate.
*/
getIntegrationsActionsCertificates(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/actions/certificates',
'GET',
{ },
{ 'status': opts['status'],'type': opts['type'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieves basic info about trusted root CA certificates
*
*/
getIntegrationsActionsCertificatesTruststore() {
return this.apiClient.callApi(
'/api/v2/integrations/actions/certificates/truststore',
'GET',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Retrieves all action drafts associated with the filters passed in via query param.
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
* @param {String} opts.sortBy Root level field name to sort on.
* @param {Object} opts.sortOrder Direction to sort 'sortBy' field. (default to asc)
* @param {String} opts.category Filter by category name.
* @param {String} opts.name Filter by partial or complete action name.
* @param {String} opts.ids Filter by action Id. Can be a comma separated list to request multiple actions. Limit of 50 Ids.
* @param {Object} opts.secure Filter based on 'secure' configuration option. True will only return actions marked as secure. False will return only non-secure actions. Do not use filter if you want all Actions.
* @param {Object} opts.includeAuthActions Whether or not to include authentication actions in the response. These actions are not directly executable. Some integrations create them and will run them as needed to refresh authentication information for other actions. (default to false)
*/
getIntegrationsActionsDrafts(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/actions/drafts',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'nextPage': opts['nextPage'],'previousPage': opts['previousPage'],'sortBy': opts['sortBy'],'sortOrder': opts['sortOrder'],'category': opts['category'],'name': opts['name'],'ids': opts['ids'],'secure': opts['secure'],'includeAuthActions': opts['includeAuthActions'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get action function settings for Action
*
*/
getIntegrationsActionsFunctionsRuntimes() {
return this.apiClient.callApi(
'/api/v2/integrations/actions/functions/runtimes',
'GET',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a specific Bot details
*
* @param {String} integrationId The integration ID for this group of bots
* @param {String} botId The bot ID for this bot
* @param {Object} opts Optional parameters
* @param {String} opts.version Specific Version
* getIntegrationsBotconnectorBot is a preview method and is subject to both breaking and non-breaking changes at any time without notice
*/
getIntegrationsBotconnectorBot(integrationId, botId, opts) {
opts = opts || {};
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationsBotconnectorBot';
}
// verify the required parameter 'botId' is set
if (botId === undefined || botId === null) {
throw 'Missing the required parameter "botId" when calling getIntegrationsBotconnectorBot';
}
return this.apiClient.callApi(
'/api/v2/integrations/botconnectors/{integrationId}/bots/{botId}',
'GET',
{ 'integrationId': integrationId,'botId': botId },
{ 'version': opts['version'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the list of bots for this integration.
*
* @param {String} integrationId The integration ID for this group of bots.
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
* getIntegrationsBotconnectorBots is a preview method and is subject to both breaking and non-breaking changes at any time without notice
*/
getIntegrationsBotconnectorBots(integrationId, opts) {
opts = opts || {};
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationsBotconnectorBots';
}
return this.apiClient.callApi(
'/api/v2/integrations/botconnectors/{integrationId}/bots',
'GET',
{ 'integrationId': integrationId },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the summary list of bots for this integration.
*
* @param {String} integrationId The integration ID for this group of bots.
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
* getIntegrationsBotconnectorBotsSummaries is a preview method and is subject to both breaking and non-breaking changes at any time without notice
*/
getIntegrationsBotconnectorBotsSummaries(integrationId, opts) {
opts = opts || {};
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationsBotconnectorBotsSummaries';
}
return this.apiClient.callApi(
'/api/v2/integrations/botconnectors/{integrationId}/bots/summaries',
'GET',
{ 'integrationId': integrationId },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a specific botConnector bot, plus versions, for this integration
*
* @param {String} integrationId The integration ID for this group of bots
* @param {String} botId The botID for this bot
* @param {Object} opts Optional parameters
* @param {String} opts.version Specific Version
*/
getIntegrationsBotconnectorIntegrationIdBot(integrationId, botId, opts) {
opts = opts || {};
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationsBotconnectorIntegrationIdBot';
}
// verify the required parameter 'botId' is set
if (botId === undefined || botId === null) {
throw 'Missing the required parameter "botId" when calling getIntegrationsBotconnectorIntegrationIdBot';
}
return this.apiClient.callApi(
'/api/v2/integrations/botconnector/{integrationId}/bots/{botId}',
'GET',
{ 'integrationId': integrationId,'botId': botId },
{ 'version': opts['version'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of bot versions for a bot
*
* @param {String} integrationId The integration ID for this bot group
* @param {String} botId The botID for this bot
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
*/
getIntegrationsBotconnectorIntegrationIdBotVersions(integrationId, botId, opts) {
opts = opts || {};
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationsBotconnectorIntegrationIdBotVersions';
}
// verify the required parameter 'botId' is set
if (botId === undefined || botId === null) {
throw 'Missing the required parameter "botId" when calling getIntegrationsBotconnectorIntegrationIdBotVersions';
}
return this.apiClient.callApi(
'/api/v2/integrations/botconnector/{integrationId}/bots/{botId}/versions',
'GET',
{ 'integrationId': integrationId,'botId': botId },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of botConnector bots for this integration
*
* @param {String} integrationId The integration ID for this group of bots
*/
getIntegrationsBotconnectorIntegrationIdBots(integrationId) {
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationsBotconnectorIntegrationIdBots';
}
return this.apiClient.callApi(
'/api/v2/integrations/botconnector/{integrationId}/bots',
'GET',
{ 'integrationId': integrationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a summary list of botConnector bots for this integration
*
* @param {String} integrationId The integration ID for this group of bots
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
*/
getIntegrationsBotconnectorIntegrationIdBotsSummaries(integrationId, opts) {
opts = opts || {};
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationsBotconnectorIntegrationIdBotsSummaries';
}
return this.apiClient.callApi(
'/api/v2/integrations/botconnector/{integrationId}/bots/summaries',
'GET',
{ 'integrationId': integrationId },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* List permitted client app integrations for the logged in user
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.sortBy variable name requested to sort by
* @param {Array.<String>} opts.expand variable name requested by expand list
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
*/
getIntegrationsClientapps(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/clientapps',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* UC integration client application configuration.
* Deprecated: Please use GET /integrations/unifiedcommunications/clientapps instead. This endpoint returns basic UI configuration data for all Unified Communications integrations client applications enabled for the current organization.
* @param {Object} opts Optional parameters
* @param {Number} opts.pageSize The total page size requested (default to 25)
* @param {Number} opts.pageNumber The page number requested (default to 1)
* @param {String} opts.sortBy variable name requested to sort by
* @param {Array.<String>} opts.expand variable name requested by expand list
* @param {String} opts.nextPage next page token
* @param {String} opts.previousPage Previous page token
* @deprecated
*/
getIntegrationsClientappsUnifiedcommunications(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/clientapps/unifiedcommunications',
'GET',
{ },
{ 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'sortBy': opts['sortBy'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'nextPage': opts['nextPage'],'previousPage': opts['previousPage'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a single credential with sensitive fields redacted
*
* @param {String} credentialId Credential ID
*/
getIntegrationsCredential(credentialId) {
// verify the required parameter 'credentialId' is set
if (credentialId === undefined || credentialId === null) {
throw 'Missing the required parameter "credentialId" when calling getIntegrationsCredential';
}
return this.apiClient.callApi(
'/api/v2/integrations/credentials/{credentialId}',
'GET',
{ 'credentialId': credentialId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* List multiple sets of credentials
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
*/
getIntegrationsCredentials(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/credentials',
'GET',
{ },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* List all credential types
*
*/
getIntegrationsCredentialsTypes() {
return this.apiClient.callApi(
'/api/v2/integrations/credentials/types',
'GET',
{ },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of Audio Connector integrations
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
*/
getIntegrationsSpeechAudioconnector(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/speech/audioconnector',
'GET',
{ },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get an Audio Connector integration
*
* @param {String} integrationId The integration ID
*/
getIntegrationsSpeechAudioconnectorIntegrationId(integrationId) {
// verify the required parameter 'integrationId' is set
if (integrationId === undefined || integrationId === null) {
throw 'Missing the required parameter "integrationId" when calling getIntegrationsSpeechAudioconnectorIntegrationId';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/audioconnector/{integrationId}',
'GET',
{ 'integrationId': integrationId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get details about a Dialogflow agent
*
* @param {String} agentId The agent ID
*/
getIntegrationsSpeechDialogflowAgent(agentId) {
// verify the required parameter 'agentId' is set
if (agentId === undefined || agentId === null) {
throw 'Missing the required parameter "agentId" when calling getIntegrationsSpeechDialogflowAgent';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/dialogflow/agents/{agentId}',
'GET',
{ 'agentId': agentId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of Dialogflow agents in the customers' Google accounts
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
* @param {String} opts.name Filter on agent name
*/
getIntegrationsSpeechDialogflowAgents(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/speech/dialogflow/agents',
'GET',
{ },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'name': opts['name'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get details about a Dialogflow CX agent
*
* @param {String} agentId The agent ID
*/
getIntegrationsSpeechDialogflowcxAgent(agentId) {
// verify the required parameter 'agentId' is set
if (agentId === undefined || agentId === null) {
throw 'Missing the required parameter "agentId" when calling getIntegrationsSpeechDialogflowcxAgent';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/dialogflowcx/agents/{agentId}',
'GET',
{ 'agentId': agentId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of Dialogflow CX agents in the customers' Google accounts
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
* @param {String} opts.name Filter on agent name
*/
getIntegrationsSpeechDialogflowcxAgents(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/speech/dialogflowcx/agents',
'GET',
{ },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'name': opts['name'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get details about a Lex bot alias
*
* @param {String} aliasId The alias ID
*/
getIntegrationsSpeechLexBotAlias(aliasId) {
// verify the required parameter 'aliasId' is set
if (aliasId === undefined || aliasId === null) {
throw 'Missing the required parameter "aliasId" when calling getIntegrationsSpeechLexBotAlias';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/lex/bot/alias/{aliasId}',
'GET',
{ 'aliasId': aliasId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of aliases for a bot in the customer's AWS accounts
*
* @param {String} botId The bot ID
* @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.status Filter on alias status
* @param {String} opts.name Filter on alias name
*/
getIntegrationsSpeechLexBotBotIdAliases(botId, opts) {
opts = opts || {};
// verify the required parameter 'botId' is set
if (botId === undefined || botId === null) {
throw 'Missing the required parameter "botId" when calling getIntegrationsSpeechLexBotBotIdAliases';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/lex/bot/{botId}/aliases',
'GET',
{ 'botId': botId },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'status': opts['status'],'name': opts['name'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of Lex bots in the customers' AWS accounts
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
* @param {String} opts.name Filter on bot name
*/
getIntegrationsSpeechLexBots(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/speech/lex/bots',
'GET',
{ },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'name': opts['name'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get details about a Lex V2 bot alias
*
* @param {String} aliasId The Alias ID
*/
getIntegrationsSpeechLexv2BotAlias(aliasId) {
// verify the required parameter 'aliasId' is set
if (aliasId === undefined || aliasId === null) {
throw 'Missing the required parameter "aliasId" when calling getIntegrationsSpeechLexv2BotAlias';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/lexv2/bot/alias/{aliasId}',
'GET',
{ 'aliasId': aliasId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of aliases for a Lex V2 bot
*
* @param {String} botId The Bot ID
* @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.status Filter on alias status
* @param {String} opts.name Filter on alias name
*/
getIntegrationsSpeechLexv2BotBotIdAliases(botId, opts) {
opts = opts || {};
// verify the required parameter 'botId' is set
if (botId === undefined || botId === null) {
throw 'Missing the required parameter "botId" when calling getIntegrationsSpeechLexv2BotBotIdAliases';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/lexv2/bot/{botId}/aliases',
'GET',
{ 'botId': botId },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'status': opts['status'],'name': opts['name'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of Lex V2 bots
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
* @param {String} opts.name Filter on bot name
*/
getIntegrationsSpeechLexv2Bots(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/speech/lexv2/bots',
'GET',
{ },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'name': opts['name'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a Nuance bot in the specified Integration
*
* @param {String} nuanceIntegrationId The integration ID for this group of bots
* @param {String} botId The Nuance bot ID to get
* @param {Object} opts Optional parameters
* @param {Array.<String>} opts.expand expand
* @param {Object} opts.targetChannel targetChannel
*/
getIntegrationsSpeechNuanceNuanceIntegrationIdBot(nuanceIntegrationId, botId, opts) {
opts = opts || {};
// verify the required parameter 'nuanceIntegrationId' is set
if (nuanceIntegrationId === undefined || nuanceIntegrationId === null) {
throw 'Missing the required parameter "nuanceIntegrationId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBot';
}
// verify the required parameter 'botId' is set
if (botId === undefined || botId === null) {
throw 'Missing the required parameter "botId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBot';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/nuance/{nuanceIntegrationId}/bots/{botId}',
'GET',
{ 'nuanceIntegrationId': nuanceIntegrationId,'botId': botId },
{ 'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi'),'targetChannel': opts['targetChannel'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the status of an asynchronous Nuance bot GET job
*
* @param {String} nuanceIntegrationId The integration ID for this group of bots
* @param {String} botId The Nuance bot ID
* @param {String} jobId The asynchronous job ID
*/
getIntegrationsSpeechNuanceNuanceIntegrationIdBotJob(nuanceIntegrationId, botId, jobId) {
// verify the required parameter 'nuanceIntegrationId' is set
if (nuanceIntegrationId === undefined || nuanceIntegrationId === null) {
throw 'Missing the required parameter "nuanceIntegrationId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotJob';
}
// verify the required parameter 'botId' is set
if (botId === undefined || botId === null) {
throw 'Missing the required parameter "botId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotJob';
}
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotJob';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/nuance/{nuanceIntegrationId}/bots/{botId}/jobs/{jobId}',
'GET',
{ 'nuanceIntegrationId': nuanceIntegrationId,'botId': botId,'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the result of an asynchronous Nuance bot GET job
*
* @param {String} nuanceIntegrationId The integration ID for this group of bots
* @param {String} botId The Nuance bot ID
* @param {String} jobId The asynchronous job ID
*/
getIntegrationsSpeechNuanceNuanceIntegrationIdBotJobResults(nuanceIntegrationId, botId, jobId) {
// verify the required parameter 'nuanceIntegrationId' is set
if (nuanceIntegrationId === undefined || nuanceIntegrationId === null) {
throw 'Missing the required parameter "nuanceIntegrationId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotJobResults';
}
// verify the required parameter 'botId' is set
if (botId === undefined || botId === null) {
throw 'Missing the required parameter "botId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotJobResults';
}
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotJobResults';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/nuance/{nuanceIntegrationId}/bots/{botId}/jobs/{jobId}/results',
'GET',
{ 'nuanceIntegrationId': nuanceIntegrationId,'botId': botId,'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of Nuance bots available in the specified Integration
* If the onlyRegisteredBots param is set, the returned data will only include the Nuance bots which have configured client secrets within the Integration, otherwise all of the Nuance bots available to the Integrations configured discovery credentials are returned.
* @param {String} nuanceIntegrationId The integration ID for this group of bots
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
* @param {Boolean} opts.onlyRegisteredBots Limit bots to the ones configured for Genesys Cloud usage (default to true)
*/
getIntegrationsSpeechNuanceNuanceIntegrationIdBots(nuanceIntegrationId, opts) {
opts = opts || {};
// verify the required parameter 'nuanceIntegrationId' is set
if (nuanceIntegrationId === undefined || nuanceIntegrationId === null) {
throw 'Missing the required parameter "nuanceIntegrationId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBots';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/nuance/{nuanceIntegrationId}/bots',
'GET',
{ 'nuanceIntegrationId': nuanceIntegrationId },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'onlyRegisteredBots': opts['onlyRegisteredBots'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the status of an asynchronous Nuance bots GET job
*
* @param {String} nuanceIntegrationId The integration ID for this group of bots
* @param {String} jobId The asynchronous job ID
*/
getIntegrationsSpeechNuanceNuanceIntegrationIdBotsJob(nuanceIntegrationId, jobId) {
// verify the required parameter 'nuanceIntegrationId' is set
if (nuanceIntegrationId === undefined || nuanceIntegrationId === null) {
throw 'Missing the required parameter "nuanceIntegrationId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotsJob';
}
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotsJob';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/nuance/{nuanceIntegrationId}/bots/jobs/{jobId}',
'GET',
{ 'nuanceIntegrationId': nuanceIntegrationId,'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get the result of an asynchronous Nuance bots GET job
*
* @param {String} nuanceIntegrationId The integration ID for this group of bots
* @param {String} jobId The asynchronous job ID
*/
getIntegrationsSpeechNuanceNuanceIntegrationIdBotsJobResults(nuanceIntegrationId, jobId) {
// verify the required parameter 'nuanceIntegrationId' is set
if (nuanceIntegrationId === undefined || nuanceIntegrationId === null) {
throw 'Missing the required parameter "nuanceIntegrationId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotsJobResults';
}
// verify the required parameter 'jobId' is set
if (jobId === undefined || jobId === null) {
throw 'Missing the required parameter "jobId" when calling getIntegrationsSpeechNuanceNuanceIntegrationIdBotsJobResults';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/nuance/{nuanceIntegrationId}/bots/jobs/{jobId}/results',
'GET',
{ 'nuanceIntegrationId': nuanceIntegrationId,'jobId': jobId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get details about a STT engine
*
* @param {String} engineId The engine ID
*/
getIntegrationsSpeechSttEngine(engineId) {
// verify the required parameter 'engineId' is set
if (engineId === undefined || engineId === null) {
throw 'Missing the required parameter "engineId" when calling getIntegrationsSpeechSttEngine';
}
return this.apiClient.callApi(
'/api/v2/integrations/speech/stt/engines/{engineId}',
'GET',
{ 'engineId': engineId },
{ },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get a list of STT engines enabled for org
*
* @param {Object} opts Optional parameters
* @param {Number} opts.pageNumber Page number (default to 1)
* @param {Number} opts.pageSize Page size (default to 25)
* @param {String} opts.name Filter on engine name
*/
getIntegrationsSpeechSttEngines(opts) {
opts = opts || {};
return this.apiClient.callApi(
'/api/v2/integrations/speech/stt/engines',
'GET',
{ },
{ 'pageNumber': opts['pageNumber'],'pageSize': opts['pageSize'],'name': opts['name'] },
{ },
{ },
null,
['PureCloud OAuth'],
['application/json'],
['application/json']
);
}
/**
* Get details about a TTS engine
*
* @param {String} engineId The engine ID
* @param {Object} opts Optional parameters
* @param {Boolean} opts.includeVoices Include voices for the engine (default to false)
*/
getIntegrationsSpeechTtsEngine(engineId, opts) {
opts = opts || {};
// verify the required parameter 'engineId' is set
if (engineId === undefined || engineId === null) {
throw 'Missing th