Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions generated/activitysmith_openapi.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@
require 'activitysmith_openapi/models/forbidden_error'
require 'activitysmith_openapi/models/live_activity_action'
require 'activitysmith_openapi/models/live_activity_action_type'
require 'activitysmith_openapi/models/live_activity_alert_badge'
require 'activitysmith_openapi/models/live_activity_alert_icon'
require 'activitysmith_openapi/models/live_activity_color'
require 'activitysmith_openapi/models/live_activity_end_request'
require 'activitysmith_openapi/models/live_activity_end_response'
require 'activitysmith_openapi/models/live_activity_limit_error'
Expand Down
12 changes: 6 additions & 6 deletions generated/activitysmith_openapi/api/live_activities_api.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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, and stats 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, and alert activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
# @param live_activity_end_request [LiveActivityEndRequest]
# @param [Hash] opts the optional parameters
# @return [LiveActivityEndResponse]
Expand All @@ -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, and stats 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, and alert activity types. For segmented_progress activities, you can send the latest number_of_steps here if the workflow changed after start.
# @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
Expand Down Expand Up @@ -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, and stats 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, and alert activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
# @param live_activity_start_request [LiveActivityStartRequest]
# @param [Hash] opts the optional parameters
# @return [LiveActivityStartResponse]
Expand All @@ -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, and stats 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, and alert activity types. For segmented_progress activities, number_of_steps can be changed later during update or end calls if the workflow changes.
# @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
Expand Down Expand Up @@ -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, and stats activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as 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. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
# @param live_activity_update_request [LiveActivityUpdateRequest]
# @param [Hash] opts the optional parameters
# @return [LiveActivityUpdateResponse]
Expand All @@ -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, and stats activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as 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. Updates an existing Live Activity. If the per-activity token is not registered yet, the update is queued. Supports segmented_progress, progress, metrics, stats, and alert activity types. For segmented_progress activities, you can increase or decrease number_of_steps here as the workflow changes.
# @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
Expand Down
4 changes: 2 additions & 2 deletions generated/activitysmith_openapi/models/activity_metric.rb
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def valid?
return false if @label.nil?
return false if @label.to_s.length < 1
return false if @value.nil?
color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
return false unless color_validator.valid?(@color)
true
end
Expand All @@ -162,7 +162,7 @@ def label=(label)
# Custom attribute writer method checking allowed values (enum).
# @param [Object] color Object to be assigned
def color=(color)
validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
unless validator.valid?(color)
fail ArgumentError, "invalid value for \"color\", must be one of #{validator.allowable_values}."
end
Expand Down
69 changes: 58 additions & 11 deletions generated/activitysmith_openapi/models/content_state_end.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module OpenapiClient
# End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start.
# End payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message, with optional icon and badge. Type is optional when ending an existing activity. You can send an updated number_of_steps here if the workflow changed after start.
class ContentStateEnd
attr_accessor :title

Expand All @@ -38,10 +38,19 @@ class ContentStateEnd
# Use for type=metrics or type=stats.
attr_accessor :metrics

# Alert message. Use for type=alert.
attr_accessor :message

# Optional SF Symbol icon for type=alert.
attr_accessor :icon

# Optional badge for type=alert.
attr_accessor :badge

# Optional. When omitted, the API uses the existing Live Activity type.
attr_accessor :type

# Optional. Accent color for the Live Activity. Defaults to blue.
# Optional. Accent color for progress, segmented_progress, and metrics Live Activities. For Alert Live Activities, this tints the action button when action is included.
attr_accessor :color

# Optional. Overrides color for the current step. Only applies to type=segmented_progress.
Expand Down Expand Up @@ -86,6 +95,9 @@ def self.attribute_map
:'value' => :'value',
:'upper_limit' => :'upper_limit',
:'metrics' => :'metrics',
:'message' => :'message',
:'icon' => :'icon',
:'badge' => :'badge',
:'type' => :'type',
:'color' => :'color',
:'step_color' => :'step_color',
Expand All @@ -110,6 +122,9 @@ def self.openapi_types
:'value' => :'Float',
:'upper_limit' => :'Float',
:'metrics' => :'Array<ActivityMetric>',
:'message' => :'String',
:'icon' => :'LiveActivityAlertIcon',
:'badge' => :'LiveActivityAlertBadge',
:'type' => :'String',
:'color' => :'String',
:'step_color' => :'String',
Expand Down Expand Up @@ -175,14 +190,24 @@ def initialize(attributes = {})
end
end

