Skip to main content

initialize

client.hooks.initialize(data?: InitializeHooksRequest): Promise<unknown>

Initializes the hooks subsystem.

Sets up the hooks infrastructure, loading any persisted hooks and preparing event listeners. Should be called once during application bootstrap before registering or triggering hooks.

Parameters

ParameterTypeRequiredDescription
dataInitializeHooksRequestNoOptional initialization configuration

Returns

Promise<unknown> — A promise that resolves when initialization is complete

Example

import { CodeBoltClient } from '@codebolt/clientsdk';

const client = new CodeBoltClient();

const result = await client.hooks.initialize();
console.log(result);