From 966a7b743a2e095ebdaab8e2d5e683a969a44698 Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Mon, 15 Jun 2026 07:11:13 +0000 Subject: [PATCH 1/4] chore: regenerate SDK --- activitysmith_openapi/__init__.py | 2 +- .../api/live_activities_api.py | 30 +++++++++---------- activitysmith_openapi/api_client.py | 2 +- activitysmith_openapi/configuration.py | 2 +- activitysmith_openapi/docs/ContentStateEnd.md | 2 +- .../docs/ContentStateStart.md | 2 +- .../docs/ContentStateUpdate.md | 2 +- .../docs/LiveActivitiesApi.md | 10 +++---- .../docs/LiveActivityAction.md | 2 +- .../docs/LiveActivityEndRequest.md | 1 + .../docs/LiveActivityStartRequest.md | 1 + .../docs/LiveActivityStreamDeleteRequest.md | 1 + .../docs/LiveActivityStreamRequest.md | 1 + .../docs/LiveActivityUpdateRequest.md | 1 + .../docs/StreamContentState.md | 2 +- .../models/content_state_end.py | 2 +- .../models/content_state_start.py | 2 +- .../models/content_state_update.py | 2 +- .../models/live_activity_action.py | 2 +- .../models/live_activity_end_request.py | 11 +++++-- .../models/live_activity_start_request.py | 9 ++++-- .../live_activity_stream_delete_request.py | 9 ++++-- .../models/live_activity_stream_request.py | 7 ++++- .../models/live_activity_update_request.py | 11 +++++-- .../models/stream_content_state.py | 2 +- .../test/test_live_activity_end_request.py | 3 +- .../test/test_live_activity_start_request.py | 1 + ...est_live_activity_stream_delete_request.py | 1 + .../test/test_live_activity_stream_request.py | 1 + .../test/test_live_activity_update_request.py | 3 +- 30 files changed, 81 insertions(+), 46 deletions(-) diff --git a/activitysmith_openapi/__init__.py b/activitysmith_openapi/__init__.py index 7731b36..c255012 100644 --- a/activitysmith_openapi/__init__.py +++ b/activitysmith_openapi/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.6.0" +__version__ = "1.7.0" # import apis into sdk package from activitysmith_openapi.api.live_activities_api import LiveActivitiesApi diff --git a/activitysmith_openapi/api/live_activities_api.py b/activitysmith_openapi/api/live_activities_api.py index 001d0ac..67f5f69 100644 --- a/activitysmith_openapi/api/live_activities_api.py +++ b/activitysmith_openapi/api/live_activities_api.py @@ -67,7 +67,7 @@ def end_live_activity( ) -> LiveActivityEndResponse: """End a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. + Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_end_request: (required) :type live_activity_end_request: LiveActivityEndRequest @@ -136,7 +136,7 @@ def end_live_activity_with_http_info( ) -> ApiResponse[LiveActivityEndResponse]: """End a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. + Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_end_request: (required) :type live_activity_end_request: LiveActivityEndRequest @@ -205,7 +205,7 @@ def end_live_activity_without_preload_content( ) -> RESTResponseType: """End a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. + Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_end_request: (required) :type live_activity_end_request: LiveActivityEndRequest @@ -346,7 +346,7 @@ def end_live_activity_stream( ) -> LiveActivityStreamDeleteResponse: """End a stream - Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. + Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -420,7 +420,7 @@ def end_live_activity_stream_with_http_info( ) -> ApiResponse[LiveActivityStreamDeleteResponse]: """End a stream - Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. + Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -494,7 +494,7 @@ def end_live_activity_stream_without_preload_content( ) -> RESTResponseType: """End a stream - Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. + Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -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 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, and segmented_progress Live Activities only. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -717,7 +717,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 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, and segmented_progress Live Activities only. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -792,7 +792,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 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, and segmented_progress Live Activities only. :param stream_key: Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens. (required) :type stream_key: str @@ -940,7 +940,7 @@ def start_live_activity( ) -> LiveActivityStartResponse: """Start a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -1011,7 +1011,7 @@ def start_live_activity_with_http_info( ) -> ApiResponse[LiveActivityStartResponse]: """Start a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -1082,7 +1082,7 @@ def start_live_activity_without_preload_content( ) -> RESTResponseType: """Start a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_start_request: (required) :type live_activity_start_request: LiveActivityStartRequest @@ -1224,7 +1224,7 @@ def update_live_activity( ) -> LiveActivityUpdateResponse: """Update a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_update_request: (required) :type live_activity_update_request: LiveActivityUpdateRequest @@ -1293,7 +1293,7 @@ def update_live_activity_with_http_info( ) -> ApiResponse[LiveActivityUpdateResponse]: """Update a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_update_request: (required) :type live_activity_update_request: LiveActivityUpdateRequest @@ -1362,7 +1362,7 @@ def update_live_activity_without_preload_content( ) -> RESTResponseType: """Update a Live Activity (legacy manual lifecycle) - Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. + Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. :param live_activity_update_request: (required) :type live_activity_update_request: LiveActivityUpdateRequest diff --git a/activitysmith_openapi/api_client.py b/activitysmith_openapi/api_client.py index aa84c86..9f66196 100644 --- a/activitysmith_openapi/api_client.py +++ b/activitysmith_openapi/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.6.0/python' + self.user_agent = 'OpenAPI-Generator/1.7.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/activitysmith_openapi/configuration.py b/activitysmith_openapi/configuration.py index 81c6bf8..62dded5 100644 --- a/activitysmith_openapi/configuration.py +++ b/activitysmith_openapi/configuration.py @@ -393,7 +393,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.6.0".\ + "SDK Package Version: 1.7.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/activitysmith_openapi/docs/ContentStateEnd.md b/activitysmith_openapi/docs/ContentStateEnd.md index 5fbc8bf..fb9b546 100644 --- a/activitysmith_openapi/docs/ContentStateEnd.md +++ b/activitysmith_openapi/docs/ContentStateEnd.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes **icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer. | [optional] **badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge. Supported by alert, progress, and segmented_progress. | [optional] **type** | **str** | Optional. When omitted, the API uses the existing Live Activity type. | [optional] -**color** | **str** | Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] +**color** | **str** | Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included. | [optional] **step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] **step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] **auto_dismiss_minutes** | **int** | Optional. Minutes before the ended Live Activity is dismissed. Default 3. Set 0 for immediate dismissal. iOS will dismiss ended Live Activities after ~4 hours max. | [optional] [default to 3] diff --git a/activitysmith_openapi/docs/ContentStateStart.md b/activitysmith_openapi/docs/ContentStateStart.md index cb504f7..ea89f62 100644 --- a/activitysmith_openapi/docs/ContentStateStart.md +++ b/activitysmith_openapi/docs/ContentStateStart.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes **icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer. | [optional] **badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge. Supported by alert, progress, and segmented_progress. | [optional] **type** | **str** | | -**color** | **str** | Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] +**color** | **str** | Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included. | [optional] **step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] **step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] diff --git a/activitysmith_openapi/docs/ContentStateUpdate.md b/activitysmith_openapi/docs/ContentStateUpdate.md index 4717477..3f872cc 100644 --- a/activitysmith_openapi/docs/ContentStateUpdate.md +++ b/activitysmith_openapi/docs/ContentStateUpdate.md @@ -21,7 +21,7 @@ Name | Type | Description | Notes **icon** | [**LiveActivityAlertIcon**](LiveActivityAlertIcon.md) | Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer. | [optional] **badge** | [**LiveActivityAlertBadge**](LiveActivityAlertBadge.md) | Optional badge. Supported by alert, progress, and segmented_progress. | [optional] **type** | **str** | Optional. When omitted, the API uses the existing Live Activity type. | [optional] -**color** | **str** | Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] +**color** | **str** | Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included. | [optional] **step_color** | **str** | Optional. Overrides color for the current step. Only applies to type=segmented_progress. | [optional] **step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] diff --git a/activitysmith_openapi/docs/LiveActivitiesApi.md b/activitysmith_openapi/docs/LiveActivitiesApi.md index b28ca3e..67151d2 100644 --- a/activitysmith_openapi/docs/LiveActivitiesApi.md +++ b/activitysmith_openapi/docs/LiveActivitiesApi.md @@ -16,7 +16,7 @@ Method | HTTP request | Description End a Live Activity (legacy manual lifecycle) -Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. +Legacy manual lifecycle endpoint. For new integrations, use DELETE /live-activity/stream/{stream_key} to end a managed Live Activity stream. This endpoint remains supported for existing integrations and advanced lifecycle control. Ends a Live Activity and archives its lifecycle. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. ### Example @@ -97,7 +97,7 @@ Name | Type | Description | Notes End a stream -Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. +Use this endpoint when the process you are tracking is finished and you no longer want the Live Activity on your devices. ActivitySmith ends the current Live Activity for this stream and dismisses it from devices. If you need direct lifecycle control, use /live-activity/start, /live-activity/update, and /live-activity/end instead. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. ### Example @@ -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 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, and segmented_progress Live Activities only. ### Example @@ -266,7 +266,7 @@ Name | Type | Description | Notes Start a Live Activity (legacy manual lifecycle) -Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. +Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Starts a Live Activity on devices matched by API key scope and optional target channels. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. ### Example @@ -349,7 +349,7 @@ Name | Type | Description | Notes Update a Live Activity (legacy manual lifecycle) -Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. +Legacy manual lifecycle endpoint. For new integrations, use PUT /live-activity/stream/{stream_key} so ActivitySmith can manage start, update, rotation, and end state for you. This endpoint remains supported for existing integrations and advanced lifecycle control. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, alert, and timer activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes. For timer activities, send duration_seconds only when you want to reset the timer window; omit it to keep the current timer running. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities only. ### Example diff --git a/activitysmith_openapi/docs/LiveActivityAction.md b/activitysmith_openapi/docs/LiveActivityAction.md index 642d317..8a1b79d 100644 --- a/activitysmith_openapi/docs/LiveActivityAction.md +++ b/activitysmith_openapi/docs/LiveActivityAction.md @@ -1,6 +1,6 @@ # LiveActivityAction -Optional single action button shown in the Live Activity UI. +Optional action button shown in the Live Activity UI. Use action for the primary button, or secondary_action for a secondary button on alert, progress, and segmented_progress Live Activities. ## Properties diff --git a/activitysmith_openapi/docs/LiveActivityEndRequest.md b/activitysmith_openapi/docs/LiveActivityEndRequest.md index 4156d96..9937ce0 100644 --- a/activitysmith_openapi/docs/LiveActivityEndRequest.md +++ b/activitysmith_openapi/docs/LiveActivityEndRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **activity_id** | **str** | | **content_state** | [**ContentStateEnd**](ContentStateEnd.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStartRequest.md b/activitysmith_openapi/docs/LiveActivityStartRequest.md index 33649e7..4bbd90f 100644 --- a/activitysmith_openapi/docs/LiveActivityStartRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStartRequest.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content_state** | [**ContentStateStart**](ContentStateStart.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] **alert** | [**AlertPayload**](AlertPayload.md) | | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] diff --git a/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md b/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md index 39d4b50..a8cd448 100644 --- a/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStreamDeleteRequest.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content_state** | [**StreamContentState**](StreamContentState.md) | | [optional] **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] **alert** | [**AlertPayload**](AlertPayload.md) | | [optional] ## Example diff --git a/activitysmith_openapi/docs/LiveActivityStreamRequest.md b/activitysmith_openapi/docs/LiveActivityStreamRequest.md index d006260..6c42322 100644 --- a/activitysmith_openapi/docs/LiveActivityStreamRequest.md +++ b/activitysmith_openapi/docs/LiveActivityStreamRequest.md @@ -8,6 +8,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **content_state** | [**StreamContentState**](StreamContentState.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] **alert** | [**AlertPayload**](AlertPayload.md) | | [optional] **channels** | **List[str]** | Channel slugs. When omitted, API key scope determines recipients. | [optional] **target** | [**ChannelTarget**](ChannelTarget.md) | | [optional] diff --git a/activitysmith_openapi/docs/LiveActivityUpdateRequest.md b/activitysmith_openapi/docs/LiveActivityUpdateRequest.md index d5aca4f..fb69118 100644 --- a/activitysmith_openapi/docs/LiveActivityUpdateRequest.md +++ b/activitysmith_openapi/docs/LiveActivityUpdateRequest.md @@ -9,6 +9,7 @@ Name | Type | Description | Notes **activity_id** | **str** | | **content_state** | [**ContentStateUpdate**](ContentStateUpdate.md) | | **action** | [**LiveActivityAction**](LiveActivityAction.md) | | [optional] +**secondary_action** | [**LiveActivityAction**](LiveActivityAction.md) | Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. | [optional] ## Example diff --git a/activitysmith_openapi/docs/StreamContentState.md b/activitysmith_openapi/docs/StreamContentState.md index 3d50ea1..85ff664 100644 --- a/activitysmith_openapi/docs/StreamContentState.md +++ b/activitysmith_openapi/docs/StreamContentState.md @@ -17,7 +17,7 @@ Name | Type | Description | Notes **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] -**color** | **str** | Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints the action button when action is included. | [optional] +**color** | **str** | Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included. | [optional] **step_color** | **str** | Optional. Overrides color for the current step. Only applies to segmented_progress. | [optional] **step_colors** | **List[str]** | Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step. | [optional] **metrics** | [**List[ActivityMetric]**](ActivityMetric.md) | Use for metrics and stats activities. | [optional] diff --git a/activitysmith_openapi/models/content_state_end.py b/activitysmith_openapi/models/content_state_end.py index f5b41bd..04bbf22 100644 --- a/activitysmith_openapi/models/content_state_end.py +++ b/activitysmith_openapi/models/content_state_end.py @@ -45,7 +45,7 @@ class ContentStateEnd(BaseModel): icon: Optional[LiveActivityAlertIcon] = Field(default=None, description="Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.") badge: Optional[LiveActivityAlertBadge] = Field(default=None, description="Optional badge. Supported by alert, progress, and segmented_progress.") type: Optional[StrictStr] = Field(default=None, description="Optional. When omitted, the API uses the existing Live Activity type.") - color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints the action button when action is included.") + color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, and timer 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.") auto_dismiss_minutes: Optional[Annotated[int, Field(strict=True, ge=0)]] = Field(default=3, description="Optional. Minutes before the ended Live Activity is dismissed. Default 3. Set 0 for immediate dismissal. iOS will dismiss ended Live Activities after ~4 hours max.") diff --git a/activitysmith_openapi/models/content_state_start.py b/activitysmith_openapi/models/content_state_start.py index 2c63b66..5ec78de 100644 --- a/activitysmith_openapi/models/content_state_start.py +++ b/activitysmith_openapi/models/content_state_start.py @@ -45,7 +45,7 @@ class ContentStateStart(BaseModel): icon: Optional[LiveActivityAlertIcon] = Field(default=None, description="Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.") badge: Optional[LiveActivityAlertBadge] = Field(default=None, description="Optional badge. Supported by alert, progress, and segmented_progress.") type: StrictStr - color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints the action button when action is included.") + color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, and timer 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.") additional_properties: Dict[str, Any] = {} diff --git a/activitysmith_openapi/models/content_state_update.py b/activitysmith_openapi/models/content_state_update.py index bfad292..ae29563 100644 --- a/activitysmith_openapi/models/content_state_update.py +++ b/activitysmith_openapi/models/content_state_update.py @@ -45,7 +45,7 @@ class ContentStateUpdate(BaseModel): icon: Optional[LiveActivityAlertIcon] = Field(default=None, description="Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.") badge: Optional[LiveActivityAlertBadge] = Field(default=None, description="Optional badge. Supported by alert, progress, and segmented_progress.") type: Optional[StrictStr] = Field(default=None, description="Optional. When omitted, the API uses the existing Live Activity type.") - color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints the action button when action is included.") + color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, and timer 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.") additional_properties: Dict[str, Any] = {} diff --git a/activitysmith_openapi/models/live_activity_action.py b/activitysmith_openapi/models/live_activity_action.py index 011ff37..5e9dbae 100644 --- a/activitysmith_openapi/models/live_activity_action.py +++ b/activitysmith_openapi/models/live_activity_action.py @@ -26,7 +26,7 @@ class LiveActivityAction(BaseModel): """ - Optional single action button shown in the Live Activity UI. + Optional action button shown in the Live Activity UI. Use action for the primary button, or secondary_action for a secondary button on alert, progress, and segmented_progress Live Activities. """ # noqa: E501 title: StrictStr = Field(description="Button title displayed in the Live Activity UI.") type: LiveActivityActionType diff --git a/activitysmith_openapi/models/live_activity_end_request.py b/activitysmith_openapi/models/live_activity_end_request.py index 768f299..edffff1 100644 --- a/activitysmith_openapi/models/live_activity_end_request.py +++ b/activitysmith_openapi/models/live_activity_end_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from activitysmith_openapi.models.content_state_end import ContentStateEnd from activitysmith_openapi.models.live_activity_action import LiveActivityAction @@ -31,8 +31,9 @@ class LiveActivityEndRequest(BaseModel): activity_id: StrictStr content_state: ContentStateEnd action: Optional[LiveActivityAction] = None + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["activity_id", "content_state", "action"] + __properties: ClassVar[List[str]] = ["activity_id", "content_state", "action", "secondary_action"] model_config = ConfigDict( populate_by_name=True, @@ -81,6 +82,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of action if self.action: _dict['action'] = self.action.to_dict() + # override the default output from pydantic by calling `to_dict()` of secondary_action + if self.secondary_action: + _dict['secondary_action'] = self.secondary_action.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -100,7 +104,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "activity_id": obj.get("activity_id"), "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 + "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 }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/activitysmith_openapi/models/live_activity_start_request.py b/activitysmith_openapi/models/live_activity_start_request.py index c14d322..6d35a48 100644 --- a/activitysmith_openapi/models/live_activity_start_request.py +++ b/activitysmith_openapi/models/live_activity_start_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from activitysmith_openapi.models.alert_payload import AlertPayload from activitysmith_openapi.models.channel_target import ChannelTarget @@ -32,10 +32,11 @@ class LiveActivityStartRequest(BaseModel): """ # noqa: E501 content_state: ContentStateStart action: Optional[LiveActivityAction] = None + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") alert: Optional[AlertPayload] = None target: Optional[ChannelTarget] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["content_state", "action", "alert", "target"] + __properties: ClassVar[List[str]] = ["content_state", "action", "secondary_action", "alert", "target"] model_config = ConfigDict( populate_by_name=True, @@ -84,6 +85,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of action if self.action: _dict['action'] = self.action.to_dict() + # override the default output from pydantic by calling `to_dict()` of secondary_action + if self.secondary_action: + _dict['secondary_action'] = self.secondary_action.to_dict() # override the default output from pydantic by calling `to_dict()` of alert if self.alert: _dict['alert'] = self.alert.to_dict() @@ -109,6 +113,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "content_state": ContentStateStart.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, "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None }) diff --git a/activitysmith_openapi/models/live_activity_stream_delete_request.py b/activitysmith_openapi/models/live_activity_stream_delete_request.py index 065b03b..46b39c5 100644 --- a/activitysmith_openapi/models/live_activity_stream_delete_request.py +++ b/activitysmith_openapi/models/live_activity_stream_delete_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List, Optional from activitysmith_openapi.models.alert_payload import AlertPayload from activitysmith_openapi.models.live_activity_action import LiveActivityAction @@ -31,9 +31,10 @@ class LiveActivityStreamDeleteRequest(BaseModel): """ # noqa: E501 content_state: Optional[StreamContentState] = None action: Optional[LiveActivityAction] = None + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") alert: Optional[AlertPayload] = None additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["content_state", "action", "alert"] + __properties: ClassVar[List[str]] = ["content_state", "action", "secondary_action", "alert"] model_config = ConfigDict( populate_by_name=True, @@ -82,6 +83,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of action if self.action: _dict['action'] = self.action.to_dict() + # override the default output from pydantic by calling `to_dict()` of secondary_action + if self.secondary_action: + _dict['secondary_action'] = self.secondary_action.to_dict() # override the default output from pydantic by calling `to_dict()` of alert if self.alert: _dict['alert'] = self.alert.to_dict() @@ -104,6 +108,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "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 }) # store additional fields in additional_properties diff --git a/activitysmith_openapi/models/live_activity_stream_request.py b/activitysmith_openapi/models/live_activity_stream_request.py index 033707d..1cba75e 100644 --- a/activitysmith_openapi/models/live_activity_stream_request.py +++ b/activitysmith_openapi/models/live_activity_stream_request.py @@ -33,11 +33,12 @@ class LiveActivityStreamRequest(BaseModel): """ # noqa: E501 content_state: StreamContentState action: Optional[LiveActivityAction] = None + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") alert: Optional[AlertPayload] = None 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 additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["content_state", "action", "alert", "channels", "target"] + __properties: ClassVar[List[str]] = ["content_state", "action", "secondary_action", "alert", "channels", "target"] model_config = ConfigDict( populate_by_name=True, @@ -86,6 +87,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of action if self.action: _dict['action'] = self.action.to_dict() + # override the default output from pydantic by calling `to_dict()` of secondary_action + if self.secondary_action: + _dict['secondary_action'] = self.secondary_action.to_dict() # override the default output from pydantic by calling `to_dict()` of alert if self.alert: _dict['alert'] = self.alert.to_dict() @@ -111,6 +115,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "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, "channels": obj.get("channels"), "target": ChannelTarget.from_dict(obj["target"]) if obj.get("target") is not None else None diff --git a/activitysmith_openapi/models/live_activity_update_request.py b/activitysmith_openapi/models/live_activity_update_request.py index 5979c70..165e66d 100644 --- a/activitysmith_openapi/models/live_activity_update_request.py +++ b/activitysmith_openapi/models/live_activity_update_request.py @@ -17,7 +17,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictStr from typing import Any, ClassVar, Dict, List, Optional from activitysmith_openapi.models.content_state_update import ContentStateUpdate from activitysmith_openapi.models.live_activity_action import LiveActivityAction @@ -31,8 +31,9 @@ class LiveActivityUpdateRequest(BaseModel): activity_id: StrictStr content_state: ContentStateUpdate action: Optional[LiveActivityAction] = None + secondary_action: Optional[LiveActivityAction] = Field(default=None, description="Optional secondary action button. Supported only for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.") additional_properties: Dict[str, Any] = {} - __properties: ClassVar[List[str]] = ["activity_id", "content_state", "action"] + __properties: ClassVar[List[str]] = ["activity_id", "content_state", "action", "secondary_action"] model_config = ConfigDict( populate_by_name=True, @@ -81,6 +82,9 @@ def to_dict(self) -> Dict[str, Any]: # override the default output from pydantic by calling `to_dict()` of action if self.action: _dict['action'] = self.action.to_dict() + # override the default output from pydantic by calling `to_dict()` of secondary_action + if self.secondary_action: + _dict['secondary_action'] = self.secondary_action.to_dict() # puts key-value pairs in additional_properties in the top level if self.additional_properties is not None: for _key, _value in self.additional_properties.items(): @@ -100,7 +104,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "activity_id": obj.get("activity_id"), "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 + "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 }) # store additional fields in additional_properties for _key in obj.keys(): diff --git a/activitysmith_openapi/models/stream_content_state.py b/activitysmith_openapi/models/stream_content_state.py index 219daf0..6b7d3cb 100644 --- a/activitysmith_openapi/models/stream_content_state.py +++ b/activitysmith_openapi/models/stream_content_state.py @@ -41,7 +41,7 @@ class StreamContentState(BaseModel): 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.") - color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints the action button when action is included.") + color: Optional[StrictStr] = Field(default=None, description="Optional. Accent color for progress, segmented_progress, metrics, and timer 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 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.") metrics: Optional[Annotated[List[ActivityMetric], Field(min_length=1, max_length=8)]] = Field(default=None, description="Use for metrics and stats activities.") diff --git a/activitysmith_openapi/test/test_live_activity_end_request.py b/activitysmith_openapi/test/test_live_activity_end_request.py index 01765b6..9e2ff46 100644 --- a/activitysmith_openapi/test/test_live_activity_end_request.py +++ b/activitysmith_openapi/test/test_live_activity_end_request.py @@ -37,7 +37,8 @@ def make_instance(self, include_optional) -> LiveActivityEndRequest: return LiveActivityEndRequest( activity_id = '', content_state = { }, - action = { } + action = { }, + secondary_action = { } ) 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 2d27243..3ba6c30 100644 --- a/activitysmith_openapi/test/test_live_activity_start_request.py +++ b/activitysmith_openapi/test/test_live_activity_start_request.py @@ -37,6 +37,7 @@ def make_instance(self, include_optional) -> LiveActivityStartRequest: return LiveActivityStartRequest( content_state = { }, action = { }, + secondary_action = { }, alert = { }, target = { } ) 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 a8944bb..795f287 100644 --- a/activitysmith_openapi/test/test_live_activity_stream_delete_request.py +++ b/activitysmith_openapi/test/test_live_activity_stream_delete_request.py @@ -37,6 +37,7 @@ def make_instance(self, include_optional) -> LiveActivityStreamDeleteRequest: return LiveActivityStreamDeleteRequest( content_state = { }, action = { }, + secondary_action = { }, alert = { } ) else: diff --git a/activitysmith_openapi/test/test_live_activity_stream_request.py b/activitysmith_openapi/test/test_live_activity_stream_request.py index 68cc301..f02f8a0 100644 --- a/activitysmith_openapi/test/test_live_activity_stream_request.py +++ b/activitysmith_openapi/test/test_live_activity_stream_request.py @@ -37,6 +37,7 @@ def make_instance(self, include_optional) -> LiveActivityStreamRequest: return LiveActivityStreamRequest( content_state = { }, action = { }, + secondary_action = { }, alert = { }, channels = [ '' diff --git a/activitysmith_openapi/test/test_live_activity_update_request.py b/activitysmith_openapi/test/test_live_activity_update_request.py index ea9c335..b5945bd 100644 --- a/activitysmith_openapi/test/test_live_activity_update_request.py +++ b/activitysmith_openapi/test/test_live_activity_update_request.py @@ -37,7 +37,8 @@ def make_instance(self, include_optional) -> LiveActivityUpdateRequest: return LiveActivityUpdateRequest( activity_id = '', content_state = { }, - action = { } + action = { }, + secondary_action = { } ) else: return LiveActivityUpdateRequest( From 8fd4bca559193609a99a2e65a187b58a7a2ecd3d Mon Sep 17 00:00:00 2001 From: bardonadam Date: Mon, 15 Jun 2026 14:24:10 +0700 Subject: [PATCH 2/4] feat: expose live activity secondary actions Why: - Live Activity secondary_action needs to be available through the Python handwritten helpers, not only generated request models. How: - Thread secondary_action through Live Activity request builders and document the secondary button example. - Add wrapper tests for named secondary_action payloads. Verification: - ./.venv/bin/python -m pytest Initiated-by: user Implemented-by: codex --- README.md | 7 ++++++- activitysmith/client.py | 12 ++++++++++++ tests/test_resources.py | 12 ++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6a418d7..e9b00e8 100644 --- a/README.md +++ b/README.md @@ -323,7 +323,7 @@ activitysmith.live_activities.end_stream( ### Live Activity Action -Live Activities can include one optional action button. +Live Activities can include a primary action button. `secondary_action` adds a secondary button for `alert`, `progress`, and `segmented_progress` Live Activities, using the same `open_url`, `shortcuts://`, and `webhook` payload shapes as `action`. - `open_url`: open an HTTPS URL. - `open_url` with a `shortcuts://run-shortcut?name=...` URL: run a specific iPhone Shortcut, for example to open an app. @@ -401,6 +401,11 @@ activitysmith.live_activities.stream( "requested_by": "activitysmith-python", }, ), + secondary_action=action( + title="Open Runbook", + type="open_url", + url="https://ops.example.com/runbooks/search-reindex", + ), ) ``` diff --git a/activitysmith/client.py b/activitysmith/client.py index 1eeffb9..0f6f182 100644 --- a/activitysmith/client.py +++ b/activitysmith/client.py @@ -276,6 +276,7 @@ def _build_live_activity_request( auto_dismiss_seconds: Any | None = None, auto_dismiss_minutes: Any | None = None, action: Any | None = None, + secondary_action: Any | None = None, alert: Any | None = None, target: Any | None = None, channels: Any | None = None, @@ -307,6 +308,7 @@ def _build_live_activity_request( { "activity_id": activity_id, "action": action, + "secondary_action": secondary_action, "alert": alert, "target": target, "channels": channels, @@ -448,6 +450,7 @@ def start( color: Any | None = None, step_color: Any | None = None, action: Any | None = None, + secondary_action: Any | None = None, alert: Any | None = None, target: Any | None = None, channels: Any | None = None, @@ -472,6 +475,7 @@ def start( color=color, step_color=step_color, action=action, + secondary_action=secondary_action, alert=alert, target=target, channels=channels, @@ -503,6 +507,7 @@ def update( color: Any | None = None, step_color: Any | None = None, action: Any | None = None, + secondary_action: Any | None = None, ): request = _build_live_activity_request( request, @@ -525,6 +530,7 @@ def update( color=color, step_color=step_color, action=action, + secondary_action=secondary_action, ) return self._api.update_live_activity(live_activity_update_request=request) @@ -552,6 +558,7 @@ def end( step_color: Any | None = None, auto_dismiss_minutes: Any | None = None, action: Any | None = None, + secondary_action: Any | None = None, ): request = _build_live_activity_request( request, @@ -575,6 +582,7 @@ def end( step_color=step_color, auto_dismiss_minutes=auto_dismiss_minutes, action=action, + secondary_action=secondary_action, ) return self._api.end_live_activity(live_activity_end_request=request) @@ -601,6 +609,7 @@ def stream( color: Any | None = None, step_color: Any | None = None, action: Any | None = None, + secondary_action: Any | None = None, alert: Any | None = None, target: Any | None = None, channels: Any | None = None, @@ -625,6 +634,7 @@ def stream( color=color, step_color=step_color, action=action, + secondary_action=secondary_action, alert=alert, target=target, channels=channels, @@ -658,6 +668,7 @@ def end_stream( step_color: Any | None = None, auto_dismiss_minutes: Any | None = None, action: Any | None = None, + secondary_action: Any | None = None, alert: Any | None = None, ): request = _build_live_activity_request( @@ -681,6 +692,7 @@ def end_stream( step_color=step_color, auto_dismiss_minutes=auto_dismiss_minutes, action=action, + secondary_action=secondary_action, alert=alert, ) return self._api.end_live_activity_stream( diff --git a/tests/test_resources.py b/tests/test_resources.py index 9cf5a92..03b6dfd 100644 --- a/tests/test_resources.py +++ b/tests/test_resources.py @@ -526,6 +526,12 @@ def test_live_activities_build_requests_from_named_fields(monkeypatch): type="open_url", url="shortcuts://run-shortcut?name=Open%20Dashboard", ) + secondary_action_payload = action( + title="Deny", + type="webhook", + url="https://ops.example.com/hooks/server-health/deny", + method="POST", + ) state_payload = content_state( title="Server Health", subtitle="prod-web-1", @@ -536,6 +542,7 @@ def test_live_activities_build_requests_from_named_fields(monkeypatch): client.live_activities.start( content_state=state_payload, action=action_payload, + secondary_action=secondary_action_payload, channels=["ops"], ) client.live_activities.update( @@ -544,6 +551,7 @@ def test_live_activities_build_requests_from_named_fields(monkeypatch): subtitle="prod-web-1", type=client.live_activities.TYPE_METRICS, metrics=metrics, + secondary_action=secondary_action_payload, ) client.live_activities.end( activity_id="act-1", @@ -552,6 +560,7 @@ def test_live_activities_build_requests_from_named_fields(monkeypatch): type=client.live_activities.TYPE_METRICS, metrics=metrics, auto_dismiss_minutes=2, + secondary_action=secondary_action_payload, ) assert client.live_activities._api.calls == [ @@ -566,6 +575,7 @@ def test_live_activities_build_requests_from_named_fields(monkeypatch): "metrics": metrics, }, "action": action_payload, + "secondary_action": secondary_action_payload, "target": {"channels": ["ops"]}, } }, @@ -581,6 +591,7 @@ def test_live_activities_build_requests_from_named_fields(monkeypatch): "type": client.live_activities.TYPE_METRICS, "metrics": metrics, }, + "secondary_action": secondary_action_payload, } }, ), @@ -596,6 +607,7 @@ def test_live_activities_build_requests_from_named_fields(monkeypatch): "metrics": metrics, "auto_dismiss_minutes": 2, }, + "secondary_action": secondary_action_payload, } }, ), From 82f2ae2f6ea0b0ef765684931e1bed77d94fcbdb Mon Sep 17 00:00:00 2001 From: bardonadam Date: Mon, 15 Jun 2026 17:26:20 +0700 Subject: [PATCH 3/4] docs: update secondary action README examples --- README.md | 55 +++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 49 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index e9b00e8..39b28a0 100644 --- a/README.md +++ b/README.md @@ -323,15 +323,15 @@ activitysmith.live_activities.end_stream( ### Live Activity Action -Live Activities can include a primary action button. `secondary_action` adds a secondary button for `alert`, `progress`, and `segmented_progress` Live Activities, using the same `open_url`, `shortcuts://`, and `webhook` payload shapes as `action`. +Live Activities can include an action button. - `open_url`: open an HTTPS URL. -- `open_url` with a `shortcuts://run-shortcut?name=...` URL: run a specific iPhone Shortcut, for example to open an app. +- `open_url` with a `shortcuts://` URL: run an Apple Shortcut, for example to open an app. - `webhook`: trigger a backend GET/POST workflow.

