Skip to content

Commit d122df9

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

12 files changed

Lines changed: 1307 additions & 51 deletions

.github/workflows/release.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version to publish (leave empty to use current version)'
11+
required: false
12+
default: ''
13+
14+
jobs:
15+
release:
16+
name: Create GitHub Release
17+
runs-on: ubuntu-latest
18+
outputs:
19+
new_release_published: ${{ steps.semantic.outputs.new_release_published }}
20+
permissions:
21+
contents: write
22+
issues: write
23+
pull-requests: write
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v5
27+
with:
28+
fetch-depth: 0
29+
token: ${{ secrets.GITHUB_TOKEN }}
30+
- name: Create GitHub Release
31+
id: semantic
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
run: |
35+
output=$(npx -p semantic-release \
36+
-p @semantic-release/changelog \
37+
-p @semantic-release/git \
38+
-p @semantic-release/github \
39+
-p conventional-changelog-conventionalcommits \
40+
semantic-release 2>&1) && exit_code=0 || exit_code=$?
41+
echo "$output"
42+
if echo "$output" | grep -q "Published release"; then
43+
echo "new_release_published=true" >> "$GITHUB_OUTPUT"
44+
else
45+
echo "new_release_published=false" >> "$GITHUB_OUTPUT"
46+
fi
47+
exit $exit_code
48+
49+
publish:
50+
name: Publish to Maven Central
51+
needs: release
52+
if: needs.release.outputs.new_release_published == 'true'
53+
runs-on: ubuntu-latest
54+
env:
55+
MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }}
56+
MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }}
57+
SIGNING_KEY_ID: ${{ secrets.SIGNING_KEY_ID }}
58+
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
59+
GPG_FILE_NAME: onesignal_sdk_gpg_subkeys.gpg
60+
steps:
61+
- name: Checkout code
62+
uses: actions/checkout@v4
63+
64+
- name: Set up Java
65+
uses: actions/setup-java@v4
66+
with:
67+
java-version: '11'
68+
distribution: 'temurin'
69+
70+
- name: Cache Gradle packages
71+
uses: actions/cache@v3
72+
with:
73+
path: |
74+
~/.gradle/caches
75+
~/.gradle/wrapper
76+
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
77+
restore-keys: |
78+
${{ runner.os }}-gradle-
79+
80+
- name: Grant execute permission for gradlew
81+
run: chmod +x gradlew
82+
83+
- name: Set version from input
84+
if: github.event.inputs.version != ''
85+
run: |
86+
echo "VERSION=${{ github.event.inputs.version }}" >> $GITHUB_ENV
87+
sed -i "s/version = '[^']*'/version = '${{ github.event.inputs.version }}'/" build.gradle
88+
89+
- name: Build project
90+
run: ./gradlew build
91+
92+
- name: Run tests
93+
run: ./gradlew test
94+
95+
- name: Decode GPG file from secret
96+
run: |
97+
echo "${{ secrets.SIGNING_SECRET_KEY_RING_FILE }}" | base64 -d > "$GPG_FILE_NAME"
98+
echo "GPG_FILE_PATH=$(pwd)/$GPG_FILE_NAME" >> $GITHUB_ENV
99+
100+
- name: Verify GPG file
101+
run: |
102+
ls -lh "$GPG_FILE_PATH"
103+
gpg --list-packets "$GPG_FILE_PATH" || echo "Invalid key file!"
104+
105+
- name: Publish to Maven Central
106+
run: |
107+
./gradlew publishAndReleaseToMavenCentral --no-configuration-cache \
108+
-PmavenCentralUsername="$MAVEN_CENTRAL_USERNAME" \
109+
-PmavenCentralPassword="$MAVEN_CENTRAL_PASSWORD" \
110+
-Psigning.keyId="$SIGNING_KEY_ID" \
111+
-Psigning.password="$SIGNING_PASSWORD" \
112+
-Psigning.secretKeyRingFile="$GPG_FILE_PATH"
113+
114+
- name: Upload build artifacts
115+
uses: actions/upload-artifact@v4
116+
if: always()
117+
with:
118+
name: build-artifacts
119+
path: build/libs/

