mirror of
https://github.com/plankanban/planka.git
synced 2025-07-18 20:59:44 +02:00
docs: Add types to webhook function (#796)
This commit is contained in:
parent
2495891fad
commit
d8635e7915
1 changed files with 15 additions and 1 deletions
|
@ -77,12 +77,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 EVENT_TYPES}).
|
||||
* @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…
Add table
Add a link
Reference in a new issue