Skip to content

Commit b5df324

Browse files
author
OneSignal
committed
feat: add v5.12.0 package updates
1 parent 029e6bf commit b5df324

4 files changed

Lines changed: 16 additions & 6 deletions

File tree

docs/StartLiveActivityRequest.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Name | Type | Description | Notes
1313
**headings** | [**crate::models::LanguageStringMap**](LanguageStringMap.md) | |
1414
**stale_date** | Option<**i32**> | 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]
1515
**priority** | Option<**i32**> | 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]
16-
**ios_relevance_score** | Option<**f32**> | iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. | [optional]
16+
**ios_relevance_score** | Option<**f32**> | 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]
1717
**idempotency_key** | Option<**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]
1818
**include_aliases** | Option<[**::std::collections::HashMap<String, Vec<String>>**](array.md)> | 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]
1919
**include_subscription_ids** | Option<**Vec<String>**> | Specific subscription ids to target. Not compatible with other targeting parameters. | [optional]

docs/UpdateLiveActivityRequest.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ Name | Type | Description | Notes
99
**event_updates** | [**serde_json::Value**](.md) | This must match the ContentState interface you have defined within your Live Activity in your app. |
1010
**contents** | Option<[**crate::models::LanguageStringMap**](LanguageStringMap.md)> | | [optional]
1111
**headings** | Option<[**crate::models::LanguageStringMap**](LanguageStringMap.md)> | | [optional]
12-
**sound** | Option<**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]
12+
**sound** | Option<**String**> | Deprecated. The API ignores this field. Use `ios_sound`. | [optional]
13+
**ios_sound** | Option<**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]
1314
**stale_date** | Option<**i32**> | 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]
1415
**dismissal_date** | Option<**i32**> | Accepts Unix timestamp in seconds; only allowed if event is \"end\" | [optional]
15-
**priority** | Option<**i32**> | 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]
16+
**priority** | Option<**i32**> | 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]
17+
**ios_relevance_score** | Option<**f32**> | 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]
1618

1719
[[Back to API list]](https://github.com/OneSignal/onesignal-rust-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-rust-api)
1820

src/models/start_live_activity_request.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub struct StartLiveActivityRequest {
3636
/// 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.
3737
#[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
3838
pub priority: Option<i32>,
39-
/// iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1.
39+
/// 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.
4040
#[serde(rename = "ios_relevance_score", skip_serializing_if = "Option::is_none")]
4141
pub ios_relevance_score: Option<f32>,
4242
/// 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

src/models/update_live_activity_request.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,24 @@ pub struct UpdateLiveActivityRequest {
2424
pub contents: Option<Box<crate::models::LanguageStringMap>>,
2525
#[serde(rename = "headings", skip_serializing_if = "Option::is_none")]
2626
pub headings: Option<Box<crate::models::LanguageStringMap>>,
27-
/// 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.
27+
/// Deprecated. The API ignores this field. Use `ios_sound`.
2828
#[serde(rename = "sound", skip_serializing_if = "Option::is_none")]
2929
pub sound: Option<String>,
30+
/// 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.
31+
#[serde(rename = "ios_sound", skip_serializing_if = "Option::is_none")]
32+
pub ios_sound: Option<String>,
3033
/// 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.
3134
#[serde(rename = "stale_date", skip_serializing_if = "Option::is_none")]
3235
pub stale_date: Option<i32>,
3336
/// Accepts Unix timestamp in seconds; only allowed if event is \"end\"
3437
#[serde(rename = "dismissal_date", skip_serializing_if = "Option::is_none")]
3538
pub dismissal_date: Option<i32>,
36-
/// 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.
39+
/// 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.
3740
#[serde(rename = "priority", skip_serializing_if = "Option::is_none")]
3841
pub priority: Option<i32>,
42+
/// 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.
43+
#[serde(rename = "ios_relevance_score", skip_serializing_if = "Option::is_none")]
44+
pub ios_relevance_score: Option<f32>,
3945
}
4046

4147
impl UpdateLiveActivityRequest {
@@ -47,9 +53,11 @@ impl UpdateLiveActivityRequest {
4753
contents: None,
4854
headings: None,
4955
sound: None,
56+
ios_sound: None,
5057
stale_date: None,
5158
dismissal_date: None,
5259
priority: None,
60+
ios_relevance_score: None,
5361
}
5462
}
5563
}

0 commit comments

Comments
 (0)