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
2 changes: 1 addition & 1 deletion docs/Model/StartLiveActivityRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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<string,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: { \&quot;external_id\&quot;: [\&quot;exId1\&quot;, \&quot;extId2\&quot;], \&quot;internal_label\&quot;: [\&quot;id1\&quot;, \&quot;id2\&quot;] } Keys must match API spellings exactly (for example the label for External ID is the string &#x60;external_id&#x60;; 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]
Expand Down
6 changes: 4 additions & 2 deletions docs/Model/UpdateLiveActivityRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 &#x60;ios_sound&#x60;. | [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 &#x60;headings&#x60; on the same request: ActivityKit ignores an update whose alert has no title, which silently drops the sound. Supersedes the deprecated &#x60;sound&#x60; 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 \&quot;end\&quot; | [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&#39;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&#39;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)
2 changes: 1 addition & 1 deletion lib/model/StartLiveActivityRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down
76 changes: 69 additions & 7 deletions lib/model/UpdateLiveActivityRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
];

/**
Expand All @@ -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
];

/**
Expand Down Expand Up @@ -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'
];

/**
Expand All @@ -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'
];

/**
Expand All @@ -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'
];

/**
Expand Down Expand Up @@ -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;
}

/**
Expand Down Expand Up @@ -420,6 +432,7 @@ public function setHeadings($headings)
* Gets sound
*
* @return string|null
* @deprecated
*/
public function getSound()
{
Expand All @@ -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)
{
Expand All @@ -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
*
Expand Down Expand Up @@ -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
*/
Expand All @@ -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.
*
Expand Down