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
20 changes: 10 additions & 10 deletions generated/activitysmith_openapi/api/live_activities_api.rb

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions generated/activitysmith_openapi/api/metrics_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
# Update a widget metric value
# Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key.
# Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key. Metric updates have an independent 300-requests-per-minute account allowance. They do not consume the Push Notification, badge, or Live Activity allowances.
# @param key [String] Metric key configured in the web app. Lowercase letters, numbers, dots, underscores, and dashes are allowed.
# @param metric_value_update_request [MetricValueUpdateRequest]
# @param [Hash] opts the optional parameters
Expand All @@ -31,7 +31,7 @@ def update_metric_value(key, metric_value_update_request, opts = {})
end

# Update a widget metric value
# Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key.
# Updates the latest value for a metric displayed in ActivitySmith widgets. Create the metric in the web app first, then update its value using the key. Metric updates have an independent 300-requests-per-minute account allowance. They do not consume the Push Notification, badge, or Live Activity allowances.
# @param key [String] Metric key configured in the web app. Lowercase letters, numbers, dots, underscores, and dashes are allowed.
# @param metric_value_update_request [MetricValueUpdateRequest]
# @param [Hash] opts the optional parameters
Expand Down
38 changes: 8 additions & 30 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. For alert include message. For timer, omit duration_seconds to preserve and freeze the latest timer state. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. 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 value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer, omit duration_seconds to preserve and freeze the latest timer state. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. 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 @@ -29,7 +29,7 @@ class ContentStateEnd
# Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided.
attr_accessor :percentage

# Current progress value. Use with upper_limit for type=progress.
# For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit.
attr_accessor :value

# Maximum progress value. Use with value for type=progress.
Expand All @@ -50,16 +50,16 @@ class ContentStateEnd
# Alert message. Use for type=alert.
attr_accessor :message

# Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.
# Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value.
attr_accessor :icon

# Optional badge. Supported by alert, progress, and segmented_progress.
# Optional badge. Supported by alert, progress, segmented_progress, and value.
attr_accessor :badge

# 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 action and secondary_action buttons when included.
# Optional. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
attr_accessor :color

# Optional. Overrides color for the current step. Only applies to type=segmented_progress.
Expand All @@ -71,28 +71,6 @@ class ContentStateEnd
# 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.
attr_accessor :auto_dismiss_minutes

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values

def initialize(datatype, allowable_values)
@allowable_values = allowable_values.map do |value|
case datatype.to_s
when /Integer/i
value.to_i
when /Float/i
value.to_f
else
value
end
end
end

def valid?(value)
!value || allowable_values.include?(value)
end
end

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
Expand Down Expand Up @@ -131,7 +109,7 @@ def self.openapi_types
:'number_of_steps' => :'Integer',
:'current_step' => :'Integer',
:'percentage' => :'Float',
:'value' => :'Float',
:'value' => :'String',
:'upper_limit' => :'Float',
:'duration_seconds' => :'Float',
:'counts_down' => :'Boolean',
Expand Down Expand Up @@ -314,7 +292,7 @@ def valid?
return false if !@metrics.nil? && @metrics.length > 8
return false if !@metrics.nil? && @metrics.length < 1
return false if !@message.nil? && @message.to_s.length < 1
type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer"])
type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer", "value"])
return false unless type_validator.valid?(@type)
color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
return false unless color_validator.valid?(@color)
Expand Down Expand Up @@ -405,7 +383,7 @@ def message=(message)
# 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", "alert", "timer"])
validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer", "value"])
unless validator.valid?(type)
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
end
Expand Down
38 changes: 8 additions & 30 deletions generated/activitysmith_openapi/models/content_state_start.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module OpenapiClient
# Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. For timer include duration_seconds for countdowns, or set counts_down false without duration_seconds for an open-ended elapsed timer. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
# Start payload requires title and type. For segmented_progress include number_of_steps and current_step. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer include duration_seconds for countdowns, or set counts_down false without duration_seconds for an open-ended elapsed timer. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. For segmented_progress, number_of_steps is not locked and can be changed in later update or end calls.
class ContentStateStart
attr_accessor :title

Expand All @@ -29,7 +29,7 @@ class ContentStateStart
# Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided.
attr_accessor :percentage

# Current progress value. Use with upper_limit for type=progress.
# For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit.
attr_accessor :value

# Maximum progress value. Use with value for type=progress.
Expand All @@ -50,15 +50,15 @@ class ContentStateStart
# Required for type=alert.
attr_accessor :message

# Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.
# Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value.
attr_accessor :icon

# Optional badge. Supported by alert, progress, and segmented_progress.
# Optional badge. Supported by alert, progress, segmented_progress, and value.
attr_accessor :badge

attr_accessor :type

# 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. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
attr_accessor :color

# Optional. Overrides color for the current step. Only applies to type=segmented_progress.
Expand All @@ -67,28 +67,6 @@ class ContentStateStart
# Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step.
attr_accessor :step_colors

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values

def initialize(datatype, allowable_values)
@allowable_values = allowable_values.map do |value|
case datatype.to_s
when /Integer/i
value.to_i
when /Float/i
value.to_f
else
value
end
end
end

