@hoover-institution/hubspot-lib
Version:
A toolkit for deep integration with HubSpot's Marketing Events API with a plugin-based architecture.
24 lines (21 loc) • 640 B
TypeScript
export interface PluginExecutionResult {
pluginId: number;
pluginName: string;
success: boolean;
result?: any;
error?: any;
}
/**
* Executes all matching plugin handlers for a given hook point and payload,
* based on the provided hookFlags (bitmask).
*
* @param hookFlags - Bitmask indicating which handlers should be executed
* @param hookPoint - The name of the hook event
* @param payload - Arbitrary payload passed to the handler
* @returns Promise that resolves with structured plugin results
*/
export function run(
hookFlags: number,
hookPoint: string,
payload: unknown
): Promise<PluginExecutionResult[]>;