docs: function(apiClient) {
      this.apiClient = apiClient || ApiClient.instance;
  
  
  
      /**
       * Accept a chat
       * Accept the specified chat interaction.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.acceptChatWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['acceptData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling acceptChat");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/accept', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Accept a chat
       * Accept the specified chat interaction.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.acceptChat = function(id, opts) {
        return this.acceptChatWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Resume async interaction chat
       * Resume for the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/AsyncResumeData} asyncResumeData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.asyncResumeWithHttpInfo = function(id, asyncResumeData) {
        var postBody = asyncResumeData;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling asyncResume");
        }
  
        // verify the required parameter 'asyncResumeData' is set
        if (asyncResumeData === undefined || asyncResumeData === null) {
          throw new Error("Missing the required parameter 'asyncResumeData' when calling asyncResume");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/resume', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Resume async interaction chat
       * Resume for the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/AsyncResumeData} asyncResumeData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.asyncResume = function(id, asyncResumeData) {
        return this.asyncResumeWithHttpInfo(id, asyncResumeData)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Cancel a chat consultation request
       * Cancel a chat consultation request that was initialized by calling [/media/chat/interactions/{id}/consult-by-queue](/reference/workspace/Media/index.html#consultByQueue). If the agent has already accepted the invitation, the Workspace API can&#39;t cancel the consultation.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/CancelConsultData} opts.cancelConsultData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.cancelConsultationChatWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['cancelConsultData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling cancelConsultationChat");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/cancel-consult', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Cancel a chat consultation request
       * Cancel a chat consultation request that was initialized by calling [/media/chat/interactions/{id}/consult-by-queue](/reference/workspace/Media/index.html#consultByQueue). If the agent has already accepted the invitation, the Workspace API can&#39;t cancel the consultation.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/CancelConsultData} opts.cancelConsultData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.cancelConsultationChat = function(id, opts) {
        return this.cancelConsultationChatWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Get chat transcript
       * Get a transcript for the specified chat interaction.
       * @param {String} id The ID of the chat interaction.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/InlineResponse2003} and HTTP response
       */
      this.chatMessagesWithHttpInfo = function(id) {
        var postBody = null;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling chatMessages");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = InlineResponse2003;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/messages', 'GET',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Get chat transcript
       * Get a transcript for the specified chat interaction.
       * @param {String} id The ID of the chat interaction.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/InlineResponse2003}
       */
      this.chatMessages = function(id) {
        return this.chatMessagesWithHttpInfo(id)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Consult with another agent
       * A consult occurs in the context of the specified chat, but the customer is not aware of the consulting agent. Messages and notifications from the consulting agent are only visible to other agents in the chat, not to the customer. After the consulting agent accepts the consultation, the originating agent can either transfer the chat to the consulting agent ([/media/{mediatype}/interactions/{id}/transfer-agent](/reference/workspace/Media/index.html#transferAgent)), add them in a conference ([/media/chat/interactions/{id}/invite](/reference/workspace/Media/index.html#invite)) or the consulting agent can leave the chat ([/media/chat/interactions/{id}/leave](/reference/workspace/Media/index.html#leaveChat)).
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/ConsultData} consultData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.consultWithHttpInfo = function(id, consultData) {
        var postBody = consultData;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling consult");
        }
  
        // verify the required parameter 'consultData' is set
        if (consultData === undefined || consultData === null) {
          throw new Error("Missing the required parameter 'consultData' when calling consult");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/consult', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Consult with another agent
       * A consult occurs in the context of the specified chat, but the customer is not aware of the consulting agent. Messages and notifications from the consulting agent are only visible to other agents in the chat, not to the customer. After the consulting agent accepts the consultation, the originating agent can either transfer the chat to the consulting agent ([/media/{mediatype}/interactions/{id}/transfer-agent](/reference/workspace/Media/index.html#transferAgent)), add them in a conference ([/media/chat/interactions/{id}/invite](/reference/workspace/Media/index.html#invite)) or the consulting agent can leave the chat ([/media/chat/interactions/{id}/leave](/reference/workspace/Media/index.html#leaveChat)).
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/ConsultData} consultData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.consult = function(id, consultData) {
        return this.consultWithHttpInfo(id, consultData)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Consult with another agent via a queue
       * Consult with another agent during a chat by sending an consult invitation to the specified queue. A consult occurs in the context of the specified chat, but the customer is not aware of the consulting agent. Messages and notifications from the consulting agent are only visible to other agents in the cat, not to the customer. After the consulting agent accepts the consultation, the originating agent can either transfer the chat to the consulting agent ([/media/{mediatype}/interactions/{id}/transfer-agent](/reference/workspace/Media/index.html#transferAgent)), add them in a conference ([/media/chat/interactions/{id}/invite](/reference/workspace/Media/index.html#invite)) or the consulting agent can leave the chat ([/media/chat/interactions/{id}/leave](/reference/workspace/Media/index.html#leaveChat)).
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/ConsultData1} consultData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.consultByQueueWithHttpInfo = function(id, consultData) {
        var postBody = consultData;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling consultByQueue");
        }
  
        // verify the required parameter 'consultData' is set
        if (consultData === undefined || consultData === null) {
          throw new Error("Missing the required parameter 'consultData' when calling consultByQueue");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/consult-by-queue', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Consult with another agent via a queue
       * Consult with another agent during a chat by sending an consult invitation to the specified queue. A consult occurs in the context of the specified chat, but the customer is not aware of the consulting agent. Messages and notifications from the consulting agent are only visible to other agents in the cat, not to the customer. After the consulting agent accepts the consultation, the originating agent can either transfer the chat to the consulting agent ([/media/{mediatype}/interactions/{id}/transfer-agent](/reference/workspace/Media/index.html#transferAgent)), add them in a conference ([/media/chat/interactions/{id}/invite](/reference/workspace/Media/index.html#invite)) or the consulting agent can leave the chat ([/media/chat/interactions/{id}/leave](/reference/workspace/Media/index.html#leaveChat)).
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/ConsultData1} consultData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.consultByQueue = function(id, consultData) {
        return this.consultByQueueWithHttpInfo(id, consultData)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Invite another agent to a chat
       * Invite another agent to join the specified chat conference. The customer is notified when the invited agent joins the chat. The agents can communicate with the customer or they can communicate with each other without the customer seeing their messages, depending on the value you set for the **visibility** parameter when you call [/media/chat/interactions/{id}/send-message](/reference/workspace/Media/index.html#sendMessage).
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/InviteData} inviteData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.inviteWithHttpInfo = function(id, inviteData) {
        var postBody = inviteData;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling invite");
        }
  
        // verify the required parameter 'inviteData' is set
        if (inviteData === undefined || inviteData === null) {
          throw new Error("Missing the required parameter 'inviteData' when calling invite");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/invite', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Invite another agent to a chat
       * Invite another agent to join the specified chat conference. The customer is notified when the invited agent joins the chat. The agents can communicate with the customer or they can communicate with each other without the customer seeing their messages, depending on the value you set for the **visibility** parameter when you call [/media/chat/interactions/{id}/send-message](/reference/workspace/Media/index.html#sendMessage).
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/InviteData} inviteData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.invite = function(id, inviteData) {
        return this.inviteWithHttpInfo(id, inviteData)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Invite another agent to a chat via a queue
       * Invite another agent to the chat conference by sending an invitation to the specified queue. The next available agent in the queue is then sent an invite to join the chat. The customer is notified when the invited agent joins the chat. The agents can communicate with the customer or they can communicate with each other without the customer seeing their messages, depending on the value you set for the **visibility** parameter when you call [/media/chat/interactions/{id}/send-message](/reference/workspace/Media/index.html#sendMessage).
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/InviteData1} inviteData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.inviteByQueueWithHttpInfo = function(id, inviteData) {
        var postBody = inviteData;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling inviteByQueue");
        }
  
        // verify the required parameter 'inviteData' is set
        if (inviteData === undefined || inviteData === null) {
          throw new Error("Missing the required parameter 'inviteData' when calling inviteByQueue");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/invite-by-queue', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Invite another agent to a chat via a queue
       * Invite another agent to the chat conference by sending an invitation to the specified queue. The next available agent in the queue is then sent an invite to join the chat. The customer is notified when the invited agent joins the chat. The agents can communicate with the customer or they can communicate with each other without the customer seeing their messages, depending on the value you set for the **visibility** parameter when you call [/media/chat/interactions/{id}/send-message](/reference/workspace/Media/index.html#sendMessage).
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/InviteData1} inviteData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.inviteByQueue = function(id, inviteData) {
        return this.inviteByQueueWithHttpInfo(id, inviteData)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Leave a chat
       * Leave the specified chat or conference. If the agent is in a conference, the chat session stays open for the customer. If the agent is not in a conference, the chat ends for the customer but the agent can still update user data and set disposition.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/LeaveData} opts.leaveData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.leaveChatWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['leaveData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling leaveChat");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/leave', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Leave a chat
       * Leave the specified chat or conference. If the agent is in a conference, the chat session stays open for the customer. If the agent is not in a conference, the chat ends for the customer but the agent can still update user data and set disposition.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/LeaveData} opts.leaveData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.leaveChat = function(id, opts) {
        return this.leaveChatWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Remove an agent from a chat conference
       * Remove the specified agent from the chat conference.
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/RemoveFromConferenceData} removeFromConferenceData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.removeFromConferenceWithHttpInfo = function(id, removeFromConferenceData) {
        var postBody = removeFromConferenceData;
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling removeFromConference");
        }
  
        // verify the required parameter 'removeFromConferenceData' is set
        if (removeFromConferenceData === undefined || removeFromConferenceData === null) {
          throw new Error("Missing the required parameter 'removeFromConferenceData' when calling removeFromConference");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/remove-from-conference', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Remove an agent from a chat conference
       * Remove the specified agent from the chat conference.
       * @param {String} id The ID of the chat interaction.
       * @param {module:model/RemoveFromConferenceData} removeFromConferenceData 
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.removeFromConference = function(id, removeFromConferenceData) {
        return this.removeFromConferenceWithHttpInfo(id, removeFromConferenceData)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Send a custom notification
       * Send a custom notification to the specified chat. The notification is typically used as a trigger for some custom behavior on the recipient&#39;s end.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/CustomNotificationData} opts.customNotificationData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.sendCustomNotificationWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['customNotificationData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling sendCustomNotification");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/send-custom-notification', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Send a custom notification
       * Send a custom notification to the specified chat. The notification is typically used as a trigger for some custom behavior on the recipient&#39;s end.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/CustomNotificationData} opts.customNotificationData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.sendCustomNotification = function(id, opts) {
        return this.sendCustomNotificationWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Send a message
       * Send a message to participants in the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData1} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.sendMessageWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['acceptData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling sendMessage");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/send-message', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Send a message
       * Send a message to participants in the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData1} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.sendMessage = function(id, opts) {
        return this.sendMessageWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Send a system command
       * Send a system command to the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/SystemCommandData} opts.systemCommandData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.sendSystemCommandWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['systemCommandData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling sendSystemCommand");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/send-system-command', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Send a system command
       * Send a system command to the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/SystemCommandData} opts.systemCommandData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.sendSystemCommand = function(id, opts) {
        return this.sendSystemCommandWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Send notification that the agent is typing
       * Send notification that the agent is typing to the other participants in the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData3} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.sendTypingStartedWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['acceptData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling sendTypingStarted");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/send-typing-started', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Send notification that the agent is typing
       * Send notification that the agent is typing to the other participants in the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData3} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.sendTypingStarted = function(id, opts) {
        return this.sendTypingStartedWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Send notification that the agent stopped typing
       * Send notification that the agent stopped typing to the other participants in the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData4} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.sendTypingStoppedWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['acceptData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling sendTypingStopped");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/send-typing-stopped', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Send notification that the agent stopped typing
       * Send notification that the agent stopped typing to the other participants in the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData4} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.sendTypingStopped = function(id, opts) {
        return this.sendTypingStoppedWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Send a URL
       * Send a URL to participants in the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData2} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.sendUrlDataWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['acceptData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling sendUrlData");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/send-url', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Send a URL
       * Send a URL to participants in the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/AcceptData2} opts.acceptData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.sendUrlData = function(id, opts) {
        return this.sendUrlDataWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Update an agent&#39;s nickname
       * Update the agent&#39;s nickname for the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/UpdateNicknameData} opts.updateNicknameData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.updateNicknameWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['updateNicknameData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling updateNickname");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/update-nickname', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Update an agent&#39;s nickname
       * Update the agent&#39;s nickname for the specified chat.
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/UpdateNicknameData} opts.updateNicknameData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.updateNickname = function(id, opts) {
        return this.updateNicknameWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
  
  
      /**
       * Share a document
       * Share a document with participants
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/UploadData} opts.uploadData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/ApiSuccessResponse} and HTTP response
       */
      this.uploadFileWithHttpInfo = function(id, opts) {
        opts = opts || {};
        var postBody = opts['uploadData'];
  
        // verify the required parameter 'id' is set
        if (id === undefined || id === null) {
          throw new Error("Missing the required parameter 'id' when calling uploadFile");
        }
  
  
        var pathParams = {
          'id': id
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
        };
  
        var authNames = [];
        var contentTypes = ['application/json'];
        var accepts = ['application/json'];
        var returnType = ApiSuccessResponse;
  
        return this.apiClient.callApi(
          '/media/chat/interactions/{id}/upload-file', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType
        );
      }
  
      /**
       * Share a document
       * Share a document with participants
       * @param {String} id The ID of the chat interaction.
       * @param {Object} opts Optional parameters
       * @param {module:model/UploadData} opts.uploadData Request parameters.
       * @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/ApiSuccessResponse}
       */
      this.uploadFile = function(id, opts) {
        return this.uploadFileWithHttpInfo(id, opts)
          .then(function(response_and_data) {
            return response_and_data.data;
          });
      }
    }