diff --git a/README.md b/README.md index 7ab61ea..04cee52 100644 --- a/README.md +++ b/README.md @@ -6,8 +6,8 @@ A powerful way to send personalized messages at scale and build effective custom For more information, please visit [https://onesignal.com](https://onesignal.com). -- API version: 5.12.0 -- Package version: 5.12.0 +- API version: 5.13.0 +- Package version: 5.13.0 ## Requirements diff --git a/composer.json b/composer.json index 33205f8..f5e4457 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "onesignal/onesignal-php-api", - "version": "5.12.0", + "version": "5.13.0", "description": "A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com", "keywords": [ "onesignal", 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/Configuration.php b/lib/Configuration.php index 9029bb3..6414f33 100644 --- a/lib/Configuration.php +++ b/lib/Configuration.php @@ -98,7 +98,7 @@ class Configuration * * @var string */ - protected $userAgent = 'OpenAPI-Generator/5.12.0/PHP'; + protected $userAgent = 'OpenAPI-Generator/5.13.0/PHP'; /** * Debug switch (default set to false) @@ -429,7 +429,7 @@ public static function toDebugReport() $report = 'PHP SDK (onesignal\client) Debug Report:' . PHP_EOL; $report .= ' OS: ' . php_uname() . PHP_EOL; $report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL; - $report .= ' SDK Package Version: 5.12.0' . PHP_EOL; + $report .= ' SDK Package Version: 5.13.0' . PHP_EOL; $report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL; return $report; diff --git a/lib/api/DefaultApi.php b/lib/api/DefaultApi.php index 9a38595..eda889d 100644 --- a/lib/api/DefaultApi.php +++ b/lib/api/DefaultApi.php @@ -481,7 +481,7 @@ public function cancelNotificationRequest($app_id, $notification_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -835,7 +835,7 @@ public function copyTemplateToAppRequest($template_id, $app_id, $copy_template_r } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -1268,7 +1268,7 @@ public function createAliasRequest($app_id, $alias_label, $alias_id, $user_ident } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -1682,7 +1682,7 @@ public function createAliasBySubscriptionRequest($app_id, $subscription_id, $use } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -2016,7 +2016,7 @@ public function createApiKeyRequest($app_id, $create_api_key_request) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -2354,7 +2354,7 @@ public function createAppRequest($app) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -2734,7 +2734,7 @@ public function createCustomEventsRequest($app_id, $custom_events_request) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -3114,7 +3114,7 @@ public function createJourneyRequest($app_id, $create_journey_request) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -3452,7 +3452,7 @@ public function createNotificationRequest($notification) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -3826,7 +3826,7 @@ public function createSegmentRequest($app_id, $segment = null) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -4282,7 +4282,7 @@ public function createSubscriptionRequest($app_id, $alias_label, $alias_id, $sub } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -4620,7 +4620,7 @@ public function createTemplateRequest($create_template_request) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -5038,7 +5038,7 @@ public function createUserRequest($app_id, $user) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -5473,7 +5473,7 @@ public function deleteAliasRequest($app_id, $alias_label, $alias_id, $alias_labe } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -5809,7 +5809,7 @@ public function deleteApiKeyRequest($app_id, $token_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -6191,7 +6191,7 @@ public function deleteJourneyRequest($app_id, $journey_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -6573,7 +6573,7 @@ public function deleteSegmentRequest($app_id, $segment_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -6856,7 +6856,7 @@ public function deleteSubscriptionRequest($app_id, $subscription_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -7216,7 +7216,7 @@ public function deleteTemplateRequest($template_id, $app_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -7510,7 +7510,7 @@ public function deleteUserRequest($app_id, $alias_label, $alias_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -7893,7 +7893,7 @@ public function exportEventsRequest($notification_id, $app_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -8244,7 +8244,7 @@ public function exportSubscriptionsRequest($app_id, $export_subscriptions_reques } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -8637,7 +8637,7 @@ public function getAliasesRequest($app_id, $alias_label, $alias_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -8988,7 +8988,7 @@ public function getAliasesBySubscriptionRequest($app_id, $subscription_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -9328,7 +9328,7 @@ public function getAppRequest($app_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -9649,7 +9649,7 @@ public function getAppsRequest() } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -10032,7 +10032,7 @@ public function getNotificationRequest($app_id, $notification_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -10412,7 +10412,7 @@ public function getNotificationHistoryRequest($notification_id, $get_notificatio } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -10809,7 +10809,7 @@ public function getNotificationsRequest($app_id, $limit = null, $offset = null, } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -11225,7 +11225,7 @@ public function getOutcomesRequest($app_id, $outcome_names, $outcome_names2 = nu } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -11621,7 +11621,7 @@ public function getSegmentRequest($app_id, $segment_id, $include_segment_detail } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -11989,7 +11989,7 @@ public function getSegmentsRequest($app_id, $offset = null, $limit = null) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -12382,7 +12382,7 @@ public function getUserRequest($app_id, $alias_label, $alias_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -12950,7 +12950,7 @@ public function listAuditLogsRequest($organization_id, $start_time = null, $end_ } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -13286,7 +13286,7 @@ public function rotateApiKeyRequest($app_id, $token_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -13662,7 +13662,7 @@ public function startLiveActivityRequest($app_id, $activity_type, $start_live_ac } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -14076,7 +14076,7 @@ public function transferSubscriptionRequest($app_id, $subscription_id, $transfer } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -14455,7 +14455,7 @@ public function unsubscribeEmailWithTokenRequest($app_id, $notification_id, $tok } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -14808,7 +14808,7 @@ public function updateApiKeyRequest($app_id, $token_id, $update_api_key_request) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -15165,7 +15165,7 @@ public function updateAppRequest($app_id, $app) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -15633,7 +15633,7 @@ public function updateJourneyRequest($app_id, $journey_id, $update_journey_reque } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -16120,7 +16120,7 @@ public function updateJourneyNodeRequest($app_id, $journey_id, $node_id, $update } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -16496,7 +16496,7 @@ public function updateLiveActivityRequest($app_id, $activity_id, $update_live_ac } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -16912,7 +16912,7 @@ public function updateSegmentRequest($app_id, $segment_id, $update_segment_reque } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -17212,7 +17212,7 @@ public function updateSubscriptionRequest($app_id, $subscription_id, $subscripti } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -17607,7 +17607,7 @@ public function updateSubscriptionByTokenRequest($app_id, $token_type, $token, $ } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -17961,7 +17961,7 @@ public function updateTemplateRequest($template_id, $app_id, $update_template_re } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -18371,7 +18371,7 @@ public function updateUserRequest($app_id, $alias_label, $alias_id, $update_user } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -18688,7 +18688,7 @@ public function viewApiKeysRequest($app_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -19047,7 +19047,7 @@ public function viewJourneyRequest($app_id, $journey_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -19406,7 +19406,7 @@ public function viewJourneyStatsRequest($app_id, $journey_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -19804,7 +19804,7 @@ public function viewJourneysRequest($app_id, $cursor = null, $limit = 50) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -20164,7 +20164,7 @@ public function viewTemplateRequest($template_id, $app_id) } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, @@ -20547,7 +20547,7 @@ public function viewTemplatesRequest($app_id, $limit = 50, $offset = 0, $channel } // Adding the telemetry header - $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.12.0'; + $defaultHeaders['OS-Usage-Data'] = 'kind=sdk, sdk-name=onesignal-php, version=5.13.0'; $headers = array_merge( $defaultHeaders, 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. *