From 661137f70420caec8844620e547ae88588a6ea90 Mon Sep 17 00:00:00 2001 From: activitysmith-bot Date: Fri, 18 Sep 2026 08:34:46 +0000 Subject: [PATCH] chore: regenerate SDK --- generated/Model/ContentStateEnd.php | 16 +++-- generated/Model/ContentStateStart.php | 16 +++-- generated/Model/ContentStateUpdate.php | 16 +++-- generated/Model/LiveActivityAction.php | 2 +- generated/Model/LiveActivityEndRequest.php | 2 +- generated/Model/LiveActivityStartRequest.php | 2 +- .../Model/LiveActivityStreamDeleteRequest.php | 2 +- generated/Model/LiveActivityStreamRequest.php | 2 +- generated/Model/LiveActivityUpdateRequest.php | 2 +- generated/Model/RateLimitError.php | 66 +++++++++++++++++++ .../Model/SendPushNotification429Response.php | 66 +++++++++++++++++++ generated/Model/StreamContentState.php | 16 +++-- generated/openapi-source.json | 4 +- 13 files changed, 176 insertions(+), 36 deletions(-) diff --git a/generated/Model/ContentStateEnd.php b/generated/Model/ContentStateEnd.php index e3ecb53..e8baa1d 100644 --- a/generated/Model/ContentStateEnd.php +++ b/generated/Model/ContentStateEnd.php @@ -35,7 +35,7 @@ * ContentStateEnd Class Doc Comment * * @category Class - * @description 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. + * @description 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. * @package ActivitySmith\Generated * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -63,7 +63,7 @@ class ContentStateEnd implements ModelInterface, ArrayAccess, \JsonSerializable 'numberOfSteps' => 'int', 'currentStep' => 'int', 'percentage' => 'float', - 'value' => 'float', + 'value' => 'string', 'upperLimit' => 'float', 'durationSeconds' => 'float', 'countsDown' => 'bool', @@ -343,6 +343,7 @@ public function getModelName() public const TYPE_STATS = 'stats'; public const TYPE_ALERT = 'alert'; public const TYPE_TIMER = 'timer'; + public const TYPE_VALUE = 'value'; public const COLOR_LIME = 'lime'; public const COLOR_GREEN = 'green'; public const COLOR_CYAN = 'cyan'; @@ -388,6 +389,7 @@ public function getTypeAllowableValues() self::TYPE_STATS, self::TYPE_ALERT, self::TYPE_TIMER, + self::TYPE_VALUE, ]; } @@ -750,7 +752,7 @@ public function setPercentage($percentage) /** * Gets value * - * @return float|null + * @return string|null */ public function getValue() { @@ -760,7 +762,7 @@ public function getValue() /** * Sets value * - * @param float|null $value Current progress value. Use with upper_limit for type=progress. + * @param string|null $value 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. * * @return self */ @@ -961,7 +963,7 @@ public function getIcon() /** * Sets icon * - * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer. + * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value. * * @return self */ @@ -988,7 +990,7 @@ public function getBadge() /** * Sets badge * - * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge. Supported by alert, progress, and segmented_progress. + * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge. Supported by alert, progress, segmented_progress, and value. * * @return self */ @@ -1052,7 +1054,7 @@ public function getColor() /** * Sets color * - * @param string|null $color 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. + * @param string|null $color 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. * * @return self */ diff --git a/generated/Model/ContentStateStart.php b/generated/Model/ContentStateStart.php index c6972d7..f2ff414 100644 --- a/generated/Model/ContentStateStart.php +++ b/generated/Model/ContentStateStart.php @@ -35,7 +35,7 @@ * ContentStateStart Class Doc Comment * * @category Class - * @description 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. + * @description 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. * @package ActivitySmith\Generated * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -63,7 +63,7 @@ class ContentStateStart implements ModelInterface, ArrayAccess, \JsonSerializabl 'numberOfSteps' => 'int', 'currentStep' => 'int', 'percentage' => 'float', - 'value' => 'float', + 'value' => 'string', 'upperLimit' => 'float', 'durationSeconds' => 'float', 'countsDown' => 'bool', @@ -337,6 +337,7 @@ public function getModelName() public const TYPE_STATS = 'stats'; public const TYPE_ALERT = 'alert'; public const TYPE_TIMER = 'timer'; + public const TYPE_VALUE = 'value'; public const COLOR_LIME = 'lime'; public const COLOR_GREEN = 'green'; public const COLOR_CYAN = 'cyan'; @@ -382,6 +383,7 @@ public function getTypeAllowableValues() self::TYPE_STATS, self::TYPE_ALERT, self::TYPE_TIMER, + self::TYPE_VALUE, ]; } @@ -742,7 +744,7 @@ public function setPercentage($percentage) /** * Gets value * - * @return float|null + * @return string|null */ public function getValue() { @@ -752,7 +754,7 @@ public function getValue() /** * Sets value * - * @param float|null $value Current progress value. Use with upper_limit for type=progress. + * @param string|null $value 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. * * @return self */ @@ -953,7 +955,7 @@ public function getIcon() /** * Sets icon * - * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer. + * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value. * * @return self */ @@ -980,7 +982,7 @@ public function getBadge() /** * Sets badge * - * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge. Supported by alert, progress, and segmented_progress. + * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge. Supported by alert, progress, segmented_progress, and value. * * @return self */ @@ -1044,7 +1046,7 @@ public function getColor() /** * Sets color * - * @param string|null $color 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. + * @param string|null $color 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. * * @return self */ diff --git a/generated/Model/ContentStateUpdate.php b/generated/Model/ContentStateUpdate.php index 84c7be3..c305275 100644 --- a/generated/Model/ContentStateUpdate.php +++ b/generated/Model/ContentStateUpdate.php @@ -35,7 +35,7 @@ * ContentStateUpdate Class Doc Comment * * @category Class - * @description 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. + * @description 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. * @package ActivitySmith\Generated * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -63,7 +63,7 @@ class ContentStateUpdate implements ModelInterface, ArrayAccess, \JsonSerializab 'numberOfSteps' => 'int', 'currentStep' => 'int', 'percentage' => 'float', - 'value' => 'float', + 'value' => 'string', 'upperLimit' => 'float', 'durationSeconds' => 'float', 'countsDown' => 'bool', @@ -337,6 +337,7 @@ public function getModelName() public const TYPE_STATS = 'stats'; public const TYPE_ALERT = 'alert'; public const TYPE_TIMER = 'timer'; + public const TYPE_VALUE = 'value'; public const COLOR_LIME = 'lime'; public const COLOR_GREEN = 'green'; public const COLOR_CYAN = 'cyan'; @@ -382,6 +383,7 @@ public function getTypeAllowableValues() self::TYPE_STATS, self::TYPE_ALERT, self::TYPE_TIMER, + self::TYPE_VALUE, ]; } @@ -739,7 +741,7 @@ public function setPercentage($percentage) /** * Gets value * - * @return float|null + * @return string|null */ public function getValue() { @@ -749,7 +751,7 @@ public function getValue() /** * Sets value * - * @param float|null $value Current progress value. Use with upper_limit for type=progress. + * @param string|null $value 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. * * @return self */ @@ -950,7 +952,7 @@ public function getIcon() /** * Sets icon * - * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer. + * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value. * * @return self */ @@ -977,7 +979,7 @@ public function getBadge() /** * Sets badge * - * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge. Supported by alert, progress, and segmented_progress. + * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge. Supported by alert, progress, segmented_progress, and value. * * @return self */ @@ -1041,7 +1043,7 @@ public function getColor() /** * Sets color * - * @param string|null $color 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. + * @param string|null $color 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. * * @return self */ diff --git a/generated/Model/LiveActivityAction.php b/generated/Model/LiveActivityAction.php index f21a210..805d286 100644 --- a/generated/Model/LiveActivityAction.php +++ b/generated/Model/LiveActivityAction.php @@ -35,7 +35,7 @@ * LiveActivityAction Class Doc Comment * * @category Class - * @description 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. + * @description 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. * @package ActivitySmith\Generated * @author OpenAPI Generator team * @link https://openapi-generator.tech diff --git a/generated/Model/LiveActivityEndRequest.php b/generated/Model/LiveActivityEndRequest.php index 6adb132..6ae266d 100644 --- a/generated/Model/LiveActivityEndRequest.php +++ b/generated/Model/LiveActivityEndRequest.php @@ -495,7 +495,7 @@ public function getSecondaryAction() /** * Sets secondaryAction * - * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. + * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction 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. * * @return self */ diff --git a/generated/Model/LiveActivityStartRequest.php b/generated/Model/LiveActivityStartRequest.php index 445118c..e160259 100644 --- a/generated/Model/LiveActivityStartRequest.php +++ b/generated/Model/LiveActivityStartRequest.php @@ -437,7 +437,7 @@ public function getSecondaryAction() /** * Sets secondaryAction * - * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. + * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction 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. * * @return self */ diff --git a/generated/Model/LiveActivityStreamDeleteRequest.php b/generated/Model/LiveActivityStreamDeleteRequest.php index 3491a9f..72a3851 100644 --- a/generated/Model/LiveActivityStreamDeleteRequest.php +++ b/generated/Model/LiveActivityStreamDeleteRequest.php @@ -454,7 +454,7 @@ public function getSecondaryAction() /** * Sets secondaryAction * - * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. + * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction 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. * * @return self */ diff --git a/generated/Model/LiveActivityStreamRequest.php b/generated/Model/LiveActivityStreamRequest.php index 9e7ac2d..ca0d7f1 100644 --- a/generated/Model/LiveActivityStreamRequest.php +++ b/generated/Model/LiveActivityStreamRequest.php @@ -448,7 +448,7 @@ public function getSecondaryAction() /** * Sets secondaryAction * - * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. + * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction 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. * * @return self */ diff --git a/generated/Model/LiveActivityUpdateRequest.php b/generated/Model/LiveActivityUpdateRequest.php index 3dc121d..770c6f1 100644 --- a/generated/Model/LiveActivityUpdateRequest.php +++ b/generated/Model/LiveActivityUpdateRequest.php @@ -495,7 +495,7 @@ public function getSecondaryAction() /** * Sets secondaryAction * - * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction Optional secondary action button. Supported for alert, progress, and segmented_progress Live Activities. Uses the same open_url, shortcuts://, and webhook shapes as action. + * @param \ActivitySmith\Generated\Model\LiveActivityAction|null $secondaryAction 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. * * @return self */ diff --git a/generated/Model/RateLimitError.php b/generated/Model/RateLimitError.php index 0fda019..a22cdd4 100644 --- a/generated/Model/RateLimitError.php +++ b/generated/Model/RateLimitError.php @@ -57,6 +57,7 @@ class RateLimitError implements ModelInterface, ArrayAccess, \JsonSerializable * @var string[] */ protected static $openAPITypes = [ + 'code' => 'string', 'error' => 'string', 'message' => 'string' ]; @@ -69,6 +70,7 @@ class RateLimitError implements ModelInterface, ArrayAccess, \JsonSerializable * @psalm-var array */ protected static $openAPIFormats = [ + 'code' => null, 'error' => null, 'message' => null ]; @@ -79,6 +81,7 @@ class RateLimitError implements ModelInterface, ArrayAccess, \JsonSerializable * @var boolean[] */ protected static array $openAPINullables = [ + 'code' => false, 'error' => false, 'message' => false ]; @@ -169,6 +172,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'code' => 'code', 'error' => 'error', 'message' => 'message' ]; @@ -179,6 +183,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'code' => 'setCode', 'error' => 'setError', 'message' => 'setMessage' ]; @@ -189,6 +194,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'code' => 'getCode', 'error' => 'getError', 'message' => 'getMessage' ]; @@ -234,6 +240,19 @@ public function getModelName() return self::$openAPIModelName; } + public const CODE_RATE_LIMITED = 'rate_limited'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCodeAllowableValues() + { + return [ + self::CODE_RATE_LIMITED, + ]; + } /** * Associative array for storing property values @@ -250,6 +269,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('code', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); } @@ -281,6 +301,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'code', must be one of '%s'", + $this->container['code'], + implode("', '", $allowedValues) + ); + } + if ($this->container['error'] === null) { $invalidProperties[] = "'error' can't be null"; } @@ -302,6 +331,43 @@ public function valid() } + /** + * Gets code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code code + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'code', must be one of '%s'", + $code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + /** * Gets error * diff --git a/generated/Model/SendPushNotification429Response.php b/generated/Model/SendPushNotification429Response.php index 699a703..462769c 100644 --- a/generated/Model/SendPushNotification429Response.php +++ b/generated/Model/SendPushNotification429Response.php @@ -57,6 +57,7 @@ class SendPushNotification429Response implements ModelInterface, ArrayAccess, \J * @var string[] */ protected static $openAPITypes = [ + 'code' => 'string', 'error' => 'string', 'message' => 'string', 'limit' => 'int', @@ -73,6 +74,7 @@ class SendPushNotification429Response implements ModelInterface, ArrayAccess, \J * @psalm-var array */ protected static $openAPIFormats = [ + 'code' => null, 'error' => null, 'message' => null, 'limit' => null, @@ -87,6 +89,7 @@ class SendPushNotification429Response implements ModelInterface, ArrayAccess, \J * @var boolean[] */ protected static array $openAPINullables = [ + 'code' => false, 'error' => false, 'message' => false, 'limit' => false, @@ -181,6 +184,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $attributeMap = [ + 'code' => 'code', 'error' => 'error', 'message' => 'message', 'limit' => 'limit', @@ -195,6 +199,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $setters = [ + 'code' => 'setCode', 'error' => 'setError', 'message' => 'setMessage', 'limit' => 'setLimit', @@ -209,6 +214,7 @@ public function isNullableSetToNull(string $property): bool * @var string[] */ protected static $getters = [ + 'code' => 'getCode', 'error' => 'getError', 'message' => 'getMessage', 'limit' => 'getLimit', @@ -258,6 +264,19 @@ public function getModelName() return self::$openAPIModelName; } + public const CODE_RATE_LIMITED = 'rate_limited'; + + /** + * Gets allowable values of the enum + * + * @return string[] + */ + public function getCodeAllowableValues() + { + return [ + self::CODE_RATE_LIMITED, + ]; + } /** * Associative array for storing property values @@ -274,6 +293,7 @@ public function getModelName() */ public function __construct(array $data = null) { + $this->setIfExists('code', $data ?? [], null); $this->setIfExists('error', $data ?? [], null); $this->setIfExists('message', $data ?? [], null); $this->setIfExists('limit', $data ?? [], null); @@ -309,6 +329,15 @@ public function listInvalidProperties() { $invalidProperties = []; + $allowedValues = $this->getCodeAllowableValues(); + if (!is_null($this->container['code']) && !in_array($this->container['code'], $allowedValues, true)) { + $invalidProperties[] = sprintf( + "invalid value '%s' for 'code', must be one of '%s'", + $this->container['code'], + implode("', '", $allowedValues) + ); + } + if ($this->container['error'] === null) { $invalidProperties[] = "'error' can't be null"; } @@ -336,6 +365,43 @@ public function valid() } + /** + * Gets code + * + * @return string|null + */ + public function getCode() + { + return $this->container['code']; + } + + /** + * Sets code + * + * @param string|null $code code + * + * @return self + */ + public function setCode($code) + { + if (is_null($code)) { + throw new \InvalidArgumentException('non-nullable code cannot be null'); + } + $allowedValues = $this->getCodeAllowableValues(); + if (!in_array($code, $allowedValues, true)) { + throw new \InvalidArgumentException( + sprintf( + "Invalid value '%s' for 'code', must be one of '%s'", + $code, + implode("', '", $allowedValues) + ) + ); + } + $this->container['code'] = $code; + + return $this; + } + /** * Gets error * diff --git a/generated/Model/StreamContentState.php b/generated/Model/StreamContentState.php index feed44e..43b7094 100644 --- a/generated/Model/StreamContentState.php +++ b/generated/Model/StreamContentState.php @@ -35,7 +35,7 @@ * StreamContentState Class Doc Comment * * @category Class - * @description 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. + * @description 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. * @package ActivitySmith\Generated * @author OpenAPI Generator team * @link https://openapi-generator.tech @@ -63,7 +63,7 @@ class StreamContentState implements ModelInterface, ArrayAccess, \JsonSerializab 'numberOfSteps' => 'int', 'currentStep' => 'int', 'percentage' => 'float', - 'value' => 'float', + 'value' => 'string', 'upperLimit' => 'float', 'durationSeconds' => 'float', 'countsDown' => 'bool', @@ -349,6 +349,7 @@ public function getModelName() public const TYPE_STATS = 'stats'; public const TYPE_ALERT = 'alert'; public const TYPE_TIMER = 'timer'; + public const TYPE_VALUE = 'value'; public const COLOR_LIME = 'lime'; public const COLOR_GREEN = 'green'; public const COLOR_CYAN = 'cyan'; @@ -394,6 +395,7 @@ public function getTypeAllowableValues() self::TYPE_STATS, self::TYPE_ALERT, self::TYPE_TIMER, + self::TYPE_VALUE, ]; } @@ -761,7 +763,7 @@ public function setPercentage($percentage) /** * Gets value * - * @return float|null + * @return string|null */ public function getValue() { @@ -771,7 +773,7 @@ public function getValue() /** * Sets value * - * @param float|null $value Current progress value. Use with upper_limit for progress. + * @param string|null $value 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. * * @return self */ @@ -943,7 +945,7 @@ public function getColor() /** * Sets color * - * @param string|null $color 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. + * @param string|null $color 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. * * @return self */ @@ -1119,7 +1121,7 @@ public function getIcon() /** * Sets icon * - * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, and timer. + * @param \ActivitySmith\Generated\Model\LiveActivityAlertIcon|null $icon Optional SF Symbol icon. Supported by alert, progress, segmented_progress, metrics, stats, timer, and value. * * @return self */ @@ -1146,7 +1148,7 @@ public function getBadge() /** * Sets badge * - * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge. Supported by alert, progress, and segmented_progress. + * @param \ActivitySmith\Generated\Model\LiveActivityAlertBadge|null $badge Optional badge. Supported by alert, progress, segmented_progress, and value. * * @return self */ 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" }