UNPKG

purecloud-platform-client-v2

Version:

A JavaScript library to interface with the PureCloud Platform API

1,525 lines (1,398 loc) 268 kB
import ApiClient from '../ApiClient.js'; class ConversationsApi { /** * Conversations service. * @module purecloud-platform-client-v2/api/ConversationsApi * @version 223.0.0 */ /** * Constructs a new ConversationsApi. * @alias module:purecloud-platform-client-v2/api/ConversationsApi * @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/cancel an async details job * * @param {String} jobId jobId */ deleteAnalyticsConversationsDetailsJob(jobId) { // verify the required parameter 'jobId' is set if (jobId === undefined || jobId === null) { throw 'Missing the required parameter "jobId" when calling deleteAnalyticsConversationsDetailsJob'; } return this.apiClient.callApi( '/api/v2/analytics/conversations/details/jobs/{jobId}', 'DELETE', { 'jobId': jobId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a code used to add a communication to this participant * * @param {String} conversationId conversation ID * @param {String} participantId participant ID * @param {String} addCommunicationCode addCommunicationCode */ deleteConversationParticipantCode(conversationId, participantId, addCommunicationCode) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling deleteConversationParticipantCode'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling deleteConversationParticipantCode'; } // verify the required parameter 'addCommunicationCode' is set if (addCommunicationCode === undefined || addCommunicationCode === null) { throw 'Missing the required parameter "addCommunicationCode" when calling deleteConversationParticipantCode'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/participants/{participantId}/codes/{addCommunicationCode}', 'DELETE', { 'conversationId': conversationId,'participantId': participantId,'addCommunicationCode': addCommunicationCode }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Remove flagged reason from conversation participant. * * @param {String} conversationId conversation ID * @param {String} participantId participant ID */ deleteConversationParticipantFlaggedreason(conversationId, participantId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling deleteConversationParticipantFlaggedreason'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling deleteConversationParticipantFlaggedreason'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/participants/{participantId}/flaggedreason', 'DELETE', { 'conversationId': conversationId,'participantId': participantId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Cancel the transfer * * @param {String} conversationId conversationId * @param {String} participantId participantId */ deleteConversationsCallParticipantConsult(conversationId, participantId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling deleteConversationsCallParticipantConsult'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling deleteConversationsCallParticipantConsult'; } return this.apiClient.callApi( '/api/v2/conversations/calls/{conversationId}/participants/{participantId}/consult', 'DELETE', { 'conversationId': conversationId,'participantId': participantId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete attachment from draft * * @param {String} conversationId conversationId * @param {String} attachmentId attachmentId */ deleteConversationsEmailMessagesDraftAttachment(conversationId, attachmentId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling deleteConversationsEmailMessagesDraftAttachment'; } // verify the required parameter 'attachmentId' is set if (attachmentId === undefined || attachmentId === null) { throw 'Missing the required parameter "attachmentId" when calling deleteConversationsEmailMessagesDraftAttachment'; } return this.apiClient.callApi( '/api/v2/conversations/emails/{conversationId}/messages/draft/attachments/{attachmentId}', 'DELETE', { 'conversationId': conversationId,'attachmentId': attachmentId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Remove a cached media item asychronously * * @param {String} cachedMediaItemId cachedMediaItemId */ deleteConversationsMessagesCachedmediaCachedMediaItemId(cachedMediaItemId) { // verify the required parameter 'cachedMediaItemId' is set if (cachedMediaItemId === undefined || cachedMediaItemId === null) { throw 'Missing the required parameter "cachedMediaItemId" when calling deleteConversationsMessagesCachedmediaCachedMediaItemId'; } return this.apiClient.callApi( '/api/v2/conversations/messages/cachedmedia/{cachedMediaItemId}', 'DELETE', { 'cachedMediaItemId': cachedMediaItemId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a Facebook messaging integration * * @param {String} integrationId Integration ID */ deleteConversationsMessagingIntegrationsFacebookIntegrationId(integrationId) { // verify the required parameter 'integrationId' is set if (integrationId === undefined || integrationId === null) { throw 'Missing the required parameter "integrationId" when calling deleteConversationsMessagingIntegrationsFacebookIntegrationId'; } return this.apiClient.callApi( '/api/v2/conversations/messaging/integrations/facebook/{integrationId}', 'DELETE', { 'integrationId': integrationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete Instagram messaging integration * * @param {String} integrationId Integration ID */ deleteConversationsMessagingIntegrationsInstagramIntegrationId(integrationId) { // verify the required parameter 'integrationId' is set if (integrationId === undefined || integrationId === null) { throw 'Missing the required parameter "integrationId" when calling deleteConversationsMessagingIntegrationsInstagramIntegrationId'; } return this.apiClient.callApi( '/api/v2/conversations/messaging/integrations/instagram/{integrationId}', 'DELETE', { 'integrationId': integrationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete an Open messaging integration * See https://developer.genesys.cloud/api/digital/openmessaging/ for more information. * @param {String} integrationId Integration ID */ deleteConversationsMessagingIntegrationsOpenIntegrationId(integrationId) { // verify the required parameter 'integrationId' is set if (integrationId === undefined || integrationId === null) { throw 'Missing the required parameter "integrationId" when calling deleteConversationsMessagingIntegrationsOpenIntegrationId'; } return this.apiClient.callApi( '/api/v2/conversations/messaging/integrations/open/{integrationId}', 'DELETE', { 'integrationId': integrationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete Twitter messaging integration * * @param {String} integrationId Integration ID */ deleteConversationsMessagingIntegrationsTwitterIntegrationId(integrationId) { // verify the required parameter 'integrationId' is set if (integrationId === undefined || integrationId === null) { throw 'Missing the required parameter "integrationId" when calling deleteConversationsMessagingIntegrationsTwitterIntegrationId'; } return this.apiClient.callApi( '/api/v2/conversations/messaging/integrations/twitter/{integrationId}', 'DELETE', { 'integrationId': integrationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a WhatsApp messaging integration * * @param {String} integrationId Integration ID */ deleteConversationsMessagingIntegrationsWhatsappIntegrationId(integrationId) { // verify the required parameter 'integrationId' is set if (integrationId === undefined || integrationId === null) { throw 'Missing the required parameter "integrationId" when calling deleteConversationsMessagingIntegrationsWhatsappIntegrationId'; } return this.apiClient.callApi( '/api/v2/conversations/messaging/integrations/whatsapp/{integrationId}', 'DELETE', { 'integrationId': integrationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a messaging setting * * @param {String} messageSettingId Message Setting ID */ deleteConversationsMessagingSetting(messageSettingId) { // verify the required parameter 'messageSettingId' is set if (messageSettingId === undefined || messageSettingId === null) { throw 'Missing the required parameter "messageSettingId" when calling deleteConversationsMessagingSetting'; } return this.apiClient.callApi( '/api/v2/conversations/messaging/settings/{messageSettingId}', 'DELETE', { 'messageSettingId': messageSettingId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete the organization's default setting, a global default will be applied to integrations without settings * When an integration is created a settings ID may be assigned to it. If the settings ID is not supplied, the default settings will be assigned to it. */ deleteConversationsMessagingSettingsDefault() { return this.apiClient.callApi( '/api/v2/conversations/messaging/settings/default', 'DELETE', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Delete a supported content profile * * @param {String} supportedContentId Supported Content ID */ deleteConversationsMessagingSupportedcontentSupportedContentId(supportedContentId) { // verify the required parameter 'supportedContentId' is set if (supportedContentId === undefined || supportedContentId === null) { throw 'Missing the required parameter "supportedContentId" when calling deleteConversationsMessagingSupportedcontentSupportedContentId'; } return this.apiClient.callApi( '/api/v2/conversations/messaging/supportedcontent/{supportedContentId}', 'DELETE', { 'supportedContentId': supportedContentId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a conversation by id * * @param {String} conversationId conversationId */ getAnalyticsConversationDetails(conversationId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getAnalyticsConversationDetails'; } return this.apiClient.callApi( '/api/v2/analytics/conversations/{conversationId}/details', 'GET', { 'conversationId': conversationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get status for async query for conversation aggregates * * @param {String} jobId jobId * getAnalyticsConversationsAggregatesJob is a preview method and is subject to both breaking and non-breaking changes at any time without notice */ getAnalyticsConversationsAggregatesJob(jobId) { // verify the required parameter 'jobId' is set if (jobId === undefined || jobId === null) { throw 'Missing the required parameter "jobId" when calling getAnalyticsConversationsAggregatesJob'; } return this.apiClient.callApi( '/api/v2/analytics/conversations/aggregates/jobs/{jobId}', 'GET', { 'jobId': jobId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Fetch a page of results for an async aggregates query * * @param {String} jobId jobId * @param {Object} opts Optional parameters * @param {String} opts.cursor Cursor token to retrieve next page * getAnalyticsConversationsAggregatesJobResults is a preview method and is subject to both breaking and non-breaking changes at any time without notice */ getAnalyticsConversationsAggregatesJobResults(jobId, opts) { opts = opts || {}; // verify the required parameter 'jobId' is set if (jobId === undefined || jobId === null) { throw 'Missing the required parameter "jobId" when calling getAnalyticsConversationsAggregatesJobResults'; } return this.apiClient.callApi( '/api/v2/analytics/conversations/aggregates/jobs/{jobId}/results', 'GET', { 'jobId': jobId }, { 'cursor': opts['cursor'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Gets multiple conversations by id * * @param {Object} opts Optional parameters * @param {Array.<String>} opts.id Comma-separated conversation ids */ getAnalyticsConversationsDetails(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/analytics/conversations/details', 'GET', { }, { 'id': this.apiClient.buildCollectionParam(opts['id'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get status for async query for conversation details * * @param {String} jobId jobId */ getAnalyticsConversationsDetailsJob(jobId) { // verify the required parameter 'jobId' is set if (jobId === undefined || jobId === null) { throw 'Missing the required parameter "jobId" when calling getAnalyticsConversationsDetailsJob'; } return this.apiClient.callApi( '/api/v2/analytics/conversations/details/jobs/{jobId}', 'GET', { 'jobId': jobId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Fetch a page of results for an async details job * * @param {String} jobId jobId * @param {Object} opts Optional parameters * @param {String} opts.cursor Indicates where to resume query results (not required for first page) * @param {Number} opts.pageSize The desired maximum number of results */ getAnalyticsConversationsDetailsJobResults(jobId, opts) { opts = opts || {}; // verify the required parameter 'jobId' is set if (jobId === undefined || jobId === null) { throw 'Missing the required parameter "jobId" when calling getAnalyticsConversationsDetailsJobResults'; } return this.apiClient.callApi( '/api/v2/analytics/conversations/details/jobs/{jobId}/results', 'GET', { 'jobId': jobId }, { 'cursor': opts['cursor'],'pageSize': opts['pageSize'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Lookup the datalake availability date and time * */ getAnalyticsConversationsDetailsJobsAvailability() { return this.apiClient.callApi( '/api/v2/analytics/conversations/details/jobs/availability', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get conversation * * @param {String} conversationId conversation ID */ getConversation(conversationId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversation'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}', 'GET', { 'conversationId': conversationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Fetch info on a secure session * * @param {String} conversationId conversation ID * @param {String} participantId participant ID * @param {String} secureSessionId secure IVR session ID */ getConversationParticipantSecureivrsession(conversationId, participantId, secureSessionId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationParticipantSecureivrsession'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationParticipantSecureivrsession'; } // verify the required parameter 'secureSessionId' is set if (secureSessionId === undefined || secureSessionId === null) { throw 'Missing the required parameter "secureSessionId" when calling getConversationParticipantSecureivrsession'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions/{secureSessionId}', 'GET', { 'conversationId': conversationId,'participantId': participantId,'secureSessionId': secureSessionId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a list of secure sessions for this participant. * * @param {String} conversationId conversation ID * @param {String} participantId participant ID */ getConversationParticipantSecureivrsessions(conversationId, participantId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationParticipantSecureivrsessions'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationParticipantSecureivrsessions'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/participants/{participantId}/secureivrsessions', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation participant. * * @param {String} conversationId conversation ID * @param {String} participantId participant ID * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) */ getConversationParticipantWrapup(conversationId, participantId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationParticipantWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationParticipantWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/participants/{participantId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get list of wrapup codes for this conversation participant * * @param {String} conversationId conversation ID * @param {String} participantId participant ID */ getConversationParticipantWrapupcodes(conversationId, participantId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationParticipantWrapupcodes'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationParticipantWrapupcodes'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/participants/{participantId}/wrapupcodes', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the secure attributes on a conversation. * * @param {String} conversationId conversation ID */ getConversationSecureattributes(conversationId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationSecureattributes'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/secureattributes', 'GET', { 'conversationId': conversationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get Suggestion. * * @param {String} conversationId Conversation ID * @param {String} suggestionId Suggestion ID */ getConversationSuggestion(conversationId, suggestionId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationSuggestion'; } // verify the required parameter 'suggestionId' is set if (suggestionId === undefined || suggestionId === null) { throw 'Missing the required parameter "suggestionId" when calling getConversationSuggestion'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/suggestions/{suggestionId}', 'GET', { 'conversationId': conversationId,'suggestionId': suggestionId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get all suggestions for a conversation. * * @param {String} conversationId Conversation ID * @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.pageSize Number of entities to return. Maximum of 200. * @param {Object} opts.type Suggestion type to filter by. * @param {Object} opts.state Suggestion state to filter Copilot suggestions. */ getConversationSuggestions(conversationId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationSuggestions'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/suggestions', 'GET', { 'conversationId': conversationId }, { 'before': opts['before'],'after': opts['after'],'pageSize': opts['pageSize'],'type': opts['type'],'state': opts['state'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the summaries of the conversation. * * @param {String} conversationId Conversation ID */ getConversationSummaries(conversationId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationSummaries'; } return this.apiClient.callApi( '/api/v2/conversations/{conversationId}/summaries', 'GET', { 'conversationId': conversationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get active conversations for the logged in user * * @param {Object} opts Optional parameters * @param {String} opts.communicationType Call or Chat communication filtering */ getConversations(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/conversations', 'GET', { }, { 'communicationType': opts['communicationType'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get call conversation * * @param {String} conversationId conversationId */ getConversationsCall(conversationId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCall'; } return this.apiClient.callApi( '/api/v2/conversations/calls/{conversationId}', 'GET', { 'conversationId': conversationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation communication. * * @param {String} conversationId conversationId * @param {String} participantId participantId * @param {String} communicationId communicationId * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) */ getConversationsCallParticipantCommunicationWrapup(conversationId, participantId, communicationId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCallParticipantCommunicationWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsCallParticipantCommunicationWrapup'; } // verify the required parameter 'communicationId' is set if (communicationId === undefined || communicationId === null) { throw 'Missing the required parameter "communicationId" when calling getConversationsCallParticipantCommunicationWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/calls/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId,'communicationId': communicationId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation participant. * * @param {String} conversationId conversationId * @param {String} participantId participantId * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) */ getConversationsCallParticipantWrapup(conversationId, participantId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCallParticipantWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsCallParticipantWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/calls/{conversationId}/participants/{participantId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get list of wrapup codes for this conversation participant * * @param {String} conversationId conversationId * @param {String} participantId participantId */ getConversationsCallParticipantWrapupcodes(conversationId, participantId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCallParticipantWrapupcodes'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsCallParticipantWrapupcodes'; } return this.apiClient.callApi( '/api/v2/conversations/calls/{conversationId}/participants/{participantId}/wrapupcodes', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get callback conversation * * @param {String} conversationId conversationId */ getConversationsCallback(conversationId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCallback'; } return this.apiClient.callApi( '/api/v2/conversations/callbacks/{conversationId}', 'GET', { 'conversationId': conversationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation communication. * * @param {String} conversationId conversationId * @param {String} participantId participantId * @param {String} communicationId communicationId * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) */ getConversationsCallbackParticipantCommunicationWrapup(conversationId, participantId, communicationId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCallbackParticipantCommunicationWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsCallbackParticipantCommunicationWrapup'; } // verify the required parameter 'communicationId' is set if (communicationId === undefined || communicationId === null) { throw 'Missing the required parameter "communicationId" when calling getConversationsCallbackParticipantCommunicationWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId,'communicationId': communicationId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation participant. * * @param {String} conversationId conversationId * @param {String} participantId participantId * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) */ getConversationsCallbackParticipantWrapup(conversationId, participantId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCallbackParticipantWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsCallbackParticipantWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get list of wrapup codes for this conversation participant * * @param {String} conversationId conversationId * @param {String} participantId participantId */ getConversationsCallbackParticipantWrapupcodes(conversationId, participantId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCallbackParticipantWrapupcodes'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsCallbackParticipantWrapupcodes'; } return this.apiClient.callApi( '/api/v2/conversations/callbacks/{conversationId}/participants/{participantId}/wrapupcodes', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get active callback conversations for the logged in user * */ getConversationsCallbacks() { return this.apiClient.callApi( '/api/v2/conversations/callbacks', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get active call conversations for the logged in user * */ getConversationsCalls() { return this.apiClient.callApi( '/api/v2/conversations/calls', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get call history * * @param {Object} opts Optional parameters * @param {Number} opts.pageSize Page size, maximum 50 (default to 25) * @param {Number} opts.pageNumber Page number (default to 1) * @param {String} opts.interval Interval string; format is ISO-8601. Separate start and end times with forward slash '/' * @param {Array.<String>} opts.expand Which fields, if any, to expand. */ getConversationsCallsHistory(opts) { opts = opts || {}; return this.apiClient.callApi( '/api/v2/conversations/calls/history', 'GET', { }, { 'pageSize': opts['pageSize'],'pageNumber': opts['pageNumber'],'interval': opts['interval'],'expand': this.apiClient.buildCollectionParam(opts['expand'], 'multi') }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the maximum number of participants that this user can have on a conference * */ getConversationsCallsMaximumconferenceparties() { return this.apiClient.callApi( '/api/v2/conversations/calls/maximumconferenceparties', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get chat conversation * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-removal-of-acd-web-chat-version-2/. * @param {String} conversationId conversationId * @deprecated */ getConversationsChat(conversationId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsChat'; } return this.apiClient.callApi( '/api/v2/conversations/chats/{conversationId}', 'GET', { 'conversationId': conversationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get a web chat conversation message * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-removal-of-acd-web-chat-version-2/. The current user must be involved with the conversation to get its messages. * @param {String} conversationId conversationId * @param {String} messageId messageId * @deprecated */ getConversationsChatMessage(conversationId, messageId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsChatMessage'; } // verify the required parameter 'messageId' is set if (messageId === undefined || messageId === null) { throw 'Missing the required parameter "messageId" when calling getConversationsChatMessage'; } return this.apiClient.callApi( '/api/v2/conversations/chats/{conversationId}/messages/{messageId}', 'GET', { 'conversationId': conversationId,'messageId': messageId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the messages of a chat conversation. * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-removal-of-acd-web-chat-version-2/. The current user must be involved with the conversation to get its messages. * @param {String} conversationId conversationId * @param {Object} opts Optional parameters * @param {String} opts.after If specified, get the messages chronologically after the id of this message * @param {String} opts.before If specified, get the messages chronologically before the id of this message * @param {Object} opts.sortOrder Sort order (default to ascending) * @param {Number} opts.maxResults Limit the returned number of messages, up to a maximum of 100 (default to 100) * @deprecated */ getConversationsChatMessages(conversationId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsChatMessages'; } return this.apiClient.callApi( '/api/v2/conversations/chats/{conversationId}/messages', 'GET', { 'conversationId': conversationId }, { 'after': opts['after'],'before': opts['before'],'sortOrder': opts['sortOrder'],'maxResults': opts['maxResults'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation communication. * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-removal-of-acd-web-chat-version-2/. * @param {String} conversationId conversationId * @param {String} participantId participantId * @param {String} communicationId communicationId * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) * @deprecated */ getConversationsChatParticipantCommunicationWrapup(conversationId, participantId, communicationId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsChatParticipantCommunicationWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsChatParticipantCommunicationWrapup'; } // verify the required parameter 'communicationId' is set if (communicationId === undefined || communicationId === null) { throw 'Missing the required parameter "communicationId" when calling getConversationsChatParticipantCommunicationWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/chats/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId,'communicationId': communicationId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation participant. * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-removal-of-acd-web-chat-version-2/. * @param {String} conversationId conversationId * @param {String} participantId participantId * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) * @deprecated */ getConversationsChatParticipantWrapup(conversationId, participantId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsChatParticipantWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsChatParticipantWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/chats/{conversationId}/participants/{participantId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get list of wrapup codes for this conversation participant * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-removal-of-acd-web-chat-version-2/. * @param {String} conversationId conversationId * @param {String} participantId participantId * @deprecated */ getConversationsChatParticipantWrapupcodes(conversationId, participantId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsChatParticipantWrapupcodes'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsChatParticipantWrapupcodes'; } return this.apiClient.callApi( '/api/v2/conversations/chats/{conversationId}/participants/{participantId}/wrapupcodes', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get active chat conversations for the logged in user * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-removal-of-acd-web-chat-version-2/. * @deprecated */ getConversationsChats() { return this.apiClient.callApi( '/api/v2/conversations/chats', 'GET', { }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get cobrowse conversation * * @param {String} conversationId conversationId */ getConversationsCobrowsesession(conversationId) { // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCobrowsesession'; } return this.apiClient.callApi( '/api/v2/conversations/cobrowsesessions/{conversationId}', 'GET', { 'conversationId': conversationId }, { }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation communication. * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-legacy-co-browse-and-screenshare/ * @param {String} conversationId conversationId * @param {String} participantId participantId * @param {String} communicationId communicationId * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) * @deprecated */ getConversationsCobrowsesessionParticipantCommunicationWrapup(conversationId, participantId, communicationId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCobrowsesessionParticipantCommunicationWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsCobrowsesessionParticipantCommunicationWrapup'; } // verify the required parameter 'communicationId' is set if (communicationId === undefined || communicationId === null) { throw 'Missing the required parameter "communicationId" when calling getConversationsCobrowsesessionParticipantCommunicationWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/communications/{communicationId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId,'communicationId': communicationId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get the wrap-up for this conversation participant. * This endpoint is deprecated. Please see the article https://help.mypurecloud.com/articles/deprecation-legacy-co-browse-and-screenshare/ * @param {String} conversationId conversationId * @param {String} participantId participantId * @param {Object} opts Optional parameters * @param {Boolean} opts.provisional Indicates if the wrap-up code is provisional. (default to false) * @deprecated */ getConversationsCobrowsesessionParticipantWrapup(conversationId, participantId, opts) { opts = opts || {}; // verify the required parameter 'conversationId' is set if (conversationId === undefined || conversationId === null) { throw 'Missing the required parameter "conversationId" when calling getConversationsCobrowsesessionParticipantWrapup'; } // verify the required parameter 'participantId' is set if (participantId === undefined || participantId === null) { throw 'Missing the required parameter "participantId" when calling getConversationsCobrowsesessionParticipantWrapup'; } return this.apiClient.callApi( '/api/v2/conversations/cobrowsesessions/{conversationId}/participants/{participantId}/wrapup', 'GET', { 'conversationId': conversationId,'participantId': participantId }, { 'provisional': opts['provisional'] }, { }, { }, null, ['PureCloud OAuth'], ['application/json'], ['application/json'] ); } /** * Get list of wrapup codes for this conversation participa