Skip to content

Commit 3d856ea

Browse files
author
OneSignal
committed
feat: add v5.0.0-beta1 package updates
1 parent a8baa16 commit 3d856ea

File tree

65 files changed

+96
-96
lines changed

Some content is hidden

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

65 files changed

+96
-96
lines changed

README.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
OneSignal
44
- API version: 5.0.1
5-
- Build date: 2025-05-13T23:45:41.211Z[Etc/UTC]
5+
- Build date: 2025-06-02T20:41:04.585Z[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

@@ -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 appKeyToken = "YOUR_APP_KEY";
94-
private static final String userKeyToken = "YOUR_USER_TOKEN";
93+
private static final String restApiKey = "YOUR_REST_API_KEY"; // App REST API key required for most endpoints
94+
private static final String organizationApiKey = "YOUR_ORGANIZATION_API_KEY"; // Organization key is only required for creating new apps and other top-level endpoints
9595

9696
private static Notification createNotification() {
9797
Notification notification = new Notification();
@@ -109,10 +109,10 @@ public class Example {
109109
public static void main(String[] args) {
110110
// Setting up the client
111111
ApiClient defaultClient = Configuration.getDefaultApiClient();
112-
HttpBearerAuth appKey = (HttpBearerAuth) defaultClient.getAuthentication("app_key");
113-
appKey.setBearerToken(appKeyToken);
114-
HttpBearerAuth userKey = (HttpBearerAuth) defaultClient.getAuthentication("user_key");
115-
userKey.setBearerToken(userKeyToken);
112+
HttpBearerAuth restApiAuth = (HttpBearerAuth) defaultClient.getAuthentication("rest_api_key");
113+
restApiAuth.setBearerToken(restApiKey);
114+
HttpBearerAuth organizationApiAuth = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
115+
organizationApiAuth.setBearerToken(organizationApiKey);
116116
api = new DefaultApi(defaultClient);
117117

118118
// Setting up the notification
@@ -226,11 +226,11 @@ Class | Method | HTTP request | Description
226226
## Documentation for Authorization
227227

228228
Authentication schemes defined for the API:
229-
### rest_api_key
229+
### organization_api_key
230230

231231
- **Type**: HTTP basic authentication
232232

233-
### user_auth_key
233+
### rest_api_key
234234

235235
- **Type**: HTTP basic authentication
236236

api/openapi.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ paths:
326326
$ref: '#/components/schemas/RateLimitError'
327327
description: Rate Limit Exceeded
328328
security:
329-
- user_auth_key: []
329+
- organization_api_key: []
330330
summary: View apps
331331
x-accepts: application/json
332332
post:
@@ -358,7 +358,7 @@ paths:
358358
$ref: '#/components/schemas/RateLimitError'
359359
description: Rate Limit Exceeded
360360
security:
361-
- user_auth_key: []
361+
- organization_api_key: []
362362
summary: Create an app
363363
x-content-type: application/json
364364
x-accepts: application/json
@@ -395,7 +395,7 @@ paths:
395395
$ref: '#/components/schemas/RateLimitError'
396396
description: Rate Limit Exceeded
397397
security:
398-
- user_auth_key: []
398+
- organization_api_key: []
399399
summary: View an app
400400
x-accepts: application/json
401401
put:
@@ -437,7 +437,7 @@ paths:
437437
$ref: '#/components/schemas/RateLimitError'
438438
description: Rate Limit Exceeded
439439
security:
440-
- user_auth_key: []
440+
- organization_api_key: []
441441
summary: Update an app
442442
x-content-type: application/json
443443
x-accepts: application/json
@@ -4048,7 +4048,7 @@ components:
40484048
rest_api_key:
40494049
scheme: bearer
40504050
type: http
4051-
user_auth_key:
4051+
organization_api_key:
40524052
scheme: bearer
40534053
type: http
40544054

docs/DefaultApi.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,9 @@ public class Example {
283283
ApiClient defaultClient = Configuration.getDefaultApiClient();
284284
defaultClient.setBasePath("https://api.onesignal.com");
285285

286-
// Configure HTTP bearer authorization: user_auth_key
287-
HttpBearerAuth user_auth_key = (HttpBearerAuth) defaultClient.getAuthentication("user_auth_key");
288-
user_auth_key.setBearerToken("BEARER TOKEN");
286+
// Configure HTTP bearer authorization: organization_api_key
287+
HttpBearerAuth organization_api_key = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
288+
organization_api_key.setBearerToken("BEARER TOKEN");
289289

290290
DefaultApi apiInstance = new DefaultApi(defaultClient);
291291
App app = new App(); // App |
@@ -315,7 +315,7 @@ public class Example {
315315

316316
### Authorization
317317

318-
[user_auth_key](../README.md#user_auth_key)
318+
[organization_api_key](../README.md#organization_api_key)
319319

320320
### HTTP request headers
321321

@@ -1227,9 +1227,9 @@ public class Example {
12271227
ApiClient defaultClient = Configuration.getDefaultApiClient();
12281228
defaultClient.setBasePath("https://api.onesignal.com");
12291229

1230-
// Configure HTTP bearer authorization: user_auth_key
1231-
HttpBearerAuth user_auth_key = (HttpBearerAuth) defaultClient.getAuthentication("user_auth_key");
1232-
user_auth_key.setBearerToken("BEARER TOKEN");
1230+
// Configure HTTP bearer authorization: organization_api_key
1231+
HttpBearerAuth organization_api_key = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
1232+
organization_api_key.setBearerToken("BEARER TOKEN");
12331233

12341234
DefaultApi apiInstance = new DefaultApi(defaultClient);
12351235
String appId = "appId_example"; // String | An app id
@@ -1259,7 +1259,7 @@ public class Example {
12591259

12601260
### Authorization
12611261

1262-
[user_auth_key](../README.md#user_auth_key)
1262+
[organization_api_key](../README.md#organization_api_key)
12631263

12641264
### HTTP request headers
12651265

@@ -1296,9 +1296,9 @@ public class Example {
12961296
ApiClient defaultClient = Configuration.getDefaultApiClient();
12971297
defaultClient.setBasePath("https://api.onesignal.com");
12981298

1299-
// Configure HTTP bearer authorization: user_auth_key
1300-
HttpBearerAuth user_auth_key = (HttpBearerAuth) defaultClient.getAuthentication("user_auth_key");
1301-
user_auth_key.setBearerToken("BEARER TOKEN");
1299+
// Configure HTTP bearer authorization: organization_api_key
1300+
HttpBearerAuth organization_api_key = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
1301+
organization_api_key.setBearerToken("BEARER TOKEN");
13021302

13031303
DefaultApi apiInstance = new DefaultApi(defaultClient);
13041304
try {
@@ -1324,7 +1324,7 @@ This endpoint does not need any parameter.
13241324

13251325
### Authorization
13261326

1327-
[user_auth_key](../README.md#user_auth_key)
1327+
[organization_api_key](../README.md#organization_api_key)
13281328

13291329
### HTTP request headers
13301330

@@ -1954,9 +1954,9 @@ public class Example {
19541954
ApiClient defaultClient = Configuration.getDefaultApiClient();
19551955
defaultClient.setBasePath("https://api.onesignal.com");
19561956

1957-
// Configure HTTP bearer authorization: user_auth_key
1958-
HttpBearerAuth user_auth_key = (HttpBearerAuth) defaultClient.getAuthentication("user_auth_key");
1959-
user_auth_key.setBearerToken("BEARER TOKEN");
1957+
// Configure HTTP bearer authorization: organization_api_key
1958+
HttpBearerAuth organization_api_key = (HttpBearerAuth) defaultClient.getAuthentication("organization_api_key");
1959+
organization_api_key.setBearerToken("BEARER TOKEN");
19601960

19611961
DefaultApi apiInstance = new DefaultApi(defaultClient);
19621962
String appId = "appId_example"; // String | An app id
@@ -1988,7 +1988,7 @@ public class Example {
19881988

19891989
### Authorization
19901990

1991-
[user_auth_key](../README.md#user_auth_key)
1991+
[organization_api_key](../README.md#organization_api_key)
19921992

19931993
### HTTP request headers
19941994

src/main/java/com/onesignal/client/ApiClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ public ApiClient() {
9090
initHttpClient();
9191

9292
// Setup authentications (key: authentication name, value: authentication).
93+
authentications.put("organization_api_key", new HttpBearerAuth("Key"));
9394
authentications.put("rest_api_key", new HttpBearerAuth("Key"));
94-
authentications.put("user_auth_key", new HttpBearerAuth("Key"));
9595
// Prevent the authentications from being modified.
9696
authentications = Collections.unmodifiableMap(authentications);
9797
}
@@ -107,8 +107,8 @@ public ApiClient(OkHttpClient client) {
107107
httpClient = client;
108108

109109
// Setup authentications (key: authentication name, value: authentication).
110+
authentications.put("organization_api_key", new HttpBearerAuth("Key"));
110111
authentications.put("rest_api_key", new HttpBearerAuth("Key"));
111-
authentications.put("user_auth_key", new HttpBearerAuth("Key"));
112112
// Prevent the authentications from being modified.
113113
authentications = Collections.unmodifiableMap(authentications);
114114
}

src/main/java/com/onesignal/client/ApiException.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* <p>ApiException class.</p>
2323
*/
2424
@SuppressWarnings("serial")
25-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-13T23:45:41.211Z[Etc/UTC]")
25+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-02T20:41:04.585Z[Etc/UTC]")
2626
public class ApiException extends Exception {
2727
private int code = 0;
2828
private Map<String, List<String>> responseHeaders = null;

src/main/java/com/onesignal/client/Configuration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package com.onesignal.client;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-13T23:45:41.211Z[Etc/UTC]")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-02T20:41:04.585Z[Etc/UTC]")
1717
public class Configuration {
1818
private static ApiClient defaultApiClient = new ApiClient();
1919

src/main/java/com/onesignal/client/Pair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
package com.onesignal.client;
1515

16-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-13T23:45:41.211Z[Etc/UTC]")
16+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-02T20:41:04.585Z[Etc/UTC]")
1717
public class Pair {
1818
private String name = "";
1919
private String value = "";

src/main/java/com/onesignal/client/StringUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import java.util.Collection;
1717
import java.util.Iterator;
1818

19-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-13T23:45:41.211Z[Etc/UTC]")
19+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-02T20:41:04.585Z[Etc/UTC]")
2020
public class StringUtil {
2121
/**
2222
* Check if the given array contains the given value (with case-insensitive comparison).

src/main/java/com/onesignal/client/api/DefaultApi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ public okhttp3.Call createAppCall(App app, final ApiCallback _callback) throws A
652652
localVarHeaderParams.put("Content-Type", localVarContentType);
653653
}
654654

655-
String[] localVarAuthNames = new String[] { "user_auth_key" };
655+
String[] localVarAuthNames = new String[] { "organization_api_key" };
656656
return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
657657
}
658658

@@ -2656,7 +2656,7 @@ public okhttp3.Call getAppCall(String appId, final ApiCallback _callback) throws
26562656
localVarHeaderParams.put("Content-Type", localVarContentType);
26572657
}
26582658

2659-
String[] localVarAuthNames = new String[] { "user_auth_key" };
2659+
String[] localVarAuthNames = new String[] { "organization_api_key" };
26602660
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
26612661
}
26622662

@@ -2792,7 +2792,7 @@ public okhttp3.Call getAppsCall(final ApiCallback _callback) throws ApiException
27922792
localVarHeaderParams.put("Content-Type", localVarContentType);
27932793
}
27942794

2795-
String[] localVarAuthNames = new String[] { "user_auth_key" };
2795+
String[] localVarAuthNames = new String[] { "organization_api_key" };
27962796
return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
27972797
}
27982798

@@ -4219,7 +4219,7 @@ public okhttp3.Call updateAppCall(String appId, App app, final ApiCallback _call
42194219
localVarHeaderParams.put("Content-Type", localVarContentType);
42204220
}
42214221

4222-
String[] localVarAuthNames = new String[] { "user_auth_key" };
4222+
String[] localVarAuthNames = new String[] { "organization_api_key" };
42234223
return localVarApiClient.buildCall(basePath, localVarPath, "PUT", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback);
42244224
}
42254225

src/main/java/com/onesignal/client/auth/ApiKeyAuth.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import java.util.Map;
2121
import java.util.List;
2222

23-
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-05-13T23:45:41.211Z[Etc/UTC]")
23+
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", date = "2025-06-02T20:41:04.585Z[Etc/UTC]")
2424
public class ApiKeyAuth implements Authentication {
2525
private final String location;
2626
private final String paramName;

0 commit comments

Comments
 (0)