Files
speckle-server/packages/server/modules/core/hooks.ts
T
2024-12-16 10:17:16 +01:00

17 lines
334 B
TypeScript

type OnCreateObjectRequest = ({
projectId
}: {
projectId: string
}) => Promise<void> | void
export type HooksConfig = {
onCreateObjectRequest: OnCreateObjectRequest[]
}
export type Hook = OnCreateObjectRequest
export type ExecuteHooks = (
key: keyof HooksConfig,
{ projectId }: { projectId: string }
) => Promise<void[]>