From 6b9d1004fcff1869a1d790b6aca6ef31866a19a0 Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Thu, 19 Nov 2026 01:06:32 +0000 Subject: [PATCH] chore: regenerate SDK --- activitysmith_openapi/api/live_activities_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/PushNotificationRequest.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_request.py | 2 +- .../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 ++ 30 files changed, 104 insertions(+), 43 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/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..0d24b8f 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStartRequest.md b/activitysmith_openapi/docs/LiveActivityStartRequest.md index a7261b8..d4112a5 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md b/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md index f38468f..12ae950 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStreamRequest.md b/activitysmith_openapi/docs/LiveActivityStreamRequest.md index 08c5287..e8601ac 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityUpdateRequest.md b/activitysmith_openapi/docs/LiveActivityUpdateRequest.md index da9cb5a..4d02d03 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead. | [optional] ## Example diff --git a/activitysmith_openapi/docs/PushNotificationRequest.md b/activitysmith_openapi/docs/PushNotificationRequest.md index eccf650..d0ddc37 100644 --- a/activitysmith_openapi/docs/PushNotificationRequest.md +++ b/activitysmith_openapi/docs/PushNotificationRequest.md @@ -16,7 +16,7 @@ Name | Type | Description | Notes **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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead. | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] **tags** | **List[str]** | Optional tags to organize and filter notification history. | [optional] 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..fc165ee 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead.") + __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..3984fd6 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead.") + __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..0b13fe8 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead.") + __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..88271de 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead.") + __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..3dd24e2 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead.") + __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_request.py b/activitysmith_openapi/models/push_notification_request.py index f71c50c..3794fe0 100644 --- a/activitysmith_openapi/models/push_notification_request.py +++ b/activitysmith_openapi/models/push_notification_request.py @@ -42,7 +42,7 @@ class PushNotificationRequest(BaseModel): 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. Bundled sounds and `none` need iOS app 1.19.0 or later. Older apps play the iOS default sound instead.") 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..8a54615 100644 --- a/activitysmith_openapi/openapi-source.json +++ b/activitysmith_openapi/openapi-source.json @@ -1,6 +1,6 @@ { "repository": "ActivitySmithHQ/activitysmith-backend", - "commit": "15ba559268fc8a9faa46ac73ed6c5fdc96f7e4f7", + "commit": "ce53ca26261b8ccdd68b8a75ef38310359a1517a", "path": "openapi.json", - "sha256": "1964b1e64ee810e2dd4cadb41916e59b836720b8607ef60c298e3f990aeb9cb8" + "sha256": "a442bc4915f79bd6c34e75a85a6f0fbeba46d8115caec2821147adc71017eac6" } 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',