From 167d65045355f430670c2e4a0a2f4768c54d9e7f Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Fri, 18 Sep 2026 08:34:56 +0000 Subject: [PATCH] chore: regenerate SDK --- .../api/live_activities_api.rb | 20 ++++----- .../activitysmith_openapi/api/metrics_api.rb | 4 +- .../models/content_state_end.rb | 38 ++++------------ .../models/content_state_start.rb | 38 ++++------------ .../models/content_state_update.rb | 38 ++++------------ .../models/live_activity_action.rb | 2 +- .../models/live_activity_end_request.rb | 2 +- .../models/live_activity_start_request.rb | 2 +- .../live_activity_stream_delete_request.rb | 2 +- .../models/live_activity_stream_request.rb | 2 +- .../models/live_activity_update_request.rb | 2 +- .../models/rate_limit_error.rb | 45 ++++++++++++++++++- .../models/stream_content_state.rb | 38 ++++------------ generated/openapi-source.json | 4 +- 14 files changed, 96 insertions(+), 141 deletions(-) diff --git a/generated/activitysmith_openapi/api/live_activities_api.rb b/generated/activitysmith_openapi/api/live_activities_api.rb index 18c7cb4..c106b10 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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. + # 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, timer, and value 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, segmented_progress, and value Live Activities. # @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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. + # 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, timer, and value 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, segmented_progress, and value Live Activities. # @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 secondary_action for a second button on alert, progress, and segmented_progress Live Activities. + # 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, segmented_progress, and value Live Activities. # @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 secondary_action for a second button on alert, progress, and segmented_progress Live Activities. + # 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, segmented_progress, and value Live Activities. # @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 secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. + # Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. # @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 secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. + # Use a stable stream_key for each ongoing thing you want to show as a Live Activity. Send the latest content_state whenever it changes, and ActivitySmith will keep the Live Activity in sync. For timer streams, send duration_seconds to start or reset the timer; omit duration_seconds on later updates to preserve the existing timer window. Use secondary_action for a second button on alert, progress, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. On later stream updates, omit tags to keep the current tags, send tags again to replace them, or send an empty array to clear them. # @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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. + # 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, timer, and value 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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. # @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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. Optional tags to organize and filter notification history. + # 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, timer, and value 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, segmented_progress, and value Live Activities. Optional tags to organize and filter notification history. # @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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. + # 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, timer, and value 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, segmented_progress, and value Live Activities. # @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. Use secondary_action for a second button on alert, progress, and segmented_progress Live Activities. + # 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, timer, and value 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, segmented_progress, and value Live Activities. # @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/api/metrics_api.rb b/generated/activitysmith_openapi/api/metrics_api.rb index e625768..1efa62b 100644 --- a/generated/activitysmith_openapi/api/metrics_api.rb +++ b/generated/activitysmith_openapi/api/metrics_api.rb @@ -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 @@ -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 diff --git a/generated/activitysmith_openapi/models/content_state_end.rb b/generated/activitysmith_openapi/models/content_state_end.rb index bc72c5a..826891b 100644 --- a/generated/activitysmith_openapi/models/content_state_end.rb +++ b/generated/activitysmith_openapi/models/content_state_end.rb @@ -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 @@ -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. @@ -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. @@ -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 { @@ -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', @@ -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) @@ -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 diff --git a/generated/activitysmith_openapi/models/content_state_start.rb b/generated/activitysmith_openapi/models/content_state_start.rb index e1bbdcb..b25530f 100644 --- a/generated/activitysmith_openapi/models/content_state_start.rb +++ b/generated/activitysmith_openapi/models/content_state_start.rb @@ -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 @@ -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. @@ -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. @@ -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 { @@ -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', @@ -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) @@ -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 diff --git a/generated/activitysmith_openapi/models/content_state_update.rb b/generated/activitysmith_openapi/models/content_state_update.rb index af2cac6..387b8d3 100644 --- a/generated/activitysmith_openapi/models/content_state_update.rb +++ b/generated/activitysmith_openapi/models/content_state_update.rb @@ -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 @@ -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. @@ -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. @@ -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 { @@ -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', @@ -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) @@ -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 diff --git a/generated/activitysmith_openapi/models/live_activity_action.rb b/generated/activitysmith_openapi/models/live_activity_action.rb index 682acfe..586d12d 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 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 diff --git a/generated/activitysmith_openapi/models/live_activity_end_request.rb b/generated/activitysmith_openapi/models/live_activity_end_request.rb index d8877d0..e571922 100644 --- a/generated/activitysmith_openapi/models/live_activity_end_request.rb +++ b/generated/activitysmith_openapi/models/live_activity_end_request.rb @@ -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. diff --git a/generated/activitysmith_openapi/models/live_activity_start_request.rb b/generated/activitysmith_openapi/models/live_activity_start_request.rb index 135006f..edee64d 100644 --- a/generated/activitysmith_openapi/models/live_activity_start_request.rb +++ b/generated/activitysmith_openapi/models/live_activity_start_request.rb @@ -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 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 0cb5d09..edb68c1 100644 --- a/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb +++ b/generated/activitysmith_openapi/models/live_activity_stream_delete_request.rb @@ -26,7 +26,7 @@ class LiveActivityStreamDeleteRequest 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 diff --git a/generated/activitysmith_openapi/models/live_activity_stream_request.rb b/generated/activitysmith_openapi/models/live_activity_stream_request.rb index 0253e2b..8d849f4 100644 --- a/generated/activitysmith_openapi/models/live_activity_stream_request.rb +++ b/generated/activitysmith_openapi/models/live_activity_stream_request.rb @@ -23,7 +23,7 @@ class LiveActivityStreamRequest 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 diff --git a/generated/activitysmith_openapi/models/live_activity_update_request.rb b/generated/activitysmith_openapi/models/live_activity_update_request.rb index ae174e2..0e2295a 100644 --- a/generated/activitysmith_openapi/models/live_activity_update_request.rb +++ b/generated/activitysmith_openapi/models/live_activity_update_request.rb @@ -28,7 +28,7 @@ class LiveActivityUpdateRequest 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. diff --git a/generated/activitysmith_openapi/models/rate_limit_error.rb b/generated/activitysmith_openapi/models/rate_limit_error.rb index 3015532..d123af0 100644 --- a/generated/activitysmith_openapi/models/rate_limit_error.rb +++ b/generated/activitysmith_openapi/models/rate_limit_error.rb @@ -15,13 +15,38 @@ module OpenapiClient class RateLimitError + attr_accessor :code + attr_accessor :error attr_accessor :message + 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 { + :'code' => :'code', :'error' => :'error', :'message' => :'message' } @@ -35,6 +60,7 @@ def self.acceptable_attributes # Attribute type mapping. def self.openapi_types { + :'code' => :'String', :'error' => :'String', :'message' => :'String' } @@ -61,6 +87,10 @@ def initialize(attributes = {}) h[k.to_sym] = v } + if attributes.key?(:'code') + self.code = attributes[:'code'] + end + if attributes.key?(:'error') self.error = attributes[:'error'] else @@ -94,16 +124,29 @@ def list_invalid_properties # @return true if the model is valid def valid? warn '[DEPRECATED] the `valid?` method is obsolete' + code_validator = EnumAttributeValidator.new('String', ["rate_limited"]) + return false unless code_validator.valid?(@code) return false if @error.nil? return false if @message.nil? true end + # Custom attribute writer method checking allowed values (enum). + # @param [Object] code Object to be assigned + def code=(code) + validator = EnumAttributeValidator.new('String', ["rate_limited"]) + unless validator.valid?(code) + fail ArgumentError, "invalid value for \"code\", must be one of #{validator.allowable_values}." + end + @code = code + end + # Checks equality by comparing each attribute. # @param [Object] Object to be compared def ==(o) return true if self.equal?(o) self.class == o.class && + code == o.code && error == o.error && message == o.message end @@ -117,7 +160,7 @@ def eql?(o) # Calculates hash code according to all attributes. # @return [Integer] Hash code def hash - [error, message].hash + [code, error, message].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 44bfe73..c7a11fb 100644 --- a/generated/activitysmith_openapi/models/stream_content_state.rb +++ b/generated/activitysmith_openapi/models/stream_content_state.rb @@ -14,7 +14,7 @@ require 'time' module OpenapiClient - # Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, alert, and timer types. For timer, send duration_seconds to start or reset a bounded timer; omit duration_seconds on later updates to preserve the existing timer window. + # Current state for a managed Live Activity stream. Include type on the first PUT, and whenever the stream may need to start a fresh activity. Supports segmented_progress, progress, metrics, stats, alert, timer, and value types. For timer, send duration_seconds to start or reset a bounded timer; omit duration_seconds on later updates to preserve the existing timer window. class StreamContentState attr_accessor :title @@ -29,7 +29,7 @@ class StreamContentState # Use for progress. Takes precedence over value/upper_limit if both are provided. attr_accessor :percentage - # Current progress value. Use with upper_limit for progress. + # For type=value, the required prominent readout (string or finite number); strings preserve exact formatting. For progress, a numeric progress value used with upper_limit. attr_accessor :value # Maximum progress value. Use with value for progress. @@ -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 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 segmented_progress. @@ -62,10 +62,10 @@ class StreamContentState # 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 # Optional. Seconds before the ended Live Activity is dismissed. @@ -74,28 +74,6 @@ class StreamContentState # Optional. Minutes before the ended Live Activity is dismissed. 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 { @@ -135,7 +113,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', @@ -322,7 +300,7 @@ def valid? return false if !@current_step.nil? && @current_step < 0 return false if !@percentage.nil? && @percentage > 100 return false if !@percentage.nil? && @percentage < 0 - 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) @@ -385,7 +363,7 @@ def percentage=(percentage) # 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 diff --git a/generated/openapi-source.json b/generated/openapi-source.json index dc05717..ca35066 100644 --- a/generated/openapi-source.json +++ b/generated/openapi-source.json @@ -1,6 +1,6 @@ { "repository": "ActivitySmithHQ/activitysmith-backend", - "commit": "49ad7b083b50f53bc3d81edb77ca6597845160a2", + "commit": "021e2a6c15a1a24621af28d9598967fa5e217671", "path": "openapi.json", - "sha256": "b7e33cd485df8ddc5d7fb7b57b61106fd6f8ff3ffa7cc7bef4ac1ccbbb0cede7" + "sha256": "312fce8bbe1ef45c96e9c6fce3fe0660ef242da435f2e99dc28d2ba1c5e6ff1c" }