docs: 🏷️ add types to webhook function

pull/796/head
HannesOberreiter 2 years ago
parent caf8790f28
commit 0dd864b001

@ -22,12 +22,26 @@ const jsonifyData = (data) => {
return nextData;
};
/**
* @typedef {Object} Included
* @property {any[]} [projects] - Array of projects (optional).
* @property {any[]} [boards] - Array of boards (optional).
* @property {any[]} [lists] - Array of lists (optional).
* @property {any[]} [cards] - Array of cards (optional).
*/
/**
* @typedef {Object} Data
* @property {any} item - Actual event data.
* @property {Included} [included] - Optional included data.
*/
/**
* Sends a webhook notification to a configured URL.
*
* @param {*} webhook - Webhook configuration.
* @param {string} event - The event (see {@link Events}).
* @param {*} data - The actual data related to the event.
* @param {Data} data - The data object containing event data and optionally included data.
* @param {ref} user - User object associated with the event.
* @returns {Promise<void>}
*/

Loading…
Cancel
Save