Skip to content

Commit ce62201

Browse files
author
OneSignal
committed
feat: add v5.3.0 package updates
1 parent ff20f28 commit ce62201

14 files changed

+259
-6
lines changed

.github/workflows/release.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
jobs:
9+
release:
10+
name: Create GitHub Release
11+
runs-on: ubuntu-latest
12+
outputs:
13+
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
14+
permissions:
15+
contents: write
16+
issues: write
17+
pull-requests: write
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v5
21+
with:
22+
fetch-depth: 0
23+
token: ${{ secrets.GITHUB_TOKEN }}
24+
- name: Create GitHub Release
25+
id: semantic
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: |
29+
output=$(npx -p semantic-release \
30+
-p @semantic-release/changelog \
31+
-p @semantic-release/git \
32+
-p @semantic-release/github \
33+
-p conventional-changelog-conventionalcommits \
34+
semantic-release 2>&1) && exit_code=0 || exit_code=$?
35+
echo "$output"
36+
if echo "$output" | grep -q "Published release"; then
37+
echo "new_release_published=true" >> "$GITHUB_OUTPUT"
38+
else
39+
echo "new_release_published=false" >> "$GITHUB_OUTPUT"
40+
fi
41+
exit $exit_code
42+
43+
publish:
44+
name: Publish to PyPI
45+
needs: release
46+
if: needs.release.outputs.new_release_published == 'true'
47+
runs-on: ubuntu-latest
48+
steps:
49+
- uses: actions/checkout@v5
50+
- name: Set up Python 3.10
51+
uses: actions/setup-python@v6
52+
with:
53+
python-version: "3.10"
54+
- name: Install pypa/build
55+
run: >-
56+
python -m
57+
pip install
58+
build
59+
--user
60+
- name: Build a binary wheel and a source tarball
61+
run: >-
62+
python -m
63+
build
64+
--sdist
65+
--wheel
66+
--outdir dist/
67+
.
68+
- name: Publish a Python distribution to PyPI
69+
uses: pypa/gh-action-pypi-publish@release/v1
70+
with:
71+
user: __token__
72+
password: ${{ secrets.PYPI_API_TOKEN }}
73+
verbose: true

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
1818

1919
- API version: 5.3.0
20-
- Package version: 5.3.0-beta1
20+
- Package version: 5.3.0
2121
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
2222

2323
## Requirements.

docs/BasicNotification.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,19 @@ Name | Type | Description | Notes
105105
**email_body** | **str** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional]
106106
**email_from_name** | **str, none_type** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional]
107107
**email_from_address** | **str, none_type** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional]
108+
**email_reply_to_address** | **str, none_type** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional]
108109
**email_preheader** | **str, none_type** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional]
109110
**disable_email_click_tracking** | **bool, none_type** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional]
110111
**include_unsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional]
111112
**sms_from** | **str, none_type** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional]
112113
**sms_media_urls** | **[str], none_type** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional]
113114
**filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional]
114115
**custom_data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional]
116+
**huawei_badge_class** | **str, none_type** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional]
117+
**huawei_badge_add_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional]
118+
**huawei_badge_set_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional]
119+
**huawei_category** | **str, none_type** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional]
120+
**huawei_bi_tag** | **str, none_type** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional]
115121
**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]
116122

117123
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/BasicNotificationAllOf.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,19 @@ Name | Type | Description | Notes
9292
**email_body** | **str** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional]
9393
**email_from_name** | **str, none_type** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional]
9494
**email_from_address** | **str, none_type** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional]
95+
**email_reply_to_address** | **str, none_type** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional]
9596
**email_preheader** | **str, none_type** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional]
9697
**disable_email_click_tracking** | **bool, none_type** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional]
9798
**include_unsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional]
9899
**sms_from** | **str, none_type** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional]
99100
**sms_media_urls** | **[str], none_type** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional]
100101
**filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional]
101102
**custom_data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional]
103+
**huawei_badge_class** | **str, none_type** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional]
104+
**huawei_badge_add_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional]
105+
**huawei_badge_set_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional]
106+
**huawei_category** | **str, none_type** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional]
107+
**huawei_bi_tag** | **str, none_type** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional]
102108
**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]
103109

104110
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

