You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @returns {Promise<{response: object, result: object}>} - A promise that resolves to the applied macro's result.
107
+
* @returns {Promise<{response: object, result: { ticket: RecursivePartial<import('./tickets').Ticket> }}>} - A promise that resolves to the applied macro's result.
81
108
* @throws {Error} Throws an error if the request fails.
* Creates a macro representation derived from a ticket.
92
119
* @param {number} ticketID - The ID of the ticket from which to build a macro replica.
93
120
* @param {number} macroID - The ID of the macro.
94
-
* @returns {Promise<{response: object, result: object}>} - A promise that resolves to the macro replica.
121
+
* @returns {Promise<{response: object, result: { ticket: RecursivePartial<import('./tickets').Ticket> }}>} - A promise that resolves to the macro replica.
95
122
* @throws {Error} Throws an error if the request fails.
* @property {boolean} public - true if a public comment; false if an internal note. The initial value set on ticket creation persists for any additional comment unless you change it
40
40
* @property {string} type - Comment or VoiceComment. The JSON object for adding voice comments to tickets is different. See Adding voice comments to tickets
41
41
* @property {string[]} [uploads] - 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
42
-
* @property {object} [via] - Describes how the object was created. See the Via object reference
42
+
* @property {Via} [via] - Describes how the object was created. See the Via object reference
* @property {string} updated_at - When this record last got updated
94
94
* @property {string} [updated_stamp] - Write only. Datetime of last update received from API. See the safe_update property
95
95
* @property {string} url - The API url of this ticket
96
-
* @property {object} [via] - For more information, see the Via object reference
96
+
* @property {Via} [via] - For more information, see the Via object reference
97
97
* @property {number} [via_followup_source_id] - POST requests only. The id of a closed ticket when creating a follow-up ticket. See Creating a follow-up ticket
98
98
* @property {number} [via_id] - Write only. For more information, see the Via object reference
* @property {string} endpoint - The destination URL that the webhook notifies when Zendesk events occur
13
+
* @property {object} [external_source] - External source by which a webhook is created, e.g. Zendesk Marketplace
14
+
* @property {'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE'} http_method - HTTP method used for the webhook's requests. To subscribe the webhook to Zendesk events, this must be "POST"
15
+
* @property {string} id - An auto-generated webhook id (read-only)
16
+
* @property {string} name - Webhook name
17
+
* @property {'json' | 'xml' | 'form_encoded'} request_format - The format of the data that the webhook will send. To subscribe the webhook to Zendesk events, this must be "json"
18
+
* @property {WebhookSigningSecret} [signing_secret] - Signing secret used to verify webhook requests
19
+
* @property {'active' | 'inactive'} status - Current status of the webhook
20
+
* @property {Array} [subscriptions] - Event subscriptions for the webhook. To subscribe the webhook to Zendesk events, specify one or more event types
21
+
* @property {string} [updated_at] - When the webhook was last updated (read-only)
22
+
* @property {string} [updated_by] - id of the user who last updated the webhook (read-only)
23
+
*/
24
+
25
+
/**
26
+
* @typedef {object} CreateOrUpdateWebhook
27
+
* @property {Partial<Webhook>} webhook - The webhook object to create or update.
28
+
*/
29
+
30
+
/**
31
+
* @typedef {object} WebhookSigningSecret
32
+
* @property {string} algorithm - The algorithm used to generate the signing secret like "sha256"
33
+
* @property {string} secret - The signing secret used to verify webhook requests
34
+
*/
35
+
4
36
/**
5
37
* Webhooks client for interacting with the Zendesk Webhooks API.
0 commit comments