Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 26 additions & 7 deletions api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4529,6 +4529,7 @@ components:
tr: tr
sound: sound
name: name
ios_sound: ios_sound
headings:
de: de
hi: hi
Expand Down Expand Up @@ -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.
Expand All @@ -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\
Expand All @@ -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
Expand Down Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion docs/StartLiveActivityRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] |
Expand Down
6 changes: 4 additions & 2 deletions docs/UpdateLiveActivityRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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] |



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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() {
}

Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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) {
Expand All @@ -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 <T> boolean equalsNullable(JsonNullable<T> a, JsonNullable<T> 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 <T> int hashCodeNullable(JsonNullable<T> a) {
if (a == null) {
return 1;
}
return a.isPresent() ? Arrays.deepHashCode(new Object[]{a.get()}) : 31;
}

@Override
Expand All @@ -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();
}
Expand Down Expand Up @@ -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<String>();
Expand Down