Skip to content

Commit a8baa16

Browse files
authored
Merge pull request #46 from OneSignal/user-api-updates
Add v5.0.0-beta1 package updates
2 parents 08d2a20 + c1fbcf6 commit a8baa16

150 files changed

Lines changed: 4563 additions & 10750 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/ask-question.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🙋‍♂️ Ask a question
22
description: Tell us what's on your mind
3-
title: "[question]: "
4-
labels: ["triage"]
3+
title: "[Question]: "
4+
labels: ["Question"]
55
body:
66
- type: markdown
77
attributes:
@@ -22,4 +22,4 @@ body:
2222
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
2323
options:
2424
- label: I agree to follow this project's Code of Conduct
25-
required: true
25+
required: true

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 🪳 Bug report
22
description: File a bug report
33
title: "[Bug]: "
4-
labels: ["bug", "triage"]
4+
labels: ["Bug"]
55
body:
66
- type: markdown
77
attributes:
@@ -48,4 +48,4 @@ body:
4848
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
4949
options:
5050
- label: I agree to follow this project's Code of Conduct
51-
required: true
51+
required: true

.github/ISSUE_TEMPLATE/general-feedback.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: 📣 General feedback
22
description: Tell us what's on your mind
3-
title: "[Bug]: "
4-
labels: ["triage"]
3+
title: "[Feedback]: "
4+
labels: ["Feedback"]
55
body:
66
- type: markdown
77
attributes:
@@ -22,4 +22,4 @@ body:
2222
description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/OneSignal/api/blob/main/CONTRIBUTING.md)
2323
options:
2424
- label: I agree to follow this project's Code of Conduct
25-
required: true
25+
required: true

.github/workflows/project.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Add issues to project
2+
3+
on:
4+
issues:
5+
types:
6+
- opened
7+
8+
jobs:
9+
add-to-project:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Add issue to project
13+
uses: actions/add-to-project@v1.0.2
14+
with:
15+
# SDK Server Project
16+
project-url: https://github.com/orgs/OneSignal/projects/11
17+
github-token: ${{ secrets.GH_PROJECTS_TOKEN }}

README.md

Lines changed: 36 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# onesignal-java-client
22

33
OneSignal
4-
- API version: 1.4.0
5-
- Build date: 2025-04-25T19:31:57.613Z[Etc/UTC]
4+
- API version: 5.0.1
5+
- Build date: 2025-05-13T23:45:41.211Z[Etc/UTC]
66

77
A powerful way to send personalized messages at scale and build effective customer engagement strategies. Learn more at onesignal.com
88

@@ -41,7 +41,7 @@ Add this dependency to your project's POM:
4141
<dependency>
4242
<groupId>org.openapitools</groupId>
4343
<artifactId>onesignal-java-client</artifactId>
44-
<version>1.4.0</version>
44+
<version>5.0.1</version>
4545
<scope>compile</scope>
4646
</dependency>
4747
```
@@ -57,7 +57,7 @@ Add this dependency to your project's build file:
5757
}
5858
5959
dependencies {
60-
implementation "org.openapitools:onesignal-java-client:1.4.0"
60+
implementation "org.openapitools:onesignal-java-client:5.0.1"
6161
}
6262
```
6363

@@ -71,7 +71,7 @@ mvn clean package
7171

7272
Then manually install the following JARs:
7373

74-
* `target/onesignal-java-client-1.4.0.jar`
74+
* `target/onesignal-java-client-5.0.1.jar`
7575
* `target/lib/*.jar`
7676

7777
## Getting Started
@@ -90,8 +90,8 @@ import com.onesignal.client.api.DefaultApi;
9090

