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.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ actor: Actor | null; application: Application; type: "application.create" | "application.update";}Type Literal
Section titled “Type Literal”{ actor: Actor | null; applicationKey: string; type: "application.delete";}Type Literal
Section titled “Type Literal”{ actor: Actor | null; eventType: EventType; type: "event-type.upsert";}Type Literal
Section titled “Type Literal”{ actor: Actor | null; name: string; type: "event-type.delete";}Type Literal
Section titled “Type Literal”{ actor: Actor | null; applicationKey: string; endpoint: Endpoint; type: "endpoint.create" | "endpoint.update";}Type Literal
Section titled “Type Literal”{ actor: Actor | null; applicationKey: string; endpointId: string; type: | "endpoint.delete" | "endpoint.rotate-secret" | "endpoint.disable" | "endpoint.enable";}Type Literal
Section titled “Type Literal”{ 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 |
Type Literal
Section titled “Type Literal”{ actor: Actor | null; applicationKey: string; deliveryId: string; type: "delivery.retry";}Type Literal
Section titled “Type Literal”{ actor: Actor | null; applicationKey: string; endpointId: string; since: string; type: "endpoint.recover";}