Skip to content
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
68 changes: 68 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
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 RubyGems
needs: release
if: needs.release.outputs.new_release_published == 'true'
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v5

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.2'
bundler-cache: true

- name: Build gem
run: |
gem build onesignal.gemspec
ls -la *.gem

- name: Publish to RubyGems
uses: rubygems/release-gem@v1
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ A powerful way to send personalized messages at scale and build effective custom
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:

- API version: 5.3.0
- Package version: 5.3.0-beta1
- Package version: 5.3.0
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
For more information, please visit [https://onesignal.com](https://onesignal.com)

Expand All @@ -24,16 +24,16 @@ gem build onesignal.gemspec
Then either install the gem locally:

```shell
gem install ./onesignal-5.3.0-beta1.gem
gem install ./onesignal-5.3.0.gem
```

(for development, run `gem install --dev ./onesignal-5.3.0-beta1.gem` to install the development dependencies)
(for development, run `gem install --dev ./onesignal-5.3.0.gem` to install the development dependencies)

or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).

Finally add this to the Gemfile:

gem 'onesignal', '~> 5.3.0-beta1'
gem 'onesignal', '~> 5.3.0'

### Install from Git

Expand Down
14 changes: 13 additions & 1 deletion docs/BasicNotification.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,19 @@
| **email_body** | **String** | 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] |
| **email_from_name** | **String** | 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** | **String** | 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** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] |
| **email_preheader** | **String** | 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** | **Boolean** | 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** | **Boolean** | 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] |
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
| **sms_media_urls** | **Array<String>** | 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** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
| **custom_data** | **Object** | 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** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |

## Example

Expand Down Expand Up @@ -220,13 +226,19 @@ instance = OneSignal::BasicNotification.new(
email_body: null,
email_from_name: null,
email_from_address: null,
email_reply_to_address: null,
email_preheader: null,
disable_email_click_tracking: null,
include_unsubscribed: null,
sms_from: null,
sms_media_urls: null,
filters: null,
custom_data: null
custom_data: null,
huawei_badge_class: null,
huawei_badge_add_num: null,
huawei_badge_set_num: null,
huawei_category: null,
huawei_bi_tag: null
)
```

14 changes: 13 additions & 1 deletion docs/BasicNotificationAllOf.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,19 @@
| **email_body** | **String** | 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] |
| **email_from_name** | **String** | 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** | **String** | 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** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] |
| **email_preheader** | **String** | 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** | **Boolean** | 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** | **Boolean** | 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] |
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
| **sms_media_urls** | **Array<String>** | 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** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
| **custom_data** | **Object** | 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** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |

## Example

Expand Down Expand Up @@ -194,13 +200,19 @@ instance = OneSignal::BasicNotificationAllOf.new(
email_body: null,
email_from_name: null,
email_from_address: null,
email_reply_to_address: null,
email_preheader: null,
disable_email_click_tracking: null,
include_unsubscribed: null,
sms_from: null,
sms_media_urls: null,
filters: null,
custom_data: null
custom_data: null,
huawei_badge_class: null,
huawei_badge_add_num: null,
huawei_badge_set_num: null,
huawei_category: null,
huawei_bi_tag: null
)
```

12 changes: 12 additions & 0 deletions docs/Notification.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,19 @@
| **email_body** | **String** | 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] |
| **email_from_name** | **String** | 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** | **String** | 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** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] |
| **email_preheader** | **String** | 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** | **Boolean** | 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** | **Boolean** | 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] |
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
| **sms_media_urls** | **Array<String>** | 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** | [**Array<FilterExpression>**](FilterExpression.md) | | [optional] |
| **custom_data** | **Object** | 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** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
| **send_after** | **Time** | 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] |

## Example
Expand Down Expand Up @@ -221,13 +227,19 @@ instance = OneSignal::Notification.new(
email_body: null,
email_from_name: null,
email_from_address: null,
email_reply_to_address: null,
email_preheader: null,
disable_email_click_tracking: null,
include_unsubscribed: null,
sms_from: null,
sms_media_urls: null,
filters: null,
custom_data: null,
huawei_badge_class: null,
huawei_badge_add_num: null,
huawei_badge_set_num: null,
huawei_category: null,
huawei_bi_tag: null,
send_after: null
)
```
Expand Down
Loading
Loading