@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
@@ -3,21 +3,23 @@ import * as models from '../models/all';
3
3
  import { Configuration} from '../configuration'
4
4
 
5
5
  import { App } from '../models/App';
6
+ import { BadRequestError } from '../models/BadRequestError';
6
7
  import { BasicNotification } from '../models/BasicNotification';
7
8
  import { BasicNotificationAllOf } from '../models/BasicNotificationAllOf';
8
9
  import { BasicNotificationAllOfAndroidBackgroundLayout } from '../models/BasicNotificationAllOfAndroidBackgroundLayout';
10
+ import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
9
11
  import { Button } from '../models/Button';
10
12
  import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
11
- import { CreateNotificationBadRequestResponse } from '../models/CreateNotificationBadRequestResponse';
12
13
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
13
14
  import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
14
- import { CreateSegmentBadRequestResponse } from '../models/CreateSegmentBadRequestResponse';
15
15
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
16
16
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
17
- import { DeletePlayerBadRequestResponse } from '../models/DeletePlayerBadRequestResponse';
17
+ import { CreateSubscriptionRequestBody } from '../models/CreateSubscriptionRequestBody';
18
+ import { CreateUserConflictResponse } from '../models/CreateUserConflictResponse';
19
+ import { CreateUserConflictResponseErrorsInner } from '../models/CreateUserConflictResponseErrorsInner';
20
+ import { CreateUserConflictResponseErrorsItemsMeta } from '../models/CreateUserConflictResponseErrorsItemsMeta';
18
21
  import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
19
22
  import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
20
- import { DeleteSegmentBadRequestResponse } from '../models/DeleteSegmentBadRequestResponse';
21
23
  import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
22
24
  import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
23
25
  import { DeliveryData } from '../models/DeliveryData';
@@ -26,11 +28,16 @@ import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResp
26
28
  import { Filter } from '../models/Filter';
27
29
  import { FilterExpressions } from '../models/FilterExpressions';
28
30
  import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
31
+ import { IdentifyUserConflictResponse } from '../models/IdentifyUserConflictResponse';
32
+ import { IdentifyUserConflictResponseErrorsInner } from '../models/IdentifyUserConflictResponseErrorsInner';
33
+ import { InlineResponse200 } from '../models/InlineResponse200';
34
+ import { InlineResponse2003 } from '../models/InlineResponse2003';
35
+ import { InlineResponse201 } from '../models/InlineResponse201';
36
+ import { InlineResponse202 } from '../models/InlineResponse202';
29
37
  import { InvalidIdentifierError } from '../models/InvalidIdentifierError';
30
38
  import { Notification } from '../models/Notification';
31
39
  import { Notification200Errors } from '../models/Notification200Errors';
32
40
  import { NotificationAllOf } from '../models/NotificationAllOf';
33
- import { NotificationHistoryBadRequestResponse } from '../models/NotificationHistoryBadRequestResponse';
34
41
  import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
35
42
  import { NotificationSlice } from '../models/NotificationSlice';
36
43
  import { NotificationTarget } from '../models/NotificationTarget';
@@ -44,14 +51,27 @@ import { PlatformDeliveryDataEmailAllOf } from '../models/PlatformDeliveryDataEm
44
51
  import { PlatformDeliveryDataSmsAllOf } from '../models/PlatformDeliveryDataSmsAllOf';
45
52
  import { Player } from '../models/Player';
46
53
  import { PlayerNotificationTarget } from '../models/PlayerNotificationTarget';
54
+ import { PlayerNotificationTargetIncludeAliases } from '../models/PlayerNotificationTargetIncludeAliases';
47
55
  import { PlayerSlice } from '../models/PlayerSlice';
56
+ import { PropertiesDeltas } from '../models/PropertiesDeltas';
57
+ import { PropertiesObject } from '../models/PropertiesObject';
48
58
  import { Purchase } from '../models/Purchase';
