Skip to content

WebhookRuntime

Defined in: packages/webhook/src/runtime/types.ts:125

addEndpoint(input): Promise<{ active: boolean; createdAt: Date; description?: string; events: WebhookEventType[]; filters?: { channelId?: string[]; providerId?: string[]; templateId?: string[]; }; headers?: Record<string, string>; id: string; lastTriggeredAt?: Date; name?: string; retryConfig?: { backoffMultiplier: number; maxRetries: number; retryDelayMs: number; }; secret?: string; secretUndecryptable?: true; status: "error" | "active" | "inactive" | "suspended"; updatedAt: Date; url: string; }>

Defined in: packages/webhook/src/runtime/types.ts:126

WebhookEndpointInput

Promise<{ active: boolean; createdAt: Date; description?: string; events: WebhookEventType[]; filters?: { channelId?: string[]; providerId?: string[]; templateId?: string[]; }; headers?: Record<string, string>; id: string; lastTriggeredAt?: Date; name?: string; retryConfig?: { backoffMultiplier: number; maxRetries: number; retryDelayMs: number; }; secret?: string; secretUndecryptable?: true; status: "error" | "active" | "inactive" | "suspended"; updatedAt: Date; url: string; }>


addEndpoints(inputs): Promise<object[]>

Defined in: packages/webhook/src/runtime/types.ts:127

readonly WebhookEndpointInput[]

Promise<object[]>


emit(event): Promise<void>

Defined in: packages/webhook/src/runtime/types.ts:140

WebhookEvent

Promise<void>


emitSync(event): Promise<object[]>

Defined in: packages/webhook/src/runtime/types.ts:141

WebhookEvent

Promise<object[]>


flush(): Promise<void>

Defined in: packages/webhook/src/runtime/types.ts:142

Promise<void>


getEndpoint(endpointId): Promise<{ active: boolean; createdAt: Date; description?: string; events: WebhookEventType[]; filters?: { channelId?: string[]; providerId?: string[]; templateId?: string[]; }; headers?: Record<string, string>; id: string; lastTriggeredAt?: Date; name?: string; retryConfig?: { backoffMultiplier: number; maxRetries: number; retryDelayMs: number; }; secret?: string; secretUndecryptable?: true; status: "error" | "active" | "inactive" | "suspended"; updatedAt: Date; url: string; } | null>

Defined in: packages/webhook/src/runtime/types.ts:135

string

Promise<{ active: boolean; createdAt: Date; description?: string; events: WebhookEventType[]; filters?: { channelId?: string[]; providerId?: string[]; templateId?: string[]; }; headers?: Record<string, string>; id: string; lastTriggeredAt?: Date; name?: string; retryConfig?: { backoffMultiplier: number; maxRetries: number; retryDelayMs: number; }; secret?: string; secretUndecryptable?: true; status: "error" | "active" | "inactive" | "suspended"; updatedAt: Date; url: string; } | null>


listDeliveries(options?): Promise<object[]>

Defined in: packages/webhook/src/runtime/types.ts:143

WebhookDeliveryListOptions

Promise<object[]>


listEndpoints(): Promise<object[]>

Defined in: packages/webhook/src/runtime/types.ts:136

Promise<object[]>


migrateFieldCryptoToTenant(): Promise<WebhookTenantMigrationResult>

Defined in: packages/webhook/src/runtime/types.ts:152

Re-encrypts stored endpoint secrets and delivery payloads written before ciphertext was bound to fieldCrypto.tenantId. Run it once every instance is upgraded; endpoint writes through this runtime wait until it finishes. See migrateWebhookFieldCryptoToTenant.

Promise<WebhookTenantMigrationResult>


probeEndpoint(input): Promise<WebhookTestResult>

Defined in: packages/webhook/src/runtime/types.ts:137

string | WebhookRuntimeTestPayload

Promise<WebhookTestResult>


removeEndpoint(endpointId): Promise<void>

Defined in: packages/webhook/src/runtime/types.ts:134

string

Promise<void>


shutdown(): Promise<void>

Defined in: packages/webhook/src/runtime/types.ts:158

Stops the batch timer, delivers the queued events, waits for endpoint writes already queued, and closes the persistence. Endpoint changes requested after it starts are rejected.

Promise<void>


updateEndpoint(endpointId, updates): Promise<{ active: boolean; createdAt: Date; description?: string; events: WebhookEventType[]; filters?: { channelId?: string[]; providerId?: string[]; templateId?: string[]; }; headers?: Record<string, string>; id: string; lastTriggeredAt?: Date; name?: string; retryConfig?: { backoffMultiplier: number; maxRetries: number; retryDelayMs: number; }; secret?: string; secretUndecryptable?: true; status: "error" | "active" | "inactive" | "suspended"; updatedAt: Date; url: string; }>

Defined in: packages/webhook/src/runtime/types.ts:130

string

Partial<WebhookEndpointInput>

Promise<{ active: boolean; createdAt: Date; description?: string; events: WebhookEventType[]; filters?: { channelId?: string[]; providerId?: string[]; templateId?: string[]; }; headers?: Record<string, string>; id: string; lastTriggeredAt?: Date; name?: string; retryConfig?: { backoffMultiplier: number; maxRetries: number; retryDelayMs: number; }; secret?: string; secretUndecryptable?: true; status: "error" | "active" | "inactive" | "suspended"; updatedAt: Date; url: string; }>