Skip to content

Commit 8ec9ab2

Browse files
committed
chore: enforce listCollaborators to TicketCollaborator[]
1 parent bd605a4 commit 8ec9ab2

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/clients/core/tickets.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,12 @@ const {Client} = require('../client');
127127
* @property {Array<Ticket>} [tickets] - The ticket object to create many tickets.
128128
*/
129129

130+
/**
131+
* @typedef {object} TicketCollaborator
132+
* @property {number} id - The ID of the collaborator.
133+
* @property {string} name - The name of the collaborator.
134+
*/
135+
130136
/**
131137
* @class
132138
* Client for the Zendesk API - Tickets.
@@ -238,7 +244,7 @@ class Tickets extends Client {
238244
/**
239245
* List collaborators of a specific ticket.
240246
* @param {number} ticketId - The ID of the ticket.
241-
* @returns {Promise<Array>} An array of collaborators for the ticket.
247+
* @returns {Promise<Array<TicketCollaborator>>} An array of collaborators for the ticket.
242248
* @see {@link https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#list-tickets}
243249
* @example
244250
* const collaborators = await client.tickets.listCollaborators(7890);

0 commit comments

Comments
 (0)