Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .fern/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"standardwebhooks": ">=1.0.1,<2"
}
},
"originGitCommit": "7f4874492ea69bebb374c4938000c7eec0c1504c",
"originGitCommit": "c10862aedcd9ddb1656d7da1815165e7dcfa2f08",
"originGitCommitIsDirty": false,
"invokedBy": "ci",
"requestedVersion": "2.6.0",
Expand Down
8 changes: 7 additions & 1 deletion .fern/replay.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -48954,6 +48954,14 @@ client.webhooks.create(
<dl>
<dd>

**title:** `typing.Optional[str]` — A label for the webhook, shown in the dashboard. Up to 255 characters.

</dd>
</dl>

<dl>
<dd>

**request_options:** `typing.Optional[RequestOptions]` — Request-specific configuration.

</dd>
Expand Down Expand Up @@ -49205,6 +49213,14 @@ client.webhooks.update(
<dl>
<dd>

**title:** `typing.Optional[str]` — A label for the webhook, shown in the dashboard. Up to 255 characters. Pass `null` or an empty string to remove it.

</dd>
</dl>

<dl>
<dd>

**url:** `typing.Optional[str]` — The URL to send the webhook to.

</dd>
Expand Down
5 changes: 5 additions & 0 deletions src/whop_sdk/types/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ class Webhook(UniversalBaseModel):
"""

testable_events: typing.List[WebhookTestableEventsItem]
title: typing.Optional[str] = pydantic.Field(default=None)
"""
A label for this webhook endpoint, such as `Production`, shown in the dashboard. `null` if no title was set.
"""

url: str = pydantic.Field()
"""
Destination URL where webhook payloads are delivered via HTTP POST.
Expand Down
5 changes: 5 additions & 0 deletions src/whop_sdk/types/webhook_list_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ class WebhookListItem(UniversalBaseModel):
ID of the resource (account or app) this webhook is attached to.
"""

title: typing.Optional[str] = pydantic.Field(default=None)
"""
A label for this webhook endpoint, such as `Production`, shown in the dashboard. `null` if no title was set.
"""

url: str = pydantic.Field()
"""
Destination URL where webhook payloads are delivered via HTTP POST.
Expand Down
20 changes: 20 additions & 0 deletions src/whop_sdk/webhooks/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def create(
enabled: typing.Optional[bool] = OMIT,
events: typing.Optional[typing.Sequence[CreateWebhooksRequestEventsItem]] = OMIT,
resource_id: typing.Optional[str] = OMIT,
title: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Webhook:
"""
Expand All @@ -149,6 +150,9 @@ def create(
resource_id : typing.Optional[str]
The account or app to create the webhook for. Defaults to the current account.

title : typing.Optional[str]
A label for the webhook, shown in the dashboard. Up to 255 characters.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -177,6 +181,7 @@ def create(
enabled=enabled,
events=events,
resource_id=resource_id,
title=title,
request_options=request_options,
)
return _response.data
Expand Down Expand Up @@ -255,6 +260,7 @@ def update(
child_resource_events: typing.Optional[bool] = OMIT,
enabled: typing.Optional[bool] = OMIT,
events: typing.Optional[typing.Sequence[UpdateWebhooksRequestEventsItem]] = OMIT,
title: typing.Optional[str] = OMIT,
url: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Webhook:
Expand All @@ -278,6 +284,9 @@ def update(
events : typing.Optional[typing.Sequence[UpdateWebhooksRequestEventsItem]]
The events to send the webhook for, in dot form (for example `payment.succeeded`).

title : typing.Optional[str]
A label for the webhook, shown in the dashboard. Up to 255 characters. Pass `null` or an empty string to remove it.

url : typing.Optional[str]
The URL to send the webhook to.

Expand Down Expand Up @@ -308,6 +317,7 @@ def update(
child_resource_events=child_resource_events,
enabled=enabled,
events=events,
title=title,
url=url,
request_options=request_options,
)
Expand Down Expand Up @@ -630,6 +640,7 @@ async def create(
enabled: typing.Optional[bool] = OMIT,
events: typing.Optional[typing.Sequence[CreateWebhooksRequestEventsItem]] = OMIT,
resource_id: typing.Optional[str] = OMIT,
title: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Webhook:
"""
Expand All @@ -655,6 +666,9 @@ async def create(
resource_id : typing.Optional[str]
The account or app to create the webhook for. Defaults to the current account.

title : typing.Optional[str]
A label for the webhook, shown in the dashboard. Up to 255 characters.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand Down Expand Up @@ -691,6 +705,7 @@ async def main() -> None:
enabled=enabled,
events=events,
resource_id=resource_id,
title=title,
request_options=request_options,
)
return _response.data
Expand Down Expand Up @@ -787,6 +802,7 @@ async def update(
child_resource_events: typing.Optional[bool] = OMIT,
enabled: typing.Optional[bool] = OMIT,
events: typing.Optional[typing.Sequence[UpdateWebhooksRequestEventsItem]] = OMIT,
title: typing.Optional[str] = OMIT,
url: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> Webhook:
Expand All @@ -810,6 +826,9 @@ async def update(
events : typing.Optional[typing.Sequence[UpdateWebhooksRequestEventsItem]]
The events to send the webhook for, in dot form (for example `payment.succeeded`).

title : typing.Optional[str]
A label for the webhook, shown in the dashboard. Up to 255 characters. Pass `null` or an empty string to remove it.

url : typing.Optional[str]
The URL to send the webhook to.

Expand Down Expand Up @@ -848,6 +867,7 @@ async def main() -> None:
child_resource_events=child_resource_events,
enabled=enabled,
events=events,
title=title,
url=url,
request_options=request_options,
)
Expand Down
20 changes: 20 additions & 0 deletions src/whop_sdk/webhooks/raw_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ def create(
enabled: typing.Optional[bool] = OMIT,
events: typing.Optional[typing.Sequence[CreateWebhooksRequestEventsItem]] = OMIT,
resource_id: typing.Optional[str] = OMIT,
title: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[Webhook]:
"""
Expand All @@ -217,6 +218,9 @@ def create(
resource_id : typing.Optional[str]
The account or app to create the webhook for. Defaults to the current account.

title : typing.Optional[str]
A label for the webhook, shown in the dashboard. Up to 255 characters.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -235,6 +239,7 @@ def create(
"enabled": enabled,
"events": events,
"resource_id": resource_id,
"title": title,
"url": url,
},
headers={
Expand Down Expand Up @@ -477,6 +482,7 @@ def update(
child_resource_events: typing.Optional[bool] = OMIT,
enabled: typing.Optional[bool] = OMIT,
events: typing.Optional[typing.Sequence[UpdateWebhooksRequestEventsItem]] = OMIT,
title: typing.Optional[str] = OMIT,
url: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> HttpResponse[Webhook]:
Expand All @@ -500,6 +506,9 @@ def update(
events : typing.Optional[typing.Sequence[UpdateWebhooksRequestEventsItem]]
The events to send the webhook for, in dot form (for example `payment.succeeded`).

title : typing.Optional[str]
A label for the webhook, shown in the dashboard. Up to 255 characters. Pass `null` or an empty string to remove it.

url : typing.Optional[str]
The URL to send the webhook to.

Expand All @@ -520,6 +529,7 @@ def update(
"child_resource_events": child_resource_events,
"enabled": enabled,
"events": events,
"title": title,
"url": url,
},
headers={
Expand Down Expand Up @@ -1217,6 +1227,7 @@ async def create(
enabled: typing.Optional[bool] = OMIT,
events: typing.Optional[typing.Sequence[CreateWebhooksRequestEventsItem]] = OMIT,
resource_id: typing.Optional[str] = OMIT,
title: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[Webhook]:
"""
Expand All @@ -1242,6 +1253,9 @@ async def create(
resource_id : typing.Optional[str]
The account or app to create the webhook for. Defaults to the current account.

title : typing.Optional[str]
A label for the webhook, shown in the dashboard. Up to 255 characters.

request_options : typing.Optional[RequestOptions]
Request-specific configuration.

Expand All @@ -1260,6 +1274,7 @@ async def create(
"enabled": enabled,
"events": events,
"resource_id": resource_id,
"title": title,
"url": url,
},
headers={
Expand Down Expand Up @@ -1504,6 +1519,7 @@ async def update(
child_resource_events: typing.Optional[bool] = OMIT,
enabled: typing.Optional[bool] = OMIT,
events: typing.Optional[typing.Sequence[UpdateWebhooksRequestEventsItem]] = OMIT,
title: typing.Optional[str] = OMIT,
url: typing.Optional[str] = OMIT,
request_options: typing.Optional[RequestOptions] = None,
) -> AsyncHttpResponse[Webhook]:
Expand All @@ -1527,6 +1543,9 @@ async def update(
events : typing.Optional[typing.Sequence[UpdateWebhooksRequestEventsItem]]
The events to send the webhook for, in dot form (for example `payment.succeeded`).

title : typing.Optional[str]
A label for the webhook, shown in the dashboard. Up to 255 characters. Pass `null` or an empty string to remove it.

url : typing.Optional[str]
The URL to send the webhook to.

Expand All @@ -1547,6 +1566,7 @@ async def update(
"child_resource_events": child_resource_events,
"enabled": enabled,
"events": events,
"title": title,
"url": url,
},
headers={
Expand Down
Loading