Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/clients/core/tickets.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,12 @@ const {Client} = require('../client');
* @property {Array<Ticket>} [tickets] - The ticket object to create many tickets.
*/

/**
* @typedef {object} TicketCollaborator
* @property {number} id - The ID of the collaborator.
* @property {string} name - The name of the collaborator.
*/

/**
* @class
* Client for the Zendesk API - Tickets.
Expand Down Expand Up @@ -238,7 +244,7 @@ class Tickets extends Client {
/**
* List collaborators of a specific ticket.
* @param {number} ticketId - The ID of the ticket.
* @returns {Promise<Array>} An array of collaborators for the ticket.
* @returns {Promise<Array<TicketCollaborator>>} An array of collaborators for the ticket.
* @see {@link https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets}
* @example
* const collaborators = await client.tickets.listCollaborators(7890);
Expand All @@ -250,7 +256,7 @@ class Tickets extends Client {
/**
* List incidents related to a specific ticket.
* @param {number} ticketId - The ID of the ticket.
* @returns {Promise<Array>} An array of incidents related to the ticket.
* @returns {Promise<Array<Ticket>>} An array of incidents related to the ticket.
* @see {@link https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets}
* @example
* const incidents = await client.tickets.listIncidents(7890);
Expand Down Expand Up @@ -523,7 +529,7 @@ class Tickets extends Client {
/**
* Retrieve comments associated with a specific ticket.
* @param {number} ticketId - The ID of the ticket to retrieve comments for.
* @returns {Promise<Array>} A promise that resolves with an array of comments associated with the ticket.
* @returns {Promise<Array<TicketComment>>} A promise that resolves with an array of comments associated with the ticket.
* @throws {Error} If `ticketId` is not a valid number.
* @see {@link https://developer.zendesk.com/api-reference/ticketing/tickets/ticket_comments/}
* @example
Expand Down