api/openapi.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5117,6 +5117,12 @@ components:
51175117
nullable: true
51185118
type: string
51195119
writeOnly: true
5120+
email_reply_to_address:
5121+
description: "Channel: Email\nThe email address where replies should be\
5122+
\ sent. If not specified, replies will go to the from address.\n"
5123+
nullable: true
5124+
type: string
5125+
writeOnly: true
51205126
email_preheader:
51215127
description: "Channel: Email\nThe preheader text of the email.\nPreheader\
51225128
\ is the preview text displayed immediately after an email subject that\
@@ -5170,6 +5176,49 @@ components:
51705176
nullable: true
51715177
type: object
51725178
writeOnly: true
5179+
huawei_badge_class:
5180+
description: "Channel: Push Notifications\nPlatform: Huawei\nFull path of\
5181+
\ the app entry activity class"
5182+
nullable: true
5183+
type: string
5184+
writeOnly: true
5185+
huawei_badge_add_num:
5186+
description: "Channel: Push Notifications\nPlatform: Huawei\nAccumulative\
5187+
\ badge number, which is an integer ranging from 1 to 99"
5188+
nullable: true
5189+
type: integer
5190+
writeOnly: true
5191+
huawei_badge_set_num:
5192+
description: "Channel: Push Notifications\nPlatform: Huawei\nBadge number,\
5193+
\ which is an integer ranging from 0 to 99"
5194+
nullable: true
5195+
type: integer
5196+
writeOnly: true
5197+
huawei_category:
5198+
description: "Channel: Push Notifications\nPlatform: Huawei\nCategory of\
5199+
\ the push notification for HMS classification."
5200+
enum:
5201+
- IM
5202+
- VOIP
5203+
- SUBSCRIPTION
5204+
- TRAVEL
5205+
- HEALTH
5206+
- WORK
5207+
- ACCOUNT
5208+
- EXPRESS
5209+
- FINANCE
5210+
- DEVICE_REMINDER
5211+
- MAIL
5212+
- MARKETING
5213+
nullable: true
5214+
type: string
5215+
writeOnly: true
5216+
huawei_bi_tag:
5217+
description: "Channel: Push Notifications\nPlatform: Huawei\nA tag used\
5218+
\ for Huawei business intelligence and analytics."
5219+
nullable: true
5220+
type: string
5221+
writeOnly: true
51735222
type: object
51745223
Notification_allOf:
51755224
properties:

