Skip to content

WebhookEndpointStore

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

Stores webhook endpoints. Ids and URLs are unique: a store never replaces one endpoint with another, so a re-registered URL cannot silently get a new id and secret.

add(endpoint): Promise<void>

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

Stores a new endpoint. Rejects with WebhookEndpointConflictError when an endpoint with the same id or URL is already stored.

boolean = ...

Date = ...

string = ...

WebhookEventType[] = ...

{ channelId?: string[]; providerId?: string[]; templateId?: string[]; } = ...

string[] = ...

string[] = ...

string[] = ...

Record<string, string> = ...

string = ...

Date = ...

string = ...

{ backoffMultiplier: number; maxRetries: number; retryDelayMs: number; } = ...

number = ...

number = ...

number = ...

string = ...

true = ...

"error" | "active" | "inactive" | "suspended" = ...

Date = ...

string = ...

Promise<void>


get(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:43

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>


list(): Promise<object[]>

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

Promise<object[]>


remove(endpointId): Promise<void>

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

string

Promise<void>


update(endpointId, endpoint): Promise<void>

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

Replaces the endpoint stored under endpointId. Rejects when there is none, and with WebhookEndpointConflictError when another endpoint has the new URL.

string

boolean = ...

Date = ...

string = ...

WebhookEventType[] = ...

{ channelId?: string[]; providerId?: string[]; templateId?: string[]; } = ...

string[] = ...

string[] = ...

string[] = ...

Record<string, string> = ...

string = ...

Date = ...

string = ...

{ backoffMultiplier: number; maxRetries: number; retryDelayMs: number; } = ...

number = ...

number = ...

number = ...

string = ...

true = ...

"error" | "active" | "inactive" | "suspended" = ...

Date = ...

string = ...

Promise<void>