Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
docs(sdk-go): describe never-sent rows in the delivery-failure log
Yudhi Armyndharis72930d4ab058
diff --git a/sdk/go/types_webhook.go b/sdk/go/types_webhook.goindex ca08c102f..5c1195c6d 100644--- a/sdk/go/types_webhook.go+++ b/sdk/go/types_webhook.go@@ -180,8 +180,9 @@ type WebhookTestResult struct {Error string `json:"error,omitempty"`}-// WebhookDeliveryFailure is a webhook delivery abandoned after every retry,-// as listed by the delivery-failure log.+// WebhookDeliveryFailure is a webhook delivery that exhausted its retries, or+// one never sent (Attempts 0) that the outbox replays, as listed by the+// delivery-failure log. A later successful delivery removes the row.type WebhookDeliveryFailure struct {ID string `json:"id"`WebhookID string `json:"webhookId"`@@ -191,13 +192,14 @@ type WebhookDeliveryFailure struct {// IdempotencyKey is the key the receiver would have deduped on.IdempotencyKey *string `json:"idempotencyKey,omitempty"`DeliveryID *string `json:"deliveryId,omitempty"`- // Attempts is the total number of attempts made before giving up.+ // Attempts is the number of attempts recorded; 0 when the delivery was+ // shed, refused or failed before sending.Attempts int `json:"attempts"`// LastStatusCode is the last HTTP status when the failure was a non-2xx// response; nil for a network or timeout error.LastStatusCode *int `json:"lastStatusCode,omitempty"`LastError string `json:"lastError"`- // CreatedAt is the ISO timestamp of when the delivery was finally abandoned.+ // CreatedAt is the ISO timestamp of when the failure was first recorded.CreatedAt string `json:"createdAt"`}diff --git a/sdk/go/webhooks.go b/sdk/go/webhooks.goindex dfe52b83b..d9aa89e74 100644--- a/sdk/go/webhooks.go+++ b/sdk/go/webhooks.go@@ -18,8 +18,11 @@ func (s *WebhooksService) ListAll(ctx context.Context, query *DeliveryFailureQuereturn out, err}-// DeliveryFailures returns deliveries that were ATTEMPTED and failed — the diagnostic for a webhook-// that stopped arriving. Requires an ADMIN-level key.+// DeliveryFailures returns deliveries the gateway gave up on or could not dispatch: the diagnostic+// for a webhook that stopped arriving. Rows with Attempts > 0 exhausted their retries against the+// receiver; rows with Attempts == 0 were never sent (payload over the size cap, a webhook:before hook+// error, dispatch capacity shed, or shutdown). A row is removed once a later replay delivers the+// event. Requires an ADMIN-level key.//// A delivery a smart filter suppressed never reaches this log. Most recent first.func (s *WebhooksService) DeliveryFailures(ctx context.Context, query *DeliveryFailureQuery) ([]WebhookDeliveryFailure, error) {