Skip to content

Commit 9777640

Browse files
onesignal-deployOneSignal
andauthored
feat: add Huawei and email_reply_to_address parameters to Notification (#61)
Co-authored-by: OneSignal <noreply@onesignal.com>
1 parent 3a329b1 commit 9777640

16 files changed

Lines changed: 608 additions & 20 deletions

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
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 RubyGems
45+
needs: release
46+
if: needs.release.outputs.new_release_published == 'true'
47+
runs-on: ubuntu-latest
48+
permissions:
49+
id-token: write
50+
contents: write
51+
steps:
52+
- uses: actions/checkout@v5
53+
54+
- name: Set up Ruby
55+
uses: ruby/setup-ruby@v1
56+
with:
57+
ruby-version: '3.2'
58+
bundler-cache: true
59+
60+
- name: Build gem
61+
run: |
62+
gem build onesignal.gemspec
63+
ls -la *.gem
64+
65+
- name: Publish to RubyGems
66+
uses: rubygems/release-gem@v1
67+
env:
68+
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ A powerful way to send personalized messages at scale and build effective custom
77
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
88

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

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

2626
```shell
27-
gem install ./onesignal-5.3.0-beta1.gem
27+
gem install ./onesignal-5.3.0.gem
2828
```
2929

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

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

3434
Finally add this to the Gemfile:
3535

36-
gem 'onesignal', '~> 5.3.0-beta1'
36+
gem 'onesignal', '~> 5.3.0'
3737

3838
### Install from Git
3939

docs/BasicNotification.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,19 @@
105105
| **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 &lt;a&gt; 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** | **String** | Channel: Email The name the email is from. If not specified, will default to \&quot;from name\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
107107
| **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \&quot;from email\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
108+
| **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] |
108109
| **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] |
109110
| **disable_email_click_tracking** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. If set to &#x60;true&#x60;, 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** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared. | [optional] |
111112
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
112113
| **sms_media_urls** | **Array&lt;String&gt;** | 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** | [**Array&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
114115
| **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: {\&quot;order_id\&quot;: 123, \&quot;currency\&quot;: \&quot;USD\&quot;, \&quot;amount\&quot;: 25} | [optional] |
116+
| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
117+
| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
118+
| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
119+
| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
120+
| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
115121

116122
## Example
117123

@@ -220,13 +226,19 @@ instance = OneSignal::BasicNotification.new(
220226
email_body: null,
221227
email_from_name: null,
222228
email_from_address: null,
229+
email_reply_to_address: null,
223230
email_preheader: null,
224231
disable_email_click_tracking: null,
225232
include_unsubscribed: null,
226233
sms_from: null,
227234
sms_media_urls: null,
228235
filters: null,
229-
custom_data: null
236+
custom_data: null,
237+
huawei_badge_class: null,
238+
huawei_badge_add_num: null,
239+
huawei_badge_set_num: null,
240+
huawei_category: null,
241+
huawei_bi_tag: null
230242
)
231243
```
232244

docs/BasicNotificationAllOf.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,19 @@
9292
| **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 &lt;a&gt; 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** | **String** | Channel: Email The name the email is from. If not specified, will default to \&quot;from name\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
9494
| **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \&quot;from email\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
95+
| **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] |
9596
| **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] |
9697
| **disable_email_click_tracking** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. If set to &#x60;true&#x60;, 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** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared. | [optional] |
9899
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
99100
| **sms_media_urls** | **Array&lt;String&gt;** | 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** | [**Array&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
101102
| **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: {\&quot;order_id\&quot;: 123, \&quot;currency\&quot;: \&quot;USD\&quot;, \&quot;amount\&quot;: 25} | [optional] |
103+
| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
104+
| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
105+
| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
106+
| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
107+
| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
102108

103109
## Example
104110

@@ -194,13 +200,19 @@ instance = OneSignal::BasicNotificationAllOf.new(
194200
email_body: null,
195201
email_from_name: null,
196202
email_from_address: null,
203+
email_reply_to_address: null,
197204
email_preheader: null,
198205
disable_email_click_tracking: null,
199206
include_unsubscribed: null,
200207
sms_from: null,
201208
sms_media_urls: null,
202209
filters: null,
203-
custom_data: null
210+
custom_data: null,
211+
huawei_badge_class: null,
212+
huawei_badge_add_num: null,
213+
huawei_badge_set_num: null,
214+
huawei_category: null,
215+
huawei_bi_tag: null
204216
)
205217
```
206218

docs/Notification.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,13 +105,19 @@
105105
| **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 &lt;a&gt; 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** | **String** | Channel: Email The name the email is from. If not specified, will default to \&quot;from name\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
107107
| **email_from_address** | **String** | Channel: Email The email address the email is from. If not specified, will default to \&quot;from email\&quot; set in the OneSignal Dashboard Email Settings. | [optional] |
108+
| **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] |
108109
| **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] |
109110
| **disable_email_click_tracking** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. If set to &#x60;true&#x60;, 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** | **Boolean** | Channel: Email Default is &#x60;false&#x60;. This field is used to send transactional notifications. If set to &#x60;true&#x60;, this notification will also be sent to unsubscribed emails. If a &#x60;template_id&#x60; is provided, the &#x60;include_unsubscribed&#x60; value from the template will be inherited. If you are using a third-party ESP, this field requires the ESP&#39;s list of unsubscribed emails to be cleared. | [optional] |
111112
| **sms_from** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
112113
| **sms_media_urls** | **Array&lt;String&gt;** | 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** | [**Array&lt;FilterExpression&gt;**](FilterExpression.md) | | [optional] |
114115
| **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: {\&quot;order_id\&quot;: 123, \&quot;currency\&quot;: \&quot;USD\&quot;, \&quot;amount\&quot;: 25} | [optional] |
116+
| **huawei_badge_class** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
117+
| **huawei_badge_add_num** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
118+
| **huawei_badge_set_num** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
119+
| **huawei_category** | **String** | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
120+
| **huawei_bi_tag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
115121
| **send_after** | **Time** | Channel: All Schedule notification for future delivery. API defaults to UTC -1100 Examples: All examples are the exact same date &amp; time. \&quot;Thu Sep 24 2015 14:00:00 GMT-0700 (PDT)\&quot; \&quot;September 24th 2015, 2:00:00 pm UTC-07:00\&quot; \&quot;2015-09-24 14:00:00 GMT-0700\&quot; \&quot;Sept 24 2015 14:00:00 GMT-0700\&quot; \&quot;Thu Sep 24 2015 14:00:00 GMT-0700 (Pacific Daylight Time)\&quot; Note: SMS currently only supports send_after parameter. | [optional] |
116122

117123
## Example
@@ -221,13 +227,19 @@ instance = OneSignal::Notification.new(
221227
email_body: null,
222228
email_from_name: null,
223229
email_from_address: null,
230+
email_reply_to_address: null,
224231
email_preheader: null,
225232
disable_email_click_tracking: null,
226233
include_unsubscribed: null,
227234
sms_from: null,
228235
sms_media_urls: null,
229236
filters: null,
230237
custom_data: null,
238+
huawei_badge_class: null,
239+
huawei_badge_add_num: null,
240+
huawei_badge_set_num: null,
241+
huawei_category: null,
242+
huawei_bi_tag: null,
231243
send_after: null
232244
)
233245
```

0 commit comments

Comments
 (0)