The TypeScript and Python SDKs have been updated to v0.1.1 with fixes to webhook delivery methods and WebSocket message formats. These changes align the SDKs with the actual API surface.
Webhook Delivery Methods
The webhook endpoint resource accessor has been renamed for consistency with the API path structure:
TypeScript SDK:
client.webhookEndpoints.create(...)(wasclient.webhooks.endpoints.create(...))client.webhookEndpoints.list(...)(wasclient.webhooks.endpoints.list(...))client.webhookEndpoints.get(id)(wasclient.webhooks.endpoints.get(id))client.webhookEndpoints.update(id, data)(wasclient.webhooks.endpoints.update(id, data))client.webhookEndpoints.delete(id)(wasclient.webhooks.endpoints.delete(id))client.webhookEndpoints.listDeliveries(id, params?)(new -- replacesclient.webhooks.deliveries.list(...))
Python SDK:
client.webhook_endpoints.create(...)(wasclient.webhooks.endpoints.create(...))client.webhook_endpoints.list_deliveries(endpoint_id, ...)(new -- replacesclient.webhooks.deliveries.list(...))
WebSocket Subscribe Format
The WebSocket subscribe message now uses type instead of action, event_types instead of events, and environment_ids (string array) instead of env_id (string):
{
"type": "subscribe",
"event_types": ["message.received"],
"environment_ids": ["env_01JQ..."]
}Previously, the subscribe message used "action": "subscribe" with "env_id" as a single string.
WebhookDelivery Type Alignment
The WebhookDelivery type fields have been aligned with the actual API response shape:
http_status(wasresponse_status_code)attempt_number(wasattempt)- Added
event_id,endpoint_id,response_body,created_atfields
Upgrade Guide
Update your SDK dependency to v0.1.1:
# TypeScript
npm install @agentpost/sdk@0.1.1
# Python
pip install agentpost==0.1.1Then update any code that references the old accessor paths or field names. Search your codebase for client.webhooks.endpoints, client.webhooks.deliveries, response_status_code, and "action": "subscribe" to find all occurrences that need updating.