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: 2 additions & 0 deletions docs/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -4352,9 +4352,11 @@ with onesignal.ApiClient(configuration) as api_client:
vi="vi_example",
),
sound="sound_example",
ios_sound="ios_sound_example",
stale_date=1,
dismissal_date=1,
priority=1,
ios_relevance_score=3.14,
)

try:
Expand Down
2 changes: 1 addition & 1 deletion docs/StartLiveActivityRequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Name | Type | Description | Notes
**event** | **str** | | defaults to "start"
**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, none_type** | 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, none_type** | 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** | **str, none_type** | 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** | [**IncludeAliases**](IncludeAliases.md) | | [optional]
**include_subscription_ids** | **[str], none_type** | 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 @@ -9,10 +9,12 @@ Name | Type | Description | Notes
**event_updates** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | 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** | **str** | 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** | **str** | Deprecated. The API ignores this field. Use `ios_sound`. | [optional]
**ios_sound** | **str** | 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, none_type** | 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]
**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]

[[Back to API list]](https://github.com/OneSignal/onesignal-python-api#full-api-reference) [[Back to README]](https://github.com/OneSignal/onesignal-python-api)
Expand Down
4 changes: 2 additions & 2 deletions onesignal/model/start_live_activity_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def _from_openapi_data(cls, name, activity_id, event_attributes, event_updates,
_visited_composed_classes = (Animal,)
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] # noqa: E501
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] # noqa: E501
ios_relevance_score (float, none_type): iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1.. [optional] # noqa: E501
ios_relevance_score (float, none_type): 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] # noqa: E501
idempotency_key (str, none_type): 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] # noqa: E501
include_aliases (IncludeAliases): [optional] # noqa: E501
include_subscription_ids ([str], none_type): Specific subscription ids to target. Not compatible with other targeting parameters.. [optional] # noqa: E501
Expand Down Expand Up @@ -299,7 +299,7 @@ def __init__(self, name, activity_id, event_attributes, event_updates, contents,
_visited_composed_classes = (Animal,)
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] # noqa: E501
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] # noqa: E501
ios_relevance_score (float, none_type): iOS 15+. A score to indicate how a notification should be displayed when grouped. Use a float between 0-1.. [optional] # noqa: E501
ios_relevance_score (float, none_type): 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] # noqa: E501
idempotency_key (str, none_type): 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] # noqa: E501
include_aliases (IncludeAliases): [optional] # noqa: E501
include_subscription_ids ([str], none_type): Specific subscription ids to target. Not compatible with other targeting parameters.. [optional] # noqa: E501
Expand Down
16 changes: 12 additions & 4 deletions onesignal/model/update_live_activity_request.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,11 @@ def openapi_types():
'contents': (LanguageStringMap,), # noqa: E501
'headings': (LanguageStringMap,), # noqa: E501
'sound': (str,), # noqa: E501
'ios_sound': (str,), # noqa: E501
'stale_date': (int,), # noqa: E501
'dismissal_date': (int,), # noqa: E501
'priority': (int,), # noqa: E501
'ios_relevance_score': (float, none_type,), # noqa: E501
}

@cached_property
Expand All @@ -114,9 +116,11 @@ def discriminator():
'contents': 'contents', # noqa: E501
'headings': 'headings', # noqa: E501
'sound': 'sound', # noqa: E501
'ios_sound': 'ios_sound', # noqa: E501
'stale_date': 'stale_date', # noqa: E501
'dismissal_date': 'dismissal_date', # noqa: E501
'priority': 'priority', # noqa: E501
'ios_relevance_score': 'ios_relevance_score', # noqa: E501
}

read_only_vars = {
Expand Down Expand Up @@ -167,10 +171,12 @@ def _from_openapi_data(cls, name, event, event_updates, *args, **kwargs): # noq
_visited_composed_classes = (Animal,)
contents (LanguageStringMap): [optional] # noqa: E501
headings (LanguageStringMap): [optional] # noqa: E501
sound (str): 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] # noqa: E501
sound (str): Deprecated. The API ignores this field. Use `ios_sound`.. [optional] # noqa: E501
ios_sound (str): 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] # noqa: E501
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] # noqa: E501
dismissal_date (int): Accepts Unix timestamp in seconds; only allowed if event is \"end\". [optional] # noqa: E501
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] # noqa: E501
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] # noqa: E501
ios_relevance_score (float, none_type): 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] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down Expand Up @@ -266,10 +272,12 @@ def __init__(self, name, event, event_updates, *args, **kwargs): # noqa: E501
_visited_composed_classes = (Animal,)
contents (LanguageStringMap): [optional] # noqa: E501
headings (LanguageStringMap): [optional] # noqa: E501
sound (str): 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] # noqa: E501
sound (str): Deprecated. The API ignores this field. Use `ios_sound`.. [optional] # noqa: E501
ios_sound (str): 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] # noqa: E501
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] # noqa: E501
dismissal_date (int): Accepts Unix timestamp in seconds; only allowed if event is \"end\". [optional] # noqa: E501
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] # noqa: E501
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] # noqa: E501
ios_relevance_score (float, none_type): 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] # noqa: E501
"""

_check_type = kwargs.pop('_check_type', True)
Expand Down