Skip to content

Commit 2f8a98e

Browse files
authored
Merge pull request #45 from OneSignal/api
Dependency Update
2 parents 76bf176 + bbed5a7 commit 2f8a98e

Some content is hidden

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

60 files changed

+1161
-120
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22
All notable changes to this project will be documented in this file.
3+
## December 2022
4+
### `1.0.0-beta8` - 11/14/2022
5+
- Added Live Activity endpoints
6+
- Fixed various bugs
37

48
## November 2022
59
### `1.0.0-beta5` - 11/14/2022

DefaultApi.md

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,15 @@ All URIs are relative to *https://onesignal.com/api/v1*
44

55
Method | HTTP request | Description
66
------------- | ------------- | -------------
7+
[**beginLiveActivity**](DefaultApi.md#beginLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity
78
[**cancelNotification**](DefaultApi.md#cancelNotification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
89
[**createApp**](DefaultApi.md#createApp) | **POST** /apps | Create an app
910
[**createNotification**](DefaultApi.md#createNotification) | **POST** /notifications | Create notification
1011
[**createPlayer**](DefaultApi.md#createPlayer) | **POST** /players | Add a device
1112
[**createSegments**](DefaultApi.md#createSegments) | **POST** /apps/{app_id}/segments | Create Segments
1213
[**deletePlayer**](DefaultApi.md#deletePlayer) | **DELETE** /players/{player_id} | Delete a user record
1314
[**deleteSegments**](DefaultApi.md#deleteSegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments
15+
[**endLiveActivity**](DefaultApi.md#endLiveActivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity
1416
[**exportPlayers**](DefaultApi.md#exportPlayers) | **POST** /players/csv_export?app_id={app_id} | CSV export
1517
[**getApp**](DefaultApi.md#getApp) | **GET** /apps/{app_id} | View an app
1618
[**getApps**](DefaultApi.md#getApps) | **GET** /apps | View apps
@@ -21,10 +23,75 @@ Method | HTTP request | Description
2123
[**getPlayer**](DefaultApi.md#getPlayer) | **GET** /players/{player_id} | View device
2224
[**getPlayers**](DefaultApi.md#getPlayers) | **GET** /players | View devices
2325
[**updateApp**](DefaultApi.md#updateApp) | **PUT** /apps/{app_id} | Update an app
26+
[**updateLiveActivity**](DefaultApi.md#updateLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
2427
[**updatePlayer**](DefaultApi.md#updatePlayer) | **PUT** /players/{player_id} | Edit device
2528
[**updatePlayerTags**](DefaultApi.md#updatePlayerTags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
2629

2730

31+
# **beginLiveActivity**
32+
> void beginLiveActivity(beginLiveActivityRequest)
33+
34+
Starts a Live Activity
35+
36+
### Example
37+
38+
39+
```typescript
40+
import { } from '';
41+
import * as fs from 'fs';
42+
43+
const configuration = .createConfiguration();
44+
const apiInstance = new .DefaultApi(configuration);
45+
46+
let body:.DefaultApiBeginLiveActivityRequest = {
47+
// string | The OneSignal App ID for your app. Available in Keys & IDs.
48+
appId: "app_id_example",
49+
// string | Live Activity record ID
50+
activityId: "activity_id_example",
51+
// BeginLiveActivityRequest
52+
beginLiveActivityRequest: {
53+
push_token: "push_token_example",
54+
subscription_id: "subscription_id_example",
55+
},
56+
};
57+
58+
apiInstance.beginLiveActivity(body).then((data:any) => {
59+
console.log('API called successfully. Returned data: ' + data);
60+
}).catch((error:any) => console.error(error));
61+
```
62+
63+
64+
### Parameters
65+
66+
Name | Type | Description | Notes
67+
------------- | ------------- | ------------- | -------------
68+
**beginLiveActivityRequest** | **BeginLiveActivityRequest**| |
69+
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
70+
**activityId** | [**string**] | Live Activity record ID | defaults to undefined
71+
72+
73+
### Return type
74+
75+
**void**
76+
77+
### Authorization
78+
79+
[app_key](README.md#app_key)
80+
81+
### HTTP request headers
82+
83+
- **Content-Type**: application/json
84+
- **Accept**: application/json
85+
86+
87+
### HTTP response details
88+
| Status code | Description | Response headers |
89+
|-------------|-------------|------------------|
90+
**204** | OK | - |
91+
**400** | Bad Request | - |
92+
93+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
94+
2895
# **cancelNotification**
2996
> CancelNotificationSuccessResponse cancelNotification()
3097
@@ -79,6 +146,7 @@ Name | Type | Description | Notes
79146
| Status code | Description | Response headers |
80147
|-------------|-------------|------------------|
81148
**200** | OK | - |
149+
**400** | Bad Request | - |
82150

83151
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
84152

@@ -112,6 +180,10 @@ let body:.DefaultApiCreateAppRequest = {
112180
apns_p12_password: "apns_p12_password_example",
113181
safari_apns_p12: "safari_apns_p12_example",
114182
safari_apns_p12_password: "safari_apns_p12_password_example",
183+
apns_key_id: "apns_key_id_example",
184+
apns_team_id: "apns_team_id_example",
185+
apns_bundle_id: "apns_bundle_id_example",
186+
apns_p8: "apns_p8_example",
115187
safari_site_origin: "safari_site_origin_example",
116188
safari_icon_256_256: "safari_icon_256_256_example",
117189
site_name: "site_name_example",
@@ -151,6 +223,7 @@ Name | Type | Description | Notes
151223
| Status code | Description | Response headers |
152224
|-------------|-------------|------------------|
153225
**200** | OK | - |
226+
**400** | Bad Request | - |
154227

155228
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
156229

@@ -286,6 +359,7 @@ Name | Type | Description | Notes
286359
| Status code | Description | Response headers |
287360
|-------------|-------------|------------------|
288361
**200** | OK | - |
362+
**400** | Bad Request | - |
289363

290364
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
291365

@@ -472,6 +546,67 @@ Name | Type | Description | Notes
472546

473547
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
474548

549+
# **endLiveActivity**
550+
> void endLiveActivity()
551+
552+
Stops a Live Activity
553+
554+
### Example
555+
556+
557+
```typescript
558+
import { } from '';
559+
import * as fs from 'fs';
560+
561+
const configuration = .createConfiguration();
562+
const apiInstance = new .DefaultApi(configuration);
563+
564+
let body:.DefaultApiEndLiveActivityRequest = {
565+
// string | The OneSignal App ID for your app. Available in Keys & IDs.
566+
appId: "app_id_example",
567+
// string | Live Activity record ID
568+
activityId: "activity_id_example",
569+
// string | Subscription ID
570+
subscriptionId: "subscription_id_example",
571+
};
572+
573+
apiInstance.endLiveActivity(body).then((data:any) => {
574+
console.log('API called successfully. Returned data: ' + data);
575+
}).catch((error:any) => console.error(error));
576+
```
577+
578+
579+
### Parameters
580+
581+
Name | Type | Description | Notes
582+
------------- | ------------- | ------------- | -------------
583+
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
584+
**activityId** | [**string**] | Live Activity record ID | defaults to undefined
585+
**subscriptionId** | [**string**] | Subscription ID | defaults to undefined
586+
587+
588+
### Return type
589+
590+
**void**
591+
592+
### Authorization
593+
594+
[app_key](README.md#app_key)
595+
596+
### HTTP request headers
597+
598+
- **Content-Type**: Not defined
599+
- **Accept**: application/json
600+
601+
602+
### HTTP response details
603+
| Status code | Description | Response headers |
604+
|-------------|-------------|------------------|
605+
**204** | OK | - |
606+
**400** | Bad Request | - |
607+
608+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
609+
475610
# **exportPlayers**
476611
> ExportPlayersSuccessResponse exportPlayers()
477612
@@ -587,6 +722,7 @@ Name | Type | Description | Notes
587722
| Status code | Description | Response headers |
588723
|-------------|-------------|------------------|
589724
**200** | OK | - |
725+
**400** | Bad Request | - |
590726

591727
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
592728

@@ -635,6 +771,7 @@ This endpoint does not need any parameter.
635771
| Status code | Description | Response headers |
636772
|-------------|-------------|------------------|
637773
**200** | OK | - |
774+
**400** | Bad Request | - |
638775

639776
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
640777

@@ -692,6 +829,7 @@ Name | Type | Description | Notes
692829
| Status code | Description | Response headers |
693830
|-------------|-------------|------------------|
694831
**200** | OK | - |
832+
**400** | Bad Request | - |
695833

696834
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
697835

@@ -817,6 +955,7 @@ Name | Type | Description | Notes
817955
| Status code | Description | Response headers |
818956
|-------------|-------------|------------------|
819957
**200** | OK | - |
958+
**400** | Bad Request | - |
820959

821960
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
822961

@@ -886,6 +1025,7 @@ Name | Type | Description | Notes
8861025
| Status code | Description | Response headers |
8871026
|-------------|-------------|------------------|
8881027
**200** | OK | - |
1028+
**400** | Bad Request | - |
8891029

8901030
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
8911031

@@ -946,6 +1086,7 @@ Name | Type | Description | Notes
9461086
| Status code | Description | Response headers |
9471087
|-------------|-------------|------------------|
9481088
**200** | OK | - |
1089+
**400** | Bad Request | - |
9491090

9501091
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
9511092

@@ -1006,6 +1147,7 @@ Name | Type | Description | Notes
10061147
| Status code | Description | Response headers |
10071148
|-------------|-------------|------------------|
10081149
**200** | OK | - |
1150+
**400** | Bad Request | - |
10091151

10101152
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
10111153

@@ -1041,6 +1183,10 @@ let body:.DefaultApiUpdateAppRequest = {
10411183
apns_p12_password: "apns_p12_password_example",
10421184
safari_apns_p12: "safari_apns_p12_example",
10431185
safari_apns_p12_password: "safari_apns_p12_password_example",
1186+
apns_key_id: "apns_key_id_example",
1187+
apns_team_id: "apns_team_id_example",
1188+
apns_bundle_id: "apns_bundle_id_example",
1189+
apns_p8: "apns_p8_example",
10441190
safari_site_origin: "safari_site_origin_example",
10451191
safari_icon_256_256: "safari_icon_256_256_example",
10461192
site_name: "site_name_example",
@@ -1081,6 +1227,73 @@ Name | Type | Description | Notes
10811227
| Status code | Description | Response headers |
10821228
|-------------|-------------|------------------|
10831229
**200** | OK | - |
1230+
**400** | Bad Request | - |
1231+
1232+
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
1233+
1234+
# **updateLiveActivity**
1235+
> UpdateLiveActivitySuccessResponse updateLiveActivity(updateLiveActivityRequest)
1236+
1237+
Updates a specified live activity.
1238+
1239+
### Example
1240+
1241+
1242+
```typescript
1243+
import { } from '';
1244+
import * as fs from 'fs';
1245+
1246+
const configuration = .createConfiguration();
1247+
const apiInstance = new .DefaultApi(configuration);
1248+
1249+
let body:.DefaultApiUpdateLiveActivityRequest = {
1250+
// string | The OneSignal App ID for your app. Available in Keys & IDs.
1251+
appId: "app_id_example",
1252+
// string | Live Activity record ID
1253+
activityId: "activity_id_example",
1254+
// UpdateLiveActivityRequest
1255+
updateLiveActivityRequest: {
1256+
name: "headings",
1257+
event: "update",
1258+
event_updates: {},
1259+
dismiss_at: 3.14,
1260+
},
1261+
};
1262+
1263+
apiInstance.updateLiveActivity(body).then((data:any) => {
1264+
console.log('API called successfully. Returned data: ' + data);
1265+
}).catch((error:any) => console.error(error));
1266+
```
1267+
1268+
1269+
### Parameters
1270+
1271+
Name | Type | Description | Notes
1272+
------------- | ------------- | ------------- | -------------
1273+
**updateLiveActivityRequest** | **UpdateLiveActivityRequest**| |
1274+
**appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
1275+
**activityId** | [**string**] | Live Activity record ID | defaults to undefined
1276+
1277+
1278+
### Return type
1279+
1280+
**UpdateLiveActivitySuccessResponse**
1281+
1282+
### Authorization
1283+
1284+
[app_key](README.md#app_key)
1285+
1286+
### HTTP request headers
1287+
1288+
- **Content-Type**: application/json
1289+
- **Accept**: application/json
1290+
1291+
1292+
### HTTP response details
1293+
| Status code | Description | Response headers |
1294+
|-------------|-------------|------------------|
1295+
**200** | OK | - |
1296+
**400** | Bad Request | - |
10841297

10851298
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
10861299

@@ -1164,6 +1377,7 @@ Name | Type | Description | Notes
11641377
| Status code | Description | Response headers |
11651378
|-------------|-------------|------------------|
11661379
**200** | OK | - |
1380+
**400** | Bad Request | - |
11671381

11681382
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
11691383

@@ -1226,6 +1440,7 @@ Name | Type | Description | Notes
12261440
| Status code | Description | Response headers |
12271441
|-------------|-------------|------------------|
12281442
**200** | OK | - |
1443+
**400** | Bad Request | - |
12291444

12301445
[[Back to top]](#) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to Model list]](README.md#documentation-for-models) [[Back to README]](README.md)
12311446

0 commit comments

Comments
 (0)