def valid?(value)
!value || allowable_values.include?(value)
end
end

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
Expand Down Expand Up @@ -126,7 +104,7 @@ def self.openapi_types
:'number_of_steps' => :'Integer',
:'current_step' => :'Integer',
:'percentage' => :'Float',
:'value' => :'Float',
:'value' => :'String',
:'upper_limit' => :'Float',
:'duration_seconds' => :'Float',
:'counts_down' => :'Boolean',
Expand Down Expand Up @@ -305,7 +283,7 @@ def valid?
return false if !@metrics.nil? && @metrics.length < 1
return false if !@message.nil? && @message.to_s.length < 1
return false if @type.nil?
type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer"])
type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer", "value"])
return false unless type_validator.valid?(@type)
color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
return false unless color_validator.valid?(@color)
Expand Down Expand Up @@ -395,7 +373,7 @@ def message=(message)
# 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", "alert", "timer"])
validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer", "value"])
unless validator.valid?(type)
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
end
Expand Down
38 changes: 8 additions & 30 deletions generated/activitysmith_openapi/models/content_state_update.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module OpenapiClient
# Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For alert include message. For timer, omit duration_seconds to preserve the current timer window or send duration_seconds to reset the timer from the update request time. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, and segmented_progress. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates.
# Update payload requires title. For segmented_progress include current_step and optionally number_of_steps. For progress include percentage or value with upper_limit. For metrics and stats include a non-empty metrics array. For value include a string or number in value; strings preserve currency, units, and other formatting. For alert include message. For timer, omit duration_seconds to preserve the current timer window or send duration_seconds to reset the timer from the update request time. Optional icon is supported by all Live Activity types. Optional badge is supported by alert, progress, segmented_progress, and value. Type is optional when updating an existing activity. You can increase or decrease number_of_steps during updates.
class ContentStateUpdate
attr_accessor :title

Expand All @@ -29,7 +29,7 @@ class ContentStateUpdate
# Progress percentage (0–100). Use for type=progress. Takes precedence over value/upper_limit if both are provided.
attr_accessor :percentage

# Current progress value. Use with upper_limit for type=progress.
# For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For type=progress, a numeric progress value used with upper_limit.
attr_accessor :value

# Maximum progress value. Use with value for type=progress.
Expand All @@ -50,16 +50,16 @@ class ContentStateUpdate
# Alert message. Use for type=alert.
attr_accessor :message

# Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer.
# Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value.
attr_accessor :icon

# Optional badge. Supported by alert, progress, and segmented_progress.
# Optional badge. Supported by alert, progress, segmented_progress, and value.
attr_accessor :badge

# 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 action and secondary_action buttons when included.
# Optional. Accent color for progress, segmented_progress, metrics, timer, and value Live Activities. For Alert Live Activities, this tints action and secondary_action buttons when included.
attr_accessor :color

# Optional. Overrides color for the current step. Only applies to type=segmented_progress.
Expand All @@ -68,28 +68,6 @@ class ContentStateUpdate
# Optional. Colors for completed steps. When used with segmented_progress, the array length should match current_step.
attr_accessor :step_colors

class EnumAttributeValidator
attr_reader :datatype
attr_reader :allowable_values

def initialize(datatype, allowable_values)
@allowable_values = allowable_values.map do |value|
case datatype.to_s
when /Integer/i
value.to_i
when /Float/i
value.to_f
else
value
end
end
end

def valid?(value)
!value || allowable_values.include?(value)
end
end

# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
Expand Down Expand Up @@ -127,7 +105,7 @@ def self.openapi_types
:'number_of_steps' => :'Integer',
:'current_step' => :'Integer',
:'percentage' => :'Float',
:'value' => :'Float',
:'value' => :'String',
:'upper_limit' => :'Float',
:'duration_seconds' => :'Float',
:'counts_down' => :'Boolean',
Expand Down Expand Up @@ -299,7 +277,7 @@ def valid?
return false if !@metrics.nil? && @metrics.length > 8
return false if !@metrics.nil? && @metrics.length < 1
return false if !@message.nil? && @message.to_s.length < 1
type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer"])
type_validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer", "value"])
return false unless type_validator.valid?(@type)
color_validator = EnumAttributeValidator.new('String', ["lime", "green", "cyan", "blue", "purple", "magenta", "red", "orange", "yellow", "gray"])
return false unless color_validator.valid?(@color)
Expand Down Expand Up @@ -389,7 +367,7 @@ def message=(message)
# 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", "alert", "timer"])
validator = EnumAttributeValidator.new('String', ["segmented_progress", "progress", "metrics", "stats", "alert", "timer", "value"])
unless validator.valid?(type)
fail ArgumentError, "invalid value for \"type\", must be one of #{validator.allowable_values}."
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
require 'time'

module OpenapiClient
# 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.
# 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, segmented_progress, and value Live Activities.
class LiveActivityAction
# Button title displayed in the Live Activity UI.
attr_accessor :title
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class LiveActivityEndRequest

attr_accessor :action

# Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
attr_accessor :secondary_action

# Attribute mapping from ruby-style variable name to JSON key.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class LiveActivityStartRequest

attr_accessor :action

# Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
# Optional secondary action button. Supported for alert, progress, segmented_progress, and value Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action.
attr_accessor :secondary_action

attr_accessor :alert
Expand Down
Loading
Loading