docs/BasicNotification.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,19 @@
108108
|**emailBody** | **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] |
109109
|**emailFromName** | **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] |
110110
|**emailFromAddress** | **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] |
111+
|**emailReplyToAddress** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] |
111112
|**emailPreheader** | **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] |
112113
|**disableEmailClickTracking** | **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] |
113114
|**includeUnsubscribed** | **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] |
114115
|**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
115116
|**smsMediaUrls** | **List<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] |
116117
|**filters** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] |
117118
|**customData** | **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] |
119+
|**huaweiBadgeClass** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
120+
|**huaweiBadgeAddNum** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
121+
|**huaweiBadgeSetNum** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
122+
|**huaweiCategory** | [**HuaweiCategoryEnum**](#HuaweiCategoryEnum) | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
123+
|**huaweiBiTag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
118124

119125

120126

@@ -137,3 +143,22 @@
137143

138144

139145

146+
## Enum: HuaweiCategoryEnum
147+
148+
| Name | Value |
149+
|---- | -----|
150+
| IM | "IM" |
151+
| VOIP | "VOIP" |
152+
| SUBSCRIPTION | "SUBSCRIPTION" |
153+
| TRAVEL | "TRAVEL" |
154+
| HEALTH | "HEALTH" |
155+
| WORK | "WORK" |
156+
| ACCOUNT | "ACCOUNT" |
157+
| EXPRESS | "EXPRESS" |
158+
| FINANCE | "FINANCE" |
159+
| DEVICE_REMINDER | "DEVICE_REMINDER" |
160+
| MAIL | "MAIL" |
161+
| MARKETING | "MARKETING" |
162+
163+
164+

docs/BasicNotificationAllOf.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,19 @@
9595
|**emailBody** | **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] |
9696
|**emailFromName** | **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] |
9797
|**emailFromAddress** | **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] |
98+
|**emailReplyToAddress** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] |
9899
|**emailPreheader** | **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] |
99100
|**disableEmailClickTracking** | **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] |
100101
|**includeUnsubscribed** | **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] |
101102
|**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
102103
|**smsMediaUrls** | **List<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] |
103104
|**filters** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] |
104105
|**customData** | **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] |
106+
|**huaweiBadgeClass** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
107+
|**huaweiBadgeAddNum** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
108+
|**huaweiBadgeSetNum** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
109+
|**huaweiCategory** | [**HuaweiCategoryEnum**](#HuaweiCategoryEnum) | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
110+
|**huaweiBiTag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
105111

106112

107113

@@ -114,3 +120,22 @@
114120

115121

116122

123+
## Enum: HuaweiCategoryEnum
124+
125+
| Name | Value |
126+
|---- | -----|
127+
| IM | "IM" |
128+
| VOIP | "VOIP" |
129+
| SUBSCRIPTION | "SUBSCRIPTION" |
130+
| TRAVEL | "TRAVEL" |
131+
| HEALTH | "HEALTH" |
132+
| WORK | "WORK" |
133+
| ACCOUNT | "ACCOUNT" |
134+
| EXPRESS | "EXPRESS" |
135+
| FINANCE | "FINANCE" |
136+
| DEVICE_REMINDER | "DEVICE_REMINDER" |
137+
| MAIL | "MAIL" |
138+
| MARKETING | "MARKETING" |
139+
140+
141+

docs/Notification.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,13 +108,19 @@
108108
|**emailBody** | **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] |
109109
|**emailFromName** | **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] |
110110
|**emailFromAddress** | **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] |
111+
|**emailReplyToAddress** | **String** | Channel: Email The email address where replies should be sent. If not specified, replies will go to the from address. | [optional] |
111112
|**emailPreheader** | **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] |
112113
|**disableEmailClickTracking** | **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] |
113114
|**includeUnsubscribed** | **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] |
114115
|**smsFrom** | **String** | Channel: SMS Phone Number used to send SMS. Should be a registered Twilio phone number in E.164 format. | [optional] |
115116
|**smsMediaUrls** | **List<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] |
116117
|**filters** | [**List<FilterExpression>**](FilterExpression.md) | | [optional] |
117118
|**customData** | **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] |
119+
|**huaweiBadgeClass** | **String** | Channel: Push Notifications Platform: Huawei Full path of the app entry activity class | [optional] |
120+
|**huaweiBadgeAddNum** | **Integer** | Channel: Push Notifications Platform: Huawei Accumulative badge number, which is an integer ranging from 1 to 99 | [optional] |
121+
|**huaweiBadgeSetNum** | **Integer** | Channel: Push Notifications Platform: Huawei Badge number, which is an integer ranging from 0 to 99 | [optional] |
122+
|**huaweiCategory** | [**HuaweiCategoryEnum**](#HuaweiCategoryEnum) | Channel: Push Notifications Platform: Huawei Category of the push notification for HMS classification. | [optional] |
123+
|**huaweiBiTag** | **String** | Channel: Push Notifications Platform: Huawei A tag used for Huawei business intelligence and analytics. | [optional] |
118124
|**sendAfter** | **OffsetDateTime** | 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] |
119125

120126

@@ -138,3 +144,22 @@
138144

139145

140146

147+
## Enum: HuaweiCategoryEnum
148+
149+
| Name | Value |
150+
|---- | -----|
151+
| IM | "IM" |
152+
| VOIP | "VOIP" |
153+
| SUBSCRIPTION | "SUBSCRIPTION" |
154+
| TRAVEL | "TRAVEL" |
155+
| HEALTH | "HEALTH" |
156+
| WORK | "WORK" |
157+
| ACCOUNT | "ACCOUNT" |
158+
| EXPRESS | "EXPRESS" |
159+
| FINANCE | "FINANCE" |
160+
| DEVICE_REMINDER | "DEVICE_REMINDER" |
161+
| MAIL | "MAIL" |
162+
| MARKETING | "MARKETING" |
163+
164+
165+

0 commit comments

Comments
 (0)