diff --git a/docs/Model/StartLiveActivityRequest.md b/docs/Model/StartLiveActivityRequest.md index e0e6d63..a2c542a 100644 --- a/docs/Model/StartLiveActivityRequest.md +++ b/docs/Model/StartLiveActivityRequest.md @@ -13,7 +13,7 @@ Name | Type | Description | Notes **headings** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | **stale_date** | **int** | Accepts Unix timestamp in seconds. When time reaches the configured stale date, the system considers the Live Activity out of date, and the ActivityState of the Live Activity changes to ActivityState.stale. | [optional] **priority** | **int** | Delivery priority through the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. | [optional] -**ios_relevance_score** | **float** | iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. | [optional] +**ios_relevance_score** | **float** | A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later. | [optional] **idempotency_key** | **string** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same idempotency key. If one exists, a notification will not be sent, and result of the previous operation will instead be returned. Therefore, if you plan on using this feature, it's important to use a good source of randomness to generate the UUID passed here. This key is only idempotent for 30 days. After 30 days, the notification could be removed from our system and a notification with the same idempotency key will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional] **include_aliases** | **array** | Target specific users by aliases assigned via API. An alias can be an external_id, onesignal_id, or a custom alias. Accepts an object where keys are alias labels and values are arrays of alias IDs to include Example usage: { \"external_id\": [\"exId1\", \"extId2\"], \"internal_label\": [\"id1\", \"id2\"] } Keys must match API spellings exactly (for example the label for External ID is the string `external_id`; arbitrary keys such as camelCase variants are not aliases and may yield no recipients). Not compatible with any other targeting parameters. REQUIRED: REST API Key Authentication Limit of 2,000 entries per REST API call Note: If targeting push, email, or sms subscribers with same ids, use with target_channel to indicate you are sending a push or email or sms. | [optional] **include_subscription_ids** | **string[]** | Specific subscription ids to target. Not compatible with other targeting parameters. | [optional] diff --git a/docs/Model/UpdateLiveActivityRequest.md b/docs/Model/UpdateLiveActivityRequest.md index 90788ac..5348a55 100644 --- a/docs/Model/UpdateLiveActivityRequest.md +++ b/docs/Model/UpdateLiveActivityRequest.md @@ -9,9 +9,11 @@ Name | Type | Description | Notes **event_updates** | **object** | This must match the ContentState interface you have defined within your Live Activity in your app. | **contents** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | [optional] **headings** | [**\onesignal\client\model\LanguageStringMap**](LanguageStringMap.md) | | [optional] -**sound** | **string** | Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. | [optional] +**sound** | **string** | Deprecated. The API ignores this field. Use `ios_sound`. | [optional] +**ios_sound** | **string** | Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. Requires `headings` on the same request: ActivityKit ignores an update whose alert has no title, which silently drops the sound. Supersedes the deprecated `sound` field. | [optional] **stale_date** | **int** | Accepts Unix timestamp in seconds. When time reaches the configured stale date, the system considers the Live Activity out of date, and the ActivityState of the Live Activity changes to ActivityState.stale. | [optional] **dismissal_date** | **int** | Accepts Unix timestamp in seconds; only allowed if event is \"end\" | [optional] -**priority** | **int** | Delivery priority through the the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. | [optional] +**priority** | **int** | Delivery priority through the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. | [optional] +**ios_relevance_score** | **float** | A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later. | [optional] [[Back to API list]](https://github.com/OneSignal/onesignal-php-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-php-api) diff --git a/lib/model/StartLiveActivityRequest.php b/lib/model/StartLiveActivityRequest.php index 0fad8e7..461eef3 100644 --- a/lib/model/StartLiveActivityRequest.php +++ b/lib/model/StartLiveActivityRequest.php @@ -577,7 +577,7 @@ public function getIosRelevanceScore() /** * Sets ios_relevance_score * - * @param float|null $ios_relevance_score iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. + * @param float|null $ios_relevance_score A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later. * * @return self */ diff --git a/lib/model/UpdateLiveActivityRequest.php b/lib/model/UpdateLiveActivityRequest.php index 7b1a806..e99b22c 100644 --- a/lib/model/UpdateLiveActivityRequest.php +++ b/lib/model/UpdateLiveActivityRequest.php @@ -65,9 +65,11 @@ class UpdateLiveActivityRequest implements ModelInterface, ArrayAccess, \JsonSer 'contents' => '\onesignal\client\model\LanguageStringMap', 'headings' => '\onesignal\client\model\LanguageStringMap', 'sound' => 'string', + 'ios_sound' => 'string', 'stale_date' => 'int', 'dismissal_date' => 'int', - 'priority' => 'int' + 'priority' => 'int', + 'ios_relevance_score' => 'float' ]; /** @@ -84,9 +86,11 @@ class UpdateLiveActivityRequest implements ModelInterface, ArrayAccess, \JsonSer 'contents' => null, 'headings' => null, 'sound' => null, + 'ios_sound' => null, 'stale_date' => null, 'dismissal_date' => null, - 'priority' => null + 'priority' => null, + 'ios_relevance_score' => null ]; /** @@ -122,9 +126,11 @@ public static function openAPIFormats() 'contents' => 'contents', 'headings' => 'headings', 'sound' => 'sound', + 'ios_sound' => 'ios_sound', 'stale_date' => 'stale_date', 'dismissal_date' => 'dismissal_date', - 'priority' => 'priority' + 'priority' => 'priority', + 'ios_relevance_score' => 'ios_relevance_score' ]; /** @@ -139,9 +145,11 @@ public static function openAPIFormats() 'contents' => 'setContents', 'headings' => 'setHeadings', 'sound' => 'setSound', + 'ios_sound' => 'setIosSound', 'stale_date' => 'setStaleDate', 'dismissal_date' => 'setDismissalDate', - 'priority' => 'setPriority' + 'priority' => 'setPriority', + 'ios_relevance_score' => 'setIosRelevanceScore' ]; /** @@ -156,9 +164,11 @@ public static function openAPIFormats() 'contents' => 'getContents', 'headings' => 'getHeadings', 'sound' => 'getSound', + 'ios_sound' => 'getIosSound', 'stale_date' => 'getStaleDate', 'dismissal_date' => 'getDismissalDate', - 'priority' => 'getPriority' + 'priority' => 'getPriority', + 'ios_relevance_score' => 'getIosRelevanceScore' ]; /** @@ -239,9 +249,11 @@ public function __construct(?array $data = null) $this->container['contents'] = $data['contents'] ?? null; $this->container['headings'] = $data['headings'] ?? null; $this->container['sound'] = $data['sound'] ?? null; + $this->container['ios_sound'] = $data['ios_sound'] ?? null; $this->container['stale_date'] = $data['stale_date'] ?? null; $this->container['dismissal_date'] = $data['dismissal_date'] ?? null; $this->container['priority'] = $data['priority'] ?? null; + $this->container['ios_relevance_score'] = $data['ios_relevance_score'] ?? null; } /** @@ -420,6 +432,7 @@ public function setHeadings($headings) * Gets sound * * @return string|null + * @deprecated */ public function getSound() { @@ -429,9 +442,10 @@ public function getSound() /** * Sets sound * - * @param string|null $sound Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. + * @param string|null $sound Deprecated. The API ignores this field. Use `ios_sound`. * * @return self + * @deprecated */ public function setSound($sound) { @@ -440,6 +454,30 @@ public function setSound($sound) return $this; } + /** + * Gets ios_sound + * + * @return string|null + */ + public function getIosSound() + { + return $this->container['ios_sound']; + } + + /** + * Sets ios_sound + * + * @param string|null $ios_sound Sound file that is included in your app to play instead of the default device notification sound. Omit to disable vibration and sound for the notification. Requires `headings` on the same request: ActivityKit ignores an update whose alert has no title, which silently drops the sound. Supersedes the deprecated `sound` field. + * + * @return self + */ + public function setIosSound($ios_sound) + { + $this->container['ios_sound'] = $ios_sound; + + return $this; + } + /** * Gets stale_date * @@ -501,7 +539,7 @@ public function getPriority() /** * Sets priority * - * @param int|null $priority Delivery priority through the the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. + * @param int|null $priority Delivery priority through the push provider (APNs). Pass 10 for higher priority notifications, or 5 for lower priority notifications. Lower priority notifications are sent based on the power considerations of the end user's device. If not set, defaults to 10. Some providers (APNs) allow for a limited budget of high priority notifications per hour, and if that budget is exceeded, the provider may throttle notification delivery. * * @return self */ @@ -511,6 +549,30 @@ public function setPriority($priority) return $this; } + + /** + * Gets ios_relevance_score + * + * @return float|null + */ + public function getIosRelevanceScore() + { + return $this->container['ios_relevance_score']; + } + + /** + * Sets ios_relevance_score + * + * @param float|null $ios_relevance_score A value between 0 and 1. When more than one Live Activity is active for your app, the one with the highest relevance score shows in the Dynamic Island. If the scores are equal, the system shows the Live Activity that started first. The score also sets the order of Live Activities on the Lock Screen. Only available on iOS 16.2 and later. + * + * @return self + */ + public function setIosRelevanceScore($ios_relevance_score) + { + $this->container['ios_relevance_score'] = $ios_relevance_score; + + return $this; + } /** * Returns true if offset exists. False otherwise. *