diff --git a/generated/activitysmith_openapi/models/live_activity_action.rb b/generated/activitysmith_openapi/models/live_activity_action.rb index 38fc7b9..1f83765 100644 --- a/generated/activitysmith_openapi/models/live_activity_action.rb +++ b/generated/activitysmith_openapi/models/live_activity_action.rb @@ -21,7 +21,7 @@ class LiveActivityAction attr_accessor :type - # Action URL. For open_url, use an HTTPS or shortcuts:// URL. For webhook, use an HTTPS URL called by the ActivitySmith backend. + # Action URL. For open_url, use an HTTPS URL or a shortcuts:// URL that runs an Apple Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend. attr_accessor :url # Webhook HTTP method. Used only when type=webhook. @@ -95,7 +95,6 @@ def initialize(attributes = {}) else self.url = nil end - validate_action_url! if attributes.key?(:'method') self.method = attributes[:'method'] @@ -110,16 +109,6 @@ def initialize(attributes = {}) end end - def validate_action_url! - return if @url.nil? || @type.nil? - if @type == LiveActivityActionType::OPEN_URL && @url !~ /\A(https|shortcuts):\/\// - fail ArgumentError, 'invalid value for "url", open_url must use https or shortcuts.' - end - if @type == LiveActivityActionType::WEBHOOK && @url !~ /\Ahttps:\/\// - fail ArgumentError, 'invalid value for "url", webhook must use https.' - end - end - # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties @@ -136,12 +125,6 @@ def list_invalid_properties if @url.nil? invalid_properties.push('invalid value for "url", url cannot be nil.') end - if !@url.nil? && @type == LiveActivityActionType::OPEN_URL && @url !~ /\A(https|shortcuts):\/\// - invalid_properties.push('invalid value for "url", open_url must use https or shortcuts.') - end - if !@url.nil? && @type == LiveActivityActionType::WEBHOOK && @url !~ /\Ahttps:\/\// - invalid_properties.push('invalid value for "url", webhook must use https.') - end invalid_properties end @@ -153,8 +136,6 @@ def valid? return false if @title.nil? return false if @type.nil? return false if @url.nil? - return false if !@url.nil? && @type == LiveActivityActionType::OPEN_URL && @url !~ /\A(https|shortcuts):\/\// - return false if !@url.nil? && @type == LiveActivityActionType::WEBHOOK && @url !~ /\Ahttps:\/\// true end diff --git a/generated/activitysmith_openapi/models/push_notification_action.rb b/generated/activitysmith_openapi/models/push_notification_action.rb index 1238aeb..4980c21 100644 --- a/generated/activitysmith_openapi/models/push_notification_action.rb +++ b/generated/activitysmith_openapi/models/push_notification_action.rb @@ -20,7 +20,7 @@ class PushNotificationAction attr_accessor :type - # Action URL. For open_url, use an HTTPS or shortcuts:// URL. For webhook, use an HTTPS URL called by the ActivitySmith backend. + # Action URL. For open_url, use an HTTPS URL or a shortcuts:// URL that runs an Apple Shortcut. For webhook, use an HTTPS URL called by the ActivitySmith backend. attr_accessor :url # Webhook HTTP method. Used only when type=webhook. @@ -94,7 +94,6 @@ def initialize(attributes = {}) else self.url = nil end - validate_action_url! if attributes.key?(:'method') self.method = attributes[:'method'] @@ -109,16 +108,6 @@ def initialize(attributes = {}) end end - def validate_action_url! - return if @url.nil? || @type.nil? - if @type == PushNotificationActionType::OPEN_URL && @url !~ /\A(https|shortcuts):\/\// - fail ArgumentError, 'invalid value for "url", open_url must use https or shortcuts.' - end - if @type == PushNotificationActionType::WEBHOOK && @url !~ /\Ahttps:\/\// - fail ArgumentError, 'invalid value for "url", webhook must use https.' - end - end - # Show invalid properties with the reasons. Usually used together with valid? # @return Array for valid properties with the reasons def list_invalid_properties @@ -135,12 +124,6 @@ def list_invalid_properties if @url.nil? invalid_properties.push('invalid value for "url", url cannot be nil.') end - if !@url.nil? && @type == PushNotificationActionType::OPEN_URL && @url !~ /\A(https|shortcuts):\/\// - invalid_properties.push('invalid value for "url", open_url must use https or shortcuts.') - end - if !@url.nil? && @type == PushNotificationActionType::WEBHOOK && @url !~ /\Ahttps:\/\// - invalid_properties.push('invalid value for "url", webhook must use https.') - end invalid_properties end @@ -152,8 +135,6 @@ def valid? return false if @title.nil? return false if @type.nil? return false if @url.nil? - return false if !@url.nil? && @type == PushNotificationActionType::OPEN_URL && @url !~ /\A(https|shortcuts):\/\// - return false if !@url.nil? && @type == PushNotificationActionType::WEBHOOK && @url !~ /\Ahttps:\/\// true end diff --git a/generated/activitysmith_openapi/models/push_notification_request.rb b/generated/activitysmith_openapi/models/push_notification_request.rb index d15ad5b..0bf454c 100644 --- a/generated/activitysmith_openapi/models/push_notification_request.rb +++ b/generated/activitysmith_openapi/models/push_notification_request.rb @@ -24,7 +24,7 @@ class PushNotificationRequest # Optional HTTPS URL for an image, audio file, or video that users can preview or play when they expand the notification. If `redirection` is omitted, tapping the notification opens this URL. Cannot be combined with `actions`. attr_accessor :media - # Optional HTTPS or shortcuts:// URL opened when user taps the notification body. Overrides the default tap target from `media` when both are provided. + # Optional HTTPS URL or shortcuts:// URL opened when the user taps the notification body. Use shortcuts:// to run an Apple Shortcut. Overrides the default tap target from `media` when both are provided. attr_accessor :redirection # Optional interactive actions shown when users expand the notification. Cannot be combined with `media`.