diff --git a/README.md b/README.md
index d7dfbb9..7ca7ae7 100644
--- a/README.md
+++ b/README.md
@@ -325,15 +325,15 @@ activitysmith.live_activities.end_stream(
### Live Activity Action
-Live Activities can include one optional action button.
+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.
@@ -412,6 +412,56 @@ activitysmith.live_activities.stream(
)
```
+#### Secondary action
+
+
+
+
+
+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.
+
+```ruby
+activitysmith.live_activities.stream(
+ "agent-approval",
+ {
+ content_state: ActivitySmith::LiveActivities.content_state(
+ title: "Approval Needed",
+ message: "Should I send the follow-up email to Brightlane?",
+ type: "alert",
+ color: "green",
+ icon: ActivitySmith::LiveActivities.alert_icon("sparkles", color: "green"),
+ badge: ActivitySmith::LiveActivities.alert_badge("Agent", color: "green")
+ ),
+ action: {
+ title: "Send",
+ type: "webhook",
+ url: "https://agent.example.com/live-activity/approve",
+ method: "POST",
+ body: {
+ approval_id: "approval_01JY3J7Q9S0P8M1V5PZK7DR4M2",
+ decision: "send"
+ }
+ },
+ secondary_action: {
+ title: "Deny",
+ type: "webhook",
+ url: "https://agent.example.com/live-activity/deny",
+ method: "POST",
+ body: {
+ approval_id: "approval_01JY3J7Q9S0P8M1V5PZK7DR4M2",
+ decision: "deny"
+ }
+ }
+ }
+)
+```
+
### Icons and Badges
Add more context to Live Activities with icons and badges.
diff --git a/generated/activitysmith_openapi/api/live_activities_api.rb b/generated/activitysmith_openapi/api/live_activities_api.rb
index e8f65b9..175ad8c 100644
--- a/generated/activitysmith_openapi/api/live_activities_api.rb
+++ b/generated/activitysmith_openapi/api/live_activities_api.rb
@@ -20,7 +20,7 @@ def initialize(api_client = ApiClient.default)
@api_client = api_client
end
# 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 [LiveActivityEndRequest]
# @param [Hash] opts the optional parameters
# @return [LiveActivityEndResponse]
@@ -30,7 +30,7 @@ def end_live_activity(live_activity_end_request, opts = {})
end
# 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 [LiveActivityEndRequest]
# @param [Hash] opts the optional parameters
# @return [Array<(LiveActivityEndResponse, Integer, Hash)>] LiveActivityEndResponse data, response status code and response headers
@@ -88,7 +88,7 @@ def end_live_activity_with_http_info(live_activity_end_request, opts = {})
end
# 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 [String] Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.
# @param [Hash] opts the optional parameters
# @option opts [LiveActivityStreamDeleteRequest] :live_activity_stream_delete_request
@@ -99,7 +99,7 @@ def end_live_activity_stream(stream_key, opts = {})
end
# 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 [String] Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.
# @param [Hash] opts the optional parameters
# @option opts [LiveActivityStreamDeleteRequest] :live_activity_stream_delete_request
@@ -167,7 +167,7 @@ def end_live_activity_stream_with_http_info(stream_key, opts = {})
end
# 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 [String] Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.
# @param live_activity_stream_request [LiveActivityStreamRequest]
# @param [Hash] opts the optional parameters
@@ -178,7 +178,7 @@ def reconcile_live_activity_stream(stream_key, live_activity_stream_request, opt
end
# 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 [String] Stable identifier for one ongoing thing. Allowed characters: letters, numbers, underscores, and hyphens.
# @param live_activity_stream_request [LiveActivityStreamRequest]
# @param [Hash] opts the optional parameters
@@ -250,7 +250,7 @@ def reconcile_live_activity_stream_with_http_info(stream_key, live_activity_stre
end
# 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 [LiveActivityStartRequest]
# @param [Hash] opts the optional parameters
# @return [LiveActivityStartResponse]
@@ -260,7 +260,7 @@ def start_live_activity(live_activity_start_request, opts = {})
end
# 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 [LiveActivityStartRequest]
# @param [Hash] opts the optional parameters
# @return [Array<(LiveActivityStartResponse, Integer, Hash)>] LiveActivityStartResponse data, response status code and response headers
@@ -318,7 +318,7 @@ def start_live_activity_with_http_info(live_activity_start_request, opts = {})
end
# 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 [LiveActivityUpdateRequest]
# @param [Hash] opts the optional parameters
# @return [LiveActivityUpdateResponse]
@@ -328,7 +328,7 @@ def update_live_activity(live_activity_update_request, opts = {})
end
# 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 [LiveActivityUpdateRequest]
# @param [Hash] opts the optional parameters
# @return [Array<(LiveActivityUpdateResponse, Integer, Hash)>] LiveActivityUpdateResponse data, response status code and response headers
diff --git a/generated/activitysmith_openapi/models/content_state_end.rb b/generated/activitysmith_openapi/models/content_state_end.rb
index 6290222..bc72c5a 100644
--- a/generated/activitysmith_openapi/models/content_state_end.rb
+++ b/generated/activitysmith_openapi/models/content_state_end.rb
@@ -59,7 +59,7 @@ class ContentStateEnd
# Optional. When omitted, the API uses the existing Live Activity type.
attr_accessor :type
- # 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. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
attr_accessor :color
# Optional. Overrides color for the current step. Only applies to type=segmented_progress.
diff --git a/generated/activitysmith_openapi/models/content_state_start.rb b/generated/activitysmith_openapi/models/content_state_start.rb
index 32a67ad..e1bbdcb 100644
--- a/generated/activitysmith_openapi/models/content_state_start.rb
+++ b/generated/activitysmith_openapi/models/content_state_start.rb
@@ -58,7 +58,7 @@ class ContentStateStart
attr_accessor :type
- # 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. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
attr_accessor :color
# Optional. Overrides color for the current step. Only applies to type=segmented_progress.
diff --git a/generated/activitysmith_openapi/models/content_state_update.rb b/generated/activitysmith_openapi/models/content_state_update.rb
index 095050d..af2cac6 100644
--- a/generated/activitysmith_openapi/models/content_state_update.rb
+++ b/generated/activitysmith_openapi/models/content_state_update.rb
@@ -59,7 +59,7 @@ class ContentStateUpdate
# Optional. When omitted, the API uses the existing Live Activity type.
attr_accessor :type
- # 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. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
attr_accessor :color
# Optional. Overrides color for the current step. Only applies to type=segmented_progress.
diff --git a/generated/activitysmith_openapi/models/live_activity_action.rb b/generated/activitysmith_openapi/models/live_activity_action.rb
index 7fcb036..389bd32 100644
--- a/generated/activitysmith_openapi/models/live_activity_action.rb
+++ b/generated/activitysmith_openapi/models/live_activity_action.rb
@@ -14,7 +14,7 @@
require 'time'
module OpenapiClient
- # 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.
class LiveActivityAction
# Button title displayed in the Live Activity UI.
attr_accessor :title
diff --git a/generated/activitysmith_openapi/models/live_activity_end_request.rb b/generated/activitysmith_openapi/models/live_activity_end_request.rb
index 7e79cd9..13d1fcb 100644
--- a/generated/activitysmith_openapi/models/live_activity_end_request.rb
+++ b/generated/activitysmith_openapi/models/live_activity_end_request.rb
@@ -22,12 +22,16 @@ class LiveActivityEndRequest
attr_accessor :action
+ # 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.
+ attr_accessor :secondary_action
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'activity_id' => :'activity_id',
:'content_state' => :'content_state',
- :'action' => :'action'
+ :'action' => :'action',
+ :'secondary_action' => :'secondary_action'
}
end
@@ -41,7 +45,8 @@ def self.openapi_types
{
:'activity_id' => :'String',
:'content_state' => :'ContentStateEnd',
- :'action' => :'LiveActivityAction'
+ :'action' => :'LiveActivityAction',
+ :'secondary_action' => :'LiveActivityAction'
}
end
@@ -81,6 +86,10 @@ def initialize(attributes = {})
if attributes.key?(:'action')
self.action = attributes[:'action']
end
+
+ if attributes.key?(:'secondary_action')
+ self.secondary_action = attributes[:'secondary_action']
+ end
end
# Show invalid properties with the reasons. Usually used together with valid?
@@ -115,7 +124,8 @@ def ==(o)
self.class == o.class &&
activity_id == o.activity_id &&
content_state == o.content_state &&
- action == o.action
+ action == o.action &&
+ secondary_action == o.secondary_action
end
# @see the `==` method
@@ -127,7 +137,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [activity_id, content_state, action].hash
+ [activity_id, content_state, action, secondary_action].hash
end
# Builds the object from hash
diff --git a/generated/activitysmith_openapi/models/live_activity_start_request.rb b/generated/activitysmith_openapi/models/live_activity_start_request.rb
index afeba0a..02d1445 100644
--- a/generated/activitysmith_openapi/models/live_activity_start_request.rb
+++ b/generated/activitysmith_openapi/models/live_activity_start_request.rb
@@ -20,6 +20,9 @@ class LiveActivityStartRequest
attr_accessor :action
+ # 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.
+ attr_accessor :secondary_action
+
attr_accessor :alert
attr_accessor :target
@@ -29,6 +32,7 @@ def self.attribute_map
{
:'content_state' => :'content_state',
:'action' => :'action',
+ :'secondary_action' => :'secondary_action',
:'alert' => :'alert',
:'target' => :'target'
}
@@ -44,6 +48,7 @@ def self.openapi_types
{
:'content_state' => :'ContentStateStart',
:'action' => :'LiveActivityAction',
+ :'secondary_action' => :'LiveActivityAction',
:'alert' => :'AlertPayload',
:'target' => :'ChannelTarget'
}
@@ -80,6 +85,10 @@ def initialize(attributes = {})
self.action = attributes[:'action']
end
+ if attributes.key?(:'secondary_action')
+ self.secondary_action = attributes[:'secondary_action']
+ end
+
if attributes.key?(:'alert')
self.alert = attributes[:'alert']
end
@@ -116,6 +125,7 @@ def ==(o)
self.class == o.class &&
content_state == o.content_state &&
action == o.action &&
+ secondary_action == o.secondary_action &&
alert == o.alert &&
target == o.target
end
@@ -129,7 +139,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [content_state, action, alert, target].hash
+ [content_state, action, secondary_action, alert, target].hash
end
# Builds the object from hash
diff --git a/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb b/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb
index 5d8d4a3..d9009e3 100644
--- a/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb
+++ b/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb
@@ -20,6 +20,9 @@ class LiveActivityStreamDeleteRequest
attr_accessor :action
+ # 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.
+ attr_accessor :secondary_action
+
attr_accessor :alert
# Attribute mapping from ruby-style variable name to JSON key.
@@ -27,6 +30,7 @@ def self.attribute_map
{
:'content_state' => :'content_state',
:'action' => :'action',
+ :'secondary_action' => :'secondary_action',
:'alert' => :'alert'
}
end
@@ -41,6 +45,7 @@ def self.openapi_types
{
:'content_state' => :'StreamContentState',
:'action' => :'LiveActivityAction',
+ :'secondary_action' => :'LiveActivityAction',
:'alert' => :'AlertPayload'
}
end
@@ -74,6 +79,10 @@ def initialize(attributes = {})
self.action = attributes[:'action']
end
+ if attributes.key?(:'secondary_action')
+ self.secondary_action = attributes[:'secondary_action']
+ end
+
if attributes.key?(:'alert')
self.alert = attributes[:'alert']
end
@@ -101,6 +110,7 @@ def ==(o)
self.class == o.class &&
content_state == o.content_state &&
action == o.action &&
+ secondary_action == o.secondary_action &&
alert == o.alert
end
@@ -113,7 +123,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [content_state, action, alert].hash
+ [content_state, action, secondary_action, alert].hash
end
# Builds the object from hash
diff --git a/generated/activitysmith_openapi/models/live_activity_stream_request.rb b/generated/activitysmith_openapi/models/live_activity_stream_request.rb
index 5aec908..925f1d3 100644
--- a/generated/activitysmith_openapi/models/live_activity_stream_request.rb
+++ b/generated/activitysmith_openapi/models/live_activity_stream_request.rb
@@ -20,6 +20,9 @@ class LiveActivityStreamRequest
attr_accessor :action
+ # 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.
+ attr_accessor :secondary_action
+
attr_accessor :alert
# Channel slugs. When omitted, API key scope determines recipients.
@@ -32,6 +35,7 @@ def self.attribute_map
{
:'content_state' => :'content_state',
:'action' => :'action',
+ :'secondary_action' => :'secondary_action',
:'alert' => :'alert',
:'channels' => :'channels',
:'target' => :'target'
@@ -48,6 +52,7 @@ def self.openapi_types
{
:'content_state' => :'StreamContentState',
:'action' => :'LiveActivityAction',
+ :'secondary_action' => :'LiveActivityAction',
:'alert' => :'AlertPayload',
:'channels' => :'Array',
:'target' => :'ChannelTarget'
@@ -85,6 +90,10 @@ def initialize(attributes = {})
self.action = attributes[:'action']
end
+ if attributes.key?(:'secondary_action')
+ self.secondary_action = attributes[:'secondary_action']
+ end
+
if attributes.key?(:'alert')
self.alert = attributes[:'alert']
end
@@ -146,6 +155,7 @@ def ==(o)
self.class == o.class &&
content_state == o.content_state &&
action == o.action &&
+ secondary_action == o.secondary_action &&
alert == o.alert &&
channels == o.channels &&
target == o.target
@@ -160,7 +170,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [content_state, action, alert, channels, target].hash
+ [content_state, action, secondary_action, alert, channels, target].hash
end
# Builds the object from hash
diff --git a/generated/activitysmith_openapi/models/live_activity_update_request.rb b/generated/activitysmith_openapi/models/live_activity_update_request.rb
index 4b9aa14..f6ca992 100644
--- a/generated/activitysmith_openapi/models/live_activity_update_request.rb
+++ b/generated/activitysmith_openapi/models/live_activity_update_request.rb
@@ -22,12 +22,16 @@ class LiveActivityUpdateRequest
attr_accessor :action
+ # 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.
+ attr_accessor :secondary_action
+
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
:'activity_id' => :'activity_id',
:'content_state' => :'content_state',
- :'action' => :'action'
+ :'action' => :'action',
+ :'secondary_action' => :'secondary_action'
}
end
@@ -41,7 +45,8 @@ def self.openapi_types
{
:'activity_id' => :'String',
:'content_state' => :'ContentStateUpdate',
- :'action' => :'LiveActivityAction'
+ :'action' => :'LiveActivityAction',
+ :'secondary_action' => :'LiveActivityAction'
}
end
@@ -81,6 +86,10 @@ def initialize(attributes = {})
if attributes.key?(:'action')
self.action = attributes[:'action']
end
+
+ if attributes.key?(:'secondary_action')
+ self.secondary_action = attributes[:'secondary_action']
+ end
end
# Show invalid properties with the reasons. Usually used together with valid?
@@ -115,7 +124,8 @@ def ==(o)
self.class == o.class &&
activity_id == o.activity_id &&
content_state == o.content_state &&
- action == o.action
+ action == o.action &&
+ secondary_action == o.secondary_action
end
# @see the `==` method
@@ -127,7 +137,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
- [activity_id, content_state, action].hash
+ [activity_id, content_state, action, secondary_action].hash
end
# Builds the object from hash
diff --git a/generated/activitysmith_openapi/models/stream_content_state.rb b/generated/activitysmith_openapi/models/stream_content_state.rb
index 88bcfc0..44bfe73 100644
--- a/generated/activitysmith_openapi/models/stream_content_state.rb
+++ b/generated/activitysmith_openapi/models/stream_content_state.rb
@@ -47,7 +47,7 @@ class StreamContentState
# Required on the first PUT or whenever the stream cannot infer the current activity type.
attr_accessor :type
- # 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. Accent color for progress, segmented_progress, metrics, and timer Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
attr_accessor :color
# Optional. Overrides color for the current step. Only applies to segmented_progress.
diff --git a/generated/activitysmith_openapi/version.rb b/generated/activitysmith_openapi/version.rb
index cc7fd58..5e27329 100644
--- a/generated/activitysmith_openapi/version.rb
+++ b/generated/activitysmith_openapi/version.rb
@@ -11,5 +11,5 @@
=end
module OpenapiClient
- VERSION = '1.7.0'
+ VERSION = '1.8.0'
end
diff --git a/lib/activitysmith/version.rb b/lib/activitysmith/version.rb
index 3d4fd6f..4d79d17 100644
--- a/lib/activitysmith/version.rb
+++ b/lib/activitysmith/version.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
module ActivitySmith
- VERSION = "1.7.0"
+ VERSION = "1.8.0"
end
diff --git a/test/resources_test.rb b/test/resources_test.rb
index 410e25c..6caf1df 100644
--- a/test/resources_test.rb
+++ b/test/resources_test.rb
@@ -595,6 +595,11 @@ def test_live_activities_pass_action_payloads_through
title: "Open Workflow",
type: "open_url",
url: "shortcuts://run-shortcut?name=Deploy%20Status"
+ },
+ secondary_action: {
+ title: "Deny",
+ type: "webhook",
+ url: "https://ops.example.com/hooks/deploy/deny"
}
}
@@ -614,6 +619,11 @@ def test_live_activities_pass_action_payloads_through
body: {
job_id: "reindex-2026-03-19"
}
+ },
+ secondary_action: {
+ title: "Open Runbook",
+ type: "open_url",
+ url: "https://ops.example.com/runbooks/search-reindex"
}
}
@@ -629,6 +639,11 @@ def test_live_activities_pass_action_payloads_through
title: "Open Workflow",
type: "open_url",
url: "shortcuts://run-shortcut?name=Deploy%20Status"
+ },
+ secondary_action: {
+ title: "Archive",
+ type: "webhook",
+ url: "https://ops.example.com/hooks/deploy/archive"
}
}