Live Activity with action button @@ -401,10 +401,53 @@ activitysmith.live_activities.stream( "requested_by": "activitysmith-python", }, ), +) +``` + +#### Secondary action + +

+ Alert Live Activity with primary and secondary action buttons +

+ +Use `secondary_action` when you want a second button beside the primary `action`. + +The secondary action button is supported for `alert`, `progress`, and `segmented_progress` Live Activities. Both buttons use the same `open_url`, `webhook`, and Apple Shortcut payload shapes. + +```python +activitysmith.live_activities.stream( + "agent-approval", + content_state=content_state( + title="Approval Needed", + message="Should I send the follow-up email to Brightlane?", + type="alert", + color="green", + icon=alert_icon("sparkles", color="green"), + badge=alert_badge("Agent", color="green"), + ), + action=action( + title="Send", + type="webhook", + url="https://agent.example.com/live-activity/approve", + method="POST", + body={ + "approval_id": "approval_01JY3J7Q9S0P8M1V5PZK7DR4M2", + "decision": "send", + }, + ), secondary_action=action( - title="Open Runbook", - type="open_url", - url="https://ops.example.com/runbooks/search-reindex", + title="Deny", + type="webhook", + url="https://agent.example.com/live-activity/deny", + method="POST", + body={ + "approval_id": "approval_01JY3J7Q9S0P8M1V5PZK7DR4M2", + "decision": "deny", + }, ), ) ``` From 002f9204c65c585f61599d89ca1f5f31098b0efd Mon Sep 17 00:00:00 2001 From: bardonadam Date: Tue, 16 Jun 2026 09:08:39 +0700 Subject: [PATCH 4/4] chore: release 1.8.0 --- activitysmith/client.py | 2 +- activitysmith_openapi/__init__.py | 2 +- activitysmith_openapi/api_client.py | 2 +- activitysmith_openapi/configuration.py | 2 +- pyproject.toml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/activitysmith/client.py b/activitysmith/client.py index 0f6f182..d7f75db 100644 --- a/activitysmith/client.py +++ b/activitysmith/client.py @@ -10,7 +10,7 @@ from activitysmith_openapi.api.metrics_api import MetricsApi from activitysmith_openapi.api.push_notifications_api import PushNotificationsApi -SDK_VERSION = "1.7.0" +SDK_VERSION = "1.8.0" SDK_HEADER_NAME = "X-ActivitySmith-SDK" SDK_HEADER_VALUE = f"python-v{SDK_VERSION}" diff --git a/activitysmith_openapi/__init__.py b/activitysmith_openapi/__init__.py index c255012..aafc03e 100644 --- a/activitysmith_openapi/__init__.py +++ b/activitysmith_openapi/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "1.7.0" +__version__ = "1.8.0" # import apis into sdk package from activitysmith_openapi.api.live_activities_api import LiveActivitiesApi diff --git a/activitysmith_openapi/api_client.py b/activitysmith_openapi/api_client.py index 9f66196..8cf7769 100644 --- a/activitysmith_openapi/api_client.py +++ b/activitysmith_openapi/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'OpenAPI-Generator/1.7.0/python' + self.user_agent = 'OpenAPI-Generator/1.8.0/python' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/activitysmith_openapi/configuration.py b/activitysmith_openapi/configuration.py index 62dded5..398cea1 100644 --- a/activitysmith_openapi/configuration.py +++ b/activitysmith_openapi/configuration.py @@ -393,7 +393,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 1.0.0\n"\ - "SDK Package Version: 1.7.0".\ + "SDK Package Version: 1.8.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/pyproject.toml b/pyproject.toml index 986b09a..2713b76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "activitysmith" -version = "1.7.0" +version = "1.8.0" description = "Official ActivitySmith Python SDK" readme = "README.md" requires-python = ">=3.9"