@onesignal/node-onesignal 1.0.0-beta7 → 1.0.0-beta9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/.github/workflows/Zapier.yml +29 -0
  2. package/.github/workflows/npm_deploy.yml +6 -7
  3. package/CHANGELOG.md +19 -0
  4. package/DefaultApi.md +1365 -164
  5. package/README.md +189 -0
  6. package/apis/DefaultApi.ts +2041 -423
  7. package/dist/apis/DefaultApi.d.ts +48 -0
  8. package/dist/apis/DefaultApi.js +1861 -414
  9. package/dist/apis/DefaultApi.js.map +1 -1
  10. package/dist/auth/auth.d.ts +6 -6
  11. package/dist/auth/auth.js +1 -1
  12. package/dist/http/http.d.ts +2 -2
  13. package/dist/http/http.js +1 -1
  14. package/dist/models/App.d.ts +5 -1
  15. package/dist/models/App.js +24 -0
  16. package/dist/models/App.js.map +1 -1
  17. package/dist/models/BadRequestError.d.ts +17 -0
  18. package/dist/models/BadRequestError.js +22 -0
  19. package/dist/models/BadRequestError.js.map +1 -0
  20. package/dist/models/BasicNotification.d.ts +5 -1
  21. package/dist/models/BasicNotification.js +12 -0
  22. package/dist/models/BasicNotification.js.map +1 -1
  23. package/dist/models/BasicNotificationAllOf.d.ts +1 -1
  24. package/dist/models/BeginLiveActivityRequest.d.ts +18 -0
  25. package/dist/models/BeginLiveActivityRequest.js +28 -0
  26. package/dist/models/BeginLiveActivityRequest.js.map +1 -0
  27. package/dist/models/CreateSubscriptionRequestBody.d.ts +19 -0
  28. package/dist/models/CreateSubscriptionRequestBody.js +28 -0
  29. package/dist/models/CreateSubscriptionRequestBody.js.map +1 -0
  30. package/dist/models/CreateUserConflictResponse.d.ts +18 -0
  31. package/dist/models/CreateUserConflictResponse.js +22 -0
  32. package/dist/models/CreateUserConflictResponse.js.map +1 -0
  33. package/dist/models/CreateUserConflictResponseErrorsInner.d.ts +20 -0
  34. package/dist/models/CreateUserConflictResponseErrorsInner.js +34 -0
  35. package/dist/models/CreateUserConflictResponseErrorsInner.js.map +1 -0
  36. package/dist/models/CreateUserConflictResponseErrorsItemsMeta.d.ts +17 -0
  37. package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js +22 -0
  38. package/dist/models/CreateUserConflictResponseErrorsItemsMeta.js.map +1 -0
  39. package/dist/models/Filter.d.ts +1 -1
  40. package/dist/models/FilterExpressions.d.ts +2 -2
  41. package/dist/models/GetNotificationRequestBody.d.ts +1 -1
  42. package/dist/models/IdentifyUserConflictResponse.d.ts +18 -0
  43. package/dist/models/IdentifyUserConflictResponse.js +22 -0
  44. package/dist/models/IdentifyUserConflictResponse.js.map +1 -0
  45. package/dist/models/IdentifyUserConflictResponseErrorsInner.d.ts +18 -0
  46. package/dist/models/IdentifyUserConflictResponseErrorsInner.js +28 -0
  47. package/dist/models/IdentifyUserConflictResponseErrorsInner.js.map +1 -0
  48. package/dist/models/InlineResponse200.d.ts +19 -0
  49. package/dist/models/InlineResponse200.js +22 -0
  50. package/dist/models/InlineResponse200.js.map +1 -0
  51. package/dist/models/InlineResponse2003.d.ts +17 -0
  52. package/dist/models/InlineResponse2003.js +22 -0
  53. package/dist/models/InlineResponse2003.js.map +1 -0
  54. package/dist/models/InlineResponse201.d.ts +18 -0
  55. package/dist/models/InlineResponse201.js +22 -0
  56. package/dist/models/InlineResponse201.js.map +1 -0
  57. package/dist/models/InlineResponse202.d.ts +18 -0
  58. package/dist/models/InlineResponse202.js +22 -0
  59. package/dist/models/InlineResponse202.js.map +1 -0
  60. package/dist/models/Notification.d.ts +5 -1
  61. package/dist/models/Notification.js +12 -0
  62. package/dist/models/Notification.js.map +1 -1
  63. package/dist/models/NotificationTarget.d.ts +4 -0
  64. package/dist/models/NotificationTarget.js +12 -0
  65. package/dist/models/NotificationTarget.js.map +1 -1
  66. package/dist/models/NotificationWithMeta.d.ts +5 -1
  67. package/dist/models/NotificationWithMeta.js +12 -0
  68. package/dist/models/NotificationWithMeta.js.map +1 -1
  69. package/dist/models/ObjectSerializer.d.ts +25 -5
  70. package/dist/models/ObjectSerializer.js +83 -15
  71. package/dist/models/ObjectSerializer.js.map +1 -1
  72. package/dist/models/Operator.d.ts +1 -1
  73. package/dist/models/OutcomeData.d.ts +1 -1
  74. package/dist/models/Player.d.ts +1 -1
  75. package/dist/models/Player.js +1 -1
  76. package/dist/models/Player.js.map +1 -1
  77. package/dist/models/PlayerNotificationTarget.d.ts +4 -0
  78. package/dist/models/PlayerNotificationTarget.js +12 -0
  79. package/dist/models/PlayerNotificationTarget.js.map +1 -1
  80. package/dist/models/PlayerNotificationTargetIncludeAliases.d.ts +17 -0
  81. package/dist/models/PlayerNotificationTargetIncludeAliases.js +22 -0
  82. package/dist/models/PlayerNotificationTargetIncludeAliases.js.map +1 -0
  83. package/dist/models/PropertiesDeltas.d.ts +21 -0
  84. package/dist/models/PropertiesDeltas.js +40 -0
  85. package/dist/models/PropertiesDeltas.js.map +1 -0
  86. package/dist/models/PropertiesObject.d.ts +30 -0
  87. package/dist/models/PropertiesObject.js +82 -0
  88. package/dist/models/PropertiesObject.js.map +1 -0
  89. package/dist/models/Purchase.d.ts +1 -1
  90. package/dist/models/Purchase.js +1 -1
  91. package/dist/models/SubscriptionObject.d.ts +34 -0
  92. package/dist/models/SubscriptionObject.js +118 -0
  93. package/dist/models/SubscriptionObject.js.map +1 -0
  94. package/dist/models/TransferSubscriptionRequestBody.d.ts +19 -0
  95. package/dist/models/TransferSubscriptionRequestBody.js +22 -0
  96. package/dist/models/TransferSubscriptionRequestBody.js.map +1 -0
  97. package/dist/models/UpdateLiveActivityRequest.d.ts +22 -0
  98. package/dist/models/UpdateLiveActivityRequest.js +40 -0
  99. package/dist/models/UpdateLiveActivityRequest.js.map +1 -0
  100. package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +19 -0
  101. package/dist/models/UpdateLiveActivitySuccessResponse.js +28 -0
  102. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -0
  103. package/dist/models/UpdateSubscriptionRequestBody.d.ts +18 -0
  104. package/dist/models/UpdateSubscriptionRequestBody.js +22 -0
  105. package/dist/models/UpdateSubscriptionRequestBody.js.map +1 -0
  106. package/dist/models/UpdateUserRequest.d.ts +21 -0
  107. package/dist/models/UpdateUserRequest.js +34 -0
  108. package/dist/models/UpdateUserRequest.js.map +1 -0
  109. package/dist/models/User.d.ts +25 -0
  110. package/dist/models/User.js +40 -0
  111. package/dist/models/User.js.map +1 -0
  112. package/dist/models/UserIdentityRequestBody.d.ts +19 -0
  113. package/dist/models/UserIdentityRequestBody.js +22 -0
  114. package/dist/models/UserIdentityRequestBody.js.map +1 -0
  115. package/dist/models/UserIdentityResponse.d.ts +19 -0
  116. package/dist/models/UserIdentityResponse.js +22 -0
  117. package/dist/models/UserIdentityResponse.js.map +1 -0
  118. package/dist/models/UserSubscriptionOptions.d.ts +17 -0
  119. package/dist/models/UserSubscriptionOptions.js +22 -0
  120. package/dist/models/UserSubscriptionOptions.js.map +1 -0
  121. package/dist/models/all.d.ts +25 -5
  122. package/dist/models/all.js +25 -5
  123. package/dist/models/all.js.map +1 -1
  124. package/dist/types/ObjectParamAPI.d.ts +117 -0
  125. package/dist/types/ObjectParamAPI.js +51 -0
  126. package/dist/types/ObjectParamAPI.js.map +1 -1
  127. package/dist/types/ObservableAPI.d.ts +31 -0
  128. package/dist/types/ObservableAPI.js +464 -56
  129. package/dist/types/ObservableAPI.js.map +1 -1
  130. package/dist/types/PromiseAPI.d.ts +31 -0
  131. package/dist/types/PromiseAPI.js +68 -0
  132. package/dist/types/PromiseAPI.js.map +1 -1
  133. package/models/App.ts +41 -1
  134. package/models/BadRequestError.ts +31 -0
  135. package/models/BasicNotification.ts +17 -1
  136. package/models/BasicNotificationAllOf.ts +1 -1
  137. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
  138. package/models/BeginLiveActivityRequest.ts +38 -0
  139. package/models/Button.ts +1 -1
  140. package/models/CancelNotificationSuccessResponse.ts +1 -1
  141. package/models/CreateNotificationSuccessResponse.ts +1 -1
  142. package/models/CreatePlayerSuccessResponse.ts +1 -1
  143. package/models/CreateSegmentConflictResponse.ts +1 -1
  144. package/models/CreateSegmentSuccessResponse.ts +1 -1
  145. package/models/CreateSubscriptionRequestBody.ts +39 -0
  146. package/models/CreateUserConflictResponse.ts +32 -0
  147. package/models/CreateUserConflictResponseErrorsInner.ts +46 -0
  148. package/models/CreateUserConflictResponseErrorsItemsMeta.ts +31 -0
  149. package/models/DeletePlayerNotFoundResponse.ts +1 -1
  150. package/models/DeletePlayerSuccessResponse.ts +1 -1
  151. package/models/DeleteSegmentNotFoundResponse.ts +1 -1
  152. package/models/DeleteSegmentSuccessResponse.ts +1 -1
  153. package/models/DeliveryData.ts +1 -1
  154. package/models/ExportPlayersRequestBody.ts +1 -1
  155. package/models/ExportPlayersSuccessResponse.ts +1 -1
  156. package/models/Filter.ts +1 -1
  157. package/models/FilterExpressions.ts +1 -1
  158. package/models/GetNotificationRequestBody.ts +1 -1
  159. package/models/IdentifyUserConflictResponse.ts +32 -0
  160. package/models/IdentifyUserConflictResponseErrorsInner.ts +38 -0
  161. package/models/InlineResponse200.ts +31 -0
  162. package/models/InlineResponse2003.ts +31 -0
  163. package/models/InlineResponse201.ts +32 -0
  164. package/models/InlineResponse202.ts +32 -0
  165. package/models/InvalidIdentifierError.ts +1 -1
  166. package/models/Notification.ts +17 -1
  167. package/models/Notification200Errors.ts +1 -1
  168. package/models/NotificationAllOf.ts +1 -1
  169. package/models/NotificationHistorySuccessResponse.ts +1 -1
  170. package/models/NotificationSlice.ts +1 -1
  171. package/models/NotificationTarget.ts +19 -1
  172. package/models/NotificationWithMeta.ts +17 -1
  173. package/models/NotificationWithMetaAllOf.ts +1 -1
  174. package/models/ObjectSerializer.ts +89 -21
  175. package/models/Operator.ts +1 -1
  176. package/models/OutcomeData.ts +1 -1
  177. package/models/OutcomesData.ts +1 -1
  178. package/models/PlatformDeliveryData.ts +1 -1
  179. package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
  180. package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
  181. package/models/Player.ts +3 -3
  182. package/models/PlayerNotificationTarget.ts +19 -1
  183. package/models/PlayerNotificationTargetIncludeAliases.ts +31 -0
  184. package/models/PlayerSlice.ts +1 -1
  185. package/models/PropertiesDeltas.ts +53 -0
  186. package/models/PropertiesObject.ts +102 -0
  187. package/models/Purchase.ts +3 -3
  188. package/models/Segment.ts +1 -1
  189. package/models/SegmentNotificationTarget.ts +1 -1
  190. package/models/StringMap.ts +1 -1
  191. package/models/SubscriptionObject.ts +146 -0
  192. package/models/TransferSubscriptionRequestBody.ts +31 -0
  193. package/models/UpdateLiveActivityRequest.ts +62 -0
  194. package/models/UpdateLiveActivitySuccessResponse.ts +39 -0
  195. package/models/UpdatePlayerSuccessResponse.ts +1 -1
  196. package/models/UpdatePlayerTagsRequestBody.ts +1 -1
  197. package/models/UpdatePlayerTagsSuccessResponse.ts +1 -1
  198. package/models/UpdateSubscriptionRequestBody.ts +32 -0
  199. package/models/UpdateUserRequest.ts +47 -0
  200. package/models/User.ts +55 -0
  201. package/models/UserIdentityRequestBody.ts +31 -0
  202. package/models/UserIdentityResponse.ts +31 -0
  203. package/models/UserSubscriptionOptions.ts +31 -0
  204. package/models/all.ts +25 -5
  205. package/package.json +3 -3
  206. package/types/ObjectParamAPI.ts +527 -5
  207. package/types/ObservableAPI.ts +454 -5
  208. package/types/PromiseAPI.ts +216 -5
