[SDK: Python] Add Webhook endpoints/interface #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Adds comprehensive Webhooks v2 client support to the tango-python SDK.
Added
list_webhook_event_types()to discover supported event types and subject typeslist_webhook_subscriptions()- List subscriptions with tier-capped pagination (page+page_size)get_webhook_subscription()- Get a single subscription by IDcreate_webhook_subscription()- Create a new subscriptionupdate_webhook_subscription()- Update subscription name and/or payloaddelete_webhook_subscription()- Delete a subscriptionlist_webhook_endpoints()- List endpoints with standard paginationget_webhook_endpoint()- Get a single endpoint by IDcreate_webhook_endpoint()- Create a new endpoint (one per user)update_webhook_endpoint()- Update endpoint callback URL and/or active statusdelete_webhook_endpoint()- Delete an endpointtest_webhook_delivery()- Send a test webhook to verify endpoint connectivityget_webhook_sample_payload()- Fetch sample payloads for development/testingWebhookSubscription,WebhookEndpoint,WebhookEventType, etc.)Changed
_patch()and_delete()helper methods for webhook management endpointsWhy
This implements the full Webhooks v2 API surface area from the Tango server, enabling SDK users to:
Testing
Notes
page+page_size(tier-capped), while endpoints usepage+limitsubject_ids) require Enterprise tierRelated
Resolves makegov/tango#1274