if attributes.key?(:'message')
self.message = attributes[:'message']
end

if attributes.key?(:'icon')
self.icon = attributes[:'icon']
end

if attributes.key?(:'badge')
self.badge = attributes[:'badge']
end

if attributes.key?(:'type')
self.type = attributes[:'type']
end

if attributes.key?(:'color')
self.color = attributes[:'color']
else
self.color = 'blue'
end

if attributes.key?(:'step_color')
Expand Down Expand Up @@ -235,6 +260,10 @@ def list_invalid_properties
invalid_properties.push('invalid value for "metrics", number of items must be greater than or equal to 1.')
end

if !@message.nil? && @message.to_s.length < 1
invalid_properties.push('invalid value for "message", the character length must be great than or equal to 1.')
end

if !@auto_dismiss_minutes.nil? && @auto_dismiss_minutes < 0
invalid_properties.push('invalid value for "auto_dismiss_minutes", must be greater than or equal to 0.')
end
Expand All @@ -253,11 +282,12 @@ def valid?
return false if !@percentage.nil? && @percentage < 0
return false if !@metrics.nil? && @metrics.length > 8
return false if !@metrics.nil? && @metrics.length < 1
type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
return false if !@message.nil? && @message.to_s.length < 1
type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert"])
return false unless type_validator.valid?(@type)
color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
return false unless color_validator.valid?(@color)
step_color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
step_color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
return false unless step_color_validator.valid?(@step_color)
return false if !@auto_dismiss_minutes.nil? && @auto_dismiss_minutes < 0
true
Expand Down Expand Up @@ -327,10 +357,24 @@ def metrics=(metrics)
@metrics = metrics
end

# Custom attribute writer method with validation
# @param [Object] message Value to be assigned
def message=(message)
if message.nil?
fail ArgumentError, 'message cannot be nil'
end

if message.to_s.length < 1
fail ArgumentError, 'invalid value for "message", the character length must be great than or equal to 1.'
end

@message = message
end

# Custom attribute writer method checking allowed values (enum).
# @param [Object] type Object to be assigned
def type=(type)
validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats"])
validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert"])
unless validator.valid?(type)
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
end
Expand All @@ -340,7 +384,7 @@ def type=(type)
# Custom attribute writer method checking allowed values (enum).
# @param [Object] color Object to be assigned
def color=(color)
validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
unless validator.valid?(color)
fail ArgumentError, "invalid value for \"color\", must be one of #{validator.allowable_values}."
end
Expand All @@ -350,7 +394,7 @@ def color=(color)
# Custom attribute writer method checking allowed values (enum).
# @param [Object] step_color Object to be assigned
def step_color=(step_color)
validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow"])
validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
unless validator.valid?(step_color)
fail ArgumentError, "invalid value for \"step_color\", must be one of #{validator.allowable_values}."
end
Expand Down Expand Up @@ -384,6 +428,9 @@ def ==(o)
value == o.value &&
upper_limit == o.upper_limit &&
metrics == o.metrics &&
message == o.message &&
icon == o.icon &&
badge == o.badge &&
type == o.type &&
color == o.color &&
step_color == o.step_color &&
Expand All @@ -400,7 +447,7 @@ def eql?(o)
# Calculates hash code according to all attributes.
# @return [Integer] Hash code
def hash
[title, subtitle, number_of_steps, current_step, percentage, value, upper_limit, metrics, type, color, step_color, step_colors, auto_dismiss_minutes].hash
[title, subtitle, number_of_steps, current_step, percentage, value, upper_limit, metrics, message, icon, badge, type, color, step_color, step_colors, auto_dismiss_minutes].hash
end

# Builds the object from hash
Expand Down
Loading