hookbridge 1.1.2__tar.gz → 1.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- hookbridge-1.3.0/.claude/settings.local.json +8 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/PKG-INFO +1 -1
- {hookbridge-1.1.2 → hookbridge-1.3.0}/hookbridge/__init__.py +69 -35
- hookbridge-1.3.0/hookbridge/client.py +1649 -0
- hookbridge-1.3.0/hookbridge/types.py +421 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/pyproject.toml +1 -1
- {hookbridge-1.1.2 → hookbridge-1.3.0}/tests/test_async_client.py +50 -2
- {hookbridge-1.1.2 → hookbridge-1.3.0}/tests/test_client.py +11 -3
- hookbridge-1.3.0/tests/test_client_spec_parity.py +669 -0
- hookbridge-1.1.2/hookbridge/client.py +0 -1300
- hookbridge-1.1.2/hookbridge/types.py +0 -387
- {hookbridge-1.1.2 → hookbridge-1.3.0}/.gitignore +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/PUBLISHING.md +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/README.md +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/hookbridge/errors.py +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/hookbridge/py.typed +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/requirements-dev.txt +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/requirements.txt +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/tests/__init__.py +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/tests/conftest.py +0 -0
- {hookbridge-1.1.2 → hookbridge-1.3.0}/tests/test_errors.py +0 -0
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
"""
|
|
2
|
-
HookBridge SDK for Python
|
|
3
|
-
|
|
4
|
-
Send webhooks with guaranteed delivery, automatic retries, and full observability.
|
|
5
|
-
|
|
6
|
-
Example:
|
|
7
|
-
>>> from hookbridge import HookBridge
|
|
8
|
-
>>>
|
|
9
|
-
>>> client = HookBridge(api_key="hb_live_xxxxxxxxxxxxxxxxxxxx")
|
|
10
|
-
>>>
|
|
11
|
-
>>> # Create an endpoint first
|
|
12
|
-
>>> endpoint = client.create_endpoint(url="https://customer.app/webhooks")
|
|
13
|
-
>>>
|
|
14
|
-
>>> # Send webhooks via the endpoint
|
|
15
|
-
>>> result = client.send(
|
|
16
|
-
... endpoint_id=endpoint.id,
|
|
17
|
-
... payload={"event": "order.created", "order_id": "12345"}
|
|
18
|
-
... )
|
|
19
|
-
>>> print(result.message_id)
|
|
2
|
+
HookBridge SDK for Python.
|
|
20
3
|
"""
|
|
21
4
|
|
|
22
5
|
from hookbridge.client import AsyncHookBridge, HookBridge
|
|
@@ -34,56 +17,107 @@ from hookbridge.errors import (
|
|
|
34
17
|
from hookbridge.types import (
|
|
35
18
|
APIKeyInfo,
|
|
36
19
|
APIKeyMode,
|
|
20
|
+
CheckoutSession,
|
|
37
21
|
CreateAPIKeyResponse,
|
|
38
22
|
CreateEndpointResponse,
|
|
23
|
+
CreateInboundEndpointResponse,
|
|
24
|
+
DeleteResult,
|
|
39
25
|
DLQMessagesResponse,
|
|
40
26
|
Endpoint,
|
|
41
27
|
EndpointSummary,
|
|
28
|
+
ExportRecord,
|
|
29
|
+
InboundEndpoint,
|
|
30
|
+
InboundEndpointSummary,
|
|
31
|
+
InboundLogEntry,
|
|
32
|
+
InboundLogsResponse,
|
|
33
|
+
InboundMetrics,
|
|
34
|
+
InboundRejection,
|
|
35
|
+
InboundRejectionsResponse,
|
|
36
|
+
Invoice,
|
|
37
|
+
InvoiceLine,
|
|
38
|
+
InvoicesResponse,
|
|
42
39
|
ListEndpointsResponse,
|
|
40
|
+
ListInboundEndpointsResponse,
|
|
43
41
|
LogsResponse,
|
|
44
42
|
Message,
|
|
45
43
|
MessageStatus,
|
|
46
44
|
MessageSummary,
|
|
47
45
|
Metrics,
|
|
48
46
|
MetricsWindow,
|
|
47
|
+
PauseState,
|
|
48
|
+
PortalSession,
|
|
49
|
+
Project,
|
|
50
|
+
ReplayableMessageStatus,
|
|
51
|
+
ReplayAllMessagesResponse,
|
|
52
|
+
ReplayBatchMessagesResponse,
|
|
53
|
+
ReplayBatchResult,
|
|
54
|
+
ReplayMessageResponse,
|
|
49
55
|
RotateSecretResponse,
|
|
50
56
|
SendWebhookResponse,
|
|
57
|
+
SigningKey,
|
|
51
58
|
Subscription,
|
|
52
59
|
SubscriptionLimits,
|
|
53
60
|
SubscriptionUsage,
|
|
54
61
|
TimeSeriesBucket,
|
|
55
62
|
TimeSeriesMetrics,
|
|
63
|
+
UpdateResult,
|
|
64
|
+
UsageHistoryResponse,
|
|
65
|
+
UsageHistoryRow,
|
|
56
66
|
)
|
|
57
67
|
|
|
58
|
-
__version__ = "1.
|
|
68
|
+
__version__ = "1.3.0"
|
|
59
69
|
|
|
60
70
|
__all__ = [
|
|
61
|
-
# Client
|
|
62
71
|
"HookBridge",
|
|
63
72
|
"AsyncHookBridge",
|
|
64
|
-
# Types
|
|
65
|
-
"SendWebhookResponse",
|
|
66
|
-
"Message",
|
|
67
|
-
"MessageSummary",
|
|
68
|
-
"MessageStatus",
|
|
69
|
-
"LogsResponse",
|
|
70
|
-
"Metrics",
|
|
71
|
-
"MetricsWindow",
|
|
72
|
-
"TimeSeriesBucket",
|
|
73
|
-
"TimeSeriesMetrics",
|
|
74
|
-
"Subscription",
|
|
75
|
-
"SubscriptionLimits",
|
|
76
|
-
"SubscriptionUsage",
|
|
77
73
|
"APIKeyInfo",
|
|
78
74
|
"APIKeyMode",
|
|
75
|
+
"CheckoutSession",
|
|
79
76
|
"CreateAPIKeyResponse",
|
|
77
|
+
"CreateEndpointResponse",
|
|
78
|
+
"CreateInboundEndpointResponse",
|
|
79
|
+
"DeleteResult",
|
|
80
80
|
"DLQMessagesResponse",
|
|
81
81
|
"Endpoint",
|
|
82
82
|
"EndpointSummary",
|
|
83
|
-
"
|
|
83
|
+
"ExportRecord",
|
|
84
|
+
"InboundEndpoint",
|
|
85
|
+
"InboundEndpointSummary",
|
|
86
|
+
"InboundLogEntry",
|
|
87
|
+
"InboundLogsResponse",
|
|
88
|
+
"InboundMetrics",
|
|
89
|
+
"InboundRejection",
|
|
90
|
+
"InboundRejectionsResponse",
|
|
91
|
+
"Invoice",
|
|
92
|
+
"InvoiceLine",
|
|
93
|
+
"InvoicesResponse",
|
|
84
94
|
"ListEndpointsResponse",
|
|
95
|
+
"ListInboundEndpointsResponse",
|
|
96
|
+
"LogsResponse",
|
|
97
|
+
"Message",
|
|
98
|
+
"MessageStatus",
|
|
99
|
+
"MessageSummary",
|
|
100
|
+
"Metrics",
|
|
101
|
+
"MetricsWindow",
|
|
102
|
+
"PauseState",
|
|
103
|
+
"PortalSession",
|
|
104
|
+
"Project",
|
|
105
|
+
"ReplayAllMessagesResponse",
|
|
106
|
+
"ReplayBatchMessagesResponse",
|
|
107
|
+
"ReplayBatchResult",
|
|
108
|
+
"ReplayMessageResponse",
|
|
109
|
+
"ReplayableMessageStatus",
|
|
85
110
|
"RotateSecretResponse",
|
|
86
|
-
|
|
111
|
+
"SendWebhookResponse",
|
|
112
|
+
"SigningKey",
|
|
113
|
+
"Subscription",
|
|
114
|
+
"SubscriptionLimits",
|
|
115
|
+
"SubscriptionUsage",
|
|
116
|
+
"TimeSeriesBucket",
|
|
117
|
+
"TimeSeriesMetrics",
|
|
118
|
+
"UpdateResult",
|
|
119
|
+
"UsageHistoryResponse",
|
|
120
|
+
"UsageHistoryRow",
|
|
87
121
|
"HookBridgeError",
|
|
88
122
|
"AuthenticationError",
|
|
89
123
|
"NotFoundError",
|