From c1c2f7c24836f892060a5a3dcf21049835ce48c4 Mon Sep 17 00:00:00 2001 From: OneSignal Date: Tue, 24 Mar 2026 17:58:19 +0000 Subject: [PATCH] feat: add v5.3.0 package updates --- .github/workflows/release.yml | 73 ++++++++++++++++++++ README.md | 2 +- docs/BasicNotification.md | 6 ++ docs/BasicNotificationAllOf.md | 6 ++ docs/Notification.md | 6 ++ docs/NotificationWithMeta.md | 6 ++ onesignal/__init__.py | 2 +- onesignal/api_client.py | 4 +- onesignal/configuration.py | 2 +- onesignal/model/basic_notification.py | 39 +++++++++++ onesignal/model/basic_notification_all_of.py | 39 +++++++++++ onesignal/model/notification.py | 39 +++++++++++ onesignal/model/notification_with_meta.py | 39 +++++++++++ setup.py | 2 +- 14 files changed, 259 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6918d57 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,73 @@ +name: Release + +on: + push: + branches: [main] + workflow_dispatch: + +jobs: + release: + name: Create GitHub Release + runs-on: ubuntu-latest + outputs: + new_release_published: ${{ steps.semantic.outputs.new_release_published }} + permissions: + contents: write + issues: write + pull-requests: write + steps: + - name: Checkout + uses: actions/checkout@v5 + with: + fetch-depth: 0 + token: ${{ secrets.GITHUB_TOKEN }} + - name: Create GitHub Release + id: semantic + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + output=$(npx -p semantic-release \ + -p @semantic-release/changelog \ + -p @semantic-release/git \ + -p @semantic-release/github \ + -p conventional-changelog-conventionalcommits \ + semantic-release 2>&1) && exit_code=0 || exit_code=$? + echo "$output" + if echo "$output" | grep -q "Published release"; then + echo "new_release_published=true" >> "$GITHUB_OUTPUT" + else + echo "new_release_published=false" >> "$GITHUB_OUTPUT" + fi + exit $exit_code + + publish: + name: Publish to PyPI + needs: release + if: needs.release.outputs.new_release_published == 'true' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + - name: Set up Python 3.10 + uses: actions/setup-python@v6 + with: + python-version: "3.10" + - name: Install pypa/build + run: >- + python -m + pip install + build + --user + - name: Build a binary wheel and a source tarball + run: >- + python -m + build + --sdist + --wheel + --outdir dist/ + . + - name: Publish a Python distribution to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} + verbose: true diff --git a/README.md b/README.md index 0ec481d..6f5241e 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com - API version: 5.3.0 -- Package version: 5.3.0-beta1 +- Package version: 5.3.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen ## Requirements. diff --git a/docs/BasicNotification.md b/docs/BasicNotification.md index 5dc7f59..6817ec7 100644 --- a/docs/BasicNotification.md +++ b/docs/BasicNotification.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **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] **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] +**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] **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] **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] **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] @@ -112,6 +113,11 @@ Name | Type | Description | Notes **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] **filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional] **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] +**huawei_badge_class** | **str, none_type** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] +**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] +**huawei_badge_set_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] +**huawei_category** | **str, none_type** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] +**huawei_bi_tag** | **str, none_type** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [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 Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/BasicNotificationAllOf.md b/docs/BasicNotificationAllOf.md index 0829015..d031712 100644 --- a/docs/BasicNotificationAllOf.md +++ b/docs/BasicNotificationAllOf.md @@ -92,6 +92,7 @@ Name | Type | Description | Notes **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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **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] **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] +**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] **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] **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] **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] @@ -99,6 +100,11 @@ Name | Type | Description | Notes **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] **filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional] **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] +**huawei_badge_class** | **str, none_type** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] +**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] +**huawei_badge_set_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] +**huawei_category** | **str, none_type** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] +**huawei_bi_tag** | **str, none_type** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [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 Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/Notification.md b/docs/Notification.md index 0a6bc72..bdf9446 100644 --- a/docs/Notification.md +++ b/docs/Notification.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **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] **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] +**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] **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] **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] **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] @@ -112,6 +113,11 @@ Name | Type | Description | Notes **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] **filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional] **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] +**huawei_badge_class** | **str, none_type** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] +**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] +**huawei_badge_set_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] +**huawei_category** | **str, none_type** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] +**huawei_bi_tag** | **str, none_type** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] **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] **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] diff --git a/docs/NotificationWithMeta.md b/docs/NotificationWithMeta.md index 0d7c843..5d9f43e 100644 --- a/docs/NotificationWithMeta.md +++ b/docs/NotificationWithMeta.md @@ -105,6 +105,7 @@ Name | Type | Description | Notes **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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. | [optional] **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] **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] +**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] **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] **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] **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] @@ -112,6 +113,11 @@ Name | Type | Description | Notes **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] **filters** | [**[FilterExpression], none_type**](FilterExpression.md) | | [optional] **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] +**huawei_badge_class** | **str, none_type** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] +**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] +**huawei_badge_set_num** | **int, none_type** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] +**huawei_category** | **str, none_type** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] +**huawei_bi_tag** | **str, none_type** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] **successful** | **int** | Number of notifications that were successfully delivered. | [optional] **failed** | **int** | Number of notifications that could not be delivered due to those devices being unsubscribed. | [optional] **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] diff --git a/onesignal/__init__.py b/onesignal/__init__.py index 3ddf2d5..49919cd 100644 --- a/onesignal/__init__.py +++ b/onesignal/__init__.py @@ -11,7 +11,7 @@ """ -__version__ = "5.3.0-beta1" +__version__ = "5.3.0" # import ApiClient from onesignal.api_client import ApiClient diff --git a/onesignal/api_client.py b/onesignal/api_client.py index 83cca04..bdc399c 100644 --- a/onesignal/api_client.py +++ b/onesignal/api_client.py @@ -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/5.3.0-beta1/python' + self.user_agent = 'OpenAPI-Generator/5.3.0/python' def __enter__(self): return self @@ -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=5.3.0-beta1" + header_params['OS-Usage-Data'] = "kind=sdk, sdk-name=onesignal-python, version=5.3.0" if self.cookie: header_params['Cookie'] = self.cookie if header_params: diff --git a/onesignal/configuration.py b/onesignal/configuration.py index 6e7fb42..f3704b4 100644 --- a/onesignal/configuration.py +++ b/onesignal/configuration.py @@ -400,7 +400,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: 5.3.0\n"\ - "SDK Package Version: 5.3.0-beta1".\ + "SDK Package Version: 5.3.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/onesignal/model/basic_notification.py b/onesignal/model/basic_notification.py index d44ca08..f4ef0c4 100644 --- a/onesignal/model/basic_notification.py +++ b/onesignal/model/basic_notification.py @@ -83,6 +83,21 @@ class BasicNotification(ModelComposed): 'SUM': "sum", 'COUNT': "count", }, + ('huawei_category',): { + 'None': None, + 'IM': "IM", + 'VOIP': "VOIP", + 'SUBSCRIPTION': "SUBSCRIPTION", + 'TRAVEL': "TRAVEL", + 'HEALTH': "HEALTH", + 'WORK': "WORK", + 'ACCOUNT': "ACCOUNT", + 'EXPRESS': "EXPRESS", + 'FINANCE': "FINANCE", + 'DEVICE_REMINDER': "DEVICE_REMINDER", + 'MAIL': "MAIL", + 'MARKETING': "MARKETING", + }, } validations = { @@ -212,6 +227,7 @@ def openapi_types(): 'email_body': (str,), # noqa: E501 'email_from_name': (str, none_type,), # noqa: E501 'email_from_address': (str, none_type,), # noqa: E501 + 'email_reply_to_address': (str, none_type,), # noqa: E501 'email_preheader': (str, none_type,), # noqa: E501 'disable_email_click_tracking': (bool, none_type,), # noqa: E501 'include_unsubscribed': (bool,), # noqa: E501 @@ -219,6 +235,11 @@ def openapi_types(): 'sms_media_urls': ([str], none_type,), # noqa: E501 'filters': ([FilterExpression], none_type,), # noqa: E501 'custom_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'huawei_badge_class': (str, none_type,), # noqa: E501 + 'huawei_badge_add_num': (int, none_type,), # noqa: E501 + 'huawei_badge_set_num': (int, none_type,), # noqa: E501 + 'huawei_category': (str, none_type,), # noqa: E501 + 'huawei_bi_tag': (str, none_type,), # noqa: E501 } @cached_property @@ -328,6 +349,7 @@ def discriminator(): 'email_body': 'email_body', # noqa: E501 'email_from_name': 'email_from_name', # noqa: E501 'email_from_address': 'email_from_address', # noqa: E501 + 'email_reply_to_address': 'email_reply_to_address', # noqa: E501 'email_preheader': 'email_preheader', # noqa: E501 'disable_email_click_tracking': 'disable_email_click_tracking', # noqa: E501 'include_unsubscribed': 'include_unsubscribed', # noqa: E501 @@ -335,6 +357,11 @@ def discriminator(): 'sms_media_urls': 'sms_media_urls', # noqa: E501 'filters': 'filters', # noqa: E501 'custom_data': 'custom_data', # noqa: E501 + 'huawei_badge_class': 'huawei_badge_class', # noqa: E501 + 'huawei_badge_add_num': 'huawei_badge_add_num', # noqa: E501 + 'huawei_badge_set_num': 'huawei_badge_set_num', # noqa: E501 + 'huawei_category': 'huawei_category', # noqa: E501 + 'huawei_bi_tag': 'huawei_bi_tag', # noqa: E501 } read_only_vars = { @@ -479,6 +506,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 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] # noqa: E501 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] # noqa: E501 + 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 @@ -486,6 +514,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 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] # noqa: E501 + huawei_badge_class (str, none_type): Channel: Push Notifications Platform: Huawei Full path of the app entry activity class. [optional] # noqa: E501 + 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] # noqa: E501 + huawei_badge_set_num (int, none_type): Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99. [optional] # noqa: E501 + huawei_category (str, none_type): Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.. [optional] # noqa: E501 + huawei_bi_tag (str, none_type): Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -690,6 +723,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 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] # noqa: E501 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] # noqa: E501 + 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 @@ -697,6 +731,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 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] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 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] # noqa: E501 + huawei_badge_class (str, none_type): Channel: Push Notifications Platform: Huawei Full path of the app entry activity class. [optional] # noqa: E501 + 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] # noqa: E501 + huawei_badge_set_num (int, none_type): Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99. [optional] # noqa: E501 + huawei_category (str, none_type): Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.. [optional] # noqa: E501 + huawei_bi_tag (str, none_type): Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/onesignal/model/basic_notification_all_of.py b/onesignal/model/basic_notification_all_of.py index 6b189b8..6bee9f1 100644 --- a/onesignal/model/basic_notification_all_of.py +++ b/onesignal/model/basic_notification_all_of.py @@ -72,6 +72,21 @@ class BasicNotificationAllOf(ModelNormal): 'SUM': "sum", 'COUNT': "count", }, + ('huawei_category',): { + 'None': None, + 'IM': "IM", + 'VOIP': "VOIP", + 'SUBSCRIPTION': "SUBSCRIPTION", + 'TRAVEL': "TRAVEL", + 'HEALTH': "HEALTH", + 'WORK': "WORK", + 'ACCOUNT': "ACCOUNT", + 'EXPRESS': "EXPRESS", + 'FINANCE': "FINANCE", + 'DEVICE_REMINDER': "DEVICE_REMINDER", + 'MAIL': "MAIL", + 'MARKETING': "MARKETING", + }, } validations = { @@ -188,6 +203,7 @@ def openapi_types(): 'email_body': (str,), # noqa: E501 'email_from_name': (str, none_type,), # noqa: E501 'email_from_address': (str, none_type,), # noqa: E501 + 'email_reply_to_address': (str, none_type,), # noqa: E501 'email_preheader': (str, none_type,), # noqa: E501 'disable_email_click_tracking': (bool, none_type,), # noqa: E501 'include_unsubscribed': (bool,), # noqa: E501 @@ -195,6 +211,11 @@ def openapi_types(): 'sms_media_urls': ([str], none_type,), # noqa: E501 'filters': ([FilterExpression], none_type,), # noqa: E501 'custom_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'huawei_badge_class': (str, none_type,), # noqa: E501 + 'huawei_badge_add_num': (int, none_type,), # noqa: E501 + 'huawei_badge_set_num': (int, none_type,), # noqa: E501 + 'huawei_category': (str, none_type,), # noqa: E501 + 'huawei_bi_tag': (str, none_type,), # noqa: E501 } @cached_property @@ -291,6 +312,7 @@ def discriminator(): 'email_body': 'email_body', # noqa: E501 'email_from_name': 'email_from_name', # noqa: E501 'email_from_address': 'email_from_address', # noqa: E501 + 'email_reply_to_address': 'email_reply_to_address', # noqa: E501 'email_preheader': 'email_preheader', # noqa: E501 'disable_email_click_tracking': 'disable_email_click_tracking', # noqa: E501 'include_unsubscribed': 'include_unsubscribed', # noqa: E501 @@ -298,6 +320,11 @@ def discriminator(): 'sms_media_urls': 'sms_media_urls', # noqa: E501 'filters': 'filters', # noqa: E501 'custom_data': 'custom_data', # noqa: E501 + 'huawei_badge_class': 'huawei_badge_class', # noqa: E501 + 'huawei_badge_add_num': 'huawei_badge_add_num', # noqa: E501 + 'huawei_badge_set_num': 'huawei_badge_set_num', # noqa: E501 + 'huawei_category': 'huawei_category', # noqa: E501 + 'huawei_bi_tag': 'huawei_bi_tag', # noqa: E501 } read_only_vars = { @@ -431,6 +458,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 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] # noqa: E501 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] # noqa: E501 + 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 @@ -438,6 +466,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 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] # noqa: E501 + huawei_badge_class (str, none_type): Channel: Push Notifications Platform: Huawei Full path of the app entry activity class. [optional] # noqa: E501 + 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] # noqa: E501 + huawei_badge_set_num (int, none_type): Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99. [optional] # noqa: E501 + huawei_category (str, none_type): Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.. [optional] # noqa: E501 + huawei_bi_tag (str, none_type): Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) @@ -611,6 +644,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 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] # noqa: E501 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] # noqa: E501 + 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 @@ -618,6 +652,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 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] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 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] # noqa: E501 + huawei_badge_class (str, none_type): Channel: Push Notifications Platform: Huawei Full path of the app entry activity class. [optional] # noqa: E501 + 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] # noqa: E501 + huawei_badge_set_num (int, none_type): Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99. [optional] # noqa: E501 + huawei_category (str, none_type): Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.. [optional] # noqa: E501 + huawei_bi_tag (str, none_type): Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.. [optional] # noqa: E501 """ _check_type = kwargs.pop('_check_type', True) diff --git a/onesignal/model/notification.py b/onesignal/model/notification.py index 6dce078..2848153 100644 --- a/onesignal/model/notification.py +++ b/onesignal/model/notification.py @@ -83,6 +83,21 @@ class Notification(ModelComposed): 'SUM': "sum", 'COUNT': "count", }, + ('huawei_category',): { + 'None': None, + 'IM': "IM", + 'VOIP': "VOIP", + 'SUBSCRIPTION': "SUBSCRIPTION", + 'TRAVEL': "TRAVEL", + 'HEALTH': "HEALTH", + 'WORK': "WORK", + 'ACCOUNT': "ACCOUNT", + 'EXPRESS': "EXPRESS", + 'FINANCE': "FINANCE", + 'DEVICE_REMINDER': "DEVICE_REMINDER", + 'MAIL': "MAIL", + 'MARKETING': "MARKETING", + }, } validations = { @@ -212,6 +227,7 @@ def openapi_types(): 'email_body': (str,), # noqa: E501 'email_from_name': (str, none_type,), # noqa: E501 'email_from_address': (str, none_type,), # noqa: E501 + 'email_reply_to_address': (str, none_type,), # noqa: E501 'email_preheader': (str, none_type,), # noqa: E501 'disable_email_click_tracking': (bool, none_type,), # noqa: E501 'include_unsubscribed': (bool,), # noqa: E501 @@ -219,6 +235,11 @@ def openapi_types(): 'sms_media_urls': ([str], none_type,), # noqa: E501 'filters': ([FilterExpression], none_type,), # noqa: E501 'custom_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'huawei_badge_class': (str, none_type,), # noqa: E501 + 'huawei_badge_add_num': (int, none_type,), # noqa: E501 + 'huawei_badge_set_num': (int, none_type,), # noqa: E501 + 'huawei_category': (str, none_type,), # noqa: E501 + 'huawei_bi_tag': (str, none_type,), # noqa: E501 'send_after': (datetime, none_type,), # noqa: E501 } @@ -329,6 +350,7 @@ def discriminator(): 'email_body': 'email_body', # noqa: E501 'email_from_name': 'email_from_name', # noqa: E501 'email_from_address': 'email_from_address', # noqa: E501 + 'email_reply_to_address': 'email_reply_to_address', # noqa: E501 'email_preheader': 'email_preheader', # noqa: E501 'disable_email_click_tracking': 'disable_email_click_tracking', # noqa: E501 'include_unsubscribed': 'include_unsubscribed', # noqa: E501 @@ -336,6 +358,11 @@ def discriminator(): 'sms_media_urls': 'sms_media_urls', # noqa: E501 'filters': 'filters', # noqa: E501 'custom_data': 'custom_data', # noqa: E501 + 'huawei_badge_class': 'huawei_badge_class', # noqa: E501 + 'huawei_badge_add_num': 'huawei_badge_add_num', # noqa: E501 + 'huawei_badge_set_num': 'huawei_badge_set_num', # noqa: E501 + 'huawei_category': 'huawei_category', # noqa: E501 + 'huawei_bi_tag': 'huawei_bi_tag', # noqa: E501 'send_after': 'send_after', # noqa: E501 } @@ -481,6 +508,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 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] # noqa: E501 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] # noqa: E501 + 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 @@ -488,6 +516,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 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] # noqa: E501 + huawei_badge_class (str, none_type): Channel: Push Notifications Platform: Huawei Full path of the app entry activity class. [optional] # noqa: E501 + 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] # noqa: E501 + huawei_badge_set_num (int, none_type): Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99. [optional] # noqa: E501 + huawei_category (str, none_type): Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.. [optional] # noqa: E501 + huawei_bi_tag (str, none_type): Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.. [optional] # noqa: E501 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] # noqa: E501 """ @@ -693,6 +726,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 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] # noqa: E501 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] # noqa: E501 + 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 @@ -700,6 +734,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 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] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 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] # noqa: E501 + huawei_badge_class (str, none_type): Channel: Push Notifications Platform: Huawei Full path of the app entry activity class. [optional] # noqa: E501 + 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] # noqa: E501 + huawei_badge_set_num (int, none_type): Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99. [optional] # noqa: E501 + huawei_category (str, none_type): Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.. [optional] # noqa: E501 + huawei_bi_tag (str, none_type): Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.. [optional] # noqa: E501 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] # noqa: E501 """ diff --git a/onesignal/model/notification_with_meta.py b/onesignal/model/notification_with_meta.py index 923eaad..52dc0d3 100644 --- a/onesignal/model/notification_with_meta.py +++ b/onesignal/model/notification_with_meta.py @@ -91,6 +91,21 @@ class NotificationWithMeta(ModelComposed): 'SUM': "sum", 'COUNT': "count", }, + ('huawei_category',): { + 'None': None, + 'IM': "IM", + 'VOIP': "VOIP", + 'SUBSCRIPTION': "SUBSCRIPTION", + 'TRAVEL': "TRAVEL", + 'HEALTH': "HEALTH", + 'WORK': "WORK", + 'ACCOUNT': "ACCOUNT", + 'EXPRESS': "EXPRESS", + 'FINANCE': "FINANCE", + 'DEVICE_REMINDER': "DEVICE_REMINDER", + 'MAIL': "MAIL", + 'MARKETING': "MARKETING", + }, } validations = { @@ -220,6 +235,7 @@ def openapi_types(): 'email_body': (str,), # noqa: E501 'email_from_name': (str, none_type,), # noqa: E501 'email_from_address': (str, none_type,), # noqa: E501 + 'email_reply_to_address': (str, none_type,), # noqa: E501 'email_preheader': (str, none_type,), # noqa: E501 'disable_email_click_tracking': (bool, none_type,), # noqa: E501 'include_unsubscribed': (bool,), # noqa: E501 @@ -227,6 +243,11 @@ def openapi_types(): 'sms_media_urls': ([str], none_type,), # noqa: E501 'filters': ([FilterExpression], none_type,), # noqa: E501 'custom_data': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501 + 'huawei_badge_class': (str, none_type,), # noqa: E501 + 'huawei_badge_add_num': (int, none_type,), # noqa: E501 + 'huawei_badge_set_num': (int, none_type,), # noqa: E501 + 'huawei_category': (str, none_type,), # noqa: E501 + 'huawei_bi_tag': (str, none_type,), # noqa: E501 'successful': (int,), # noqa: E501 'failed': (int,), # noqa: E501 'errored': (int,), # noqa: E501 @@ -348,6 +369,7 @@ def discriminator(): 'email_body': 'email_body', # noqa: E501 'email_from_name': 'email_from_name', # noqa: E501 'email_from_address': 'email_from_address', # noqa: E501 + 'email_reply_to_address': 'email_reply_to_address', # noqa: E501 'email_preheader': 'email_preheader', # noqa: E501 'disable_email_click_tracking': 'disable_email_click_tracking', # noqa: E501 'include_unsubscribed': 'include_unsubscribed', # noqa: E501 @@ -355,6 +377,11 @@ def discriminator(): 'sms_media_urls': 'sms_media_urls', # noqa: E501 'filters': 'filters', # noqa: E501 'custom_data': 'custom_data', # noqa: E501 + 'huawei_badge_class': 'huawei_badge_class', # noqa: E501 + 'huawei_badge_add_num': 'huawei_badge_add_num', # noqa: E501 + 'huawei_badge_set_num': 'huawei_badge_set_num', # noqa: E501 + 'huawei_category': 'huawei_category', # noqa: E501 + 'huawei_bi_tag': 'huawei_bi_tag', # noqa: E501 'successful': 'successful', # noqa: E501 'failed': 'failed', # noqa: E501 'errored': 'errored', # noqa: E501 @@ -511,6 +538,7 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 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] # noqa: E501 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] # noqa: E501 + 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 @@ -518,6 +546,11 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501 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] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 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] # noqa: E501 + huawei_badge_class (str, none_type): Channel: Push Notifications Platform: Huawei Full path of the app entry activity class. [optional] # noqa: E501 + 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] # noqa: E501 + huawei_badge_set_num (int, none_type): Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99. [optional] # noqa: E501 + huawei_category (str, none_type): Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.. [optional] # noqa: E501 + huawei_bi_tag (str, none_type): Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.. [optional] # noqa: E501 successful (int): Number of notifications that were successfully delivered.. [optional] # noqa: E501 failed (int): Number of notifications that could not be delivered due to those devices being unsubscribed.. [optional] # noqa: E501 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] # noqa: E501 @@ -734,6 +767,7 @@ def __init__(self, *args, **kwargs): # noqa: E501 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 tag somewhere in the email. Note: any malformed HTML content will be sent to users. Please double-check your HTML is valid. . [optional] # noqa: E501 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] # noqa: E501 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] # noqa: E501 + 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 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] # noqa: E501 @@ -741,6 +775,11 @@ def __init__(self, *args, **kwargs): # noqa: E501 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] # noqa: E501 filters ([FilterExpression], none_type): [optional] # noqa: E501 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] # noqa: E501 + huawei_badge_class (str, none_type): Channel: Push Notifications Platform: Huawei Full path of the app entry activity class. [optional] # noqa: E501 + 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] # noqa: E501 + huawei_badge_set_num (int, none_type): Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99. [optional] # noqa: E501 + huawei_category (str, none_type): Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification.. [optional] # noqa: E501 + huawei_bi_tag (str, none_type): Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics.. [optional] # noqa: E501 successful (int): Number of notifications that were successfully delivered.. [optional] # noqa: E501 failed (int): Number of notifications that could not be delivered due to those devices being unsubscribed.. [optional] # noqa: E501 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] # noqa: E501 diff --git a/setup.py b/setup.py index c9423c8..70883cc 100644 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ from setuptools import setup, find_packages # noqa: H301 NAME = "onesignal_python_api" -VERSION = "5.3.0-beta1" +VERSION = "5.3.0" # To install the library, run the following # # python setup.py install