9191
public class Example {
9292
private static final String appId = "YOUR_APP_ID";
93-
private static final String restKeyToken = "YOUR_REST_API_KEY"; // App REST API key required for most endpoints
94-
private static final String orgKeyToken = "YOUR_ORGANIZATION_API_KEY"; // Organization key is only required for creating new apps and other top-level endpoints
93+
private static final String appKeyToken = "YOUR_APP_KEY";
94+
private static final String userKeyToken = "YOUR_USER_TOKEN";
9595

9696
private static Notification createNotification() {
9797
Notification notification = new Notification();
@@ -110,9 +110,9 @@ public class Example {
110110
// Setting up the client
111111
ApiClient defaultClient = Configuration.getDefaultApiClient();
112112
HttpBearerAuth appKey = (HttpBearerAuth) defaultClient.getAuthentication("app_key");
113-
appKey.setBearerToken(restKeyToken);
113+
appKey.setBearerToken(appKeyToken);
114114
HttpBearerAuth userKey = (HttpBearerAuth) defaultClient.getAuthentication("user_key");
115-
userKey.setBearerToken(orgKeyToken);
115+
userKey.setBearerToken(userKeyToken);
116116
api = new DefaultApi(defaultClient);
117117

118118
// Setting up the notification
@@ -134,41 +134,34 @@ All URIs are relative to *https://api.onesignal.com*
134134

135135
Class | Method | HTTP request | Description
136136
------------ | ------------- | ------------- | -------------
137-
*DefaultApi* | [**beginLiveActivity**](docs/DefaultApi.md#beginLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity
138137
*DefaultApi* | [**cancelNotification**](docs/DefaultApi.md#cancelNotification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
138+
*DefaultApi* | [**createAlias**](docs/DefaultApi.md#createAlias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
139+
*DefaultApi* | [**createAliasBySubscription**](docs/DefaultApi.md#createAliasBySubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
139140
*DefaultApi* | [**createApp**](docs/DefaultApi.md#createApp) | **POST** /apps | Create an app
140141
*DefaultApi* | [**createNotification**](docs/DefaultApi.md#createNotification) | **POST** /notifications | Create notification
141-
*DefaultApi* | [**createPlayer**](docs/DefaultApi.md#createPlayer) | **POST** /players | Add a device
142-
*DefaultApi* | [**createSegments**](docs/DefaultApi.md#createSegments) | **POST** /apps/{app_id}/segments | Create Segments
142+
*DefaultApi* | [**createSegment**](docs/DefaultApi.md#createSegment) | **POST** /apps/{app_id}/segments | Create Segment
143143
*DefaultApi* | [**createSubscription**](docs/DefaultApi.md#createSubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
144144
*DefaultApi* | [**createUser**](docs/DefaultApi.md#createUser) | **POST** /apps/{app_id}/users |
145145
*DefaultApi* | [**deleteAlias**](docs/DefaultApi.md#deleteAlias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
146-
*DefaultApi* | [**deletePlayer**](docs/DefaultApi.md#deletePlayer) | **DELETE** /players/{player_id} | Delete a user record
147-
*DefaultApi* | [**deleteSegments**](docs/DefaultApi.md#deleteSegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments
146+
*DefaultApi* | [**deleteSegment**](docs/DefaultApi.md#deleteSegment) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segment
148147
*DefaultApi* | [**deleteSubscription**](docs/DefaultApi.md#deleteSubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
149148
*DefaultApi* | [**deleteUser**](docs/DefaultApi.md#deleteUser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
150-
*DefaultApi* | [**endLiveActivity**](docs/DefaultApi.md#endLiveActivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity
151149
*DefaultApi* | [**exportEvents**](docs/DefaultApi.md#exportEvents) | **POST** /notifications/{notification_id}/export_events?app_id&#x3D;{app_id} | Export CSV of Events
152-
*DefaultApi* | [**exportPlayers**](docs/DefaultApi.md#exportPlayers) | **POST** /players/csv_export?app_id&#x3D;{app_id} | Export CSV of Players
153-
*DefaultApi* | [**fetchAliases**](docs/DefaultApi.md#fetchAliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
154-
*DefaultApi* | [**fetchUser**](docs/DefaultApi.md#fetchUser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
155-
*DefaultApi* | [**fetchUserIdentity**](docs/DefaultApi.md#fetchUserIdentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
150+
*DefaultApi* | [**exportSubscriptions**](docs/DefaultApi.md#exportSubscriptions) | **POST** /players/csv_export?app_id&#x3D;{app_id} | Export CSV of Subscriptions
151+
*DefaultApi* | [**getAliases**](docs/DefaultApi.md#getAliases) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
152+
*DefaultApi* | [**getAliasesBySubscription**](docs/DefaultApi.md#getAliasesBySubscription) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
156153
*DefaultApi* | [**getApp**](docs/DefaultApi.md#getApp) | **GET** /apps/{app_id} | View an app
157154
*DefaultApi* | [**getApps**](docs/DefaultApi.md#getApps) | **GET** /apps | View apps
158-
*DefaultApi* | [**getEligibleIams**](docs/DefaultApi.md#getEligibleIams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams |
159155
*DefaultApi* | [**getNotification**](docs/DefaultApi.md#getNotification) | **GET** /notifications/{notification_id} | View notification
160156
*DefaultApi* | [**getNotificationHistory**](docs/DefaultApi.md#getNotificationHistory) | **POST** /notifications/{notification_id}/history | Notification History
161157
*DefaultApi* | [**getNotifications**](docs/DefaultApi.md#getNotifications) | **GET** /notifications | View notifications
162158
*DefaultApi* | [**getOutcomes**](docs/DefaultApi.md#getOutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
163-
*DefaultApi* | [**getPlayer**](docs/DefaultApi.md#getPlayer) | **GET** /players/{player_id} | View device
164-
*DefaultApi* | [**getPlayers**](docs/DefaultApi.md#getPlayers) | **GET** /players | View devices
165-
*DefaultApi* | [**identifyUserByAlias**](docs/DefaultApi.md#identifyUserByAlias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
166-
*DefaultApi* | [**identifyUserBySubscriptionId**](docs/DefaultApi.md#identifyUserBySubscriptionId) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
159+
*DefaultApi* | [**getSegments**](docs/DefaultApi.md#getSegments) | **GET** /apps/{app_id}/segments | Get Segments
160+
*DefaultApi* | [**getUser**](docs/DefaultApi.md#getUser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
167161
*DefaultApi* | [**transferSubscription**](docs/DefaultApi.md#transferSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
162+
*DefaultApi* | [**unsubscribeEmailWithToken**](docs/DefaultApi.md#unsubscribeEmailWithToken) | **POST** /apps/{app_id}/notifications/{notification_id}/unsubscribe | Unsubscribe with token
168163
*DefaultApi* | [**updateApp**](docs/DefaultApi.md#updateApp) | **PUT** /apps/{app_id} | Update an app
169164
*DefaultApi* | [**updateLiveActivity**](docs/DefaultApi.md#updateLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
170-
*DefaultApi* | [**updatePlayer**](docs/DefaultApi.md#updatePlayer) | **PUT** /players/{player_id} | Edit device
171-
*DefaultApi* | [**updatePlayerTags**](docs/DefaultApi.md#updatePlayerTags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
172165
*DefaultApi* | [**updateSubscription**](docs/DefaultApi.md#updateSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
173166
*DefaultApi* | [**updateUser**](docs/DefaultApi.md#updateUser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
174167

@@ -179,37 +172,25 @@ Class | Method | HTTP request | Description
179172
- [BasicNotification](docs/BasicNotification.md)
180173
- [BasicNotificationAllOf](docs/BasicNotificationAllOf.md)
181174
- [BasicNotificationAllOfAndroidBackgroundLayout](docs/BasicNotificationAllOfAndroidBackgroundLayout.md)
182-
- [BeginLiveActivityRequest](docs/BeginLiveActivityRequest.md)
183175
- [Button](docs/Button.md)
184-
- [CancelNotificationSuccessResponse](docs/CancelNotificationSuccessResponse.md)
185176
- [CreateNotificationSuccessResponse](docs/CreateNotificationSuccessResponse.md)
186-
- [CreatePlayerSuccessResponse](docs/CreatePlayerSuccessResponse.md)
187177
- [CreateSegmentConflictResponse](docs/CreateSegmentConflictResponse.md)
188178
- [CreateSegmentSuccessResponse](docs/CreateSegmentSuccessResponse.md)
189-
- [CreateSubscriptionRequestBody](docs/CreateSubscriptionRequestBody.md)
190179
- [CreateUserConflictResponse](docs/CreateUserConflictResponse.md)
191180
- [CreateUserConflictResponseErrorsInner](docs/CreateUserConflictResponseErrorsInner.md)
192181
- [CreateUserConflictResponseErrorsItemsMeta](docs/CreateUserConflictResponseErrorsItemsMeta.md)
193-
- [DeletePlayerNotFoundResponse](docs/DeletePlayerNotFoundResponse.md)
194-
- [DeletePlayerSuccessResponse](docs/DeletePlayerSuccessResponse.md)
195-
- [DeleteSegmentNotFoundResponse](docs/DeleteSegmentNotFoundResponse.md)
196-
- [DeleteSegmentSuccessResponse](docs/DeleteSegmentSuccessResponse.md)
197182
- [DeliveryData](docs/DeliveryData.md)
198183
- [ExportEventsSuccessResponse](docs/ExportEventsSuccessResponse.md)
199-
- [ExportPlayersRequestBody](docs/ExportPlayersRequestBody.md)
200-
- [ExportPlayersSuccessResponse](docs/ExportPlayersSuccessResponse.md)
184+
- [ExportSubscriptionsRequestBody](docs/ExportSubscriptionsRequestBody.md)
185+
- [ExportSubscriptionsSuccessResponse](docs/ExportSubscriptionsSuccessResponse.md)
201186
- [Filter](docs/Filter.md)
202-
- [FilterExpressions](docs/FilterExpressions.md)
187+
- [FilterExpression](docs/FilterExpression.md)
203188
- [GenericError](docs/GenericError.md)
204-
- [GenericErrorErrorsInner](docs/GenericErrorErrorsInner.md)
205-
- [GetNotificationRequestBody](docs/GetNotificationRequestBody.md)
206-
- [InlineResponse200](docs/InlineResponse200.md)
207-
- [InlineResponse2003](docs/InlineResponse2003.md)
208-
- [InlineResponse201](docs/InlineResponse201.md)
209-
- [InlineResponse202](docs/InlineResponse202.md)
210-
- [InvalidIdentifierError](docs/InvalidIdentifierError.md)
189+
- [GenericSuccessBoolResponse](docs/GenericSuccessBoolResponse.md)
190+
- [GetNotificationHistoryRequestBody](docs/GetNotificationHistoryRequestBody.md)
191+
- [GetSegmentsSuccessResponse](docs/GetSegmentsSuccessResponse.md)
192+
- [LanguageStringMap](docs/LanguageStringMap.md)
211193
- [Notification](docs/Notification.md)
212-
- [Notification200Errors](docs/Notification200Errors.md)
213194
- [NotificationAllOf](docs/NotificationAllOf.md)
214195
- [NotificationHistorySuccessResponse](docs/NotificationHistorySuccessResponse.md)
215196
- [NotificationSlice](docs/NotificationSlice.md)
@@ -222,40 +203,34 @@ Class | Method | HTTP request | Description
222203
- [PlatformDeliveryData](docs/PlatformDeliveryData.md)
223204
- [PlatformDeliveryDataEmailAllOf](docs/PlatformDeliveryDataEmailAllOf.md)
224205
- [PlatformDeliveryDataSmsAllOf](docs/PlatformDeliveryDataSmsAllOf.md)
225-
- [Player](docs/Player.md)
226-
- [PlayerNotificationTarget](docs/PlayerNotificationTarget.md)
227-
- [PlayerNotificationTargetIncludeAliases](docs/PlayerNotificationTargetIncludeAliases.md)
228-
- [PlayerSlice](docs/PlayerSlice.md)
206+
- [PropertiesBody](docs/PropertiesBody.md)
229207
- [PropertiesDeltas](docs/PropertiesDeltas.md)
230208
- [PropertiesObject](docs/PropertiesObject.md)
231209
- [Purchase](docs/Purchase.md)
232-
- [RateLimiterError](docs/RateLimiterError.md)
210+
- [RateLimitError](docs/RateLimitError.md)
233211
- [Segment](docs/Segment.md)
212+
- [SegmentData](docs/SegmentData.md)
234213
- [SegmentNotificationTarget](docs/SegmentNotificationTarget.md)
235-
- [StringMap](docs/StringMap.md)
236-
- [SubscriptionObject](docs/SubscriptionObject.md)
214+
- [Subscription](docs/Subscription.md)
215+
- [SubscriptionBody](docs/SubscriptionBody.md)
216+
- [SubscriptionNotificationTarget](docs/SubscriptionNotificationTarget.md)
237217
- [TransferSubscriptionRequestBody](docs/TransferSubscriptionRequestBody.md)
238218
- [UpdateLiveActivityRequest](docs/UpdateLiveActivityRequest.md)
239219
- [UpdateLiveActivitySuccessResponse](docs/UpdateLiveActivitySuccessResponse.md)
240-
- [UpdatePlayerSuccessResponse](docs/UpdatePlayerSuccessResponse.md)
241-
- [UpdatePlayerTagsRequestBody](docs/UpdatePlayerTagsRequestBody.md)
242-
- [UpdatePlayerTagsSuccessResponse](docs/UpdatePlayerTagsSuccessResponse.md)
243-
- [UpdateSubscriptionRequestBody](docs/UpdateSubscriptionRequestBody.md)
244220
- [UpdateUserRequest](docs/UpdateUserRequest.md)
245221
- [User](docs/User.md)
246-
- [UserIdentityRequestBody](docs/UserIdentityRequestBody.md)
247-
- [UserIdentityResponse](docs/UserIdentityResponse.md)
248-
- [UserSubscriptionOptions](docs/UserSubscriptionOptions.md)
222+
- [UserIdentityBody](docs/UserIdentityBody.md)
223+
- [WebButton](docs/WebButton.md)
249224

250225

251226
## Documentation for Authorization
252227

253228
Authentication schemes defined for the API:
254-
### app_key
229+
### rest_api_key
255230

256231
- **Type**: HTTP basic authentication
257232

258-
### user_key
233+
### user_auth_key
259234

260235
- **Type**: HTTP basic authentication
261236

0 commit comments

Comments
 (0)