Skip to content

Commit c4709aa

Browse files
committed
python: Add OperationalWebhook resource
1 parent 9bf8610 commit c4709aa

File tree

3 files changed

+28
-1
lines changed

3 files changed

+28
-1
lines changed

codegen.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ output_dir = "svix-cli/src/cmds/api"
6161
[python]
6262
template_dir = "python/templates"
6363
extra_shell_commands = [
64-
"rm python/svix/api/{environment,health,ingest,operational_webhook}.py",
64+
"rm python/svix/api/{environment,health,ingest}.py",
6565
]
6666
[[python.task]]
6767
template = "python/templates/api_resource.py.jinja"
+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is @generated
2+
from .common import ApiBase
3+
from .operational_webhook_endpoint import (
4+
OperationalWebhookEndpoint,
5+
OperationalWebhookEndpointAsync,
6+
)
7+
8+
9+
class OperationalWebhookAsync(ApiBase):
10+
@property
11+
def endpoint(self) -> OperationalWebhookEndpointAsync:
12+
return OperationalWebhookEndpointAsync(self._client)
13+
14+
15+
class OperationalWebhook(ApiBase):
16+
@property
17+
def endpoint(self) -> OperationalWebhookEndpoint:
18+
return OperationalWebhookEndpoint(self._client)

python/svix/api/svix.py

+9
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from .integration import Integration, IntegrationAsync
99
from .message import Message, MessageAsync
1010
from .message_attempt import MessageAttempt, MessageAttemptAsync
11+
from .operational_webhook import OperationalWebhook, OperationalWebhookAsync
1112
from .operational_webhook_endpoint import (
1213
OperationalWebhookEndpoint,
1314
OperationalWebhookEndpointAsync,
@@ -107,6 +108,10 @@ def message_attempt(self) -> MessageAttemptAsync:
107108
def statistics(self) -> StatisticsAsync:
108109
return StatisticsAsync(self._client)
109110

111+
@property
112+
def operational_webhook(self) -> OperationalWebhookAsync:
113+
return OperationalWebhookAsync(self._client)
114+
110115
@property
111116
def operational_webhook_endpoint(self) -> OperationalWebhookEndpointAsync:
112117
return OperationalWebhookEndpointAsync(self._client)
@@ -145,6 +150,10 @@ def message_attempt(self) -> MessageAttempt:
145150
def statistics(self) -> Statistics:
146151
return Statistics(self._client)
147152

153+
@property
154+
def operational_webhook(self) -> OperationalWebhook:
155+
return OperationalWebhook(self._client)
156+
148157
@property
149158
def operational_webhook_endpoint(self) -> OperationalWebhookEndpoint:
150159
return OperationalWebhookEndpoint(self._client)

0 commit comments

Comments
 (0)