Skip to content

Add v2.2.0 package updates #40

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 10, 2025
Merged
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com

- API version: 1.3.0
- Package version: 2.1.0
- API version: 1.4.0
- Package version: 2.2.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen

## Requirements.
Expand Down
3 changes: 2 additions & 1 deletion docs/BasicNotification.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Name | Type | Description | Notes
**is_adm** | **bool, none_type** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional]
**is_chrome** | **bool, none_type** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional]
**channel_for_external_user_ids** | **str** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional]
**external_id** | **str, none_type** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**external_id** | **str, none_type** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [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]
**contents** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**headings** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**subtitle** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
Expand Down
3 changes: 2 additions & 1 deletion docs/BasicNotificationAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ Name | Type | Description | Notes
**is_chrome** | **bool, none_type** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional]
**channel_for_external_user_ids** | **str** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional]
**app_id** | **str** | Required: Your OneSignal Application ID, which can be found in Keys & IDs. It is a UUID and looks similar to 8250eaf6-1a58-489e-b136-7c74a864b434. | [optional]
**external_id** | **str, none_type** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**external_id** | **str, none_type** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [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]
**contents** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**headings** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**subtitle** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
Expand Down
3 changes: 2 additions & 1 deletion docs/Notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Name | Type | Description | Notes
**is_adm** | **bool, none_type** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional]
**is_chrome** | **bool, none_type** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional]
**channel_for_external_user_ids** | **str** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional]
**external_id** | **str, none_type** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**external_id** | **str, none_type** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [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]
**contents** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**headings** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**subtitle** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
Expand Down
3 changes: 2 additions & 1 deletion docs/NotificationWithMeta.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ Name | Type | Description | Notes
**is_adm** | **bool, none_type** | Indicates whether to send to all devices registered under your app's Amazon Fire platform. | [optional]
**is_chrome** | **bool, none_type** | This flag is not used for web push Please see isChromeWeb for sending to web push users. This flag only applies to Google Chrome Apps & Extensions. Indicates whether to send to all devices registered under your app's Google Chrome Apps & Extension platform. | [optional]
**channel_for_external_user_ids** | **str** | Indicates if the message type when targeting with include_external_user_ids for cases where an email, sms, and/or push subscribers have the same external user id. Example: Use the string \"push\" to indicate you are sending a push notification or the string \"email\"for sending emails or \"sms\"for sending SMS. | [optional]
**external_id** | **str, none_type** | Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [optional]
**external_id** | **str, none_type** | [DEPRECATED] Correlation and idempotency key. A request received with this parameter will first look for another notification with the same external_id. 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 external_id will be sent again. See Idempotent Notification Requests for more details writeOnly: true | [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]
**contents** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**headings** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
**subtitle** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
Expand Down
4 changes: 2 additions & 2 deletions onesignal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501

The version of the OpenAPI document: 1.3.0
The version of the OpenAPI document: 1.4.0
Contact: devrel@onesignal.com
Generated by: https://openapi-generator.tech
"""


__version__ = "2.1.0"
__version__ = "2.2.0"

# import ApiClient
from onesignal.api_client import ApiClient
Expand Down
2 changes: 1 addition & 1 deletion onesignal/api/default_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501

The version of the OpenAPI document: 1.3.0
The version of the OpenAPI document: 1.4.0
Contact: devrel@onesignal.com
Generated by: https://openapi-generator.tech
"""
Expand Down
6 changes: 3 additions & 3 deletions onesignal/api_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501

The version of the OpenAPI document: 1.3.0
The version of the OpenAPI document: 1.4.0
Contact: devrel@onesignal.com
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
self.default_headers[header_name] = header_value
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'OpenAPI-Generator/2.1.0/python'
self.user_agent = 'OpenAPI-Generator/2.2.0/python'

def __enter__(self):
return self
Expand Down Expand Up @@ -142,7 +142,7 @@ def __call_api(
# header parameters
header_params = header_params or {}
header_params.update(self.default_headers)
header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=2.1.0"
header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=2.2.0"
if self.cookie:
header_params['Cookie'] = self.cookie
if header_params:
Expand Down
10 changes: 5 additions & 5 deletions onesignal/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501

The version of the OpenAPI document: 1.3.0
The version of the OpenAPI document: 1.4.0
Contact: devrel@onesignal.com
Generated by: https://openapi-generator.tech
"""
Expand Down Expand Up @@ -378,15 +378,15 @@ def auth_settings(self):
'type': 'bearer',
'in': 'header',
'key': 'Authorization',
'value': 'Bearer ' + self.app_key
'value': 'Key ' + self.app_key
}

if self.user_key is not None:
auth['user_key'] = {
'type': 'bearer',
'in': 'header',
'key': 'Authorization',
'value': 'Bearer ' + self.user_key
'value': 'Key ' + self.user_key
}

return auth
Expand All @@ -399,8 +399,8 @@ def to_debug_report(self):
return "Python SDK Debug Report:\n"\
"OS: {env}\n"\
"Python Version: {pyversion}\n"\
"Version of the API: 1.3.0\n"\
"SDK Package Version: 2.1.0".\
"Version of the API: 1.4.0\n"\
"SDK Package Version: 2.2.0".\
format(env=sys.platform, pyversion=sys.version)

def get_host_settings(self):
Expand Down
2 changes: 1 addition & 1 deletion onesignal/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501

The version of the OpenAPI document: 1.3.0
The version of the OpenAPI document: 1.4.0
Contact: devrel@onesignal.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion onesignal/model/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501

The version of the OpenAPI document: 1.3.0
The version of the OpenAPI document: 1.4.0
Contact: devrel@onesignal.com
Generated by: https://openapi-generator.tech
"""
Expand Down
2 changes: 1 addition & 1 deletion onesignal/model/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com # noqa: E501

The version of the OpenAPI document: 1.3.0
The version of the OpenAPI document: 1.4.0
Contact: devrel@onesignal.com
Generated by: https://openapi-generator.tech
"""
Expand Down
Loading