package/DefaultApi.md CHANGED
@@ -4,27 +4,108 @@ All URIs are relative to *https://onesignal.com/api/v1*
4
4
 
5
5
  Method | HTTP request | Description
6
6
  ------------- | ------------- | -------------
7
+ [**beginLiveActivity**](DefaultApi.md#beginLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/token | Start Live Activity
7
8
  [**cancelNotification**](DefaultApi.md#cancelNotification) | **DELETE** /notifications/{notification_id} | Stop a scheduled or currently outgoing notification
8
9
  [**createApp**](DefaultApi.md#createApp) | **POST** /apps | Create an app
9
10
  [**createNotification**](DefaultApi.md#createNotification) | **POST** /notifications | Create notification
10
11
  [**createPlayer**](DefaultApi.md#createPlayer) | **POST** /players | Add a device
11
12
  [**createSegments**](DefaultApi.md#createSegments) | **POST** /apps/{app_id}/segments | Create Segments
13
+ [**createSubscription**](DefaultApi.md#createSubscription) | **POST** /apps/{app_id}/users/by/{alias_label}/{alias_id}/subscriptions |
14
+ [**createUser**](DefaultApi.md#createUser) | **POST** /apps/{app_id}/users |
15
+ [**deleteAlias**](DefaultApi.md#deleteAlias) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity/{alias_label_to_delete} |
12
16
  [**deletePlayer**](DefaultApi.md#deletePlayer) | **DELETE** /players/{player_id} | Delete a user record
13
17
  [**deleteSegments**](DefaultApi.md#deleteSegments) | **DELETE** /apps/{app_id}/segments/{segment_id} | Delete Segments
18
+ [**deleteSubscription**](DefaultApi.md#deleteSubscription) | **DELETE** /apps/{app_id}/subscriptions/{subscription_id} |
19
+ [**deleteUser**](DefaultApi.md#deleteUser) | **DELETE** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
20
+ [**endLiveActivity**](DefaultApi.md#endLiveActivity) | **DELETE** /apps/{app_id}/live_activities/{activity_id}/token/{subscription_id} | Stop Live Activity
14
21
  [**exportPlayers**](DefaultApi.md#exportPlayers) | **POST** /players/csv_export?app_id={app_id} | CSV export
22
+ [**fetchAliases**](DefaultApi.md#fetchAliases) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
23
+ [**fetchUser**](DefaultApi.md#fetchUser) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
24
+ [**fetchUserIdentity**](DefaultApi.md#fetchUserIdentity) | **GET** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
15
25
  [**getApp**](DefaultApi.md#getApp) | **GET** /apps/{app_id} | View an app
16
26
  [**getApps**](DefaultApi.md#getApps) | **GET** /apps | View apps
27
+ [**getEligibleIams**](DefaultApi.md#getEligibleIams) | **GET** /apps/{app_id}/subscriptions/{subscription_id}/iams |
17
28
  [**getNotification**](DefaultApi.md#getNotification) | **GET** /notifications/{notification_id} | View notification
18
29
  [**getNotificationHistory**](DefaultApi.md#getNotificationHistory) | **POST** /notifications/{notification_id}/history | Notification History
19
30
  [**getNotifications**](DefaultApi.md#getNotifications) | **GET** /notifications | View notifications
20
31
  [**getOutcomes**](DefaultApi.md#getOutcomes) | **GET** /apps/{app_id}/outcomes | View Outcomes
21
32
  [**getPlayer**](DefaultApi.md#getPlayer) | **GET** /players/{player_id} | View device
22
33
  [**getPlayers**](DefaultApi.md#getPlayers) | **GET** /players | View devices
34
+ [**identifyUserByAlias**](DefaultApi.md#identifyUserByAlias) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id}/identity |
35
+ [**identifyUserBySubscriptionId**](DefaultApi.md#identifyUserBySubscriptionId) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/user/identity |
36
+ [**transferSubscription**](DefaultApi.md#transferSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id}/owner |
23
37
  [**updateApp**](DefaultApi.md#updateApp) | **PUT** /apps/{app_id} | Update an app
38
+ [**updateLiveActivity**](DefaultApi.md#updateLiveActivity) | **POST** /apps/{app_id}/live_activities/{activity_id}/notifications | Update a Live Activity via Push
24
39
  [**updatePlayer**](DefaultApi.md#updatePlayer) | **PUT** /players/{player_id} | Edit device
25
40
  [**updatePlayerTags**](DefaultApi.md#updatePlayerTags) | **PUT** /apps/{app_id}/users/{external_user_id} | Edit tags with external user id
41
+ [**updateSubscription**](DefaultApi.md#updateSubscription) | **PATCH** /apps/{app_id}/subscriptions/{subscription_id} |
42
+ [**updateUser**](DefaultApi.md#updateUser) | **PATCH** /apps/{app_id}/users/by/{alias_label}/{alias_id} |
26
43
 
27
44
 
45
+ # **beginLiveActivity**
46
+ > void beginLiveActivity(beginLiveActivityRequest)
47
+
48
+ Starts a Live Activity
49
+
50
+ ### Example
51
+
52
+
53
+ ```typescript
54
+ import { } from '';
55
+ import * as fs from 'fs';
56
+
57
+ const configuration = .createConfiguration();
58
+ const apiInstance = new .DefaultApi(configuration);
59
+
60
+ let body:.DefaultApiBeginLiveActivityRequest = {
61
+ // string | The OneSignal App ID for your app. Available in Keys & IDs.
62
+ appId: "app_id_example",
63
+ // string | Live Activity record ID
64
+ activityId: "activity_id_example",
65
+ // BeginLiveActivityRequest
66
+ beginLiveActivityRequest: {
67
+ push_token: "push_token_example",
68
+ subscription_id: "subscription_id_example",
69
+ },
70
+ };
71
+
72
+ apiInstance.beginLiveActivity(body).then((data:any) => {
73
+ console.log('API called successfully. Returned data: ' + data);
74
+ }).catch((error:any) => console.error(error));
75
+ ```
76
+
77
+
78
+ ### Parameters
79
+
80
+ Name | Type | Description | Notes
81
+ ------------- | ------------- | ------------- | -------------
82
+ **beginLiveActivityRequest** | **BeginLiveActivityRequest**| |
83
+ **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
84
+ **activityId** | [**string**] | Live Activity record ID | defaults to undefined
85
+
86
+
87
+ ### Return type
88
+
89
+ **void**
90
+
91
+ ### Authorization
92
+
93
+ [app_key](README.md#app_key)
94
+
95
+ ### HTTP request headers
96
+
97
+ - **Content-Type**: application/json
98
+ - **Accept**: application/json
99
+
100
+
101
+ ### HTTP response details
102
+ | Status code | Description | Response headers |
103
+ |-------------|-------------|------------------|
104
+ **204** | OK | - |
105
+ **400** | Bad Request | - |
106
+
107
+ [[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)
108
+
28
109
  # **cancelNotification**
29
110
  > CancelNotificationSuccessResponse cancelNotification()
30
111
 
@@ -79,6 +160,7 @@ Name | Type | Description | Notes
79
160
  | Status code | Description | Response headers |
80
161
  |-------------|-------------|------------------|
81
162
  **200** | OK | - |
163
+ **400** | Bad Request | - |
82
164
 
83
165
  [[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)
84
166
 
@@ -112,6 +194,10 @@ let body:.DefaultApiCreateAppRequest = {
112
194
  apns_p12_password: "apns_p12_password_example",
113
195
  safari_apns_p12: "safari_apns_p12_example",
114
196
  safari_apns_p12_password: "safari_apns_p12_password_example",
197
+ apns_key_id: "apns_key_id_example",
198
+ apns_team_id: "apns_team_id_example",
199
+ apns_bundle_id: "apns_bundle_id_example",
200
+ apns_p8: "apns_p8_example",
115
201
  safari_site_origin: "safari_site_origin_example",
116
202
  safari_icon_256_256: "safari_icon_256_256_example",
117
203
  site_name: "site_name_example",
@@ -151,6 +237,7 @@ Name | Type | Description | Notes
151
237
  | Status code | Description | Response headers |
152
238
  |-------------|-------------|------------------|
153
239
  **200** | OK | - |
240
+ **400** | Bad Request | - |
154
241
 
155
242
  [[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)
156
243
 
@@ -249,7 +336,7 @@ let body:.DefaultApiCreatePlayerRequest = {
249
336
  last_active: 1,
250
337
  notification_types: 1,
251
338
  test_type: 1,
252
- _long: 3.14,
339
+ long: 3.14,
253
340
  lat: 3.14,
254
341
  country: "country_example",
255
342
  },
@@ -286,6 +373,7 @@ Name | Type | Description | Notes
286
373
  | Status code | Description | Response headers |
287
374
  |-------------|-------------|------------------|
288
375
  **200** | OK | - |
376
+ **400** | Bad Request | - |
289
377
 
290
378
  [[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)
291
379
 
@@ -354,10 +442,10 @@ Name | Type | Description | Notes
354
442
 
355
443
  [[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)
356
444
 
357
- # **deletePlayer**
358
- > DeletePlayerSuccessResponse deletePlayer()
445
+ # **createSubscription**
446
+ > InlineResponse201 createSubscription(createSubscriptionRequestBody)
359
447
 
360
- Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
448
+ Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
361
449
 
362
450
  ### Example
363
451
 
@@ -369,14 +457,39 @@ import * as fs from 'fs';
369
457
  const configuration = .createConfiguration();
370
458
  const apiInstance = new .DefaultApi(configuration);
371
459
 
372
- let body:.DefaultApiDeletePlayerRequest = {
373
- // string | The OneSignal App ID for your app. Available in Keys & IDs.
460
+ let body:.DefaultApiCreateSubscriptionRequest = {
461
+ // string
374
462
  appId: "app_id_example",
375
- // string | The OneSignal player_id
376
- playerId: "player_id_example",
463
+ // string
464
+ aliasLabel: "alias_label_example",
465
+ // string
466
+ aliasId: "alias_id_example",
467
+ // CreateSubscriptionRequestBody
468
+ createSubscriptionRequestBody: {
469
+ subscription: {
470
+ id: "id_example",
471
+ type: "iOSPush",
472
+ token: "token_example",
473
+ enabled: true,
474
+ notification_types: 3.14,
475
+ session_time: 3.14,
476
+ session_count: 3.14,
477
+ sdk: "sdk_example",
478
+ device_model: "device_model_example",
479
+ device_os: "device_os_example",
480
+ rooted: true,
481
+ test_type: 3.14,
482
+ app_version: "app_version_example",
483
+ net_type: 3.14,
484
+ carrier: "carrier_example",
485
+ web_auth: "web_auth_example",
486
+ web_p256: "web_p256_example",
487
+ },
488
+ retain_previous_owner: true,
489
+ },
377
490
  };
378
491
 
379
- apiInstance.deletePlayer(body).then((data:any) => {
492
+ apiInstance.createSubscription(body).then((data:any) => {
380
493
  console.log('API called successfully. Returned data: ' + data);
381
494
  }).catch((error:any) => console.error(error));
382
495
  ```
@@ -386,13 +499,15 @@ apiInstance.deletePlayer(body).then((data:any) => {
386
499
 
387
500
  Name | Type | Description | Notes
388
501
  ------------- | ------------- | ------------- | -------------
389
- **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
390
- **playerId** | [**string**] | The OneSignal player_id | defaults to undefined
502
+ **createSubscriptionRequestBody** | **CreateSubscriptionRequestBody**| |
503
+ **appId** | [**string**] | | defaults to undefined
504
+ **aliasLabel** | [**string**] | | defaults to undefined
505
+ **aliasId** | [**string**] | | defaults to undefined
391
506
 
392
507
 
393
508
  ### Return type
394
509
 
395
- **DeletePlayerSuccessResponse**
510
+ **InlineResponse201**
396
511
 
397
512
  ### Authorization
398
513
 
@@ -400,23 +515,22 @@ Name | Type | Description | Notes
400
515
 
401
516
  ### HTTP request headers
402
517
 
403
- - **Content-Type**: Not defined
518
+ - **Content-Type**: application/json
404
519
  - **Accept**: application/json
405
520
 
406
521
 
407
522
  ### HTTP response details
408
523
  | Status code | Description | Response headers |
409
524
  |-------------|-------------|------------------|
410
- **200** | OK | - |
411
- **400** | Bad Request | - |
412
- **404** | Not Found | - |
525
+ **201** | CREATED | - |
526
+ **202** | ACCEPTED | - |
413
527
 
414
528
  [[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)
415
529
 
416
- # **deleteSegments**
417
- > DeleteSegmentSuccessResponse deleteSegments()
530
+ # **createUser**
531
+ > User createUser(user)
418
532
 
419
- Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
533
+ Creates a User, optionally Subscriptions owned by the User as well as Aliases. Aliases provided in the payload will be used to look up an existing User.
420
534
 
421
535
  ### Example
422
536
 
@@ -428,14 +542,59 @@ import * as fs from 'fs';
428
542
  const configuration = .createConfiguration();
429
543
  const apiInstance = new .DefaultApi(configuration);
430
544
 
431
- let body:.DefaultApiDeleteSegmentsRequest = {
432
- // string | The OneSignal App ID for your app. Available in Keys & IDs.
545
+ let body:.DefaultApiCreateUserRequest = {
546
+ // string
433
547
  appId: "app_id_example",
434
- // string | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
435
- segmentId: "segment_id_example",
548
+ // User
549
+ user: {
550
+ properties: {
551
+ tags: {},
552
+ language: "language_example",
553
+ timezone_id: "timezone_id_example",
554
+ lat: 3.14,
555
+ long: 3.14,
556
+ country: "country_example",
557
+ first_active: 3.14,
558
+ last_active: 3.14,
559
+ amount_spent: 3.14,
560
+ purchases: [
561
+ {
562
+ sku: "sku_example",
563
+ amount: "amount_example",
564
+ iso: "iso_example",
565
+ },
566
+ ],
567
+ ip: "ip_example",
568
+ },
569
+ identity: {},
570
+ subscriptions: [
571
+ {
572
+ id: "id_example",
573
+ type: "iOSPush",
574
+ token: "token_example",
575
+ enabled: true,
576
+ notification_types: 3.14,
577
+ session_time: 3.14,
578
+ session_count: 3.14,
579
+ sdk: "sdk_example",
580
+ device_model: "device_model_example",
581
+ device_os: "device_os_example",
582
+ rooted: true,
583
+ test_type: 3.14,
584
+ app_version: "app_version_example",
585
+ net_type: 3.14,
586
+ carrier: "carrier_example",
587
+ web_auth: "web_auth_example",
588
+ web_p256: "web_p256_example",
589
+ },
590
+ ],
591
+ subscription_options: {
592
+ retain_previous_owner: true,
593
+ },
594
+ },
436
595
  };
437
596
 
438
- apiInstance.deleteSegments(body).then((data:any) => {
597
+ apiInstance.createUser(body).then((data:any) => {
439
598
  console.log('API called successfully. Returned data: ' + data);
440
599
  }).catch((error:any) => console.error(error));
441
600
  ```
@@ -445,13 +604,13 @@ apiInstance.deleteSegments(body).then((data:any) => {
445
604
 
446
605
  Name | Type | Description | Notes
447
606
  ------------- | ------------- | ------------- | -------------
448
- **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
449
- **segmentId** | [**string**] | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | defaults to undefined
607
+ **user** | **User**| |
608
+ **appId** | [**string**] | | defaults to undefined
450
609
 
451
610
 
452
611
  ### Return type
453
612
 
454
- **DeleteSegmentSuccessResponse**
613
+ **User**
455
614
 
456
615
  ### Authorization
457
616
 
@@ -459,23 +618,23 @@ Name | Type | Description | Notes
459
618
 
460
619
  ### HTTP request headers
461
620
 
462
- - **Content-Type**: Not defined
621
+ - **Content-Type**: application/json
463
622
  - **Accept**: application/json
464
623
 
465
624
 
466
625
  ### HTTP response details
467
626
  | Status code | Description | Response headers |
468
627
  |-------------|-------------|------------------|
469
- **200** | OK | - |
470
- **400** | Bad Request | - |
471
- **404** | Not Found | - |
628
+ **201** | CREATED | - |
629
+ **202** | ACCEPTED | - |
630
+ **409** | Multiple User Identity Conflict | - |
472
631
 
473
632
  [[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)
474
633
 
475
- # **exportPlayers**
476
- > ExportPlayersSuccessResponse exportPlayers()
634
+ # **deleteAlias**
635
+ > InlineResponse200 deleteAlias()
477
636
 
478
- Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. 🚧 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. 🚧 Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. 🚧 Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
637
+ Deletes an alias by alias label
479
638
 
480
639
  ### Example
481
640
 
@@ -487,20 +646,18 @@ import * as fs from 'fs';
487
646
  const configuration = .createConfiguration();
488
647
  const apiInstance = new .DefaultApi(configuration);
489
648
 
490
- let body:.DefaultApiExportPlayersRequest = {
491
- // string | The app ID that you want to export devices from
649
+ let body:.DefaultApiDeleteAliasRequest = {
650
+ // string
492
651
  appId: "app_id_example",
493
- // ExportPlayersRequestBody (optional)
494
- exportPlayersRequestBody: {
495
- extra_fields: [
496
- "extra_fields_example",
497
- ],
498
- last_active_since: "last_active_since_example",
499
- segment_name: "segment_name_example",
500
- },
652
+ // string
653
+ aliasLabel: "alias_label_example",
654
+ // string
655
+ aliasId: "alias_id_example",
656
+ // string
657
+ aliasLabelToDelete: "alias_label_to_delete_example",
501
658
  };
502
659
 
503
- apiInstance.exportPlayers(body).then((data:any) => {
660
+ apiInstance.deleteAlias(body).then((data:any) => {
504
661
  console.log('API called successfully. Returned data: ' + data);
505
662
  }).catch((error:any) => console.error(error));
506
663
  ```
@@ -510,13 +667,15 @@ apiInstance.exportPlayers(body).then((data:any) => {
510
667
 
511
668
  Name | Type | Description | Notes
512
669
  ------------- | ------------- | ------------- | -------------
513
- **exportPlayersRequestBody** | **ExportPlayersRequestBody**| |
514
- **appId** | [**string**] | The app ID that you want to export devices from | defaults to undefined
670
+ **appId** | [**string**] | | defaults to undefined
671
+ **aliasLabel** | [**string**] | | defaults to undefined
672
+ **aliasId** | [**string**] | | defaults to undefined
673
+ **aliasLabelToDelete** | [**string**] | | defaults to undefined
515
674
 
516
675
 
517
676
  ### Return type
518
677
 
519
- **ExportPlayersSuccessResponse**
678
+ **InlineResponse200**
520
679
 
521
680
  ### Authorization
522
681
 
@@ -524,7 +683,7 @@ Name | Type | Description | Notes
524
683
 
525
684
  ### HTTP request headers
526
685
 
527
- - **Content-Type**: application/json
686
+ - **Content-Type**: Not defined
528
687
  - **Accept**: application/json
529
688
 
530
689
 
@@ -532,14 +691,13 @@ Name | Type | Description | Notes
532
691
  | Status code | Description | Response headers |
533
692
  |-------------|-------------|------------------|
534
693
  **200** | OK | - |
535
- **400** | Bad Request | - |
536
694
 
537
695
  [[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)
538
696
 
539
- # **getApp**
540
- > App getApp()
697
+ # **deletePlayer**
698
+ > DeletePlayerSuccessResponse deletePlayer()
541
699
 
542
- View the details of a single OneSignal app
700
+ Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
543
701
 
544
702
  ### Example
545
703
 
@@ -551,12 +709,14 @@ import * as fs from 'fs';
551
709
  const configuration = .createConfiguration();
552
710
  const apiInstance = new .DefaultApi(configuration);
553
711
 
554
- let body:.DefaultApiGetAppRequest = {
555
- // string | An app id
712
+ let body:.DefaultApiDeletePlayerRequest = {
713
+ // string | The OneSignal App ID for your app. Available in Keys & IDs.
556
714
  appId: "app_id_example",
715
+ // string | The OneSignal player_id
716
+ playerId: "player_id_example",
557
717
  };
558
718
 
559
- apiInstance.getApp(body).then((data:any) => {
719
+ apiInstance.deletePlayer(body).then((data:any) => {
560
720
  console.log('API called successfully. Returned data: ' + data);
561
721
  }).catch((error:any) => console.error(error));
562
722
  ```
@@ -566,16 +726,17 @@ apiInstance.getApp(body).then((data:any) => {
566
726
 
567
727
  Name | Type | Description | Notes
568
728
  ------------- | ------------- | ------------- | -------------
569
- **appId** | [**string**] | An app id | defaults to undefined
729
+ **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys & IDs. | defaults to undefined
730
+ **playerId** | [**string**] | The OneSignal player_id | defaults to undefined
570
731
 
571
732
 
572
733
  ### Return type
573
734
 
574
- **App**
735
+ **DeletePlayerSuccessResponse**
575
736
 
576
737
  ### Authorization
577
738
 
578
- [user_key](README.md#user_key)
739
+ [app_key](README.md#app_key)
579
740
 
580
741
  ### HTTP request headers
581
742
 
@@ -587,13 +748,15 @@ Name | Type | Description | Notes
587
748
  | Status code | Description | Response headers |
588
749
  |-------------|-------------|------------------|
589
750
  **200** | OK | - |
751
+ **400** | Bad Request | - |
752
+ **404** | Not Found | - |
590
753
 
591
754
  [[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)
592
755
 
593
- # **getApps**
594
- > Array<App> getApps()
756
+ # **deleteSegments**
757
+ > DeleteSegmentSuccessResponse deleteSegments()
595
758
 
596
- View the details of all of your current OneSignal apps
759
+ Delete segments (not user devices) - Required: OneSignal Paid Plan You can delete a segment under your app by calling this API. You must provide an API key in the Authorization header that has admin access on the app. The segment_id can be found in the URL of the segment when viewing it in the dashboard.
597
760
 
598
761
  ### Example
599
762
 
@@ -605,25 +768,34 @@ import * as fs from 'fs';
605
768
  const configuration = .createConfiguration();
606
769
  const apiInstance = new .DefaultApi(configuration);
607
770
 
608
- let body:any = {};
771
+ let body:.DefaultApiDeleteSegmentsRequest = {
772
+ // string | The OneSignal App ID for your app. Available in Keys & IDs.
773
+ appId: "app_id_example",
774
+ // string | The segment_id can be found in the URL of the segment when viewing it in the dashboard.
775
+ segmentId: "segment_id_example",
776
+ };
609
777
 
610
- apiInstance.getApps(body).then((data:any) => {
778
+ apiInstance.deleteSegments(body).then((data:any) => {
611
779
  console.log('API called successfully. Returned data: ' + data);
612
780
  }).catch((error:any) => console.error(error));
613
781
  ```
614
782
 
615
783
 
616
784
  ### Parameters
617
- This endpoint does not need any parameter.
785
+
786
+ Name | Type | Description | Notes
787
+ ------------- | ------------- | ------------- | -------------
788
+ **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys &amp; IDs. | defaults to undefined
789
+ **segmentId** | [**string**] | The segment_id can be found in the URL of the segment when viewing it in the dashboard. | defaults to undefined
618
790
 
619
791
 
620
792
  ### Return type
621
793
 
622
- **Array<App>**
794
+ **DeleteSegmentSuccessResponse**
623
795
 
624
796
  ### Authorization
625
797
 
626
- [user_key](README.md#user_key)
798
+ [app_key](README.md#app_key)
627
799
 
628
800
  ### HTTP request headers
629
801
 
@@ -635,13 +807,15 @@ This endpoint does not need any parameter.
635
807
  | Status code | Description | Response headers |
636
808
  |-------------|-------------|------------------|
637
809
  **200** | OK | - |
810
+ **400** | Bad Request | - |
811
+ **404** | Not Found | - |
638
812
 
639
813
  [[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)
640
814
 
641
- # **getNotification**
642
- > NotificationWithMeta getNotification()
815
+ # **deleteSubscription**
816
+ > void deleteSubscription()
643
817
 
644
- View the details of a single notification and outcomes associated with it
818
+ Deletes the Subscription.
645
819
 
646
820
  ### Example
647
821
 
@@ -653,14 +827,14 @@ import * as fs from 'fs';
653
827
  const configuration = .createConfiguration();
654
828
  const apiInstance = new .DefaultApi(configuration);
655
829
 
656
- let body:.DefaultApiGetNotificationRequest = {
830
+ let body:.DefaultApiDeleteSubscriptionRequest = {
657
831
  // string
658
832
  appId: "app_id_example",
659
833
  // string
660
- notificationId: "notification_id_example",
834
+ subscriptionId: "subscription_id_example",
661
835
  };
662
836
 
663
- apiInstance.getNotification(body).then((data:any) => {
837
+ apiInstance.deleteSubscription(body).then((data:any) => {
664
838
  console.log('API called successfully. Returned data: ' + data);
665
839
  }).catch((error:any) => console.error(error));
666
840
  ```
@@ -671,12 +845,12 @@ apiInstance.getNotification(body).then((data:any) => {
671
845
  Name | Type | Description | Notes
672
846
  ------------- | ------------- | ------------- | -------------
673
847
  **appId** | [**string**] | | defaults to undefined
674
- **notificationId** | [**string**] | | defaults to undefined
848
+ **subscriptionId** | [**string**] | | defaults to undefined
675
849
 
676
850
 
677
851
  ### Return type
678
852
 
679
- **NotificationWithMeta**
853
+ **void**
680
854
 
681
855
  ### Authorization
682
856
 
@@ -685,20 +859,20 @@ Name | Type | Description | Notes
685
859
  ### HTTP request headers
686
860
 
687
861
  - **Content-Type**: Not defined
688
- - **Accept**: application/json
862
+ - **Accept**: Not defined
689
863
 
690
864
 
691
865
  ### HTTP response details
692
866
  | Status code | Description | Response headers |
693
867
  |-------------|-------------|------------------|
694
- **200** | OK | - |
868
+ **202** | ACCEPTED | - |
695
869
 
696
870
  [[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)
697
871
 
698
- # **getNotificationHistory**
699
- > NotificationHistorySuccessResponse getNotificationHistory(getNotificationRequestBody)
872
+ # **deleteUser**
873
+ > void deleteUser()
700
874
 
701
- -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App\'s REST API Key, available in Keys & IDs.
875
+ Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
702
876
 
703
877
  ### Example
704
878
 
@@ -710,18 +884,16 @@ import * as fs from 'fs';
710
884
  const configuration = .createConfiguration();
711
885
  const apiInstance = new .DefaultApi(configuration);
712
886
 
713
- let body:.DefaultApiGetNotificationHistoryRequest = {
714
- // string | The \"id\" of the message found in the Notification object
715
- notificationId: "notification_id_example",
716
- // GetNotificationRequestBody
717
- getNotificationRequestBody: {
718
- events: "sent",
719
- email: "email_example",
720
- app_id: "app_id_example",
721
- },
887
+ let body:.DefaultApiDeleteUserRequest = {
888
+ // string
889
+ appId: "app_id_example",
890
+ // string
891
+ aliasLabel: "alias_label_example",
892
+ // string
893
+ aliasId: "alias_id_example",
722
894
  };
723
895
 
724
- apiInstance.getNotificationHistory(body).then((data:any) => {
896
+ apiInstance.deleteUser(body).then((data:any) => {
725
897
  console.log('API called successfully. Returned data: ' + data);
726
898
  }).catch((error:any) => console.error(error));
727
899
  ```
@@ -731,36 +903,36 @@ apiInstance.getNotificationHistory(body).then((data:any) => {
731
903
 
732
904
  Name | Type | Description | Notes
733
905
  ------------- | ------------- | ------------- | -------------
734
- **getNotificationRequestBody** | **GetNotificationRequestBody**| |
735
- **notificationId** | [**string**] | The \&quot;id\&quot; of the message found in the Notification object | defaults to undefined
906
+ **appId** | [**string**] | | defaults to undefined
907
+ **aliasLabel** | [**string**] | | defaults to undefined
908
+ **aliasId** | [**string**] | | defaults to undefined
736
909
 
737
910
 
738
911
  ### Return type
739
912
 
740
- **NotificationHistorySuccessResponse**
913
+ **void**
741
914
 
742
915
  ### Authorization
743
916
 
744
- [app_key](README.md#app_key)
917
+ No authorization required
745
918
 
746
919
  ### HTTP request headers
747
920
 
748
- - **Content-Type**: application/json
749
- - **Accept**: application/json
921
+ - **Content-Type**: Not defined
922
+ - **Accept**: Not defined
750
923
 
751
924
 
752
925
  ### HTTP response details
753
926
  | Status code | Description | Response headers |
754
927
  |-------------|-------------|------------------|
755
928
  **200** | OK | - |
756
- **400** | Bad Request | - |
757
929
 
758
930
  [[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)
759
931
 
760
- # **getNotifications**
761
- > NotificationSlice getNotifications()
932
+ # **endLiveActivity**
933
+ > void endLiveActivity()
762
934
 
763
- View the details of multiple notifications
935
+ Stops a Live Activity
764
936
 
765
937
  ### Example
766
938
 
@@ -772,18 +944,16 @@ import * as fs from 'fs';
772
944
  const configuration = .createConfiguration();
773
945
  const apiInstance = new .DefaultApi(configuration);
774
946
 
775
- let body:.DefaultApiGetNotificationsRequest = {
776
- // string | The app ID that you want to view notifications from
947
+ let body:.DefaultApiEndLiveActivityRequest = {
948
+ // string | The OneSignal App ID for your app. Available in Keys & IDs.
777
949
  appId: "app_id_example",
778
- // number | How many notifications to return. Max is 50. Default is 50. (optional)
779
- limit: 1,
780
- // number | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional)
781
- offset: 1,
782
- // 0 | 1 | 3 | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional)
783
- kind: 0,
950
+ // string | Live Activity record ID
951
+ activityId: "activity_id_example",
952
+ // string | Subscription ID
953
+ subscriptionId: "subscription_id_example",
784
954
  };
785
955
 
786
- apiInstance.getNotifications(body).then((data:any) => {
956
+ apiInstance.endLiveActivity(body).then((data:any) => {
787
957
  console.log('API called successfully. Returned data: ' + data);
788
958
  }).catch((error:any) => console.error(error));
789
959
  ```
@@ -793,15 +963,14 @@ apiInstance.getNotifications(body).then((data:any) => {
793
963
 
794
964
  Name | Type | Description | Notes
795
965
  ------------- | ------------- | ------------- | -------------
796
- **appId** | [**string**] | The app ID that you want to view notifications from | defaults to undefined
797
- **limit** | [**number**] | How many notifications to return. Max is 50. Default is 50. | (optional) defaults to undefined
798
- **offset** | [**number**] | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | (optional) defaults to undefined
799
- **kind** | [**0 | 1 | 3**]**Array<0 &#124; 1 &#124; 3>** | Kind of notifications returned: * unset - All notification types (default) * &#x60;0&#x60; - Dashboard only * &#x60;1&#x60; - API only * &#x60;3&#x60; - Automated only | (optional) defaults to undefined
966
+ **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys &amp; IDs. | defaults to undefined
967
+ **activityId** | [**string**] | Live Activity record ID | defaults to undefined
968
+ **subscriptionId** | [**string**] | Subscription ID | defaults to undefined
800
969
 
801
970
 
802
971
  ### Return type
803
972
 
804
- **NotificationSlice**
973
+ **void**
805
974
 
806
975
  ### Authorization
807
976
 
@@ -816,14 +985,15 @@ Name | Type | Description | Notes
816
985
  ### HTTP response details
817
986
  | Status code | Description | Response headers |
818
987
  |-------------|-------------|------------------|
819
- **200** | OK | - |
988
+ **204** | OK | - |
989
+ **400** | Bad Request | - |
820
990
 
821
991
  [[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)
822
992
 
823
- # **getOutcomes**
824
- > OutcomesData getOutcomes()
993
+ # **exportPlayers**
994
+ > ExportPlayersSuccessResponse exportPlayers()
825
995
 
826
- View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
996
+ Generate a compressed CSV export of all of your current user data This method can be used to generate a compressed CSV export of all of your current user data. It is a much faster alternative than retrieving this data using the /players API endpoint. The file will be compressed using GZip. The file may take several minutes to generate depending on the number of users in your app. The URL generated will be available for 3 days and includes random v4 uuid as part of the resource name to be unguessable. &#x1F6A7; 403 Error Responses You can test if it is complete by making a GET request to the csv_file_url value. This file may take time to generate depending on how many device records are being pulled. If the file is not ready, a 403 error will be returned. Otherwise the file itself will be returned. &#x1F6A7; Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. &#x1F6A7; Concurrent Exports Only one concurrent export is allowed per OneSignal account. Please ensure you have successfully downloaded the .csv.gz file before exporting another app. CSV File Format: - Default Columns: | Field | Details | | --- | --- | | id | OneSignal Player Id | | identifier | Push Token | | session_count | Number of times they visited the app or site | language | Device language code | | timezone | Number of seconds away from UTC. Example: -28800 | | game_version | Version of your mobile app gathered from Android Studio versionCode in your App/build.gradle and iOS uses kCFBundleVersionKey in Xcode. | | device_os | Device Operating System Version. Example: 80 = Chrome 80, 9 = Android 9 | | device_type | Device Operating System Type | | device_model | Device Hardware String Code. Example: Mobile Web Subscribers will have `Linux armv` | | ad_id | Based on the Google Advertising Id for Android, identifierForVendor for iOS. OptedOut means user turned off Advertising tracking on the device. | | tags | Current OneSignal Data Tags on the device. | | last_active | Date and time the user last opened the mobile app or visited the site. | | playtime | Total amount of time in seconds the user had the mobile app open. | | amount_spent | Mobile only - amount spent in USD on In-App Purchases. | | created_at | Date and time the device record was created in OneSignal. Mobile - first time they opened the app with OneSignal SDK. Web - first time the user subscribed to the site. | | invalid_identifier | t = unsubscribed, f = subscibed | | badge_count | Current number of badges on the device | - Extra Columns: | Field | Details | | --- | --- | | external_user_id | Your User Id set on the device | | notification_types | Notification types | | location | Location points (Latitude and Longitude) set on the device. | | country | Country code | | rooted | Android device rooted or not | | ip | IP Address of the device if being tracked. See Handling Personal Data. | | web_auth | Web Only authorization key. | | web_p256 | Web Only p256 key. |
827
997
 
828
998
  ### Example
829
999
 
@@ -835,22 +1005,20 @@ import * as fs from 'fs';
835
1005
  const configuration = .createConfiguration();
836
1006
  const apiInstance = new .DefaultApi(configuration);
837
1007
 
838
- let body:.DefaultApiGetOutcomesRequest = {
839
- // string | The OneSignal App ID for your app. Available in Keys & IDs.
1008
+ let body:.DefaultApiExportPlayersRequest = {
1009
+ // string | The app ID that you want to export devices from
840
1010
  appId: "app_id_example",
841
- // string | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
842
- outcomeNames: "outcome_names_example",
843
- // string | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional)
844
- outcomeNames2: "outcome_names[]_example",
845
- // string | Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional)
846
- outcomeTimeRange: "outcome_time_range_example",
847
- // string | Optional Platform id. Refer device\'s platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional)
848
- outcomePlatforms: "outcome_platforms_example",
849
- // string | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional)
850
- outcomeAttribution: "outcome_attribution_example",
1011
+ // ExportPlayersRequestBody (optional)
1012
+ exportPlayersRequestBody: {
1013
+ extra_fields: [
1014
+ "extra_fields_example",
1015
+ ],
1016
+ last_active_since: "last_active_since_example",
1017
+ segment_name: "segment_name_example",
1018
+ },
851
1019
  };
852
1020
 
853
- apiInstance.getOutcomes(body).then((data:any) => {
1021
+ apiInstance.exportPlayers(body).then((data:any) => {
854
1022
  console.log('API called successfully. Returned data: ' + data);
855
1023
  }).catch((error:any) => console.error(error));
856
1024
  ```
@@ -860,7 +1028,595 @@ apiInstance.getOutcomes(body).then((data:any) => {
860
1028
 
861
1029
  Name | Type | Description | Notes
862
1030
  ------------- | ------------- | ------------- | -------------
863
- **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys &amp; IDs. | defaults to undefined
1031
+ **exportPlayersRequestBody** | **ExportPlayersRequestBody**| |
1032
+ **appId** | [**string**] | The app ID that you want to export devices from | defaults to undefined
1033
+
1034
+
1035
+ ### Return type
1036
+
1037
+ **ExportPlayersSuccessResponse**
1038
+
1039
+ ### Authorization
1040
+
1041
+ [app_key](README.md#app_key)
1042
+
1043
+ ### HTTP request headers
1044
+
1045
+ - **Content-Type**: application/json
1046
+ - **Accept**: application/json
1047
+
1048
+
1049
+ ### HTTP response details
1050
+ | Status code | Description | Response headers |
1051
+ |-------------|-------------|------------------|
1052
+ **200** | OK | - |
1053
+ **400** | Bad Request | - |
1054
+
1055
+ [[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)
1056
+
1057
+ # **fetchAliases**
1058
+ > UserIdentityResponse fetchAliases()
1059
+
1060
+ Lists all Aliases for the User identified by :subscription_id.
1061
+
1062
+ ### Example
1063
+
1064
+
1065
+ ```typescript
1066
+ import { } from '';
1067
+ import * as fs from 'fs';
1068
+
1069
+ const configuration = .createConfiguration();
1070
+ const apiInstance = new .DefaultApi(configuration);
1071
+
1072
+ let body:.DefaultApiFetchAliasesRequest = {
1073
+ // string
1074
+ appId: "app_id_example",
1075
+ // string
1076
+ subscriptionId: "subscription_id_example",
1077
+ };
1078
+
1079
+ apiInstance.fetchAliases(body).then((data:any) => {
1080
+ console.log('API called successfully. Returned data: ' + data);
1081
+ }).catch((error:any) => console.error(error));
1082
+ ```
1083
+
1084
+
1085
+ ### Parameters
1086
+
1087
+ Name | Type | Description | Notes
1088
+ ------------- | ------------- | ------------- | -------------
1089
+ **appId** | [**string**] | | defaults to undefined
1090
+ **subscriptionId** | [**string**] | | defaults to undefined
1091
+
1092
+
1093
+ ### Return type
1094
+
1095
+ **UserIdentityResponse**
1096
+
1097
+ ### Authorization
1098
+
1099
+ [app_key](README.md#app_key)
1100
+
1101
+ ### HTTP request headers
1102
+
1103
+ - **Content-Type**: Not defined
1104
+ - **Accept**: application/json
1105
+
1106
+
1107
+ ### HTTP response details
1108
+ | Status code | Description | Response headers |
1109
+ |-------------|-------------|------------------|
1110
+ **200** | OK | - |
1111
+
1112
+ [[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)
1113
+
1114
+ # **fetchUser**
1115
+ > User fetchUser()
1116
+
1117
+ Returns the User’s properties, Aliases, and Subscriptions.
1118
+
1119
+ ### Example
1120
+
1121
+
1122
+ ```typescript
1123
+ import { } from '';
1124
+ import * as fs from 'fs';
1125
+
1126
+ const configuration = .createConfiguration();
1127
+ const apiInstance = new .DefaultApi(configuration);
1128
+
1129
+ let body:.DefaultApiFetchUserRequest = {
1130
+ // string
1131
+ appId: "app_id_example",
1132
+ // string
1133
+ aliasLabel: "alias_label_example",
1134
+ // string
1135
+ aliasId: "alias_id_example",
1136
+ };
1137
+
1138
+ apiInstance.fetchUser(body).then((data:any) => {
1139
+ console.log('API called successfully. Returned data: ' + data);
1140
+ }).catch((error:any) => console.error(error));
1141
+ ```
1142
+
1143
+
1144
+ ### Parameters
1145
+
1146
+ Name | Type | Description | Notes
1147
+ ------------- | ------------- | ------------- | -------------
1148
+ **appId** | [**string**] | | defaults to undefined
1149
+ **aliasLabel** | [**string**] | | defaults to undefined
1150
+ **aliasId** | [**string**] | | defaults to undefined
1151
+
1152
+
1153
+ ### Return type
1154
+
1155
+ **User**
1156
+
1157
+ ### Authorization
1158
+
1159
+ [app_key](README.md#app_key)
1160
+
1161
+ ### HTTP request headers
1162
+
1163
+ - **Content-Type**: Not defined
1164
+ - **Accept**: application/json
1165
+
1166
+
1167
+ ### HTTP response details
1168
+ | Status code | Description | Response headers |
1169
+ |-------------|-------------|------------------|
1170
+ **200** | OK | - |
1171
+
1172
+ [[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)
1173
+
1174
+ # **fetchUserIdentity**
1175
+ > InlineResponse200 fetchUserIdentity()
1176
+
1177
+ Lists all Aliases for the User identified by (:alias_label, :alias_id).
1178
+
1179
+ ### Example
1180
+
1181
+
1182
+ ```typescript
1183
+ import { } from '';
1184
+ import * as fs from 'fs';
1185
+
1186
+ const configuration = .createConfiguration();
1187
+ const apiInstance = new .DefaultApi(configuration);
1188
+
1189
+ let body:.DefaultApiFetchUserIdentityRequest = {
1190
+ // string
1191
+ appId: "app_id_example",
1192
+ // string
1193
+ aliasLabel: "alias_label_example",
1194
+ // string
1195
+ aliasId: "alias_id_example",
1196
+ };
1197
+
1198
+ apiInstance.fetchUserIdentity(body).then((data:any) => {
1199
+ console.log('API called successfully. Returned data: ' + data);
1200
+ }).catch((error:any) => console.error(error));
1201
+ ```
1202
+
1203
+
1204
+ ### Parameters
1205
+
1206
+ Name | Type | Description | Notes
1207
+ ------------- | ------------- | ------------- | -------------
1208
+ **appId** | [**string**] | | defaults to undefined
1209
+ **aliasLabel** | [**string**] | | defaults to undefined
1210
+ **aliasId** | [**string**] | | defaults to undefined
1211
+
1212
+
1213
+ ### Return type
1214
+
1215
+ **InlineResponse200**
1216
+
1217
+ ### Authorization
1218
+
1219
+ [app_key](README.md#app_key)
1220
+
1221
+ ### HTTP request headers
1222
+
1223
+ - **Content-Type**: Not defined
1224
+ - **Accept**: application/json
1225
+
1226
+
1227
+ ### HTTP response details
1228
+ | Status code | Description | Response headers |
1229
+ |-------------|-------------|------------------|
1230
+ **200** | OK | - |
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
+ # **getApp**
1235
+ > App getApp()
1236
+
1237
+ View the details of a single OneSignal app
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:.DefaultApiGetAppRequest = {
1250
+ // string | An app id
1251
+ appId: "app_id_example",
1252
+ };
1253
+
1254
+ apiInstance.getApp(body).then((data:any) => {
1255
+ console.log('API called successfully. Returned data: ' + data);
1256
+ }).catch((error:any) => console.error(error));
1257
+ ```
1258
+
1259
+
1260
+ ### Parameters
1261
+
1262
+ Name | Type | Description | Notes
1263
+ ------------- | ------------- | ------------- | -------------
1264
+ **appId** | [**string**] | An app id | defaults to undefined
1265
+
1266
+
1267
+ ### Return type
1268
+
1269
+ **App**
1270
+
1271
+ ### Authorization
1272
+
1273
+ [user_key](README.md#user_key)
1274
+
1275
+ ### HTTP request headers
1276
+
1277
+ - **Content-Type**: Not defined
1278
+ - **Accept**: application/json
1279
+
1280
+
1281
+ ### HTTP response details
1282
+ | Status code | Description | Response headers |
1283
+ |-------------|-------------|------------------|
1284
+ **200** | OK | - |
1285
+ **400** | Bad Request | - |
1286
+
1287
+ [[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)
1288
+
1289
+ # **getApps**
1290
+ > Array<App> getApps()
1291
+
1292
+ View the details of all of your current OneSignal apps
1293
+
1294
+ ### Example
1295
+
1296
+
1297
+ ```typescript
1298
+ import { } from '';
1299
+ import * as fs from 'fs';
1300
+
1301
+ const configuration = .createConfiguration();
1302
+ const apiInstance = new .DefaultApi(configuration);
1303
+
1304
+ let body:any = {};
1305
+
1306
+ apiInstance.getApps(body).then((data:any) => {
1307
+ console.log('API called successfully. Returned data: ' + data);
1308
+ }).catch((error:any) => console.error(error));
1309
+ ```
1310
+
1311
+
1312
+ ### Parameters
1313
+ This endpoint does not need any parameter.
1314
+
1315
+
1316
+ ### Return type
1317
+
1318
+ **Array<App>**
1319
+
1320
+ ### Authorization
1321
+
1322
+ [user_key](README.md#user_key)
1323
+
1324
+ ### HTTP request headers
1325
+
1326
+ - **Content-Type**: Not defined
1327
+ - **Accept**: application/json
1328
+
1329
+
1330
+ ### HTTP response details
1331
+ | Status code | Description | Response headers |
1332
+ |-------------|-------------|------------------|
1333
+ **200** | OK | - |
1334
+ **400** | Bad Request | - |
1335
+
1336
+ [[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)
1337
+
1338
+ # **getEligibleIams**
1339
+ > InlineResponse2003 getEligibleIams()
1340
+
1341
+ Manifest of In-App Messages the Subscription is eligible to display by the SDK.
1342
+
1343
+ ### Example
1344
+
1345
+
1346
+ ```typescript
1347
+ import { } from '';
1348
+ import * as fs from 'fs';
1349
+
1350
+ const configuration = .createConfiguration();
1351
+ const apiInstance = new .DefaultApi(configuration);
1352
+
1353
+ let body:.DefaultApiGetEligibleIamsRequest = {
1354
+ // string
1355
+ appId: "app_id_example",
1356
+ // string
1357
+ subscriptionId: "subscription_id_example",
1358
+ };
1359
+
1360
+ apiInstance.getEligibleIams(body).then((data:any) => {
1361
+ console.log('API called successfully. Returned data: ' + data);
1362
+ }).catch((error:any) => console.error(error));
1363
+ ```
1364
+
1365
+
1366
+ ### Parameters
1367
+
1368
+ Name | Type | Description | Notes
1369
+ ------------- | ------------- | ------------- | -------------
1370
+ **appId** | [**string**] | | defaults to undefined
1371
+ **subscriptionId** | [**string**] | | defaults to undefined
1372
+
1373
+
1374
+ ### Return type
1375
+
1376
+ **InlineResponse2003**
1377
+
1378
+ ### Authorization
1379
+
1380
+ [app_key](README.md#app_key)
1381
+
1382
+ ### HTTP request headers
1383
+
1384
+ - **Content-Type**: Not defined
1385
+ - **Accept**: application/json
1386
+
1387
+
1388
+ ### HTTP response details
1389
+ | Status code | Description | Response headers |
1390
+ |-------------|-------------|------------------|
1391
+ **200** | OK | - |
1392
+
1393
+ [[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)
1394
+
1395
+ # **getNotification**
1396
+ > NotificationWithMeta getNotification()
1397
+
1398
+ View the details of a single notification and outcomes associated with it
1399
+
1400
+ ### Example
1401
+
1402
+
1403
+ ```typescript
1404
+ import { } from '';
1405
+ import * as fs from 'fs';
1406
+
1407
+ const configuration = .createConfiguration();
1408
+ const apiInstance = new .DefaultApi(configuration);
1409
+
1410
+ let body:.DefaultApiGetNotificationRequest = {
1411
+ // string
1412
+ appId: "app_id_example",
1413
+ // string
1414
+ notificationId: "notification_id_example",
1415
+ };
1416
+
1417
+ apiInstance.getNotification(body).then((data:any) => {
1418
+ console.log('API called successfully. Returned data: ' + data);
1419
+ }).catch((error:any) => console.error(error));
1420
+ ```
1421
+
1422
+
1423
+ ### Parameters
1424
+
1425
+ Name | Type | Description | Notes
1426
+ ------------- | ------------- | ------------- | -------------
1427
+ **appId** | [**string**] | | defaults to undefined
1428
+ **notificationId** | [**string**] | | defaults to undefined
1429
+
1430
+
1431
+ ### Return type
1432
+
1433
+ **NotificationWithMeta**
1434
+
1435
+ ### Authorization
1436
+
1437
+ [app_key](README.md#app_key)
1438
+
1439
+ ### HTTP request headers
1440
+
1441
+ - **Content-Type**: Not defined
1442
+ - **Accept**: application/json
1443
+
1444
+
1445
+ ### HTTP response details
1446
+ | Status code | Description | Response headers |
1447
+ |-------------|-------------|------------------|
1448
+ **200** | OK | - |
1449
+ **400** | Bad Request | - |
1450
+
1451
+ [[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)
1452
+
1453
+ # **getNotificationHistory**
1454
+ > NotificationHistorySuccessResponse getNotificationHistory(getNotificationRequestBody)
1455
+
1456
+ -> View the devices sent a message - OneSignal Paid Plan Required This method will return all devices that were sent the given notification_id of an Email or Push Notification if used within 7 days of the date sent. After 7 days of the sending date, the message history data will be unavailable. After a successful response is received, the destination url may be polled until the file becomes available. Most exports are done in ~1-3 minutes, so setting a poll interval of 10 seconds should be adequate. For use cases that are not meant to be consumed by a script, an email will be sent to the supplied email address. &#x1F6A7; Requirements A OneSignal Paid Plan. Turn on Send History via OneSignal API in Settings -> Analytics. Cannot get data before this was turned on. Must be called within 7 days after sending the message. Messages targeting under 1000 recipients will not have \"sent\" events recorded, but will show \"clicked\" events. Requires your OneSignal App\'s REST API Key, available in Keys & IDs.
1457
+
1458
+ ### Example
1459
+
1460
+
1461
+ ```typescript
1462
+ import { } from '';
1463
+ import * as fs from 'fs';
1464
+
1465
+ const configuration = .createConfiguration();
1466
+ const apiInstance = new .DefaultApi(configuration);
1467
+
1468
+ let body:.DefaultApiGetNotificationHistoryRequest = {
1469
+ // string | The \"id\" of the message found in the Notification object
1470
+ notificationId: "notification_id_example",
1471
+ // GetNotificationRequestBody
1472
+ getNotificationRequestBody: {
1473
+ events: "sent",
1474
+ email: "email_example",
1475
+ app_id: "app_id_example",
1476
+ },
1477
+ };
1478
+
1479
+ apiInstance.getNotificationHistory(body).then((data:any) => {
1480
+ console.log('API called successfully. Returned data: ' + data);
1481
+ }).catch((error:any) => console.error(error));
1482
+ ```
1483
+
1484
+
1485
+ ### Parameters
1486
+
1487
+ Name | Type | Description | Notes
1488
+ ------------- | ------------- | ------------- | -------------
1489
+ **getNotificationRequestBody** | **GetNotificationRequestBody**| |
1490
+ **notificationId** | [**string**] | The \&quot;id\&quot; of the message found in the Notification object | defaults to undefined
1491
+
1492
+
1493
+ ### Return type
1494
+
1495
+ **NotificationHistorySuccessResponse**
1496
+
1497
+ ### Authorization
1498
+
1499
+ [app_key](README.md#app_key)
1500
+
1501
+ ### HTTP request headers
1502
+
1503
+ - **Content-Type**: application/json
1504
+ - **Accept**: application/json
1505
+
1506
+
1507
+ ### HTTP response details
1508
+ | Status code | Description | Response headers |
1509
+ |-------------|-------------|------------------|
1510
+ **200** | OK | - |
1511
+ **400** | Bad Request | - |
1512
+
1513
+ [[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)
1514
+
1515
+ # **getNotifications**
1516
+ > NotificationSlice getNotifications()
1517
+
1518
+ View the details of multiple notifications
1519
+
1520
+ ### Example
1521
+
1522
+
1523
+ ```typescript
1524
+ import { } from '';
1525
+ import * as fs from 'fs';
1526
+
1527
+ const configuration = .createConfiguration();
1528
+ const apiInstance = new .DefaultApi(configuration);
1529
+
1530
+ let body:.DefaultApiGetNotificationsRequest = {
1531
+ // string | The app ID that you want to view notifications from
1532
+ appId: "app_id_example",
1533
+ // number | How many notifications to return. Max is 50. Default is 50. (optional)
1534
+ limit: 1,
1535
+ // number | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. (optional)
1536
+ offset: 1,
1537
+ // 0 | 1 | 3 | Kind of notifications returned: * unset - All notification types (default) * `0` - Dashboard only * `1` - API only * `3` - Automated only (optional)
1538
+ kind: 0,
1539
+ };
1540
+
1541
+ apiInstance.getNotifications(body).then((data:any) => {
1542
+ console.log('API called successfully. Returned data: ' + data);
1543
+ }).catch((error:any) => console.error(error));
1544
+ ```
1545
+
1546
+
1547
+ ### Parameters
1548
+
1549
+ Name | Type | Description | Notes
1550
+ ------------- | ------------- | ------------- | -------------
1551
+ **appId** | [**string**] | The app ID that you want to view notifications from | defaults to undefined
1552
+ **limit** | [**number**] | How many notifications to return. Max is 50. Default is 50. | (optional) defaults to undefined
1553
+ **offset** | [**number**] | Page offset. Default is 0. Results are sorted by queued_at in descending order. queued_at is a representation of the time that the notification was queued at. | (optional) defaults to undefined
1554
+ **kind** | [**0 | 1 | 3**]**Array<0 &#124; 1 &#124; 3>** | Kind of notifications returned: * unset - All notification types (default) * &#x60;0&#x60; - Dashboard only * &#x60;1&#x60; - API only * &#x60;3&#x60; - Automated only | (optional) defaults to undefined
1555
+
1556
+
1557
+ ### Return type
1558
+
1559
+ **NotificationSlice**
1560
+
1561
+ ### Authorization
1562
+
1563
+ [app_key](README.md#app_key)
1564
+
1565
+ ### HTTP request headers
1566
+
1567
+ - **Content-Type**: Not defined
1568
+ - **Accept**: application/json
1569
+
1570
+
1571
+ ### HTTP response details
1572
+ | Status code | Description | Response headers |
1573
+ |-------------|-------------|------------------|
1574
+ **200** | OK | - |
1575
+ **400** | Bad Request | - |
1576
+
1577
+ [[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)
1578
+
1579
+ # **getOutcomes**
1580
+ > OutcomesData getOutcomes()
1581
+
1582
+ View the details of all the outcomes associated with your app &#x1F6A7; Requires Authentication Key Requires your OneSignal App\'s REST API Key, available in Keys & IDs. &#x1F6A7; Outcome Data Limitations Outcomes are only accessible for around 30 days before deleted from our servers. You will need to export this data every month if you want to keep it.
1583
+
1584
+ ### Example
1585
+
1586
+
1587
+ ```typescript
1588
+ import { } from '';
1589
+ import * as fs from 'fs';
1590
+
1591
+ const configuration = .createConfiguration();
1592
+ const apiInstance = new .DefaultApi(configuration);
1593
+
1594
+ let body:.DefaultApiGetOutcomesRequest = {
1595
+ // string | The OneSignal App ID for your app. Available in Keys & IDs.
1596
+ appId: "app_id_example",
1597
+ // string | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \"os\" prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum
1598
+ outcomeNames: "outcome_names_example",
1599
+ // string | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]=os__click.count&outcome_names[]=Sales, Purchase.count where \"Sales, Purchase\" is the custom outcomes with a comma in the name. (optional)
1600
+ outcomeNames2: "outcome_names[]_example",
1601
+ // string | Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. (optional)
1602
+ outcomeTimeRange: "outcome_time_range_example",
1603
+ // string | Optional Platform id. Refer device\'s platform ids for values. Example: outcome_platform=0 for iOS outcome_platform=7,8 for Safari and Firefox Default is data from all platforms if the parameter is omitted. (optional)
1604
+ outcomePlatforms: "outcome_platforms_example",
1605
+ // string | Optional Attribution type for the outcomes. The values can be direct or influenced or unattributed. Example: outcome_attribution=direct Default is total (returns direct+influenced+unattributed) if the parameter is omitted. (optional)
1606
+ outcomeAttribution: "outcome_attribution_example",
1607
+ };
1608
+
1609
+ apiInstance.getOutcomes(body).then((data:any) => {
1610
+ console.log('API called successfully. Returned data: ' + data);
1611
+ }).catch((error:any) => console.error(error));
1612
+ ```
1613
+
1614
+
1615
+ ### Parameters
1616
+
1617
+ Name | Type | Description | Notes
1618
+ ------------- | ------------- | ------------- | -------------
1619
+ **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys &amp; IDs. | defaults to undefined
864
1620
  **outcomeNames** | [**string**] | Required Comma-separated list of names and the value (sum/count) for the returned outcome data. Note: Clicks only support count aggregation. For out-of-the-box OneSignal outcomes such as click and session duration, please use the \&quot;os\&quot; prefix with two underscores. For other outcomes, please use the name specified by the user. Example:os__session_duration.count,os__click.count,CustomOutcomeName.sum | defaults to undefined
865
1621
  **outcomeNames2** | [**string**] | Optional If outcome names contain any commas, then please specify only one value at a time. Example: outcome_names[]&#x3D;os__click.count&amp;outcome_names[]&#x3D;Sales, Purchase.count where \&quot;Sales, Purchase\&quot; is the custom outcomes with a comma in the name. | (optional) defaults to undefined
866
1622
  **outcomeTimeRange** | [**string**] | Optional Time range for the returned data. The values can be 1h (for the last 1 hour data), 1d (for the last 1 day data), or 1mo (for the last 1 month data). Default is 1h if the parameter is omitted. | (optional) defaults to undefined
@@ -870,7 +1626,129 @@ Name | Type | Description | Notes
870
1626
 
871
1627
  ### Return type
872
1628
 
873
- **OutcomesData**
1629
+ **OutcomesData**
1630
+
1631
+ ### Authorization
1632
+
1633
+ [app_key](README.md#app_key)
1634
+
1635
+ ### HTTP request headers
1636
+
1637
+ - **Content-Type**: Not defined
1638
+ - **Accept**: application/json
1639
+
1640
+
1641
+ ### HTTP response details
1642
+ | Status code | Description | Response headers |
1643
+ |-------------|-------------|------------------|
1644
+ **200** | OK | - |
1645
+ **400** | Bad Request | - |
1646
+
1647
+ [[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)
1648
+
1649
+ # **getPlayer**
1650
+ > Player getPlayer()
1651
+
1652
+ View the details of an existing device in one of your OneSignal apps
1653
+
1654
+ ### Example
1655
+
1656
+
1657
+ ```typescript
1658
+ import { } from '';
1659
+ import * as fs from 'fs';
1660
+
1661
+ const configuration = .createConfiguration();
1662
+ const apiInstance = new .DefaultApi(configuration);
1663
+
1664
+ let body:.DefaultApiGetPlayerRequest = {
1665
+ // string | Your app_id for this device
1666
+ appId: "app_id_example",
1667
+ // string | Player\'s OneSignal ID
1668
+ playerId: "player_id_example",
1669
+ // string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional)
1670
+ emailAuthHash: "email_auth_hash_example",
1671
+ };
1672
+
1673
+ apiInstance.getPlayer(body).then((data:any) => {
1674
+ console.log('API called successfully. Returned data: ' + data);
1675
+ }).catch((error:any) => console.error(error));
1676
+ ```
1677
+
1678
+
1679
+ ### Parameters
1680
+
1681
+ Name | Type | Description | Notes
1682
+ ------------- | ------------- | ------------- | -------------
1683
+ **appId** | [**string**] | Your app_id for this device | defaults to undefined
1684
+ **playerId** | [**string**] | Player\&#39;s OneSignal ID | defaults to undefined
1685
+ **emailAuthHash** | [**string**] | Email - Only required if you have enabled Identity Verification and device_type is email (11). | (optional) defaults to undefined
1686
+
1687
+
1688
+ ### Return type
1689
+
1690
+ **Player**
1691
+
1692
+ ### Authorization
1693
+
1694
+ [app_key](README.md#app_key)
1695
+
1696
+ ### HTTP request headers
1697
+
1698
+ - **Content-Type**: Not defined
1699
+ - **Accept**: application/json
1700
+
1701
+
1702
+ ### HTTP response details
1703
+ | Status code | Description | Response headers |
1704
+ |-------------|-------------|------------------|
1705
+ **200** | OK | - |
1706
+ **400** | Bad Request | - |
1707
+
1708
+ [[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)
1709
+
1710
+ # **getPlayers**
1711
+ > PlayerSlice getPlayers()
1712
+
1713
+ View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant.
1714
+
1715
+ ### Example
1716
+
1717
+
1718
+ ```typescript
1719
+ import { } from '';
1720
+ import * as fs from 'fs';
1721
+
1722
+ const configuration = .createConfiguration();
1723
+ const apiInstance = new .DefaultApi(configuration);
1724
+
1725
+ let body:.DefaultApiGetPlayersRequest = {
1726
+ // string | The app ID that you want to view players from
1727
+ appId: "app_id_example",
1728
+ // number | How many devices to return. Max is 300. Default is 300 (optional)
1729
+ limit: 1,
1730
+ // number | Result offset. Default is 0. Results are sorted by id; (optional)
1731
+ offset: 1,
1732
+ };
1733
+
1734
+ apiInstance.getPlayers(body).then((data:any) => {
1735
+ console.log('API called successfully. Returned data: ' + data);
1736
+ }).catch((error:any) => console.error(error));
1737
+ ```
1738
+
1739
+
1740
+ ### Parameters
1741
+
1742
+ Name | Type | Description | Notes
1743
+ ------------- | ------------- | ------------- | -------------
1744
+ **appId** | [**string**] | The app ID that you want to view players from | defaults to undefined
1745
+ **limit** | [**number**] | How many devices to return. Max is 300. Default is 300 | (optional) defaults to undefined
1746
+ **offset** | [**number**] | Result offset. Default is 0. Results are sorted by id; | (optional) defaults to undefined
1747
+
1748
+
1749
+ ### Return type
1750
+
1751
+ **PlayerSlice**
874
1752
 
875
1753
  ### Authorization
876
1754
 
@@ -886,13 +1764,14 @@ Name | Type | Description | Notes
886
1764
  | Status code | Description | Response headers |
887
1765
  |-------------|-------------|------------------|
888
1766
  **200** | OK | - |
1767
+ **400** | Bad Request | - |
889
1768
 
890
1769
  [[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)
891
1770
 
892
- # **getPlayer**
893
- > Player getPlayer()
1771
+ # **identifyUserByAlias**
1772
+ > InlineResponse200 identifyUserByAlias(userIdentityRequestBody)
894
1773
 
895
- View the details of an existing device in one of your OneSignal apps
1774
+ Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
896
1775
 
897
1776
  ### Example
898
1777
 
@@ -904,16 +1783,20 @@ import * as fs from 'fs';
904
1783
  const configuration = .createConfiguration();
905
1784
  const apiInstance = new .DefaultApi(configuration);
906
1785
 
907
- let body:.DefaultApiGetPlayerRequest = {
908
- // string | Your app_id for this device
1786
+ let body:.DefaultApiIdentifyUserByAliasRequest = {
1787
+ // string
909
1788
  appId: "app_id_example",
910
- // string | Player\'s OneSignal ID
911
- playerId: "player_id_example",
912
- // string | Email - Only required if you have enabled Identity Verification and device_type is email (11). (optional)
913
- emailAuthHash: "email_auth_hash_example",
1789
+ // string
1790
+ aliasLabel: "alias_label_example",
1791
+ // string
1792
+ aliasId: "alias_id_example",
1793
+ // UserIdentityRequestBody
1794
+ userIdentityRequestBody: {
1795
+ identity: {},
1796
+ },
914
1797
  };
915
1798
 
916
- apiInstance.getPlayer(body).then((data:any) => {
1799
+ apiInstance.identifyUserByAlias(body).then((data:any) => {
917
1800
  console.log('API called successfully. Returned data: ' + data);
918
1801
  }).catch((error:any) => console.error(error));
919
1802
  ```
@@ -923,14 +1806,15 @@ apiInstance.getPlayer(body).then((data:any) => {
923
1806
 
924
1807
  Name | Type | Description | Notes
925
1808
  ------------- | ------------- | ------------- | -------------
926
- **appId** | [**string**] | Your app_id for this device | defaults to undefined
927
- **playerId** | [**string**] | Player\&#39;s OneSignal ID | defaults to undefined
928
- **emailAuthHash** | [**string**] | Email - Only required if you have enabled Identity Verification and device_type is email (11). | (optional) defaults to undefined
1809
+ **userIdentityRequestBody** | **UserIdentityRequestBody**| |
1810
+ **appId** | [**string**] | | defaults to undefined
1811
+ **aliasLabel** | [**string**] | | defaults to undefined
1812
+ **aliasId** | [**string**] | | defaults to undefined
929
1813
 
930
1814
 
931
1815
  ### Return type
932
1816
 
933
- **Player**
1817
+ **InlineResponse200**
934
1818
 
935
1819
  ### Authorization
936
1820
 
@@ -938,7 +1822,7 @@ Name | Type | Description | Notes
938
1822
 
939
1823
  ### HTTP request headers
940
1824
 
941
- - **Content-Type**: Not defined
1825
+ - **Content-Type**: application/json
942
1826
  - **Accept**: application/json
943
1827
 
944
1828
 
@@ -946,13 +1830,14 @@ Name | Type | Description | Notes
946
1830
  | Status code | Description | Response headers |
947
1831
  |-------------|-------------|------------------|
948
1832
  **200** | OK | - |
1833
+ **409** | Conflict | - |
949
1834
 
950
1835
  [[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)
951
1836
 
952
- # **getPlayers**
953
- > PlayerSlice getPlayers()
1837
+ # **identifyUserBySubscriptionId**
1838
+ > UserIdentityResponse identifyUserBySubscriptionId(userIdentityRequestBody)
954
1839
 
955
- View the details of multiple devices in one of your OneSignal apps Unavailable for Apps Over 80,000 Users For performance reasons, this method is not available for larger apps. Larger apps should use the CSV export API endpoint, which is much more performant.
1840
+ Upserts one or more Aliases for the User identified by :subscription_id.
956
1841
 
957
1842
  ### Example
958
1843
 
@@ -964,16 +1849,18 @@ import * as fs from 'fs';
964
1849
  const configuration = .createConfiguration();
965
1850
  const apiInstance = new .DefaultApi(configuration);
966
1851
 
967
- let body:.DefaultApiGetPlayersRequest = {
968
- // string | The app ID that you want to view players from
1852
+ let body:.DefaultApiIdentifyUserBySubscriptionIdRequest = {
1853
+ // string
969
1854
  appId: "app_id_example",
970
- // number | How many devices to return. Max is 300. Default is 300 (optional)
971
- limit: 1,
972
- // number | Result offset. Default is 0. Results are sorted by id; (optional)
973
- offset: 1,
1855
+ // string
1856
+ subscriptionId: "subscription_id_example",
1857
+ // UserIdentityRequestBody
1858
+ userIdentityRequestBody: {
1859
+ identity: {},
1860
+ },
974
1861
  };
975
1862
 
976
- apiInstance.getPlayers(body).then((data:any) => {
1863
+ apiInstance.identifyUserBySubscriptionId(body).then((data:any) => {
977
1864
  console.log('API called successfully. Returned data: ' + data);
978
1865
  }).catch((error:any) => console.error(error));
979
1866
  ```
@@ -983,14 +1870,14 @@ apiInstance.getPlayers(body).then((data:any) => {
983
1870
 
984
1871
  Name | Type | Description | Notes
985
1872
  ------------- | ------------- | ------------- | -------------
986
- **appId** | [**string**] | The app ID that you want to view players from | defaults to undefined
987
- **limit** | [**number**] | How many devices to return. Max is 300. Default is 300 | (optional) defaults to undefined
988
- **offset** | [**number**] | Result offset. Default is 0. Results are sorted by id; | (optional) defaults to undefined
1873
+ **userIdentityRequestBody** | **UserIdentityRequestBody**| |
1874
+ **appId** | [**string**] | | defaults to undefined
1875
+ **subscriptionId** | [**string**] | | defaults to undefined
989
1876
 
990
1877
 
991
1878
  ### Return type
992
1879
 
993
- **PlayerSlice**
1880
+ **UserIdentityResponse**
994
1881
 
995
1882
  ### Authorization
996
1883
 
@@ -998,7 +1885,70 @@ Name | Type | Description | Notes
998
1885
 
999
1886
  ### HTTP request headers
1000
1887
 
1001
- - **Content-Type**: Not defined
1888
+ - **Content-Type**: application/json
1889
+ - **Accept**: application/json
1890
+
1891
+
1892
+ ### HTTP response details
1893
+ | Status code | Description | Response headers |
1894
+ |-------------|-------------|------------------|
1895
+ **200** | OK | - |
1896
+ **409** | Conflict | - |
1897
+
1898
+ [[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)
1899
+
1900
+ # **transferSubscription**
1901
+ > UserIdentityResponse transferSubscription(transferSubscriptionRequestBody)
1902
+
1903
+ Transfers this Subscription to the User identified by the identity in the payload.
1904
+
1905
+ ### Example
1906
+
1907
+
1908
+ ```typescript
1909
+ import { } from '';
1910
+ import * as fs from 'fs';
1911
+
1912
+ const configuration = .createConfiguration();
1913
+ const apiInstance = new .DefaultApi(configuration);
1914
+
1915
+ let body:.DefaultApiTransferSubscriptionRequest = {
1916
+ // string
1917
+ appId: "app_id_example",
1918
+ // string
1919
+ subscriptionId: "subscription_id_example",
1920
+ // TransferSubscriptionRequestBody
1921
+ transferSubscriptionRequestBody: {
1922
+ identity: {},
1923
+ },
1924
+ };
1925
+
1926
+ apiInstance.transferSubscription(body).then((data:any) => {
1927
+ console.log('API called successfully. Returned data: ' + data);
1928
+ }).catch((error:any) => console.error(error));
1929
+ ```
1930
+
1931
+
1932
+ ### Parameters
1933
+
1934
+ Name | Type | Description | Notes
1935
+ ------------- | ------------- | ------------- | -------------
1936
+ **transferSubscriptionRequestBody** | **TransferSubscriptionRequestBody**| |
1937
+ **appId** | [**string**] | | defaults to undefined
1938
+ **subscriptionId** | [**string**] | | defaults to undefined
1939
+
1940
+
1941
+ ### Return type
1942
+
1943
+ **UserIdentityResponse**
1944
+
1945
+ ### Authorization
1946
+
1947
+ [app_key](README.md#app_key)
1948
+
1949
+ ### HTTP request headers
1950
+
1951
+ - **Content-Type**: application/json
1002
1952
  - **Accept**: application/json
1003
1953
 
1004
1954
 
@@ -1041,6 +1991,10 @@ let body:.DefaultApiUpdateAppRequest = {
1041
1991
  apns_p12_password: "apns_p12_password_example",
1042
1992
  safari_apns_p12: "safari_apns_p12_example",
1043
1993
  safari_apns_p12_password: "safari_apns_p12_password_example",
1994
+ apns_key_id: "apns_key_id_example",
1995
+ apns_team_id: "apns_team_id_example",
1996
+ apns_bundle_id: "apns_bundle_id_example",
1997
+ apns_p8: "apns_p8_example",
1044
1998
  safari_site_origin: "safari_site_origin_example",
1045
1999
  safari_icon_256_256: "safari_icon_256_256_example",
1046
2000
  site_name: "site_name_example",
@@ -1081,6 +2035,73 @@ Name | Type | Description | Notes
1081
2035
  | Status code | Description | Response headers |
1082
2036
  |-------------|-------------|------------------|
1083
2037
  **200** | OK | - |
2038
+ **400** | Bad Request | - |
2039
+
2040
+ [[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)
2041
+
2042
+ # **updateLiveActivity**
2043
+ > UpdateLiveActivitySuccessResponse updateLiveActivity(updateLiveActivityRequest)
2044
+
2045
+ Updates a specified live activity.
2046
+
2047
+ ### Example
2048
+
2049
+
2050
+ ```typescript
2051
+ import { } from '';
2052
+ import * as fs from 'fs';
2053
+
2054
+ const configuration = .createConfiguration();
2055
+ const apiInstance = new .DefaultApi(configuration);
2056
+
2057
+ let body:.DefaultApiUpdateLiveActivityRequest = {
2058
+ // string | The OneSignal App ID for your app. Available in Keys & IDs.
2059
+ appId: "app_id_example",
2060
+ // string | Live Activity record ID
2061
+ activityId: "activity_id_example",
2062
+ // UpdateLiveActivityRequest
2063
+ updateLiveActivityRequest: {
2064
+ name: "headings",
2065
+ event: "update",
2066
+ event_updates: {},
2067
+ dismiss_at: 3.14,
2068
+ },
2069
+ };
2070
+
2071
+ apiInstance.updateLiveActivity(body).then((data:any) => {
2072
+ console.log('API called successfully. Returned data: ' + data);
2073
+ }).catch((error:any) => console.error(error));
2074
+ ```
2075
+
2076
+
2077
+ ### Parameters
2078
+
2079
+ Name | Type | Description | Notes
2080
+ ------------- | ------------- | ------------- | -------------
2081
+ **updateLiveActivityRequest** | **UpdateLiveActivityRequest**| |
2082
+ **appId** | [**string**] | The OneSignal App ID for your app. Available in Keys &amp; IDs. | defaults to undefined
2083
+ **activityId** | [**string**] | Live Activity record ID | defaults to undefined
2084
+
2085
+
2086
+ ### Return type
2087
+
2088
+ **UpdateLiveActivitySuccessResponse**
2089
+
2090
+ ### Authorization
2091
+
2092
+ [app_key](README.md#app_key)
2093
+
2094
+ ### HTTP request headers
2095
+
2096
+ - **Content-Type**: application/json
2097
+ - **Accept**: application/json
2098
+
2099
+
2100
+ ### HTTP response details
2101
+ | Status code | Description | Response headers |
2102
+ |-------------|-------------|------------------|
2103
+ **200** | OK | - |
2104
+ **400** | Bad Request | - |
1084
2105
 
1085
2106
  [[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)
1086
2107
 
@@ -1126,7 +2147,7 @@ let body:.DefaultApiUpdatePlayerRequest = {
1126
2147
  last_active: 1,
1127
2148
  notification_types: 1,
1128
2149
  test_type: 1,
1129
- _long: 3.14,
2150
+ long: 3.14,
1130
2151
  lat: 3.14,
1131
2152
  country: "country_example",
1132
2153
  },
@@ -1164,6 +2185,7 @@ Name | Type | Description | Notes
1164
2185
  | Status code | Description | Response headers |
1165
2186
  |-------------|-------------|------------------|
1166
2187
  **200** | OK | - |
2188
+ **400** | Bad Request | - |
1167
2189
 
1168
2190
  [[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)
1169
2191
 
@@ -1229,4 +2251,183 @@ Name | Type | Description | Notes
1229
2251
 
1230
2252
  [[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)
1231
2253
 
2254
+ # **updateSubscription**
2255
+ > void updateSubscription(updateSubscriptionRequestBody)
2256
+
2257
+ Updates an existing Subscription’s properties.
2258
+
2259
+ ### Example
2260
+
2261
+
2262
+ ```typescript
2263
+ import { } from '';
2264
+ import * as fs from 'fs';
2265
+
2266
+ const configuration = .createConfiguration();
2267
+ const apiInstance = new .DefaultApi(configuration);
2268
+
2269
+ let body:.DefaultApiUpdateSubscriptionRequest = {
2270
+ // string
2271
+ appId: "app_id_example",
2272
+ // string
2273
+ subscriptionId: "subscription_id_example",
2274
+ // UpdateSubscriptionRequestBody
2275
+ updateSubscriptionRequestBody: {
2276
+ subscription: {
2277
+ id: "id_example",
2278
+ type: "iOSPush",
2279
+ token: "token_example",
2280
+ enabled: true,
2281
+ notification_types: 3.14,
2282
+ session_time: 3.14,
2283
+ session_count: 3.14,
2284
+ sdk: "sdk_example",
2285
+ device_model: "device_model_example",
2286
+ device_os: "device_os_example",
2287
+ rooted: true,
2288
+ test_type: 3.14,
2289
+ app_version: "app_version_example",
2290
+ net_type: 3.14,
2291
+ carrier: "carrier_example",
2292
+ web_auth: "web_auth_example",
2293
+ web_p256: "web_p256_example",
2294
+ },
2295
+ },
2296
+ };
2297
+
2298
+ apiInstance.updateSubscription(body).then((data:any) => {
2299
+ console.log('API called successfully. Returned data: ' + data);
2300
+ }).catch((error:any) => console.error(error));
2301
+ ```
2302
+
2303
+
2304
+ ### Parameters
2305
+
2306
+ Name | Type | Description | Notes
2307
+ ------------- | ------------- | ------------- | -------------
2308
+ **updateSubscriptionRequestBody** | **UpdateSubscriptionRequestBody**| |
2309
+ **appId** | [**string**] | | defaults to undefined
2310
+ **subscriptionId** | [**string**] | | defaults to undefined
2311
+
2312
+
2313
+ ### Return type
2314
+
2315
+ **void**
2316
+
2317
+ ### Authorization
2318
+
2319
+ [app_key](README.md#app_key)
2320
+
2321
+ ### HTTP request headers
2322
+
2323
+ - **Content-Type**: application/json
2324
+ - **Accept**: Not defined
2325
+
2326
+
2327
+ ### HTTP response details
2328
+ | Status code | Description | Response headers |
2329
+ |-------------|-------------|------------------|
2330
+ **202** | ACCEPTED | - |
2331
+
2332
+ [[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)
2333
+
2334
+ # **updateUser**
2335
+ > InlineResponse202 updateUser(updateUserRequest)
2336
+
2337
+ Updates an existing User’s properties.
2338
+
2339
+ ### Example
2340
+
2341
+
2342
+ ```typescript
2343
+ import { } from '';
2344
+ import * as fs from 'fs';
2345
+
2346
+ const configuration = .createConfiguration();
2347
+ const apiInstance = new .DefaultApi(configuration);
2348
+
2349
+ let body:.DefaultApiUpdateUserRequest = {
2350
+ // string
2351
+ appId: "app_id_example",
2352
+ // string
2353
+ aliasLabel: "alias_label_example",
2354
+ // string
2355
+ aliasId: "alias_id_example",
2356
+ // UpdateUserRequest
2357
+ updateUserRequest: {
2358
+ properties: {
2359
+ tags: {},
2360
+ language: "language_example",
2361
+ timezone_id: "timezone_id_example",
2362
+ lat: 3.14,
2363
+ long: 3.14,
2364
+ country: "country_example",
2365
+ first_active: 3.14,
2366
+ last_active: 3.14,
2367
+ amount_spent: 3.14,
2368
+ purchases: [
2369
+ {
2370
+ sku: "sku_example",
2371
+ amount: "amount_example",
2372
+ iso: "iso_example",
2373
+ },
2374
+ ],
2375
+ ip: "ip_example",
2376
+ },
2377
+ refresh_device_metadata: false,
2378
+ deltas: {
2379
+ session_time: 3.14,
2380
+ session_count: 3.14,
2381
+ amount_spent: 3.14,
2382
+ purchases: [
2383
+ {
2384
+ sku: "sku_example",
2385
+ amount: "amount_example",
2386
+ iso: "iso_example",
2387
+ },
2388
+ ],
2389
+ },
2390
+ },
2391
+ // string (optional)
2392
+ subscriptionId: "subscription_id_example",
2393
+ };
2394
+
2395
+ apiInstance.updateUser(body).then((data:any) => {
2396
+ console.log('API called successfully. Returned data: ' + data);
2397
+ }).catch((error:any) => console.error(error));
2398
+ ```
2399
+
2400
+
2401
+ ### Parameters
2402
+
2403
+ Name | Type | Description | Notes
2404
+ ------------- | ------------- | ------------- | -------------
2405
+ **updateUserRequest** | **UpdateUserRequest**| |
2406
+ **appId** | [**string**] | | defaults to undefined
2407
+ **aliasLabel** | [**string**] | | defaults to undefined
2408
+ **aliasId** | [**string**] | | defaults to undefined
2409
+ **subscriptionId** | [**string**] | | (optional) defaults to undefined
2410
+
2411
+
2412
+ ### Return type
2413
+
2414
+ **InlineResponse202**
2415
+
2416
+ ### Authorization
2417
+
2418
+ [app_key](README.md#app_key)
2419
+
2420
+ ### HTTP request headers
2421
+
2422
+ - **Content-Type**: application/json
2423
+ - **Accept**: application/json
2424
+
2425
+
2426
+ ### HTTP response details
2427
+ | Status code | Description | Response headers |
2428
+ |-------------|-------------|------------------|
2429
+ **202** | ACCEPTED | - |
2430
+
2431
+ [[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)
2432
+
1232
2433