Skip to content

Commit cfc37f9

Browse files
committed
feat: tickets & users types + adjustments on types exports
1 parent e396120 commit cfc37f9

File tree

4 files changed

+33
-2
lines changed

4 files changed

+33
-2
lines changed

package.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,36 @@
4646
"types": "./dist/types/index.d.ts",
4747
"default": "./dist/index.js"
4848
}
49+
},
50+
"./clients/*": {
51+
"import": {
52+
"types": "./dist/types/clients/*.d.ts",
53+
"default": "./dist/clients/*.js"
54+
},
55+
"require": {
56+
"types": "./dist/types/clients/*.d.ts",
57+
"default": "./dist/clients/*.js"
58+
}
59+
},
60+
"./clients/*/*": {
61+
"import": {
62+
"types": "./dist/types/clients/*/*.d.ts",
63+
"default": "./dist/clients/*/*.js"
64+
},
65+
"require": {
66+
"types": "./dist/types/clients/*/*.d.ts",
67+
"default": "./dist/clients/*/*.js"
68+
}
69+
},
70+
"./clients/*/*/*": {
71+
"import": {
72+
"types": "./dist/types/clients/*/*/*.d.ts",
73+
"default": "./dist/clients/*/*/*.js"
74+
},
75+
"require": {
76+
"types": "./dist/types/clients/*/*/*.d.ts",
77+
"default": "./dist/clients/*/*/*.js"
78+
}
4979
}
5080
},
5181
"files": [

src/clients/core/tickets.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ class Tickets extends Client {
348348
* Update an existing ticket by its ID.
349349
* @param {number} ticketId - The ID of the ticket to update.
350350
* @param {CreateOrUpdateTicket} ticket - The updated ticket data as an object.
351-
* @returns {Promise<{result: Ticket}>} A promise that resolves to the updated ticket object.
351+
* @returns {Promise<{result: Ticket, response: {ticket:Ticket, audit:any[]}}>} A promise that resolves to the updated ticket object.
352352
* @async
353353
* @throws {Error} If `ticketId` is not a number or if `ticket` is not an object.
354354
* @see {@link https://developer.zendesk.com/api-reference/ticketing/tickets/tickets/#update-ticket}

src/clients/core/users.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ class Users extends Client {
138138
/**
139139
* Shows details of a user by ID.
140140
* @param {number} id - The ID of the user.
141-
* @returns {Promise<User>} The user's details.
141+
* @returns {Promise<{result: User}>} The user's details.
142142
* @async
143143
* @see {@link https://developer.zendesk.com/api-reference/ticketing/users/users/#show-user}
144144
* @example

src/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const {ZendeskClientVoice} = require('./clients/voice');
99
/**
1010
* @typedef {object} ZendeskClientOptions
1111
* @property {string} [token] - Authentication token.
12+
* @property {string} [password] - Authentication password.
1213
* @property {string} [username] - Username for authentication.
1314
* @property {string} [subdomain] - Subdomain for the Zendesk account (e.g., 'mycompany' for 'mycompany.zendesk.com'). If `endpointUri` is provided, this is ignored.
1415
* @property {string[]} [apiType=['core']] - Type of Zendesk API (e.g., 'core', 'helpcenter'). Determines the sub-client to use.

0 commit comments

Comments
 (0)