Skip to content

BeforeEvent

type BeforeEvent =
| {
actor: Actor | null;
application: Application;
type: "application.create" | "application.update";
}
| {
actor: Actor | null;
applicationKey: string;
type: "application.delete";
}
| {
actor: Actor | null;
eventType: EventType;
type: "event-type.upsert";
}
| {
actor: Actor | null;
name: string;
type: "event-type.delete";
}
| {
actor: Actor | null;
applicationKey: string;
endpoint: Endpoint;
type: "endpoint.create" | "endpoint.update";
}
| {
actor: Actor | null;
applicationKey: string;
endpointId: string;
type: | "endpoint.delete"
| "endpoint.rotate-secret"
| "endpoint.disable"
| "endpoint.enable";
}
| {
actor: Actor | null;
applicationKey: string;
eventType: string;
idempotencyKey?: string;
payload: JsonValue;
type: "message.publish";
}
| {
actor: Actor | null;
applicationKey: string;
deliveryId: string;
type: "delivery.retry";
}
| {
actor: Actor | null;
applicationKey: string;
endpointId: string;
since: string;
type: "endpoint.recover";
};

Defined in: src/hooks/contract.ts:48

Event delivered to WebhooksHooks.before — the proposed mutation, before it commits. Throw from the handler to deny it.

{
actor: Actor | null;
application: Application;
type: "application.create" | "application.update";
}

{
actor: Actor | null;
applicationKey: string;
type: "application.delete";
}

{
actor: Actor | null;
eventType: EventType;
type: "event-type.upsert";
}

{
actor: Actor | null;
name: string;
type: "event-type.delete";
}

{
actor: Actor | null;
applicationKey: string;
endpoint: Endpoint;
type: "endpoint.create" | "endpoint.update";
}

{
actor: Actor | null;
applicationKey: string;
endpointId: string;
type: | "endpoint.delete"
| "endpoint.rotate-secret"
| "endpoint.disable"
| "endpoint.enable";
}

{
actor: Actor | null;
applicationKey: string;
eventType: string;
idempotencyKey?: string;
payload: JsonValue;
type: "message.publish";
}
Name Type Description Defined in
actor Actor | null - src/hooks/contract.ts:76
applicationKey string - src/hooks/contract.ts:72
eventType string - src/hooks/contract.ts:73
idempotencyKey? string - src/hooks/contract.ts:75
payload JsonValue - src/hooks/contract.ts:74
type "message.publish" The host’s approval/quota gate for the publish hot path. src/hooks/contract.ts:71

{
actor: Actor | null;
applicationKey: string;
deliveryId: string;
type: "delivery.retry";
}

{
actor: Actor | null;
applicationKey: string;
endpointId: string;
since: string;
type: "endpoint.recover";
}