Skip to content

BeechCMS


BeechCMS / @beechcms/core / BeechHooks

Interface: BeechHooks ​

Properties ​

afterCreate? ​

optional afterCreate?: (entry, ctx) => void | Promise<void>

Parameters ​

entry ​

Record<string, any>

ctx ​

HookContext

Returns ​

void | Promise<void>


afterDelete? ​

optional afterDelete?: (id, ctx) => void | Promise<void>

Parameters ​

id ​

string

ctx ​

HookContext

Returns ​

void | Promise<void>


afterUpdate? ​

optional afterUpdate?: (entry, ctx) => void | Promise<void>

Parameters ​

entry ​

Record<string, any>

ctx ​

HookContext

Returns ​

void | Promise<void>


beforeCreate? ​

optional beforeCreate?: (data, ctx) => void | Record<string, any> | Promise<void | Record<string, any>>

Parameters ​

data ​

Record<string, any>

ctx ​

HookContext

Returns ​

void | Record<string, any> | Promise<void | Record<string, any>>


beforeDelete? ​

optional beforeDelete?: (id, ctx) => void | Promise<void>

Parameters ​

id ​

string

ctx ​

HookContext

Returns ​

void | Promise<void>


beforeUpdate? ​

optional beforeUpdate?: (id, patches, ctx) => void | Record<string, any> | Promise<void | Record<string, any>>

Parameters ​

id ​

string

patches ​

Record<string, any>

ctx ​

HookContext

Returns ​

void | Record<string, any> | Promise<void | Record<string, any>>