From 207fa4ec5ec7ab0bcdc70acdf363c7b07534f4c3 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Mon, 24 Aug 2026 23:24:23 +0000 Subject: [PATCH] feat: add v5.12.0 package updates --- api/openapi.yaml | 33 +++++-- docs/StartLiveActivityRequest.md | 2 +- docs/UpdateLiveActivityRequest.md | 6 +- .../model/StartLiveActivityRequest.java | 4 +- .../model/UpdateLiveActivityRequest.java | 87 +++++++++++++++++-- 5 files changed, 114 insertions(+), 18 deletions(-) diff --git a/api/openapi.yaml b/api/openapi.yaml index b4b0c1e0..951375be 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -4529,6 +4529,7 @@ components: tr: tr sound: sound name: name + ios_sound: ios_sound headings: de: de hi: hi @@ -4576,6 +4577,7 @@ components: dismissal_date: 6 event: update priority: 1 + ios_relevance_score: 5.962133916683182 properties: name: description: An internal name to assist with your campaign organization. @@ -4595,9 +4597,15 @@ components: headings: $ref: '#/components/schemas/LanguageStringMap' sound: - description: 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. + deprecated: true + description: Deprecated. The API ignores this field. Use `ios_sound`. + type: string + ios_sound: + description: "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.\n" type: string stale_date: description: "Accepts Unix timestamp in seconds. When time reaches the configured\ @@ -4609,14 +4617,22 @@ components: "end" type: integer priority: - description: "Delivery priority through the the push provider (APNs). Pass\ - \ 10 for higher priority notifications, or 5 for lower priority notifications.\ + description: "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." type: integer + ios_relevance_score: + description: "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." + nullable: true + type: number required: - event - event_updates @@ -5140,8 +5156,11 @@ components: \ of the end user's device. If not set, defaults to 10." type: integer ios_relevance_score: - description: iOS 15+. A score to indicate how a notification should be displayed - when grouped. Use a float between 0-1. + description: "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." nullable: true type: number idempotency_key: diff --git a/docs/StartLiveActivityRequest.md b/docs/StartLiveActivityRequest.md index bdbd6b18..265b5b5a 100644 --- a/docs/StartLiveActivityRequest.md +++ b/docs/StartLiveActivityRequest.md @@ -16,7 +16,7 @@ |**headings** | [**LanguageStringMap**](LanguageStringMap.md) | | | |**staleDate** | **Integer** | 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** | **Integer** | 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] | -|**iosRelevanceScore** | **BigDecimal** | iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. | [optional] | +|**iosRelevanceScore** | **BigDecimal** | 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] | |**idempotencyKey** | **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] | |**includeAliases** | **Map<String, List<String>>** | 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] | |**includeSubscriptionIds** | **List<String>** | Specific subscription ids to target. Not compatible with other targeting parameters. | [optional] | diff --git a/docs/UpdateLiveActivityRequest.md b/docs/UpdateLiveActivityRequest.md index d4d319f5..e9ae1dcc 100644 --- a/docs/UpdateLiveActivityRequest.md +++ b/docs/UpdateLiveActivityRequest.md @@ -12,10 +12,12 @@ |**eventUpdates** | **Object** | This must match the ContentState interface you have defined within your Live Activity in your app. | | |**contents** | [**LanguageStringMap**](LanguageStringMap.md) | | [optional] | |**headings** | [**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] | +|**iosSound** | **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] | |**staleDate** | **Integer** | 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] | |**dismissalDate** | **Integer** | Accepts Unix timestamp in seconds; only allowed if event is \"end\" | [optional] | -|**priority** | **Integer** | 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** | **Integer** | 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] | +|**iosRelevanceScore** | **BigDecimal** | 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] | diff --git a/src/main/java/com/onesignal/client/model/StartLiveActivityRequest.java b/src/main/java/com/onesignal/client/model/StartLiveActivityRequest.java index 83ceb644..cc27d3e2 100644 --- a/src/main/java/com/onesignal/client/model/StartLiveActivityRequest.java +++ b/src/main/java/com/onesignal/client/model/StartLiveActivityRequest.java @@ -385,11 +385,11 @@ public StartLiveActivityRequest iosRelevanceScore(BigDecimal iosRelevanceScore) } /** - * iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1. + * 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 iosRelevanceScore **/ @javax.annotation.Nullable - @ApiModelProperty(value = "iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1.") + @ApiModelProperty(value = "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.") public BigDecimal getIosRelevanceScore() { return iosRelevanceScore; diff --git a/src/main/java/com/onesignal/client/model/UpdateLiveActivityRequest.java b/src/main/java/com/onesignal/client/model/UpdateLiveActivityRequest.java index 5bfdcf1a..80ef9619 100644 --- a/src/main/java/com/onesignal/client/model/UpdateLiveActivityRequest.java +++ b/src/main/java/com/onesignal/client/model/UpdateLiveActivityRequest.java @@ -23,6 +23,8 @@ import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; +import java.math.BigDecimal; +import org.openapitools.jackson.nullable.JsonNullable; import java.io.Serializable; import com.google.gson.Gson; @@ -123,6 +125,10 @@ public EventEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_SOUND) private String sound; + public static final String SERIALIZED_NAME_IOS_SOUND = "ios_sound"; + @SerializedName(SERIALIZED_NAME_IOS_SOUND) + private String iosSound; + public static final String SERIALIZED_NAME_STALE_DATE = "stale_date"; @SerializedName(SERIALIZED_NAME_STALE_DATE) private Integer staleDate; @@ -135,6 +141,10 @@ public EventEnum read(final JsonReader jsonReader) throws IOException { @SerializedName(SERIALIZED_NAME_PRIORITY) private Integer priority; + public static final String SERIALIZED_NAME_IOS_RELEVANCE_SCORE = "ios_relevance_score"; + @SerializedName(SERIALIZED_NAME_IOS_RELEVANCE_SCORE) + private BigDecimal iosRelevanceScore; + public UpdateLiveActivityRequest() { } @@ -260,11 +270,13 @@ public UpdateLiveActivityRequest sound(String 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. + * Deprecated. The API ignores this field. Use `ios_sound`. * @return sound + * @deprecated **/ + @Deprecated @javax.annotation.Nullable - @ApiModelProperty(value = "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.") + @ApiModelProperty(value = "Deprecated. The API ignores this field. Use `ios_sound`.") public String getSound() { return sound; @@ -276,6 +288,29 @@ public void setSound(String sound) { } + public UpdateLiveActivityRequest iosSound(String iosSound) { + + this.iosSound = iosSound; + return this; + } + + /** + * 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 iosSound + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "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. ") + + public String getIosSound() { + return iosSound; + } + + + public void setIosSound(String iosSound) { + this.iosSound = iosSound; + } + + public UpdateLiveActivityRequest staleDate(Integer staleDate) { this.staleDate = staleDate; @@ -329,11 +364,11 @@ public UpdateLiveActivityRequest priority(Integer 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. + * 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 priority **/ @javax.annotation.Nullable - @ApiModelProperty(value = "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.") + @ApiModelProperty(value = "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.") public Integer getPriority() { return priority; @@ -345,6 +380,29 @@ public void setPriority(Integer priority) { } + public UpdateLiveActivityRequest iosRelevanceScore(BigDecimal iosRelevanceScore) { + + this.iosRelevanceScore = iosRelevanceScore; + return this; + } + + /** + * 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 iosRelevanceScore + **/ + @javax.annotation.Nullable + @ApiModelProperty(value = "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.") + + public BigDecimal getIosRelevanceScore() { + return iosRelevanceScore; + } + + + public void setIosRelevanceScore(BigDecimal iosRelevanceScore) { + this.iosRelevanceScore = iosRelevanceScore; + } + + @Override public boolean equals(Object o) { @@ -361,14 +419,27 @@ public boolean equals(Object o) { Objects.equals(this.contents, updateLiveActivityRequest.contents) && Objects.equals(this.headings, updateLiveActivityRequest.headings) && Objects.equals(this.sound, updateLiveActivityRequest.sound) && + Objects.equals(this.iosSound, updateLiveActivityRequest.iosSound) && Objects.equals(this.staleDate, updateLiveActivityRequest.staleDate) && Objects.equals(this.dismissalDate, updateLiveActivityRequest.dismissalDate) && - Objects.equals(this.priority, updateLiveActivityRequest.priority); + Objects.equals(this.priority, updateLiveActivityRequest.priority) && + Objects.equals(this.iosRelevanceScore, updateLiveActivityRequest.iosRelevanceScore); + } + + private static boolean equalsNullable(JsonNullable a, JsonNullable b) { + return a == b || (a != null && b != null && a.isPresent() && b.isPresent() && Objects.deepEquals(a.get(), b.get())); } @Override public int hashCode() { - return Objects.hash(name, event, eventUpdates, contents, headings, sound, staleDate, dismissalDate, priority); + return Objects.hash(name, event, eventUpdates, contents, headings, sound, iosSound, staleDate, dismissalDate, priority, iosRelevanceScore); + } + + private static int hashCodeNullable(JsonNullable a) { + if (a == null) { + return 1; + } + return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31; } @Override @@ -381,9 +452,11 @@ public String toString() { sb.append(" contents: ").append(toIndentedString(contents)).append("\n"); sb.append(" headings: ").append(toIndentedString(headings)).append("\n"); sb.append(" sound: ").append(toIndentedString(sound)).append("\n"); + sb.append(" iosSound: ").append(toIndentedString(iosSound)).append("\n"); sb.append(" staleDate: ").append(toIndentedString(staleDate)).append("\n"); sb.append(" dismissalDate: ").append(toIndentedString(dismissalDate)).append("\n"); sb.append(" priority: ").append(toIndentedString(priority)).append("\n"); + sb.append(" iosRelevanceScore: ").append(toIndentedString(iosRelevanceScore)).append("\n"); sb.append("}"); return sb.toString(); } @@ -412,9 +485,11 @@ private String toIndentedString(Object o) { openapiFields.add("contents"); openapiFields.add("headings"); openapiFields.add("sound"); + openapiFields.add("ios_sound"); openapiFields.add("stale_date"); openapiFields.add("dismissal_date"); openapiFields.add("priority"); + openapiFields.add("ios_relevance_score"); // a set of required properties/fields (JSON key names) openapiRequiredFields = new HashSet();