Skip to content
PricingReleases

HookDbApi

Defined in: hooks.ts:58

Scoped API surface available to server-side hook handlers. Intentionally narrow — handlers should not have full StateDb access.

appendEvent: (sessionId, type, data?, context?) => { created_at: string; event_id: string; } | null

Defined in: hooks.ts:71

string | null | undefined

string

DbFieldValue

EventContext | null

{ created_at: string; event_id: string; } | null


generateRetrospective: (sessionId) => string | null

Defined in: hooks.ts:73

string

string | null


getPushSubscriptionCount: () => number

Defined in: hooks.ts:77

number


proposeLessonFromRetro: (project, section, content, source?) => Lesson | null

Defined in: hooks.ts:72

string | null

string

string

string

Lesson | null


resolveProjectPath: (ref) => string | null

Defined in: hooks.ts:66

string | null | undefined

string | null


resolveProjectSlug: (ref) => string

Defined in: hooks.ts:65

string | null | undefined

string


sendPushToAll: (payload) => Promise<{ cleaned: number; failed: number; sent: number; }>

Defined in: hooks.ts:76

string

string

Record<string, unknown>

string

string

string

Promise<{ cleaned: number; failed: number; sent: number; }>

broadcast(channel, payload?): void

Defined in: hooks.ts:78

string

unknown

void


createSession(opts): Session | null

Defined in: hooks.ts:70

CreateSessionOpts

Session | null


getProjectMemory(projectPath?): string

Defined in: hooks.ts:64

string | null

string


getSession(id): Session | null

Defined in: hooks.ts:61

string

Session | null


getSettings(): Settings

Defined in: hooks.ts:60

Settings


getTask(id): Task | null

Defined in: hooks.ts:62

string

Task | null


getTasks(opts?): Task[]

Defined in: hooks.ts:63

GetTasksOpts

Task[]


updateTask(id, fields): Task | null

Defined in: hooks.ts:69

string

object

Task | null