HookName:
| "beforeValidate"
| "afterValidate"
| "beforeCreate"
| "afterCreate"
| "beforeUpdate"
| "afterUpdate"
| "beforeDestroy"
| "afterDestroy"
| "beforeSave"
| "afterSave"
| "beforeUpsert"
| "afterUpsert"
| "beforeFind"
| "afterFind"
| "beforeCount"
| "beforeBulkCreate"
| "afterBulkCreate"
| "beforeBulkUpdate"
| "afterBulkUpdate"
| "beforeBulkDestroy"
| "afterBulkDestroy"
Every model lifecycle hook the ORM fires.
Typing hook names as a union rather than
stringmakes a misspelled hook a compile error instead of a callback that silently never runs - which is exactly how eleven of these went unnoticed.