Skip to content

Commit 309f8f9

Browse files
author
stlc-bot
committed
fix(webhooks): format Slack webhook notifications (#1045)
Stainless-Generated-From: 8d36546
1 parent f883f60 commit 309f8f9

6 files changed

Lines changed: 24 additions & 6 deletions

‎src/context/dev/types/monitor_create_params.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,10 @@ class Schedule(TypedDict, total=False):
199199

200200
class Webhook(TypedDict, total=False):
201201
url: Required[str]
202-
"""Webhook URL events are delivered to."""
202+
"""Webhook URL events are delivered to.
203+
204+
Slack incoming webhook URLs are automatically formatted as Slack messages.
205+
"""
203206

204207
events: List[Literal["change.detected", "run.completed"]]
205208
"""Events delivered to this endpoint.

‎src/context/dev/types/monitor_create_response.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,10 @@ class LastError(BaseModel):
237237

238238
class Webhook(BaseModel):
239239
url: str
240-
"""Webhook URL events are delivered to."""
240+
"""Webhook URL events are delivered to.
241+
242+
Slack incoming webhook URLs are automatically formatted as Slack messages.
243+
"""
241244

242245
events: Optional[List[Literal["change.detected", "run.completed"]]] = None
243246
"""Events delivered to this endpoint.

‎src/context/dev/types/monitor_list_response.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,10 @@ class DataLastError(BaseModel):
238238

239239
class DataWebhook(BaseModel):
240240
url: str
241-
"""Webhook URL events are delivered to."""
241+
"""Webhook URL events are delivered to.
242+
243+
Slack incoming webhook URLs are automatically formatted as Slack messages.
244+
"""
242245

243246
events: Optional[List[Literal["change.detected", "run.completed"]]] = None
244247
"""Events delivered to this endpoint.

‎src/context/dev/types/monitor_retrieve_response.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,10 @@ class LastError(BaseModel):
237237

238238
class Webhook(BaseModel):
239239
url: str
240-
"""Webhook URL events are delivered to."""
240+
"""Webhook URL events are delivered to.
241+
242+
Slack incoming webhook URLs are automatically formatted as Slack messages.
243+
"""
241244

242245
events: Optional[List[Literal["change.detected", "run.completed"]]] = None
243246
"""Events delivered to this endpoint.

‎src/context/dev/types/monitor_update_params.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,10 @@ class Webhook(TypedDict, total=False):
197197
"""Set to null to remove the webhook."""
198198

199199
url: Required[str]
200-
"""Webhook URL events are delivered to."""
200+
"""Webhook URL events are delivered to.
201+
202+
Slack incoming webhook URLs are automatically formatted as Slack messages.
203+
"""
201204

202205
events: List[Literal["change.detected", "run.completed"]]
203206
"""Events delivered to this endpoint.

‎src/context/dev/types/monitor_update_response.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,10 @@ class LastError(BaseModel):
237237

238238
class Webhook(BaseModel):
239239
url: str
240-
"""Webhook URL events are delivered to."""
240+
"""Webhook URL events are delivered to.
241+
242+
Slack incoming webhook URLs are automatically formatted as Slack messages.
243+
"""
241244

242245
events: Optional[List[Literal["change.detected", "run.completed"]]] = None
243246
"""Events delivered to this endpoint.

0 commit comments

Comments
 (0)