/** * Middleware to add function hooks pre/post CRUD database operations */ export class EventHooks { listeners: {}; /** * Before hook * @param {*} coll * @param {*} verb * @param {*} data */ fireBefore(coll: any, verb: any, data: any): Promise; /** * After hook * @param {*} coll * @param {*} verb * @param {*} data */ fireAfter(coll: any, verb: any, data: any): Promise; /** * Codehook called before data is updated in database * @param {*} coll * @param {*} func * @returns */ beforePUT(coll: any, func: any): this; /** * Codehook called before data is inserted into database * @param {*} coll * @param {*} func * @returns */ beforePOST(coll: any, func: any): this; /** * * @param {*} coll * @param {*} func * @returns */ afterPOST(coll: any, func: any): this; /** * * @param {*} coll * @param {*} func * @returns */ beforePATCH(coll: any, func: any): this; /** * * @param {*} coll * @param {*} func * @returns */ beforeDELETE(coll: any, func: any): this; } //# sourceMappingURL=eventhooks.d.mts.map