49
59
  import { Segment } from '../models/Segment';
50
60
  import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
51
61
  import { StringMap } from '../models/StringMap';
62
+ import { SubscriptionObject } from '../models/SubscriptionObject';
63
+ import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
64
+ import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
65
+ import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
52
66
  import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
53
67
  import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
54
68
  import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
69
+ import { UpdateSubscriptionRequestBody } from '../models/UpdateSubscriptionRequestBody';
70
+ import { UpdateUserRequest } from '../models/UpdateUserRequest';
71
+ import { User } from '../models/User';
72
+ import { UserIdentityRequestBody } from '../models/UserIdentityRequestBody';
73
+ import { UserIdentityResponse } from '../models/UserIdentityResponse';
74
+ import { UserSubscriptionOptions } from '../models/UserSubscriptionOptions';
55
75
  import { ObservableDefaultApi } from './ObservableAPI';
56
76
 
57
77
  import { DefaultApiRequestFactory, DefaultApiResponseProcessor} from "../apis/DefaultApi";
@@ -66,6 +86,18 @@ export class PromiseDefaultApi {
66
86
  this.api = new ObservableDefaultApi(configuration, requestFactory, responseProcessor);
67
87
  }
68
88
 
89
+ /**
90
+ * Starts a Live Activity
91
+ * Start Live Activity
92
+ * @param appId The OneSignal App ID for your app. Available in Keys & IDs.
93
+ * @param activityId Live Activity record ID
94
+ * @param beginLiveActivityRequest
95
+ */
96
+ public beginLiveActivity(appId: string, activityId: string, beginLiveActivityRequest: BeginLiveActivityRequest, _options?: Configuration): Promise<void> {
97
+ const result = this.api.beginLiveActivity(appId, activityId, beginLiveActivityRequest, _options);
98
+ return result.toPromise();
99
+ }
100
+
69
101
  /**
70
102
  * Used to stop a scheduled or currently outgoing notification
71
103
  * Stop a scheduled or currently outgoing notification
@@ -118,6 +150,40 @@ export class PromiseDefaultApi {
118
150
  return result.toPromise();
119
151
  }
120
152
 
153
+ /**
154
+ * Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
155
+ * @param appId
156
+ * @param aliasLabel
157
+ * @param aliasId
158
+ * @param createSubscriptionRequestBody
159
+ */
160
+ public createSubscription(appId: string, aliasLabel: string, aliasId: string, createSubscriptionRequestBody: CreateSubscriptionRequestBody, _options?: Configuration): Promise<InlineResponse201> {
161
+ const result = this.api.createSubscription(appId, aliasLabel, aliasId, createSubscriptionRequestBody, _options);
162
+ return result.toPromise();
163
+ }
164
+
165
+ /**
166
+ * 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.
167
+ * @param appId
168
+ * @param user
169
+ */
170
+ public createUser(appId: string, user: User, _options?: Configuration): Promise<User> {
171
+ const result = this.api.createUser(appId, user, _options);
172
+ return result.toPromise();
173
+ }
174
+
175
+ /**
176
+ * Deletes an alias by alias label
177
+ * @param appId
178
+ * @param aliasLabel
179
+ * @param aliasId
180
+ * @param aliasLabelToDelete
181
+ */
182
+ public deleteAlias(appId: string, aliasLabel: string, aliasId: string, aliasLabelToDelete: string, _options?: Configuration): Promise<InlineResponse200> {
183
+ const result = this.api.deleteAlias(appId, aliasLabel, aliasId, aliasLabelToDelete, _options);
184
+ return result.toPromise();
185
+ }
186
+
121
187
  /**
122
188
  * Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
123
189
  * Delete a user record
@@ -140,6 +206,39 @@ export class PromiseDefaultApi {
140
206
  return result.toPromise();
141
207
  }
142
208
 
209
+ /**
210
+ * Deletes the Subscription.
211
+ * @param appId
212
+ * @param subscriptionId
213
+ */
214
+ public deleteSubscription(appId: string, subscriptionId: string, _options?: Configuration): Promise<void> {
215
+ const result = this.api.deleteSubscription(appId, subscriptionId, _options);
216
+ return result.toPromise();
217
+ }
218
+
219
+ /**
220
+ * Removes the User identified by (:alias_label, :alias_id), and all Subscriptions and Aliases
221
+ * @param appId
222
+ * @param aliasLabel
223
+ * @param aliasId
224
+ */
225
+ public deleteUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<void> {
226
+ const result = this.api.deleteUser(appId, aliasLabel, aliasId, _options);
227
+ return result.toPromise();
228
+ }
229
+
230
+ /**
231
+ * Stops a Live Activity
232
+ * Stop Live Activity
233
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
234
+ * @param activityId Live Activity record ID
235
+ * @param subscriptionId Subscription ID
236
+ */
237
+ public endLiveActivity(appId: string, activityId: string, subscriptionId: string, _options?: Configuration): Promise<void> {
238
+ const result = this.api.endLiveActivity(appId, activityId, subscriptionId, _options);
239
+ return result.toPromise();
240
+ }
241
+
143
242
  /**
144
243
  * 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. |
145
244
  * CSV export
@@ -151,6 +250,38 @@ export class PromiseDefaultApi {
151
250
  return result.toPromise();
152
251
  }
153
252
 
253
+ /**
254
+ * Lists all Aliases for the User identified by :subscription_id.
255
+ * @param appId
256
+ * @param subscriptionId
257
+ */
258
+ public fetchAliases(appId: string, subscriptionId: string, _options?: Configuration): Promise<UserIdentityResponse> {
259
+ const result = this.api.fetchAliases(appId, subscriptionId, _options);
260
+ return result.toPromise();
261
+ }
262
+
263
+ /**
264
+ * Returns the User’s properties, Aliases, and Subscriptions.
265
+ * @param appId
266
+ * @param aliasLabel
267
+ * @param aliasId
268
+ */
269
+ public fetchUser(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<User> {
270
+ const result = this.api.fetchUser(appId, aliasLabel, aliasId, _options);
271
+ return result.toPromise();
272
+ }
273
+
274
+ /**
275
+ * Lists all Aliases for the User identified by (:alias_label, :alias_id).
276
+ * @param appId
277
+ * @param aliasLabel
278
+ * @param aliasId
279
+ */
280
+ public fetchUserIdentity(appId: string, aliasLabel: string, aliasId: string, _options?: Configuration): Promise<InlineResponse200> {
281
+ const result = this.api.fetchUserIdentity(appId, aliasLabel, aliasId, _options);
282
+ return result.toPromise();
283
+ }
284
+
154
285
  /**
155
286
  * View the details of a single OneSignal app
156
287
  * View an app
@@ -170,6 +301,16 @@ export class PromiseDefaultApi {
170
301
  return result.toPromise();
171
302
  }
172
303
 
304
+ /**
305
+ * Manifest of In-App Messages the Subscription is eligible to display by the SDK.
306
+ * @param appId
307
+ * @param subscriptionId
308
+ */
309
+ public getEligibleIams(appId: string, subscriptionId: string, _options?: Configuration): Promise<InlineResponse2003> {
310
+ const result = this.api.getEligibleIams(appId, subscriptionId, _options);
311
+ return result.toPromise();
312
+ }
313
+
173
314
  /**
174
315
  * View the details of a single notification and outcomes associated with it
175
316
  * View notification
@@ -244,6 +385,40 @@ export class PromiseDefaultApi {
244
385
  return result.toPromise();
245
386
  }
246
387
 
388
+ /**
389
+ * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
390
+ * @param appId
391
+ * @param aliasLabel
392
+ * @param aliasId
393
+ * @param userIdentityRequestBody
394
+ */
395
+ public identifyUserByAlias(appId: string, aliasLabel: string, aliasId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<InlineResponse200> {
396
+ const result = this.api.identifyUserByAlias(appId, aliasLabel, aliasId, userIdentityRequestBody, _options);
397
+ return result.toPromise();
398
+ }
399
+
400
+ /**
401
+ * Upserts one or more Aliases for the User identified by :subscription_id.
402
+ * @param appId
403
+ * @param subscriptionId
404
+ * @param userIdentityRequestBody
405
+ */
406
+ public identifyUserBySubscriptionId(appId: string, subscriptionId: string, userIdentityRequestBody: UserIdentityRequestBody, _options?: Configuration): Promise<UserIdentityResponse> {
407
+ const result = this.api.identifyUserBySubscriptionId(appId, subscriptionId, userIdentityRequestBody, _options);
408
+ return result.toPromise();
409
+ }
410
+
411
+ /**
412
+ * Transfers this Subscription to the User identified by the identity in the payload.
413
+ * @param appId
414
+ * @param subscriptionId
415
+ * @param transferSubscriptionRequestBody
416
+ */
417
+ public transferSubscription(appId: string, subscriptionId: string, transferSubscriptionRequestBody: TransferSubscriptionRequestBody, _options?: Configuration): Promise<UserIdentityResponse> {
418
+ const result = this.api.transferSubscription(appId, subscriptionId, transferSubscriptionRequestBody, _options);
419
+ return result.toPromise();
420
+ }
421
+
247
422
  /**
248
423
  * Updates the name or configuration settings of an existing OneSignal app
249
424
  * Update an app
@@ -255,6 +430,18 @@ export class PromiseDefaultApi {
255
430
  return result.toPromise();
256
431
  }
257
432
 
433
+ /**
434
+ * Updates a specified live activity.
435
+ * Update a Live Activity via Push
436
+ * @param appId The OneSignal App ID for your app. Available in Keys &amp; IDs.
437
+ * @param activityId Live Activity record ID
438
+ * @param updateLiveActivityRequest
439
+ */
440
+ public updateLiveActivity(appId: string, activityId: string, updateLiveActivityRequest: UpdateLiveActivityRequest, _options?: Configuration): Promise<UpdateLiveActivitySuccessResponse> {
441
+ const result = this.api.updateLiveActivity(appId, activityId, updateLiveActivityRequest, _options);
442
+ return result.toPromise();
443
+ }
444
+
258
445
  /**
259
446
  * Update an existing device in one of your OneSignal apps
260
447
  * Edit device
@@ -278,6 +465,30 @@ export class PromiseDefaultApi {
278
465
  return result.toPromise();
279
466
  }
280
467
 
468
+ /**
469
+ * Updates an existing Subscription’s properties.
470
+ * @param appId
471
+ * @param subscriptionId
472
+ * @param updateSubscriptionRequestBody
473
+ */
474
+ public updateSubscription(appId: string, subscriptionId: string, updateSubscriptionRequestBody: UpdateSubscriptionRequestBody, _options?: Configuration): Promise<void> {
475
+ const result = this.api.updateSubscription(appId, subscriptionId, updateSubscriptionRequestBody, _options);
476
+ return result.toPromise();
477
+ }
478
+
479
+ /**
480
+ * Updates an existing User’s properties.
481
+ * @param appId
482
+ * @param aliasLabel
483
+ * @param aliasId
484
+ * @param updateUserRequest
485
+ * @param subscriptionId
486
+ */
487
+ public updateUser(appId: string, aliasLabel: string, aliasId: string, updateUserRequest: UpdateUserRequest, subscriptionId?: string, _options?: Configuration): Promise<InlineResponse202> {
488
+ const result = this.api.updateUser(appId, aliasLabel, aliasId, updateUserRequest, subscriptionId, _options);
489
+ return result.toPromise();
490
+ }
491
+
281
492
 
282
493
  }
283
494