WebhookDeliveryStore
Defined in: packages/webhook/src/runtime/types.ts:47
Methods
Section titled “Methods”add(
delivery):Promise<void>
Defined in: packages/webhook/src/runtime/types.ts:49
Stores a new delivery; ids are unique, so use replace() to overwrite.
Parameters
Section titled “Parameters”delivery
Section titled “delivery”attempts
Section titled “attempts”object[] = ...
completedAt?
Section titled “completedAt?”Date = ...
createdAt
Section titled “createdAt”Date = ...
endpointId
Section titled “endpointId”string = ...
eventId
Section titled “eventId”string = ...
eventType?
Section titled “eventType?”MESSAGE_SENT | MESSAGE_DELIVERED | MESSAGE_FAILED | MESSAGE_CLICKED | MESSAGE_READ | MESSAGE_CANCELLED | MESSAGE_UNKNOWN | TEMPLATE_CREATED | TEMPLATE_APPROVED | TEMPLATE_REJECTED | TEMPLATE_UPDATED | TEMPLATE_DELETED | CHANNEL_CREATED | CHANNEL_VERIFIED | SENDER_NUMBER_ADDED | SENDER_NUMBER_VERIFIED | QUOTA_WARNING | QUOTA_EXCEEDED | PROVIDER_ERROR | SYSTEM_MAINTENANCE | ANOMALY_DETECTED | THRESHOLD_EXCEEDED = ...
headers
Section titled “headers”Record<string, string> = ...
httpMethod
Section titled “httpMethod”"POST" | "PUT" | "PATCH" = ...
string = ...
nextRetryAt?
Section titled “nextRetryAt?”Date = ...
payload
Section titled “payload”string = ...
status
Section titled “status”"failed" | "success" | "pending" | "exhausted" = ...
string = ...
Returns
Section titled “Returns”Promise<void>
list()
Section titled “list()”list(
options?):Promise<object[]>
Defined in: packages/webhook/src/runtime/types.ts:50
Parameters
Section titled “Parameters”options?
Section titled “options?”Returns
Section titled “Returns”Promise<object[]>
replace()?
Section titled “replace()?”
optionalreplace(delivery):Promise<void>
Defined in: packages/webhook/src/runtime/types.ts:56
Overwrites the stored delivery with the same id. Optional; the tenant migration needs it to re-encrypt stored payloads, and the built-in stores implement it.
Parameters
Section titled “Parameters”delivery
Section titled “delivery”attempts
Section titled “attempts”object[] = ...
completedAt?
Section titled “completedAt?”Date = ...
createdAt
Section titled “createdAt”Date = ...
endpointId
Section titled “endpointId”string = ...
eventId
Section titled “eventId”string = ...
eventType?
Section titled “eventType?”MESSAGE_SENT | MESSAGE_DELIVERED | MESSAGE_FAILED | MESSAGE_CLICKED | MESSAGE_READ | MESSAGE_CANCELLED | MESSAGE_UNKNOWN | TEMPLATE_CREATED | TEMPLATE_APPROVED | TEMPLATE_REJECTED | TEMPLATE_UPDATED | TEMPLATE_DELETED | CHANNEL_CREATED | CHANNEL_VERIFIED | SENDER_NUMBER_ADDED | SENDER_NUMBER_VERIFIED | QUOTA_WARNING | QUOTA_EXCEEDED | PROVIDER_ERROR | SYSTEM_MAINTENANCE | ANOMALY_DETECTED | THRESHOLD_EXCEEDED = ...
headers
Section titled “headers”Record<string, string> = ...
httpMethod
Section titled “httpMethod”"POST" | "PUT" | "PATCH" = ...
string = ...
nextRetryAt?
Section titled “nextRetryAt?”Date = ...
payload
Section titled “payload”string = ...
status
Section titled “status”"failed" | "success" | "pending" | "exhausted" = ...
string = ...
Returns
Section titled “Returns”Promise<void>