mirror of
https://github.com/plankanban/planka.git
synced 2025-12-17 01:11:23 +03:00
docs: Add types to webhook function (#796)
This commit is contained in:
@@ -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>}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user