Skip to content

Commit 8d9430e

Browse files
activitysmith-sdk-bot[bot]activitysmith-bot
andauthored
chore: regenerate SDK (#22)
Co-authored-by: activitysmith-bot <activitysmith-bot@users.noreply.github.com>
1 parent d1c559a commit 8d9430e

File tree

5 files changed

+23
-9
lines changed

5 files changed

+23
-9
lines changed

activitysmith_openapi/api/push_notifications_api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def send_push_notification(
5656
) -> PushNotificationResponse:
5757
"""Send a push notification
5858
59-
Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL (tap) and up to 4 interactive actions (long-press on iOS).
59+
Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`.
6060
6161
:param push_notification_request: (required)
6262
:type push_notification_request: PushNotificationRequest
@@ -127,7 +127,7 @@ def send_push_notification_with_http_info(
127127
) -> ApiResponse[PushNotificationResponse]:
128128
"""Send a push notification
129129
130-
Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL (tap) and up to 4 interactive actions (long-press on iOS).
130+
Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`.
131131
132132
:param push_notification_request: (required)
133133
:type push_notification_request: PushNotificationRequest
@@ -198,7 +198,7 @@ def send_push_notification_without_preload_content(
198198
) -> RESTResponseType:
199199
"""Send a push notification
200200
201-
Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL (tap) and up to 4 interactive actions (long-press on iOS).
201+
Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`.
202202
203203
:param push_notification_request: (required)
204204
:type push_notification_request: PushNotificationRequest

activitysmith_openapi/docs/PushNotificationRequest.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ Name | Type | Description | Notes
88
**title** | **str** | |
99
**message** | **str** | | [optional]
1010
**subtitle** | **str** | | [optional]
11-
**redirection** | **str** | Optional HTTPS URL opened when user taps the notification body. | [optional]
12-
**actions** | [**List[PushNotificationAction]**](PushNotificationAction.md) | Optional interactive actions shown on iOS long-press. | [optional]
11+
**media** | **str** | Optional HTTPS URL for an image, audio file, or video that users can preview or play when they expand the notification. If &#x60;redirection&#x60; is omitted, tapping the notification opens this URL. Cannot be combined with &#x60;actions&#x60;. | [optional]
12+
**redirection** | **str** | Optional HTTPS URL opened when user taps the notification body. Overrides the default tap target from &#x60;media&#x60; when both are provided. | [optional]
13+
**actions** | [**List[PushNotificationAction]**](PushNotificationAction.md) | Optional interactive actions shown when users expand the notification. Cannot be combined with &#x60;media&#x60;. | [optional]
1314
**payload** | **Dict[str, object]** | | [optional]
1415
**badge** | **int** | | [optional]
1516
**sound** | **str** | | [optional]

activitysmith_openapi/docs/PushNotificationsApi.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Method | HTTP request | Description
1212
1313
Send a push notification
1414

15-
Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL (tap) and up to 4 interactive actions (long-press on iOS).
15+
Sends a push notification to devices matched by API key scope and optional target channels. Supports optional redirection URL, optional media preview or playback when the notification is expanded, and up to 4 interactive actions. `media` cannot be combined with `actions`.
1616

1717
### Example
1818

activitysmith_openapi/models/push_notification_request.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,25 @@ class PushNotificationRequest(BaseModel):
3232
title: StrictStr
3333
message: Optional[StrictStr] = None
3434
subtitle: Optional[StrictStr] = None
35-
redirection: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Optional HTTPS URL opened when user taps the notification body.")
36-
actions: Optional[Annotated[List[PushNotificationAction], Field(max_length=4)]] = Field(default=None, description="Optional interactive actions shown on iOS long-press.")
35+
media: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Optional HTTPS URL for an image, audio file, or video that users can preview or play when they expand the notification. If `redirection` is omitted, tapping the notification opens this URL. Cannot be combined with `actions`.")
36+
redirection: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Optional HTTPS URL opened when user taps the notification body. Overrides the default tap target from `media` when both are provided.")
37+
actions: Optional[Annotated[List[PushNotificationAction], Field(max_length=4)]] = Field(default=None, description="Optional interactive actions shown when users expand the notification. Cannot be combined with `media`.")
3738
payload: Optional[Dict[str, Any]] = None
3839
badge: Optional[StrictInt] = None
3940
sound: Optional[StrictStr] = None
4041
target: Optional[ChannelTarget] = None
4142
additional_properties: Dict[str, Any] = {}
42-
__properties: ClassVar[List[str]] = ["title", "message", "subtitle", "redirection", "actions", "payload", "badge", "sound", "target"]
43+
__properties: ClassVar[List[str]] = ["title", "message", "subtitle", "media", "redirection", "actions", "payload", "badge", "sound", "target"]
44+
45+
@field_validator('media')
46+
def media_validate_regular_expression(cls, value):
47+
"""Validates the regular expression"""
48+
if value is None:
49+
return value
50+
51+
if not re.match(r"^https:\/\/", value):
52+
raise ValueError(r"must validate the regular expression /^https:\/\//")
53+
return value
4354

4455
@field_validator('redirection')
4556
def redirection_validate_regular_expression(cls, value):
@@ -122,6 +133,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
122133
"title": obj.get("title"),
123134
"message": obj.get("message"),
124135
"subtitle": obj.get("subtitle"),
136+
"media": obj.get("media"),
125137
"redirection": obj.get("redirection"),
126138
"actions": [PushNotificationAction.from_dict(_item) for _item in obj["actions"]] if obj.get("actions") is not None else None,
127139
"payload": obj.get("payload"),

activitysmith_openapi/test/test_push_notification_request.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def make_instance(self, include_optional) -> PushNotificationRequest:
3838
title = '',
3939
message = '',
4040
subtitle = '',
41+
media = 'https:/',
4142
redirection = 'https:/',
4243
actions = [
4344
{

0 commit comments

Comments
 (0)