From 219e1e263f3f685d99944f0280befe399b4832e7 Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Thu, 19 Nov 2026 01:31:40 +0000 Subject: [PATCH 1/6] chore: regenerate SDK --- activitysmith_openapi/api/live_activities_api.py | 6 +++--- activitysmith_openapi/api/push_notifications_api.py | 6 +++--- activitysmith_openapi/docs/ContentStateStart.md | 8 +++++--- activitysmith_openapi/docs/ContentStateUpdate.md | 6 ++++-- activitysmith_openapi/docs/LiveActivitiesApi.md | 2 +- .../docs/LiveActivityEndRequest.md | 1 + .../docs/LiveActivityStartRequest.md | 1 + .../docs/LiveActivityStreamDeleteRequest.md | 1 + .../docs/LiveActivityStreamRequest.md | 1 + .../docs/LiveActivityUpdateRequest.md | 1 + .../docs/PushNotificationAction.md | 2 +- .../docs/PushNotificationReplaceRequest.md | 2 +- .../docs/PushNotificationRequest.md | 4 ++-- activitysmith_openapi/docs/PushNotificationsApi.md | 2 +- activitysmith_openapi/docs/StreamContentState.md | 8 +++++--- activitysmith_openapi/models/content_state_start.py | 13 +++++++++---- .../models/content_state_update.py | 11 ++++++++--- .../models/live_activity_end_request.py | 6 ++++-- .../models/live_activity_start_request.py | 6 ++++-- .../models/live_activity_stream_delete_request.py | 6 ++++-- .../models/live_activity_stream_request.py | 6 ++++-- .../models/live_activity_update_request.py | 6 ++++-- .../models/push_notification_action.py | 2 +- .../models/push_notification_replace_request.py | 2 +- .../models/push_notification_request.py | 4 ++-- .../models/stream_content_state.py | 13 +++++++++---- activitysmith_openapi/openapi-source.json | 4 ++-- .../test/test_content_state_start.py | 2 ++ .../test/test_content_state_update.py | 2 ++ .../test/test_live_activity_end_request.py | 3 ++- .../test/test_live_activity_start_request.py | 7 ++++++- .../test_live_activity_stream_delete_request.py | 5 ++++- .../test/test_live_activity_stream_request.py | 7 ++++++- .../test/test_live_activity_update_request.py | 7 ++++++- .../test/test_push_notification_request.py | 2 +- .../test/test_stream_content_state.py | 2 ++ 36 files changed, 114 insertions(+), 53 deletions(-) diff --git a/activitysmith_openapi/api/live_activities_api.py b/activitysmith_openapi/api/live_activities_api.py index 8b971ea..43b389f 100644 --- a/activitysmith_openapi/api/live_activities_api.py +++ b/activitysmith_openapi/api/live_activities_api.py @@ -642,7 +642,7 @@ def reconcile_live_activity_stream( ) -> LiveActivityStreamPutResponse: """Start a new Live Activity or update an existing one - Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. + Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer, and timer_start_at when the timer started earlier, for example to show time already gone in the progress bar. Omit them on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -718,7 +718,7 @@ def reconcile_live_activity_stream_with_http_info( ) -> ApiResponse[LiveActivityStreamPutResponse]: """Start a new Live Activity or update an existing one - Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. + Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer, and timer_start_at when the timer started earlier, for example to show time already gone in the progress bar. Omit them on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -794,7 +794,7 @@ def reconcile_live_activity_stream_without_preload_content( ) -> RESTResponseType: """Start a new Live Activity or update an existing one - Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. + Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer, and timer_start_at when the timer started earlier, for example to show time already gone in the progress bar. Omit them on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str diff --git a/activitysmith_openapi/api/push_notifications_api.py b/activitysmith_openapi/api/push_notifications_api.py index 8a36095..025b16a 100644 --- a/activitysmith_openapi/api/push_notifications_api.py +++ b/activitysmith_openapi/api/push_notifications_api.py @@ -61,7 +61,7 @@ def dismiss_push_notification( ) -> PushNotificationDismissResponse: """Dismiss a push notification - Clears a Push Notification you already sent from the Lock Screen and Notification Center on every device it was sent to, using the `notification_id` from the send response. Notification history keeps it. Devices clear the notification in the background, which can take a moment or wait until the ActivitySmith app next opens. A successful response means the dismissal was recorded, not that every device has cleared it yet. Devices running an ActivitySmith app version before 1.17.0 show a silent notification titled \"Push Notification dismissed\" in its place until the user clears it. Calling this again for the same notification returns the same response and sends nothing. A dismissed notification cannot be replaced. + Clears a Push Notification you already sent from the Lock Screen and Notification Center on every device it was sent to, using the `notification_id` from the send response. Notification history keeps it. Devices clear the notification in the background, which can take a moment or wait until the ActivitySmith app next opens. A successful response means the dismissal was recorded, not that every device has cleared it yet. Calling this again for the same notification returns the same response and sends nothing. A dismissed notification cannot be replaced. :param notification_id: The `notification_id` returned when the Push Notification was sent. (required) :type notification_id: str @@ -133,7 +133,7 @@ def dismiss_push_notification_with_http_info( ) -> ApiResponse[PushNotificationDismissResponse]: """Dismiss a push notification - Clears a Push Notification you already sent from the Lock Screen and Notification Center on every device it was sent to, using the `notification_id` from the send response. Notification history keeps it. Devices clear the notification in the background, which can take a moment or wait until the ActivitySmith app next opens. A successful response means the dismissal was recorded, not that every device has cleared it yet. Devices running an ActivitySmith app version before 1.17.0 show a silent notification titled \"Push Notification dismissed\" in its place until the user clears it. Calling this again for the same notification returns the same response and sends nothing. A dismissed notification cannot be replaced. + Clears a Push Notification you already sent from the Lock Screen and Notification Center on every device it was sent to, using the `notification_id` from the send response. Notification history keeps it. Devices clear the notification in the background, which can take a moment or wait until the ActivitySmith app next opens. A successful response means the dismissal was recorded, not that every device has cleared it yet. Calling this again for the same notification returns the same response and sends nothing. A dismissed notification cannot be replaced. :param notification_id: The `notification_id` returned when the Push Notification was sent. (required) :type notification_id: str @@ -205,7 +205,7 @@ def dismiss_push_notification_without_preload_content( ) -> RESTResponseType: """Dismiss a push notification - Clears a Push Notification you already sent from the Lock Screen and Notification Center on every device it was sent to, using the `notification_id` from the send response. Notification history keeps it. Devices clear the notification in the background, which can take a moment or wait until the ActivitySmith app next opens. A successful response means the dismissal was recorded, not that every device has cleared it yet. Devices running an ActivitySmith app version before 1.17.0 show a silent notification titled \"Push Notification dismissed\" in its place until the user clears it. Calling this again for the same notification returns the same response and sends nothing. A dismissed notification cannot be replaced. + Clears a Push Notification you already sent from the Lock Screen and Notification Center on every device it was sent to, using the `notification_id` from the send response. Notification history keeps it. Devices clear the notification in the background, which can take a moment or wait until the ActivitySmith app next opens. A successful response means the dismissal was recorded, not that every device has cleared it yet. Calling this again for the same notification returns the same response and sends nothing. A dismissed notification cannot be replaced. :param notification_id: The `notification_id` returned when the Push Notification was sent. (required) :type notification_id: str diff --git a/activitysmith_openapi/docs/ContentStateStart.md b/activitysmith_openapi/docs/ContentStateStart.md index 2a8422f..baedd53 100644 --- a/activitysmith_openapi/docs/ContentStateStart.md +++ b/activitysmith_openapi/docs/ContentStateStart.md @@ -1,19 +1,21 @@ # ContentStateStart -Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer include duration_seconds for countdowns, or set counts_down false without duration_seconds for an open-ended elapsed timer. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls. +Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer include duration_seconds or timer_end_at for countdowns, or set counts_down false without them for an open-ended elapsed timer. Add timer_start_at for a timer that started earlier. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | +**title** | **str** | Title shown on the Live Activity. Send an empty string to show no title. | **subtitle** | **str** | | [optional] **number_of_steps** | **int** | Total number of steps. Use for type=segmented_progress. This value can be increased or decreased later when updating or ending the same activity. | [optional] **current_step** | **int** | Current completed step count. Use for type=segmented_progress. Set 0 when the activity has started but no segment is complete yet. Must be less than or equal to number_of_steps. | [optional] **percentage** | **float** | Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided. | [optional] **value** | [**LiveActivityValue**](LiveActivityValue.md) | For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit. | [optional] **upper_limit** | **float** | Maximum progress value. Use with value for type=progress. | [optional] -**duration_seconds** | **float** | Timer duration in seconds. For type=timer countdowns, required on start when counts_down is true or omitted. | [optional] +**duration_seconds** | **float** | Timer duration in seconds. For type=timer countdowns, required on start when counts_down is true or omitted, unless you send timer_end_at. Counts from timer_start_at when you send it. | [optional] +**timer_start_at** | **datetime** | Use with type=timer. ISO 8601 date and time when the timer started. It can be in the past, so a countdown that started earlier shows the time already gone in its progress bar. Defaults to the request time. Must not be in the future. | [optional] +**timer_end_at** | **datetime** | Use with type=timer. ISO 8601 date and time when the countdown ends. Must be after timer_start_at, or in the future when timer_start_at is omitted. Send duration_seconds or timer_end_at, not both. | [optional] **counts_down** | **bool** | Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer. | [optional] [default to True] **is_running** | **bool** | Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume. | [optional] [default to True] **metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for type=metrics or type=stats. | [optional] diff --git a/activitysmith_openapi/docs/ContentStateUpdate.md b/activitysmith_openapi/docs/ContentStateUpdate.md index 2eafb72..68accb8 100644 --- a/activitysmith_openapi/docs/ContentStateUpdate.md +++ b/activitysmith_openapi/docs/ContentStateUpdate.md @@ -6,14 +6,16 @@ Update payload requires title. For segmented_progress include current_step and o Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | +**title** | **str** | Title shown on the Live Activity. Send an empty string to show no title. | **subtitle** | **str** | | [optional] **number_of_steps** | **int** | Total number of steps. Use for type=segmented_progress. Optional on update, and safe to change if the workflow gains or loses steps. | [optional] **current_step** | **int** | Current completed step count. Use for type=segmented_progress. Set 0 when no segment is complete yet. Must be less than or equal to number_of_steps when number_of_steps is provided. | [optional] **percentage** | **float** | Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided. | [optional] **value** | [**LiveActivityValue**](LiveActivityValue.md) | For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit. | [optional] **upper_limit** | **float** | Maximum progress value. Use with value for type=progress. | [optional] -**duration_seconds** | **float** | Timer duration in seconds. For type=timer, sending duration_seconds resets the timer window from the update request time; omit it to preserve the existing timer window. | [optional] +**duration_seconds** | **float** | Timer duration in seconds. For type=timer, sending duration_seconds resets the timer window from the update request time, or from timer_start_at when you send it. Omit it to preserve the existing timer window. | [optional] +**timer_start_at** | **datetime** | Use with type=timer. ISO 8601 date and time when the timer started. It can be in the past, so a countdown that started earlier shows the time already gone in its progress bar. Defaults to the request time. Must not be in the future. | [optional] +**timer_end_at** | **datetime** | Use with type=timer. ISO 8601 date and time when the countdown ends. Must be after timer_start_at, or in the future when timer_start_at is omitted. Send duration_seconds or timer_end_at, not both. Send timer_end_at alone to move the end and keep the current start. | [optional] **counts_down** | **bool** | Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer. | [optional] [default to True] **is_running** | **bool** | Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume. | [optional] [default to True] **metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for type=metrics or type=stats. | [optional] diff --git a/activitysmith_openapi/docs/LiveActivitiesApi.md b/activitysmith_openapi/docs/LiveActivitiesApi.md index 32004df..7e030f1 100644 --- a/activitysmith_openapi/docs/LiveActivitiesApi.md +++ b/activitysmith_openapi/docs/LiveActivitiesApi.md @@ -181,7 +181,7 @@ Name | Type | Description | Notes Start a new Live Activity or update an existing one -Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. +Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer, and timer_start_at when the timer started earlier, for example to show time already gone in the progress bar. Omit them on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. ### Example diff --git a/activitysmith_openapi/docs/LiveActivityEndRequest.md b/activitysmith_openapi/docs/LiveActivityEndRequest.md index 60c6518..f5b848f 100644 --- a/activitysmith_openapi/docs/LiveActivityEndRequest.md +++ b/activitysmith_openapi/docs/LiveActivityEndRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **content_state** | [**ContentStateEnd**](ContentStateEnd.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] **secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] +**sound** | **str** | Optional sound for the end. Ends are silent unless you set one. A sound also expands the Live Activity on the Lock Screen. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStartRequest.md b/activitysmith_openapi/docs/LiveActivityStartRequest.md index a7261b8..aaa6ff3 100644 --- a/activitysmith_openapi/docs/LiveActivityStartRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStartRequest.md @@ -13,6 +13,7 @@ Name | Type | Description | Notes **alert** | [**AlertPayload**](AlertPayload.md) | | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] **tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] +**sound** | **str** | Optional sound for the start. Omit it to play the Live Activities sound picked on the device. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md b/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md index f38468f..8d3e8d4 100644 --- a/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] **secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] **alert** | [**AlertPayload**](AlertPayload.md) | | [optional] +**sound** | **str** | Optional sound for the end. Ends are silent unless you set one. A sound also expands the Live Activity on the Lock Screen. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStreamRequest.md b/activitysmith_openapi/docs/LiveActivityStreamRequest.md index 08c5287..c36e2d8 100644 --- a/activitysmith_openapi/docs/LiveActivityStreamRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStreamRequest.md @@ -14,6 +14,7 @@ Name | Type | Description | Notes **channels** | **List[str]** | Channel slugs. When omitted, API key scope determines recipients. | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] **tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] +**sound** | **str** | Optional sound for this call. A call that starts a Live Activity plays the Live Activities sound picked on the device unless you set one. Updates are silent unless you set one. A sound on an update also expands the Live Activity on the Lock Screen. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityUpdateRequest.md b/activitysmith_openapi/docs/LiveActivityUpdateRequest.md index da9cb5a..275cf1c 100644 --- a/activitysmith_openapi/docs/LiveActivityUpdateRequest.md +++ b/activitysmith_openapi/docs/LiveActivityUpdateRequest.md @@ -12,6 +12,7 @@ Name | Type | Description | Notes **content_state** | [**ContentStateUpdate**](ContentStateUpdate.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] **secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] +**sound** | **str** | Optional sound for this update. Updates are silent unless you set one. A sound also expands the Live Activity on the Lock Screen. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound. | [optional] ## Example diff --git a/activitysmith_openapi/docs/PushNotificationAction.md b/activitysmith_openapi/docs/PushNotificationAction.md index b1569fd..d5bed46 100644 --- a/activitysmith_openapi/docs/PushNotificationAction.md +++ b/activitysmith_openapi/docs/PushNotificationAction.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **title** | **str** | Button title displayed in iOS expanded notification UI. | **type** | [**PushNotificationActionType**](PushNotificationActionType.md) | | -**url** | **str** | Action URL. For open_url, use HTTP, HTTPS, Shortcuts, or an installed app’s custom URL scheme, such as spotify:// or spotify:track:123. Custom app schemes require iOS 1.13.4 build 2 or later; no web fallback is provided. Internal and executable schemes are blocked. For webhook, use an HTTPS URL called by the ActivitySmith backend. | +**url** | **str** | Action URL. For open_url, use HTTP, HTTPS, Shortcuts, or an installed app’s custom URL scheme, such as spotify:// or spotify:track:123. Custom app schemes have no web fallback. Internal and executable schemes are blocked. For webhook, use an HTTPS URL called by the ActivitySmith backend. | **method** | [**PushNotificationWebhookMethod**](PushNotificationWebhookMethod.md) | Webhook HTTP method. Used only when type=webhook. | [optional] [default to PushNotificationWebhookMethod.POST] **body** | **object** | Optional webhook payload body. Used only when type=webhook. | [optional] diff --git a/activitysmith_openapi/docs/PushNotificationReplaceRequest.md b/activitysmith_openapi/docs/PushNotificationReplaceRequest.md index 8a864ac..bdf7e98 100644 --- a/activitysmith_openapi/docs/PushNotificationReplaceRequest.md +++ b/activitysmith_openapi/docs/PushNotificationReplaceRequest.md @@ -12,7 +12,7 @@ Name | Type | Description | Notes **subtitle** | **str** | | [optional] **icon** | **str** | Optional HTTPS image URL without credentials for a custom notification icon. If the image cannot be loaded, the app icon is used. iOS may omit subtitle when displaying a custom icon. | [optional] **media** | **str** | 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`. | [optional] -**redirection** | **str** | Optional HTTP, HTTPS, Shortcuts, or installed app URL opened when the user taps the notification body. Custom schemes such as spotify:// and spotify:track:123 require iOS 1.13.4 build 2 or later and an installed handler; no web fallback is provided. Internal and executable schemes are blocked. Overrides the default tap target from media. | [optional] +**redirection** | **str** | Optional HTTP, HTTPS, Shortcuts, or installed app URL opened when the user taps the notification body. Custom schemes such as spotify:// and spotify:track:123 require an installed handler; no web fallback is provided. Internal and executable schemes are blocked. Overrides the default tap target from media. | [optional] **actions** | [**List[PushNotificationAction]**](PushNotificationAction.md) | Optional interactive actions shown when users expand the notification. Cannot be combined with `media`. | [optional] **payload** | **object** | | [optional] **badge** | **int** | | [optional] diff --git a/activitysmith_openapi/docs/PushNotificationRequest.md b/activitysmith_openapi/docs/PushNotificationRequest.md index eccf650..6c1f291 100644 --- a/activitysmith_openapi/docs/PushNotificationRequest.md +++ b/activitysmith_openapi/docs/PushNotificationRequest.md @@ -12,11 +12,11 @@ Name | Type | Description | Notes **icon** | **str** | Optional HTTPS image URL without credentials for a custom notification icon. If the image cannot be loaded, the app icon is used. iOS may omit subtitle when displaying a custom icon. | [optional] **interruption_level** | [**PushInterruptionLevel**](PushInterruptionLevel.md) | Optional. How urgently iOS presents the notification: `passive` (quiet, no sound or screen wake), `active` (default), or `time-sensitive` (can break through Focus and Scheduled Summary when allowed). Omit for normal delivery. | [optional] **media** | **str** | 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`. | [optional] -**redirection** | **str** | Optional HTTP, HTTPS, Shortcuts, or installed app URL opened when the user taps the notification body. Custom schemes such as spotify:// and spotify:track:123 require iOS 1.13.4 build 2 or later and an installed handler; no web fallback is provided. Internal and executable schemes are blocked. Overrides the default tap target from media. | [optional] +**redirection** | **str** | Optional HTTP, HTTPS, Shortcuts, or installed app URL opened when the user taps the notification body. Custom schemes such as spotify:// and spotify:track:123 require an installed handler; no web fallback is provided. Internal and executable schemes are blocked. Overrides the default tap target from media. | [optional] **actions** | [**List[PushNotificationAction]**](PushNotificationAction.md) | Optional interactive actions shown when users expand the notification. Cannot be combined with `media`. | [optional] **payload** | **object** | | [optional] **badge** | **int** | | [optional] -**sound** | **str** | | [optional] +**sound** | **str** | Optional sound for this Push Notification. Omit it to play the Push Notifications sound picked on the device. Passive Push Notifications play no sound. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound. | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] **tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] diff --git a/activitysmith_openapi/docs/PushNotificationsApi.md b/activitysmith_openapi/docs/PushNotificationsApi.md index 5c481cf..e374c34 100644 --- a/activitysmith_openapi/docs/PushNotificationsApi.md +++ b/activitysmith_openapi/docs/PushNotificationsApi.md @@ -14,7 +14,7 @@ Method | HTTP request | Description Dismiss a push notification -Clears a Push Notification you already sent from the Lock Screen and Notification Center on every device it was sent to, using the `notification_id` from the send response. Notification history keeps it. Devices clear the notification in the background, which can take a moment or wait until the ActivitySmith app next opens. A successful response means the dismissal was recorded, not that every device has cleared it yet. Devices running an ActivitySmith app version before 1.17.0 show a silent notification titled \"Push Notification dismissed\" in its place until the user clears it. Calling this again for the same notification returns the same response and sends nothing. A dismissed notification cannot be replaced. +Clears a Push Notification you already sent from the Lock Screen and Notification Center on every device it was sent to, using the `notification_id` from the send response. Notification history keeps it. Devices clear the notification in the background, which can take a moment or wait until the ActivitySmith app next opens. A successful response means the dismissal was recorded, not that every device has cleared it yet. Calling this again for the same notification returns the same response and sends nothing. A dismissed notification cannot be replaced. ### Example diff --git a/activitysmith_openapi/docs/StreamContentState.md b/activitysmith_openapi/docs/StreamContentState.md index 60730c6..4fc8e9f 100644 --- a/activitysmith_openapi/docs/StreamContentState.md +++ b/activitysmith_openapi/docs/StreamContentState.md @@ -1,19 +1,21 @@ # StreamContentState -Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, alert, timer, and value types. For timer, send duration_seconds to start or reset a bounded timer; omit duration_seconds on later updates to preserve the existing timer window. +Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, alert, timer, and value types. For timer, send duration_seconds or timer_end_at to start or reset a bounded timer, and timer_start_at for a timer that started earlier. Omit them on later updates to preserve the existing timer window. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**title** | **str** | | +**title** | **str** | Title shown on the Live Activity. Send an empty string to show no title. | **subtitle** | **str** | | [optional] **number_of_steps** | **int** | Use for segmented_progress. | [optional] **current_step** | **int** | Use for segmented_progress. Set 0 when no segment is complete yet. Must be less than or equal to number_of_steps when number_of_steps is provided. | [optional] **percentage** | **float** | Use for progress. Takes precedence over value/upper_limit if both are provided. | [optional] **value** | [**LiveActivityValue**](LiveActivityValue.md) | For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For progress, a numeric progress value used with upper_limit. | [optional] **upper_limit** | **float** | Maximum progress value. Use with value for progress. | [optional] -**duration_seconds** | **float** | Timer duration in seconds. For type=timer, send duration_seconds to start or reset the timer window; omit it on later stream updates to preserve the existing timer window. | [optional] +**duration_seconds** | **float** | Timer duration in seconds. For type=timer, send duration_seconds to start or reset the timer window, counted from timer_start_at when you send it. Omit it on later stream updates to preserve the existing timer window. | [optional] +**timer_start_at** | **datetime** | Use with type=timer. ISO 8601 date and time when the timer started. It can be in the past, so a countdown that started earlier shows the time already gone in its progress bar. Defaults to the request time. Must not be in the future. | [optional] +**timer_end_at** | **datetime** | Use with type=timer. ISO 8601 date and time when the countdown ends. Must be after timer_start_at, or in the future when timer_start_at is omitted. Send duration_seconds or timer_end_at, not both. On later stream updates, send timer_end_at alone to move the end and keep the current start. | [optional] **counts_down** | **bool** | Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer. | [optional] [default to True] **is_running** | **bool** | Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume. | [optional] [default to True] **type** | **str** | Required on the first PUT or whenever the stream cannot infer the current activity type. | [optional] diff --git a/activitysmith_openapi/models/content_state_start.py b/activitysmith_openapi/models/content_state_start.py index 568b5b3..f5ca440 100644 --- a/activitysmith_openapi/models/content_state_start.py +++ b/activitysmith_openapi/models/content_state_start.py @@ -17,6 +17,7 @@ import re # noqa: F401 import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated @@ -29,16 +30,18 @@ class ContentStateStart(BaseModel): """ - Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer include duration_seconds for countdowns, or set counts_down false without duration_seconds for an open-ended elapsed timer. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls. + Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer include duration_seconds or timer_end_at for countdowns, or set counts_down false without them for an open-ended elapsed timer. Add timer_start_at for a timer that started earlier. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls. """ # noqa: E501 - title: StrictStr + title: StrictStr = Field(description="Title shown on the Live Activity. Send an empty string to show no title.") subtitle: Optional[StrictStr] = None number_of_steps: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Total number of steps. Use for type=segmented_progress. This value can be increased or decreased later when updating or ending the same activity.") current_step: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Current completed step count. Use for type=segmented_progress. Set 0 when the activity has started but no segment is complete yet. Must be less than or equal to number_of_steps.") percentage: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=None, description="Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided.") value: Optional[LiveActivityValue] = Field(default=None, description="For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit.") upper_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum progress value. Use with value for type=progress.") - duration_seconds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Timer duration in seconds. For type=timer countdowns, required on start when counts_down is true or omitted.") + duration_seconds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Timer duration in seconds. For type=timer countdowns, required on start when counts_down is true or omitted, unless you send timer_end_at. Counts from timer_start_at when you send it.") + timer_start_at: Optional[datetime] = Field(default=None, description="Use with type=timer. ISO 8601 date and time when the timer started. It can be in the past, so a countdown that started earlier shows the time already gone in its progress bar. Defaults to the request time. Must not be in the future.") + timer_end_at: Optional[datetime] = Field(default=None, description="Use with type=timer. ISO 8601 date and time when the countdown ends. Must be after timer_start_at, or in the future when timer_start_at is omitted. Send duration_seconds or timer_end_at, not both.") counts_down: Optional[StrictBool] = Field(default=True, description="Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer.") is_running: Optional[StrictBool] = Field(default=True, description="Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume.") metrics: Optional[Annotated[List[ActivityMetric], Field(min_length=1, max_length=8)]] = Field(default=None, description="Use for type=metrics or type=stats.") @@ -49,7 +52,7 @@ class ContentStateStart(BaseModel): color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.") step_color: Optional[StrictStr] = Field(default=None, description="Optional. Overrides color for the current step. Only applies to type=segmented_progress.") step_colors: Optional[List[StrictStr]] = Field(default=None, description="Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step.") - __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "percentage", "value", "upper_limit", "duration_seconds", "counts_down", "is_running", "metrics", "message", "icon", "badge", "type", "color", "step_color", "step_colors"] + __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "percentage", "value", "upper_limit", "duration_seconds", "timer_start_at", "timer_end_at", "counts_down", "is_running", "metrics", "message", "icon", "badge", "type", "color", "step_color", "step_colors"] @field_validator('type') def type_validate_enum(cls, value): @@ -164,6 +167,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "value": LiveActivityValue.from_dict(obj["value"]) if obj.get("value") is not None else None, "upper_limit": obj.get("upper_limit"), "duration_seconds": obj.get("duration_seconds"), + "timer_start_at": obj.get("timer_start_at"), + "timer_end_at": obj.get("timer_end_at"), "counts_down": obj.get("counts_down") if obj.get("counts_down") is not None else True, "is_running": obj.get("is_running") if obj.get("is_running") is not None else True, "metrics": [ActivityMetric.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None, diff --git a/activitysmith_openapi/models/content_state_update.py b/activitysmith_openapi/models/content_state_update.py index 2b5ea94..805f881 100644 --- a/activitysmith_openapi/models/content_state_update.py +++ b/activitysmith_openapi/models/content_state_update.py @@ -17,6 +17,7 @@ import re # noqa: F401 import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated @@ -31,14 +32,16 @@ class ContentStateUpdate(BaseModel): """ Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer, omit duration_seconds to preserve the current timer window or send duration_seconds to reset the timer from the update request time. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates. """ # noqa: E501 - title: StrictStr + title: StrictStr = Field(description="Title shown on the Live Activity. Send an empty string to show no title.") subtitle: Optional[StrictStr] = None number_of_steps: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Total number of steps. Use for type=segmented_progress. Optional on update, and safe to change if the workflow gains or loses steps.") current_step: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Current completed step count. Use for type=segmented_progress. Set 0 when no segment is complete yet. Must be less than or equal to number_of_steps when number_of_steps is provided.") percentage: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=None, description="Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided.") value: Optional[LiveActivityValue] = Field(default=None, description="For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit.") upper_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum progress value. Use with value for type=progress.") - duration_seconds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Timer duration in seconds. For type=timer, sending duration_seconds resets the timer window from the update request time; omit it to preserve the existing timer window.") + duration_seconds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Timer duration in seconds. For type=timer, sending duration_seconds resets the timer window from the update request time, or from timer_start_at when you send it. Omit it to preserve the existing timer window.") + timer_start_at: Optional[datetime] = Field(default=None, description="Use with type=timer. ISO 8601 date and time when the timer started. It can be in the past, so a countdown that started earlier shows the time already gone in its progress bar. Defaults to the request time. Must not be in the future.") + timer_end_at: Optional[datetime] = Field(default=None, description="Use with type=timer. ISO 8601 date and time when the countdown ends. Must be after timer_start_at, or in the future when timer_start_at is omitted. Send duration_seconds or timer_end_at, not both. Send timer_end_at alone to move the end and keep the current start.") counts_down: Optional[StrictBool] = Field(default=True, description="Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer.") is_running: Optional[StrictBool] = Field(default=True, description="Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume.") metrics: Optional[Annotated[List[ActivityMetric], Field(min_length=1, max_length=8)]] = Field(default=None, description="Use for type=metrics or type=stats.") @@ -49,7 +52,7 @@ class ContentStateUpdate(BaseModel): color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.") step_color: Optional[StrictStr] = Field(default=None, description="Optional. Overrides color for the current step. Only applies to type=segmented_progress.") step_colors: Optional[List[StrictStr]] = Field(default=None, description="Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step.") - __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "percentage", "value", "upper_limit", "duration_seconds", "counts_down", "is_running", "metrics", "message", "icon", "badge", "type", "color", "step_color", "step_colors"] + __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "percentage", "value", "upper_limit", "duration_seconds", "timer_start_at", "timer_end_at", "counts_down", "is_running", "metrics", "message", "icon", "badge", "type", "color", "step_color", "step_colors"] @field_validator('type') def type_validate_enum(cls, value): @@ -167,6 +170,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "value": LiveActivityValue.from_dict(obj["value"]) if obj.get("value") is not None else None, "upper_limit": obj.get("upper_limit"), "duration_seconds": obj.get("duration_seconds"), + "timer_start_at": obj.get("timer_start_at"), + "timer_end_at": obj.get("timer_end_at"), "counts_down": obj.get("counts_down") if obj.get("counts_down") is not None else True, "is_running": obj.get("is_running") if obj.get("is_running") is not None else True, "metrics": [ActivityMetric.from_dict(_item) for _item in obj["metrics"]] if obj.get("metrics") is not None else None, diff --git a/activitysmith_openapi/models/live_activity_end_request.py b/activitysmith_openapi/models/live_activity_end_request.py index 0a2721b..4c70671 100644 --- a/activitysmith_openapi/models/live_activity_end_request.py +++ b/activitysmith_openapi/models/live_activity_end_request.py @@ -36,7 +36,8 @@ class LiveActivityEndRequest(BaseModel): content_state: ContentStateEnd action: Optional[LiveActivityAction] = None secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") - __properties: ClassVar[List[str]] = ["metadata", "activity_id", "tags", "content_state", "action", "secondary_action"] + sound: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="Optional sound for the end. Ends are silent unless you set one. A sound also expands the Live Activity on the Lock Screen. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.") + __properties: ClassVar[List[str]] = ["metadata", "activity_id", "tags", "content_state", "action", "secondary_action", "sound"] model_config = ConfigDict( populate_by_name=True, @@ -115,7 +116,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "content_state": ContentStateEnd.from_dict(obj["content_state"]) if obj.get("content_state") is not None else None, "action": LiveActivityAction.from_dict(obj["action"]) if obj.get("action") is not None else None, - "secondary_action": LiveActivityAction.from_dict(obj["secondary_action"]) if obj.get("secondary_action") is not None else None + "secondary_action": LiveActivityAction.from_dict(obj["secondary_action"]) if obj.get("secondary_action") is not None else None, + "sound": obj.get("sound") }) return _obj diff --git a/activitysmith_openapi/models/live_activity_start_request.py b/activitysmith_openapi/models/live_activity_start_request.py index 5c8b78a..4e8c8bc 100644 --- a/activitysmith_openapi/models/live_activity_start_request.py +++ b/activitysmith_openapi/models/live_activity_start_request.py @@ -39,7 +39,8 @@ class LiveActivityStartRequest(BaseModel): alert: Optional[AlertPayload] = None target: Optional[ChannelTarget] = None tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") - __properties: ClassVar[List[str]] = ["metadata", "content_state", "action", "secondary_action", "alert", "target", "tags"] + sound: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="Optional sound for the start. Omit it to play the Live Activities sound picked on the device. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.") + __properties: ClassVar[List[str]] = ["metadata", "content_state", "action", "secondary_action", "alert", "target", "tags", "sound"] model_config = ConfigDict( populate_by_name=True, @@ -125,7 +126,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "secondary_action": LiveActivityAction.from_dict(obj["secondary_action"]) if obj.get("secondary_action") is not None else None, "alert": AlertPayload.from_dict(obj["alert"]) if obj.get("alert") is not None else None, "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None, - "tags": obj.get("tags") + "tags": obj.get("tags"), + "sound": obj.get("sound") }) return _obj diff --git a/activitysmith_openapi/models/live_activity_stream_delete_request.py b/activitysmith_openapi/models/live_activity_stream_delete_request.py index 10cbe52..3460708 100644 --- a/activitysmith_openapi/models/live_activity_stream_delete_request.py +++ b/activitysmith_openapi/models/live_activity_stream_delete_request.py @@ -37,7 +37,8 @@ class LiveActivityStreamDeleteRequest(BaseModel): action: Optional[LiveActivityAction] = None secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") alert: Optional[AlertPayload] = None - __properties: ClassVar[List[str]] = ["metadata", "tags", "content_state", "action", "secondary_action", "alert"] + sound: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="Optional sound for the end. Ends are silent unless you set one. A sound also expands the Live Activity on the Lock Screen. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.") + __properties: ClassVar[List[str]] = ["metadata", "tags", "content_state", "action", "secondary_action", "alert", "sound"] model_config = ConfigDict( populate_by_name=True, @@ -119,7 +120,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "content_state": StreamContentState.from_dict(obj["content_state"]) if obj.get("content_state") is not None else None, "action": LiveActivityAction.from_dict(obj["action"]) if obj.get("action") is not None else None, "secondary_action": LiveActivityAction.from_dict(obj["secondary_action"]) if obj.get("secondary_action") is not None else None, - "alert": AlertPayload.from_dict(obj["alert"]) if obj.get("alert") is not None else None + "alert": AlertPayload.from_dict(obj["alert"]) if obj.get("alert") is not None else None, + "sound": obj.get("sound") }) return _obj diff --git a/activitysmith_openapi/models/live_activity_stream_request.py b/activitysmith_openapi/models/live_activity_stream_request.py index aa0c32b..0bdb78f 100644 --- a/activitysmith_openapi/models/live_activity_stream_request.py +++ b/activitysmith_openapi/models/live_activity_stream_request.py @@ -40,7 +40,8 @@ class LiveActivityStreamRequest(BaseModel): channels: Optional[Annotated[List[StrictStr], Field(min_length=1)]] = Field(default=None, description="Channel slugs. When omitted, API key scope determines recipients.") target: Optional[ChannelTarget] = None tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") - __properties: ClassVar[List[str]] = ["metadata", "content_state", "action", "secondary_action", "alert", "channels", "target", "tags"] + sound: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="Optional sound for this call. A call that starts a Live Activity plays the Live Activities sound picked on the device unless you set one. Updates are silent unless you set one. A sound on an update also expands the Live Activity on the Lock Screen. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.") + __properties: ClassVar[List[str]] = ["metadata", "content_state", "action", "secondary_action", "alert", "channels", "target", "tags", "sound"] model_config = ConfigDict( populate_by_name=True, @@ -127,7 +128,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "alert": AlertPayload.from_dict(obj["alert"]) if obj.get("alert") is not None else None, "channels": obj.get("channels"), "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None, - "tags": obj.get("tags") + "tags": obj.get("tags"), + "sound": obj.get("sound") }) return _obj diff --git a/activitysmith_openapi/models/live_activity_update_request.py b/activitysmith_openapi/models/live_activity_update_request.py index 42472fa..52a81bb 100644 --- a/activitysmith_openapi/models/live_activity_update_request.py +++ b/activitysmith_openapi/models/live_activity_update_request.py @@ -36,7 +36,8 @@ class LiveActivityUpdateRequest(BaseModel): content_state: ContentStateUpdate action: Optional[LiveActivityAction] = None secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") - __properties: ClassVar[List[str]] = ["metadata", "activity_id", "tags", "content_state", "action", "secondary_action"] + sound: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="Optional sound for this update. Updates are silent unless you set one. A sound also expands the Live Activity on the Lock Screen. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.") + __properties: ClassVar[List[str]] = ["metadata", "activity_id", "tags", "content_state", "action", "secondary_action", "sound"] model_config = ConfigDict( populate_by_name=True, @@ -115,7 +116,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "tags": obj.get("tags"), "content_state": ContentStateUpdate.from_dict(obj["content_state"]) if obj.get("content_state") is not None else None, "action": LiveActivityAction.from_dict(obj["action"]) if obj.get("action") is not None else None, - "secondary_action": LiveActivityAction.from_dict(obj["secondary_action"]) if obj.get("secondary_action") is not None else None + "secondary_action": LiveActivityAction.from_dict(obj["secondary_action"]) if obj.get("secondary_action") is not None else None, + "sound": obj.get("sound") }) return _obj diff --git a/activitysmith_openapi/models/push_notification_action.py b/activitysmith_openapi/models/push_notification_action.py index d735e65..29b82d8 100644 --- a/activitysmith_openapi/models/push_notification_action.py +++ b/activitysmith_openapi/models/push_notification_action.py @@ -30,7 +30,7 @@ class PushNotificationAction(BaseModel): """ # noqa: E501 title: StrictStr = Field(description="Button title displayed in iOS expanded notification UI.") type: PushNotificationActionType - url: StrictStr = Field(description="Action URL. For open_url, use HTTP, HTTPS, Shortcuts, or an installed app’s custom URL scheme, such as spotify:// or spotify:track:123. Custom app schemes require iOS 1.13.4 build 2 or later; no web fallback is provided. Internal and executable schemes are blocked. For webhook, use an HTTPS URL called by the ActivitySmith backend.") + url: StrictStr = Field(description="Action URL. For open_url, use HTTP, HTTPS, Shortcuts, or an installed app’s custom URL scheme, such as spotify:// or spotify:track:123. Custom app schemes have no web fallback. Internal and executable schemes are blocked. For webhook, use an HTTPS URL called by the ActivitySmith backend.") method: Optional[PushNotificationWebhookMethod] = Field(default=PushNotificationWebhookMethod.POST, description="Webhook HTTP method. Used only when type=webhook.") body: Optional[Dict[str, Any]] = Field(default=None, description="Optional webhook payload body. Used only when type=webhook.") additional_properties: Dict[str, Any] = {} diff --git a/activitysmith_openapi/models/push_notification_replace_request.py b/activitysmith_openapi/models/push_notification_replace_request.py index f604b62..ebf1d65 100644 --- a/activitysmith_openapi/models/push_notification_replace_request.py +++ b/activitysmith_openapi/models/push_notification_replace_request.py @@ -35,7 +35,7 @@ class PushNotificationReplaceRequest(BaseModel): subtitle: Optional[StrictStr] = None icon: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Optional HTTPS image URL without credentials for a custom notification icon. If the image cannot be loaded, the app icon is used. iOS may omit subtitle when displaying a custom icon.") 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`.") - redirection: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Optional HTTP, HTTPS, Shortcuts, or installed app URL opened when the user taps the notification body. Custom schemes such as spotify:// and spotify:track:123 require iOS 1.13.4 build 2 or later and an installed handler; no web fallback is provided. Internal and executable schemes are blocked. Overrides the default tap target from media.") + redirection: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Optional HTTP, HTTPS, Shortcuts, or installed app URL opened when the user taps the notification body. Custom schemes such as spotify:// and spotify:track:123 require an installed handler; no web fallback is provided. Internal and executable schemes are blocked. Overrides the default tap target from media.") 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`.") payload: Optional[Dict[str, Any]] = None badge: Optional[StrictInt] = None diff --git a/activitysmith_openapi/models/push_notification_request.py b/activitysmith_openapi/models/push_notification_request.py index f71c50c..ef185fe 100644 --- a/activitysmith_openapi/models/push_notification_request.py +++ b/activitysmith_openapi/models/push_notification_request.py @@ -38,11 +38,11 @@ class PushNotificationRequest(BaseModel): icon: Optional[Annotated[str, Field(strict=True)]] = Field(default=None, description="Optional HTTPS image URL without credentials for a custom notification icon. If the image cannot be loaded, the app icon is used. iOS may omit subtitle when displaying a custom icon.") interruption_level: Optional[PushInterruptionLevel] = Field(default=None, description="Optional. How urgently iOS presents the notification: `passive` (quiet, no sound or screen wake), `active` (default), or `time-sensitive` (can break through Focus and Scheduled Summary when allowed). Omit for normal delivery.") 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`.") - redirection: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Optional HTTP, HTTPS, Shortcuts, or installed app URL opened when the user taps the notification body. Custom schemes such as spotify:// and spotify:track:123 require iOS 1.13.4 build 2 or later and an installed handler; no web fallback is provided. Internal and executable schemes are blocked. Overrides the default tap target from media.") + redirection: Optional[Annotated[str, Field(strict=True, max_length=2048)]] = Field(default=None, description="Optional HTTP, HTTPS, Shortcuts, or installed app URL opened when the user taps the notification body. Custom schemes such as spotify:// and spotify:track:123 require an installed handler; no web fallback is provided. Internal and executable schemes are blocked. Overrides the default tap target from media.") 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`.") payload: Optional[Dict[str, Any]] = None badge: Optional[StrictInt] = None - sound: Optional[StrictStr] = None + sound: Optional[Annotated[str, Field(min_length=1, strict=True, max_length=50)]] = Field(default=None, description="Optional sound for this Push Notification. Omit it to play the Push Notifications sound picked on the device. Passive Push Notifications play no sound. Sounds bundled with the ActivitySmith app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, `zip`. Use `default` for the sound picked on the device, or `none` for no sound.") target: Optional[ChannelTarget] = None tags: Optional[List[Annotated[str, Field(min_length=1, strict=True, max_length=64)]]] = Field(default=None, description="Optional tags to organize and filter notification history.") additional_properties: Dict[str, Any] = {} diff --git a/activitysmith_openapi/models/stream_content_state.py b/activitysmith_openapi/models/stream_content_state.py index e1e903a..47302fb 100644 --- a/activitysmith_openapi/models/stream_content_state.py +++ b/activitysmith_openapi/models/stream_content_state.py @@ -17,6 +17,7 @@ import re # noqa: F401 import json +from datetime import datetime from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictFloat, StrictInt, StrictStr, field_validator from typing import Any, ClassVar, Dict, List, Optional, Union from typing_extensions import Annotated @@ -29,16 +30,18 @@ class StreamContentState(BaseModel): """ - Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, alert, timer, and value types. For timer, send duration_seconds to start or reset a bounded timer; omit duration_seconds on later updates to preserve the existing timer window. + Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, alert, timer, and value types. For timer, send duration_seconds or timer_end_at to start or reset a bounded timer, and timer_start_at for a timer that started earlier. Omit them on later updates to preserve the existing timer window. """ # noqa: E501 - title: StrictStr + title: StrictStr = Field(description="Title shown on the Live Activity. Send an empty string to show no title.") subtitle: Optional[StrictStr] = None number_of_steps: Optional[Annotated[int, Field(strict=True, ge=1)]] = Field(default=None, description="Use for segmented_progress.") current_step: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Use for segmented_progress. Set 0 when no segment is complete yet. Must be less than or equal to number_of_steps when number_of_steps is provided.") percentage: Optional[Union[Annotated[float, Field(le=100, strict=True, ge=0)], Annotated[int, Field(le=100, strict=True, ge=0)]]] = Field(default=None, description="Use for progress. Takes precedence over value/upper_limit if both are provided.") value: Optional[LiveActivityValue] = Field(default=None, description="For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For progress, a numeric progress value used with upper_limit.") upper_limit: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Maximum progress value. Use with value for progress.") - duration_seconds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Timer duration in seconds. For type=timer, send duration_seconds to start or reset the timer window; omit it on later stream updates to preserve the existing timer window.") + duration_seconds: Optional[Union[StrictFloat, StrictInt]] = Field(default=None, description="Timer duration in seconds. For type=timer, send duration_seconds to start or reset the timer window, counted from timer_start_at when you send it. Omit it on later stream updates to preserve the existing timer window.") + timer_start_at: Optional[datetime] = Field(default=None, description="Use with type=timer. ISO 8601 date and time when the timer started. It can be in the past, so a countdown that started earlier shows the time already gone in its progress bar. Defaults to the request time. Must not be in the future.") + timer_end_at: Optional[datetime] = Field(default=None, description="Use with type=timer. ISO 8601 date and time when the countdown ends. Must be after timer_start_at, or in the future when timer_start_at is omitted. Send duration_seconds or timer_end_at, not both. On later stream updates, send timer_end_at alone to move the end and keep the current start.") counts_down: Optional[StrictBool] = Field(default=True, description="Use with type=timer. When true or omitted, the timer counts down from duration_seconds. Set false for an elapsed timer; omit duration_seconds for an open-ended elapsed timer.") is_running: Optional[StrictBool] = Field(default=True, description="Use with type=timer. Defaults to true. Set false to pause/freeze via API; set true on a paused timer to resume.") type: Optional[StrictStr] = Field(default=None, description="Required on the first PUT or whenever the stream cannot infer the current activity type.") @@ -51,7 +54,7 @@ class StreamContentState(BaseModel): badge: Optional[LiveActivityAlertBadge] = Field(default=None, description="Optional badge. Supported by alert, progress, segmented_progress, and value.") auto_dismiss_seconds: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Optional. Seconds before the ended Live Activity is dismissed.") auto_dismiss_minutes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=None, description="Optional. Minutes before the ended Live Activity is dismissed.") - __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "percentage", "value", "upper_limit", "duration_seconds", "counts_down", "is_running", "type", "color", "step_color", "step_colors", "metrics", "message", "icon", "badge", "auto_dismiss_seconds", "auto_dismiss_minutes"] + __properties: ClassVar[List[str]] = ["title", "subtitle", "number_of_steps", "current_step", "percentage", "value", "upper_limit", "duration_seconds", "timer_start_at", "timer_end_at", "counts_down", "is_running", "type", "color", "step_color", "step_colors", "metrics", "message", "icon", "badge", "auto_dismiss_seconds", "auto_dismiss_minutes"] @field_validator('type') def type_validate_enum(cls, value): @@ -169,6 +172,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "value": LiveActivityValue.from_dict(obj["value"]) if obj.get("value") is not None else None, "upper_limit": obj.get("upper_limit"), "duration_seconds": obj.get("duration_seconds"), + "timer_start_at": obj.get("timer_start_at"), + "timer_end_at": obj.get("timer_end_at"), "counts_down": obj.get("counts_down") if obj.get("counts_down") is not None else True, "is_running": obj.get("is_running") if obj.get("is_running") is not None else True, "type": obj.get("type"), diff --git a/activitysmith_openapi/openapi-source.json b/activitysmith_openapi/openapi-source.json index 6150a4d..f64cc36 100644 --- a/activitysmith_openapi/openapi-source.json +++ b/activitysmith_openapi/openapi-source.json @@ -1,6 +1,6 @@ { "repository": "ActivitySmithHQ/activitysmith-backend", - "commit": "15ba559268fc8a9faa46ac73ed6c5fdc96f7e4f7", + "commit": "0e64cfe1c855105aff7c2719df28759ae2f2d1cf", "path": "openapi.json", - "sha256": "1964b1e64ee810e2dd4cadb41916e59b836720b8607ef60c298e3f990aeb9cb8" + "sha256": "72b820a2f8447c24f2f11a3a9b4bf89709e668f39037715498c07565cf075642" } diff --git a/activitysmith_openapi/test/test_content_state_start.py b/activitysmith_openapi/test/test_content_state_start.py index 4a1a68c..e7adf88 100644 --- a/activitysmith_openapi/test/test_content_state_start.py +++ b/activitysmith_openapi/test/test_content_state_start.py @@ -43,6 +43,8 @@ def make_instance(self, include_optional) -> ContentStateStart: value = None, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, metrics = [ diff --git a/activitysmith_openapi/test/test_content_state_update.py b/activitysmith_openapi/test/test_content_state_update.py index 11412f4..98125c1 100644 --- a/activitysmith_openapi/test/test_content_state_update.py +++ b/activitysmith_openapi/test/test_content_state_update.py @@ -43,6 +43,8 @@ def make_instance(self, include_optional) -> ContentStateUpdate: value = None, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, metrics = [ diff --git a/activitysmith_openapi/test/test_live_activity_end_request.py b/activitysmith_openapi/test/test_live_activity_end_request.py index 303c56c..fe83c20 100644 --- a/activitysmith_openapi/test/test_live_activity_end_request.py +++ b/activitysmith_openapi/test/test_live_activity_end_request.py @@ -78,7 +78,8 @@ def make_instance(self, include_optional) -> LiveActivityEndRequest: }, secondary_action = { 'key' : null - } + }, + sound = '0' ) else: return LiveActivityEndRequest( diff --git a/activitysmith_openapi/test/test_live_activity_start_request.py b/activitysmith_openapi/test/test_live_activity_start_request.py index 9e3b610..a8203a0 100644 --- a/activitysmith_openapi/test/test_live_activity_start_request.py +++ b/activitysmith_openapi/test/test_live_activity_start_request.py @@ -47,6 +47,8 @@ def make_instance(self, include_optional) -> LiveActivityStartRequest: value = null, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, metrics = [ @@ -83,7 +85,8 @@ def make_instance(self, include_optional) -> LiveActivityStartRequest: ], ), tags = [ 'gB:9JLe6iL71-aa-.Ctq:dcsc.3-8:1gAa8Xa6u61ArrlGpCQjkQVRmfnjddwcDM0' - ] + ], + sound = '0' ) else: return LiveActivityStartRequest( @@ -96,6 +99,8 @@ def make_instance(self, include_optional) -> LiveActivityStartRequest: value = null, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, metrics = [ diff --git a/activitysmith_openapi/test/test_live_activity_stream_delete_request.py b/activitysmith_openapi/test/test_live_activity_stream_delete_request.py index fc63177..bd6448f 100644 --- a/activitysmith_openapi/test/test_live_activity_stream_delete_request.py +++ b/activitysmith_openapi/test/test_live_activity_stream_delete_request.py @@ -50,6 +50,8 @@ def make_instance(self, include_optional) -> LiveActivityStreamDeleteRequest: value = null, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, type = 'segmented_progress', @@ -81,7 +83,8 @@ def make_instance(self, include_optional) -> LiveActivityStreamDeleteRequest: }, alert = activitysmith_openapi.models.alert_payload.AlertPayload( title = '', - body = '', ) + body = '', ), + sound = '0' ) else: return LiveActivityStreamDeleteRequest( diff --git a/activitysmith_openapi/test/test_live_activity_stream_request.py b/activitysmith_openapi/test/test_live_activity_stream_request.py index 85398f6..e430467 100644 --- a/activitysmith_openapi/test/test_live_activity_stream_request.py +++ b/activitysmith_openapi/test/test_live_activity_stream_request.py @@ -47,6 +47,8 @@ def make_instance(self, include_optional) -> LiveActivityStreamRequest: value = null, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, type = 'segmented_progress', @@ -88,7 +90,8 @@ def make_instance(self, include_optional) -> LiveActivityStreamRequest: ], ), tags = [ 'gB:9JLe6iL71-aa-.Ctq:dcsc.3-8:1gAa8Xa6u61ArrlGpCQjkQVRmfnjddwcDM0' - ] + ], + sound = '0' ) else: return LiveActivityStreamRequest( @@ -101,6 +104,8 @@ def make_instance(self, include_optional) -> LiveActivityStreamRequest: value = null, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, type = 'segmented_progress', diff --git a/activitysmith_openapi/test/test_live_activity_update_request.py b/activitysmith_openapi/test/test_live_activity_update_request.py index 88f37d6..3edbd81 100644 --- a/activitysmith_openapi/test/test_live_activity_update_request.py +++ b/activitysmith_openapi/test/test_live_activity_update_request.py @@ -51,6 +51,8 @@ def make_instance(self, include_optional) -> LiveActivityUpdateRequest: value = null, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, metrics = [ @@ -77,7 +79,8 @@ def make_instance(self, include_optional) -> LiveActivityUpdateRequest: }, secondary_action = { 'key' : null - } + }, + sound = '0' ) else: return LiveActivityUpdateRequest( @@ -91,6 +94,8 @@ def make_instance(self, include_optional) -> LiveActivityUpdateRequest: value = null, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, metrics = [ diff --git a/activitysmith_openapi/test/test_push_notification_request.py b/activitysmith_openapi/test/test_push_notification_request.py index 8ed2458..4bc1108 100644 --- a/activitysmith_openapi/test/test_push_notification_request.py +++ b/activitysmith_openapi/test/test_push_notification_request.py @@ -52,7 +52,7 @@ def make_instance(self, include_optional) -> PushNotificationRequest: ], payload = None, badge = 56, - sound = '', + sound = '0', target = activitysmith_openapi.models.channel_target.ChannelTarget( channels = [ '' diff --git a/activitysmith_openapi/test/test_stream_content_state.py b/activitysmith_openapi/test/test_stream_content_state.py index f36eb8b..f521f64 100644 --- a/activitysmith_openapi/test/test_stream_content_state.py +++ b/activitysmith_openapi/test/test_stream_content_state.py @@ -43,6 +43,8 @@ def make_instance(self, include_optional) -> StreamContentState: value = None, upper_limit = 1.337, duration_seconds = 1.337, + timer_start_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + timer_end_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), counts_down = True, is_running = True, type = 'segmented_progress', From 0aeda422d54b720a6225f093d1c3e514b7bb72b9 Mon Sep 17 00:00:00 2001 From: bardonadam Date: Wed, 18 Nov 2026 22:29:20 +0700 Subject: [PATCH 2/6] Accept sound on Push Notifications and Live Activities Co-Authored-By: Claude Opus 5.5 --- activitysmith/client.py | 16 ++++++++++++ tests/test_value_serialization.py | 43 +++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+) diff --git a/activitysmith/client.py b/activitysmith/client.py index 7983960..f975516 100644 --- a/activitysmith/client.py +++ b/activitysmith/client.py @@ -233,6 +233,7 @@ def _build_push_request( metadata: Any | None = None, icon: Any | None = None, interruption_level: Any | None = None, + sound: Any | None = None, ) -> Any: request_fields = _compact_dict( { @@ -248,6 +249,7 @@ def _build_push_request( "metadata": metadata, "icon": icon, "interruption_level": interruption_level, + "sound": sound, } ) @@ -318,6 +320,7 @@ def _build_live_activity_request( channels: Any | None = None, tags: Any | None = None, metadata: Any | None = None, + sound: Any | None = None, ) -> Any: content_state_fields = _compact_dict( { @@ -352,6 +355,7 @@ def _build_live_activity_request( "channels": channels, "tags": tags, "metadata": metadata, + "sound": sound, } ) @@ -413,6 +417,7 @@ def send( metadata: Any | None = None, icon: Any | None = None, interruption_level: Any | None = None, + sound: Any | None = None, ): request = _build_push_request( request, @@ -428,6 +433,7 @@ def send( metadata=metadata, icon=icon, interruption_level=interruption_level, + sound=sound, ) normalized = normalize_metadata_request(_validate_push_request(_normalize_channels_target(request))) return self._api.send_push_notification( @@ -559,6 +565,7 @@ def start( channels: Any | None = None, tags: Any | None = None, metadata: Any | None = None, + sound: Any | None = None, ): request = _build_live_activity_request( request, @@ -586,6 +593,7 @@ def start( channels=channels, tags=tags, metadata=metadata, + sound=sound, ) return self._api.start_live_activity( live_activity_start_request=_normalize_channels_target(request) @@ -617,6 +625,7 @@ def update( secondary_action: Any | None = None, tags: Any | None = None, metadata: Any | None = None, + sound: Any | None = None, ): request = _build_live_activity_request( request, @@ -642,6 +651,7 @@ def update( secondary_action=secondary_action, tags=tags, metadata=metadata, + sound=sound, ) return self._api.update_live_activity(live_activity_update_request=request) @@ -672,6 +682,7 @@ def end( secondary_action: Any | None = None, tags: Any | None = None, metadata: Any | None = None, + sound: Any | None = None, ): request = _build_live_activity_request( request, @@ -698,6 +709,7 @@ def end( secondary_action=secondary_action, tags=tags, metadata=metadata, + sound=sound, ) return self._api.end_live_activity(live_activity_end_request=request) @@ -730,6 +742,7 @@ def stream( channels: Any | None = None, tags: Any | None = None, metadata: Any | None = None, + sound: Any | None = None, ): request = _build_live_activity_request( request, @@ -757,6 +770,7 @@ def stream( channels=channels, tags=tags, metadata=metadata, + sound=sound, ) return self._api.reconcile_live_activity_stream( stream_key=stream_key, @@ -791,6 +805,7 @@ def end_stream( alert: Any | None = None, tags: list[str] | None = None, metadata: dict[str, Any] | None = None, + sound: str | None = None, ): request = _build_live_activity_request( request, @@ -817,6 +832,7 @@ def end_stream( alert=alert, tags=tags, metadata=metadata, + sound=sound, ) return self._api.end_live_activity_stream( stream_key=stream_key, diff --git a/tests/test_value_serialization.py b/tests/test_value_serialization.py index fc108fa..e891670 100644 --- a/tests/test_value_serialization.py +++ b/tests/test_value_serialization.py @@ -216,6 +216,49 @@ def test_push_rejects_unsupported_interruption_level(requests, level): assert requests == [] +@pytest.mark.parametrize("method", ["send", "start", "update", "end", "stream", "end_stream"]) +@pytest.mark.parametrize("sound", ["chime", "default", "none"]) +@pytest.mark.parametrize("form", ["dict", "named", "legacy"]) +def test_sound_serialization(requests, method, sound, form): + client = ActivitySmith(api_key="test") + fields = {"title": "Deploy"} if method == "send" else {"content_state": {"title": "Deploy", "type": "progress"}} + if method in ("update", "end"): + fields["activity_id"] = "activity-1" + fields["sound"] = sound + resource = client.notifications if method == "send" else client.live_activities + legacy = { + "send": "send_push_notification", + "start": "start_live_activity", + "update": "update_live_activity", + "end": "end_live_activity", + "stream": "reconcile_live_activity_stream", + "end_stream": "end_live_activity_stream", + } + args = ["deploy"] if method in ("stream", "end_stream") else [] + with pytest.raises(RequestCaptured): + if form == "named": + getattr(resource, method)(*args, **fields) + elif form == "legacy": + getattr(resource, legacy[method])(*args, **fields) + else: + getattr(resource, method)(*args, fields) + assert requests[-1]["sound"] == sound + assert "sound" not in requests[-1].get("content_state", {}) + + +@pytest.mark.parametrize("method", ["send", "start", "update", "end", "stream", "end_stream"]) +def test_sound_omitted_by_default(requests, method): + client = ActivitySmith(api_key="test") + fields = {"title": "Deploy"} if method == "send" else {"content_state": {"title": "Deploy", "type": "progress"}} + if method in ("update", "end"): + fields["activity_id"] = "activity-1" + resource = client.notifications if method == "send" else client.live_activities + args = ["deploy"] if method in ("stream", "end_stream") else [] + with pytest.raises(RequestCaptured): + getattr(resource, method)(*args, **fields) + assert "sound" not in requests[-1] + + def test_push_replace_serialization(requests): activitysmith = ActivitySmith(api_key="test") with pytest.raises(RequestCaptured): From b5501b6e33be7662a8eced07e7b16ae6a5c48aa7 Mon Sep 17 00:00:00 2001 From: bardonadam Date: Wed, 18 Nov 2026 22:34:12 +0700 Subject: [PATCH 3/6] Document Push Notification and Live Activity sounds in the README Co-Authored-By: Claude Opus 5.5 --- README.md | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b03b3c2..7b4694d 100644 --- a/README.md +++ b/README.md @@ -196,6 +196,26 @@ activitysmith.notifications.send( ) ``` +### Push Notification Sounds + +Use `sound` to choose the sound a Push Notification plays. Omit it to play the Push Notifications sound picked in the ActivitySmith app under Settings > Sounds. + +| Value | Behavior | +| --- | --- | +| `default` | Plays the sound picked on the device. This is the same as omitting `sound`. | +| `none` | Plays no sound. | +| A sound name | Plays one of the sounds bundled with the app: `arrive`, `bell`, `bells`, `bitflip`, `bloom`, `callout`, `chime`, `coin`, `corrupt`, `crest`, `cue`, `ding`, `drop`, `ember`, `emblem`, `flourish`, `glimmer`, `glint`, `glitch`, `lantern`, `nightfall`, `nudge`, `pixel`, `pop`, `signal`, `streak`, `tally`, `wand`, `whoosh`, or `zip`. | + +Passive Push Notifications play no sound. + +```python +activitysmith.notifications.send( + title="💸 New sale", + message="Pro plan, $29/month", + sound="coin", +) +``` + ### Replace a Push Notification Every send returns a `notification_id`. Pass it to `replace` to update a Push Notification you already sent, for example when an incident you alerted on is resolved. The replacement takes the old notification's place on the Lock Screen and in history instead of stacking a second one. It arrives silently, without sound or waking the screen, and goes to the same recipients as the original. @@ -606,6 +626,25 @@ activitysmith.live_activities.stream( ) ``` +### Live Activity Sounds + +Starting a Live Activity plays the Live Activities sound picked in the ActivitySmith app. Updates and ends are silent. Set `sound` on a start, update, or end to choose its sound, with the same values as [Push Notification Sounds](#push-notification-sounds). A sound on an update or end also expands the Live Activity on the Lock Screen, so use it for moments that need attention, such as a failed step. + +```python +activitysmith.live_activities.stream( + "deploy-api", + content_state=content_state( + title="Deploying API", + subtitle="Step 3 failed", + type="segmented_progress", + number_of_steps=4, + current_step=3, + color="red", + ), + sound="glitch", +) +``` + ## Lock Screen Widgets ![Lock screen widgets](https://cdn.activitysmith.com/features/lock-screen-widgets.png) @@ -697,7 +736,7 @@ Values can be strings, numbers, or booleans. Metadata supports up to 50 entries ## Tags -Use Tags to organize and filter Push Notification and Live Activity history. Tags are created automatically when you first use them. Sending Tags requires SDK version 1.10.0 or later. +Use Tags to organize and filter Push Notification and Live Activity history. Tags are created automatically when you first use them. ```python activitysmith.notifications.send( From e6e0ed3bbc48411e0488e1b847fcaf753811cf68 Mon Sep 17 00:00:00 2001 From: bardonadam Date: Thu, 19 Nov 2026 08:40:37 +0700 Subject: [PATCH 4/6] Add timer_start_at and timer_end_at keyword arguments for timer Live Activities Co-Authored-By: Claude Opus 5.5 --- activitysmith/client.py | 26 ++++++++++++++++++++++++++ tests/test_value_serialization.py | 29 +++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) diff --git a/activitysmith/client.py b/activitysmith/client.py index f975516..7f3f53c 100644 --- a/activitysmith/client.py +++ b/activitysmith/client.py @@ -1,7 +1,9 @@ from __future__ import annotations + from .normalization import normalize_metadata_request from dataclasses import dataclass +from datetime import datetime from typing import Any from activitysmith_openapi.configuration import Configuration @@ -188,6 +190,8 @@ def content_state( upper_limit: int | float | None = None, duration_seconds: int | float | None = None, counts_down: bool | None = None, + timer_start_at: str | datetime | None = None, + timer_end_at: str | datetime | None = None, color: str | None = None, step_color: str | None = None, auto_dismiss_seconds: int | None = None, @@ -209,6 +213,8 @@ def content_state( "upper_limit": upper_limit, "duration_seconds": duration_seconds, "counts_down": counts_down, + "timer_start_at": timer_start_at, + "timer_end_at": timer_end_at, "color": color, "step_color": step_color, "auto_dismiss_seconds": auto_dismiss_seconds, @@ -309,6 +315,8 @@ def _build_live_activity_request( upper_limit: Any | None = None, duration_seconds: Any | None = None, counts_down: Any | None = None, + timer_start_at: Any | None = None, + timer_end_at: Any | None = None, color: Any | None = None, step_color: Any | None = None, auto_dismiss_seconds: Any | None = None, @@ -338,6 +346,8 @@ def _build_live_activity_request( "upper_limit": upper_limit, "duration_seconds": duration_seconds, "counts_down": counts_down, + "timer_start_at": timer_start_at, + "timer_end_at": timer_end_at, "color": color, "step_color": step_color, "auto_dismiss_seconds": auto_dismiss_seconds, @@ -556,6 +566,8 @@ def start( upper_limit: Any | None = None, duration_seconds: Any | None = None, counts_down: Any | None = None, + timer_start_at: Any | None = None, + timer_end_at: Any | None = None, color: Any | None = None, step_color: Any | None = None, action: Any | None = None, @@ -584,6 +596,8 @@ def start( upper_limit=upper_limit, duration_seconds=duration_seconds, counts_down=counts_down, + timer_start_at=timer_start_at, + timer_end_at=timer_end_at, color=color, step_color=step_color, action=action, @@ -619,6 +633,8 @@ def update( upper_limit: Any | None = None, duration_seconds: Any | None = None, counts_down: Any | None = None, + timer_start_at: Any | None = None, + timer_end_at: Any | None = None, color: Any | None = None, step_color: Any | None = None, action: Any | None = None, @@ -645,6 +661,8 @@ def update( upper_limit=upper_limit, duration_seconds=duration_seconds, counts_down=counts_down, + timer_start_at=timer_start_at, + timer_end_at=timer_end_at, color=color, step_color=step_color, action=action, @@ -733,6 +751,8 @@ def stream( upper_limit: Any | None = None, duration_seconds: Any | None = None, counts_down: Any | None = None, + timer_start_at: Any | None = None, + timer_end_at: Any | None = None, color: Any | None = None, step_color: Any | None = None, action: Any | None = None, @@ -761,6 +781,8 @@ def stream( upper_limit=upper_limit, duration_seconds=duration_seconds, counts_down=counts_down, + timer_start_at=timer_start_at, + timer_end_at=timer_end_at, color=color, step_color=step_color, action=action, @@ -797,6 +819,8 @@ def end_stream( upper_limit: Any | None = None, duration_seconds: Any | None = None, counts_down: Any | None = None, + timer_start_at: Any | None = None, + timer_end_at: Any | None = None, color: Any | None = None, step_color: Any | None = None, auto_dismiss_minutes: Any | None = None, @@ -824,6 +848,8 @@ def end_stream( upper_limit=upper_limit, duration_seconds=duration_seconds, counts_down=counts_down, + timer_start_at=timer_start_at, + timer_end_at=timer_end_at, color=color, step_color=step_color, auto_dismiss_minutes=auto_dismiss_minutes, diff --git a/tests/test_value_serialization.py b/tests/test_value_serialization.py index e891670..8a62485 100644 --- a/tests/test_value_serialization.py +++ b/tests/test_value_serialization.py @@ -493,3 +493,32 @@ def test_release_doc_examples_run_as_written(transport, capsys): assert transport[4]["body"] == {"label": "MRR", "format": "currency", "currency_code": "USD"} assert transport[5]["body"] == {"value": 12450} assert capsys.readouterr().out == "Work iPhone iOS True\n" + + +@pytest.mark.parametrize("method", ["start", "update", "stream", "end_stream"]) +@pytest.mark.parametrize("form", ["dict", "named", "helper"]) +@pytest.mark.parametrize("kind", ["string", "datetime"]) +def test_timer_window_serialization(requests, method, form, kind): + from datetime import datetime, timezone + + start = "2026-11-19T01:00:00Z" if kind == "string" else datetime(2026, 11, 19, 1, 0, tzinfo=timezone.utc) + end = "2026-11-19T02:00:00Z" if kind == "string" else datetime(2026, 11, 19, 2, 0, tzinfo=timezone.utc) + client = ActivitySmith(api_key="test") + state = {"title": "Nightly backup", "type": "timer", "timer_start_at": start, "timer_end_at": end} + if form == "helper": + state = content_state("Nightly backup", type="timer", timer_start_at=start, timer_end_at=end) + args = ["backup"] if method in ("stream", "end_stream") else [] + with pytest.raises(RequestCaptured): + if form == "named": + kwargs = dict(state) + if method == "update": + kwargs["activity_id"] = "activity-1" + getattr(client.live_activities, method)(*args, **kwargs) + else: + request = {"content_state": state} + if method == "update": + request["activity_id"] = "activity-1" + getattr(client.live_activities, method)(*args, request) + sent = requests[-1]["content_state"] + assert datetime.fromisoformat(sent["timer_start_at"].replace("Z", "+00:00")) == datetime(2026, 11, 19, 1, 0, tzinfo=timezone.utc) + assert datetime.fromisoformat(sent["timer_end_at"].replace("Z", "+00:00")) == datetime(2026, 11, 19, 2, 0, tzinfo=timezone.utc) From fcf111f44840ca1486f812564e509c7d4bbd9e5b Mon Sep 17 00:00:00 2001 From: bardonadam Date: Thu, 19 Nov 2026 08:42:30 +0700 Subject: [PATCH 5/6] Document timer start and end times in the README Co-Authored-By: Claude Opus 5.5 --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 7b4694d..49b206b 100644 --- a/README.md +++ b/README.md @@ -424,6 +424,21 @@ For a countdown, send `duration_seconds`. You can update `title`, `subtitle`, `c To start at 00:00 and count up, set `counts_down=False` and leave out `duration_seconds`. +To count down to a set time, send `timer_end_at` instead of `duration_seconds`. If the timer started earlier, also send `timer_start_at`. The progress bar then shows the time already gone. + +```python +activitysmith.live_activities.stream( + "nightly-backup", + content_state=content_state( + title="Nightly Backup", + subtitle="uploading archive", + type="timer", + timer_start_at="2026-11-19T01:00:00Z", + timer_end_at="2026-11-19T02:00:00Z", + ), +) +``` + ### End Live Activity Call `end_stream(...)` with the same `stream_key` to dismiss the Live Activity. You can include final values before it is removed. Set `auto_dismiss_seconds` to dismiss it after a delay in seconds, or `auto_dismiss_minutes` for minutes. Use `0` for immediate dismissal. Seconds take precedence if both are set. From 902c0a0e332d690d707c7c2d19b72a97fdd3e589 Mon Sep 17 00:00:00 2001 From: bardonadam Date: Thu, 19 Nov 2026 08:47:09 +0700 Subject: [PATCH 6/6] Release 1.16.0: sounds for Push Notifications and Live Activities Co-Authored-By: Claude Opus 5.5 --- CHANGELOG.md | 4 ++++ activitysmith/client.py | 2 +- pyproject.toml | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2ed8882..b59aa68 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.16.0 + +Adds sounds for Push Notifications and Live Activities. Set `sound` to one of the 30 sounds bundled with the ActivitySmith app, such as `coin` or `glitch`, to `default` for the sound picked in the app, or to `none` for no sound. + ## 1.15.0 Adds Push Notification dismissal. Pass a `notification_id` to `notifications.dismiss` to clear a Push Notification you already sent from the Lock Screen and Notification Center. History keeps it. Also adds `metrics.create` to create a Lock Screen Widget metric and set its label and format, such as currency or percent, and `devices.list` to list the iPhones and iPads paired to your account. diff --git a/activitysmith/client.py b/activitysmith/client.py index 7f3f53c..b2bcfca 100644 --- a/activitysmith/client.py +++ b/activitysmith/client.py @@ -19,7 +19,7 @@ from .normalization import normalize_live_activity_request, normalize_metric_request -SDK_VERSION = "1.15.0" +SDK_VERSION = "1.16.0" SDK_HEADER_NAME = "X-ActivitySmith-SDK" SDK_HEADER_VALUE = f"python-v{SDK_VERSION}" diff --git a/pyproject.toml b/pyproject.toml index a5799fc..012e38d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "activitysmith" -version = "1.15.0" +version = "1.16.0" description = "Official ActivitySmith Python SDK" readme = "README.md" requires-python = ">=3.9"