docs/Notification.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,19 @@ Name | Type | Description | Notes
105105
**email_body** | **str** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional]
106106
**email_from_name** | **str, none_type** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional]
107107
**email_from_address** | **str, none_type** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional]
108+
**email_reply_to_address** | **str, none_type** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional]
108109
**email_preheader** | **str, none_type** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional]
109110
**disable_email_click_tracking** | **bool, none_type** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional]
110111
**include_unsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional]
111112
**sms_from** | **str, none_type** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional]
112113
**sms_media_urls** | **[str], none_type** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional]
113114
**filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional]
114115
**custom_data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional]
116+
**huawei_badge_class** | **str, none_type** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional]
117+
**huawei_badge_add_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional]
118+
**huawei_badge_set_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional]
119+
**huawei_category** | **str, none_type** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional]
120+
**huawei_bi_tag** | **str, none_type** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional]
115121
**send_after** | **datetime, none_type** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date & time. \"Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\" \"September 24th 2015, 2:00:00 pm UTC-07:00\" \"2015-09-24 14:00:00 GMT-0700\" \"Sept 24 2015 14:00:00 GMT-0700\" \"Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\" Note: SMS currently only supports send_after parameter. | [optional]
116122
**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]
117123

docs/NotificationWithMeta.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,19 @@ Name | Type | Description | Notes
105105
**email_body** | **str** | Channel: Email Required unless template_id is set. HTML suported The body of the email you wish to send. Typically, customers include their own HTML templates here. Must include [unsubscribe_url] in an <a> tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional]
106106
**email_from_name** | **str, none_type** | Channel: Email The name the email is from. If not specified, will default to \"from name\" set in the OneSignal Dashboard Email Settings. | [optional]
107107
**email_from_address** | **str, none_type** | Channel: Email The email address the email is from. If not specified, will default to \"from email\" set in the OneSignal Dashboard Email Settings. | [optional]
108+
**email_reply_to_address** | **str, none_type** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional]
108109
**email_preheader** | **str, none_type** | Channel: Email The preheader text of the email. Preheader is the preview text displayed immediately after an email subject that provides additional context about the email content. If not specified, will default to null. | [optional]
109110
**disable_email_click_tracking** | **bool, none_type** | Channel: Email Default is `false`. If set to `true`, the URLs sent within the email will not include link tracking and will be the same as originally set; otherwise, all the URLs in the email will be tracked. | [optional]
110111
**include_unsubscribed** | **bool** | Channel: Email Default is `false`. This field is used to send transactional notifications. If set to `true`, this notification will also be sent to unsubscribed emails. If a `template_id` is provided, the `include_unsubscribed` value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP's list of unsubscribed emails to be cleared. | [optional]
111112
**sms_from** | **str, none_type** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional]
112113
**sms_media_urls** | **[str], none_type** | Channel: SMS URLs for the media files to be attached to the SMS content. Limit: 10 media urls with a total max. size of 5MBs. | [optional]
113114
**filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional]
114115
**custom_data** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type** | Channel: All JSON object that can be used as a source of message personalization data for fields that support tag variable substitution. Push, SMS: Can accept up to 2048 bytes of valid JSON. Email: Can accept up to 10000 bytes of valid JSON. Example: {\"order_id\": 123, \"currency\": \"USD\", \"amount\": 25} | [optional]
116+
**huawei_badge_class** | **str, none_type** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional]
117+
**huawei_badge_add_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional]
118+
**huawei_badge_set_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional]
119+
**huawei_category** | **str, none_type** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional]
120+
**huawei_bi_tag** | **str, none_type** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional]
115121
**successful** | **int** | Number of notifications that were successfully delivered. | [optional]
116122
**failed** | **int** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional]
117123
**errored** | **int** | Number of notifications that could not be delivered due to an error. You can find more information by viewing the notification in the dashboard. | [optional]

onesignal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"""
1212

1313

14-
__version__ = "5.3.0-beta1"
14+
__version__ = "5.3.0"
1515

1616
# import ApiClient
1717
from onesignal.api_client import ApiClient

onesignal/api_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None,
7777
self.default_headers[header_name] = header_value
7878
self.cookie = cookie
7979
# Set default User-Agent.
80-
self.user_agent = 'OpenAPI-Generator/5.3.0-beta1/python'
80+
self.user_agent = 'OpenAPI-Generator/5.3.0/python'
8181

8282
def __enter__(self):
8383
return self
@@ -142,7 +142,7 @@ def __call_api(
142142
# header parameters
143143
header_params = header_params or {}
144144
header_params.update(self.default_headers)
145-
header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=5.3.0-beta1"
145+
header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=5.3.0"
146146
if self.cookie:
147147
header_params['Cookie'] = self.cookie
148148
if header_params:

onesignal/configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ def to_debug_report(self):
400400
"OS: {env}\n"\
401401
"Python Version: {pyversion}\n"\
402402
"Version of the API: 5.3.0\n"\
403-
"SDK Package Version: 5.3.0-beta1".\
403+
"SDK Package Version: 5.3.0".\
404404
format(env=sys.platform, pyversion=sys.version)
405405

406406
def get_host_settings(self):

0 commit comments

Comments
 (0)