Skip to content

Commit

Permalink
fix jsdoc lint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
blakmatrix committed Jan 3, 2024
1 parent ccd89b3 commit 374109f
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 13 deletions.
8 changes: 4 additions & 4 deletions src/clients/core/sideconversations.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ const {ApiTypes} = require('../../constants');
* @property {Participant} [from] - The participant who sent the message. See Participants
* @property {Participant[]} to - The list of participants the message was sent to. See Participants
* @property {string[]} [attachment_ids] - List of tokens received from uploading files for comment attachments. The files are attached by creating or updating tickets with the tokens. See Attaching files in Tickets
* @property {Object.<string, string>} [external_ids] - A key-value object where all values are strings. Used for message metadata
* @property {{[key: string]: string}} [external_ids] - A key-value object where all values are strings. Used for message metadata
*/

/**
Expand All @@ -35,7 +35,7 @@ const {ApiTypes} = require('../../constants');
/**
* @typedef {object} SideConversation
* @property {string} created_at - The time the side conversation was created
* @property {Object.<string, string>} [external_ids] - A key-value store of metadata. All values must be strings
* @property {{[key: string]: string}} [external_ids] - A key-value store of metadata. All values must be strings
* @property {string} id - Automatically assigned when the side conversation is created
* @property {string} message_added_at - The time of the last message on the side conversation
* @property {Participant[]} participants - An array of participants in the side conversation. See Participants
Expand All @@ -61,7 +61,7 @@ const {ApiTypes} = require('../../constants');
/**
* @typedef {object} CreateSideConversation
* @property {Message} message - The side conversation object.
* @property {Object.<string, string>} [external_ids] - A key-value object where all values are strings. Used for conversation metadata
* @property {{[key: string]: string}} [external_ids] - A key-value object where all values are strings. Used for conversation metadata
*/

/**
Expand Down Expand Up @@ -163,7 +163,7 @@ class SideConversations extends Client {
* Upload a file to be attached to a ticket comment.
* @param {ArrayBuffer} file - The file data.
* @param {object} options - The file options.
* @param options.filename
* @param {string} options.filename - The name of the file.
* @returns {Promise<SideConversationAttachment>} The attachment details.
*/
async attachments(file, {filename}) {
Expand Down
6 changes: 4 additions & 2 deletions src/clients/core/tickets.js
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ const {Client} = require('../client');
*/

/**
* @typedef {T extends object ? { [K in keyof T]?: RecursivePartial<T[K]> } : T} RecursivePartial
* @template T
* Recursively makes all properties of T optional.
* @typedef {object} RecursivePartial
* @template T - the type being partially applied
* @property {T} [property] - Optionally each property of T.
*/

/**
Expand Down
10 changes: 5 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ class ZendeskClient {
}

/**
* @returns {Groups}
* @returns {import('./clients/core/groups.js').Groups} The Group client.
*/
get groups() {
const {Groups} = require('./clients/core/groups');
Expand Down Expand Up @@ -223,7 +223,7 @@ class ZendeskClient {
}

/**
* @returns {SideConversations}
* @returns {import('./clients/core/sideconversations.js').SideConversations} The SideConversations client.
*/
get sideconversations() {
const {SideConversations} = require('./clients/core/sideconversations');
Expand Down Expand Up @@ -276,15 +276,15 @@ class ZendeskClient {
}

/**
* @returns {TicketMetrics}
* @returns {import('./clients/core/ticketmetrics.js').TicketMetrics} The TicketMetrics client
*/
get ticketmetrics() {
const {TicketMetrics} = require('./clients/core/ticketmetrics');
return this._instantiate(TicketMetrics);
}

/**
* @returns {Tickets}
* @returns {import('./clients/core/tickets.js').Tickets} The Tickets client.
*/
get tickets() {
const {Tickets} = require('./clients/core/tickets');
Expand All @@ -307,7 +307,7 @@ class ZendeskClient {
}

/**
* @returns {Users}
* @returns {import('./clients/core/users.js').Users} The Users Instance
*/
get users() {
const {Users} = require('./clients/core/users');
Expand Down
4 changes: 2 additions & 2 deletions test/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ export const initializeClient = (config) => {

/**
*
* @param {import('../src/clients/client').ClientOptions} config
* @returns {ZendeskClient}
* @param {import('../src/clients/client').ClientOptions} config - The SetupClient config
* @returns {import('../src/clients/client').ZendeskClient} - The Zendesk Client
*/
export const setupClient = (config = {}) =>
createClient({
Expand Down

0 comments on commit 374109f

Please sign in to comment.