@onesignal/node-onesignal 2.0.1-beta2 → 5.0.0-alpha-01

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 (268) hide show
  1. package/DefaultApi.md +401 -778
  2. package/apis/DefaultApi.ts +682 -1216
  3. package/auth/auth.ts +14 -14
  4. package/configuration.ts +6 -6
  5. package/dist/apis/DefaultApi.d.ts +36 -63
  6. package/dist/apis/DefaultApi.js +653 -1174
  7. package/dist/apis/DefaultApi.js.map +1 -1
  8. package/dist/auth/auth.d.ts +6 -6
  9. package/dist/auth/auth.js +19 -19
  10. package/dist/auth/auth.js.map +1 -1
  11. package/dist/configuration.d.ts +2 -2
  12. package/dist/configuration.js +4 -4
  13. package/dist/configuration.js.map +1 -1
  14. package/dist/models/BasicNotification.d.ts +14 -12
  15. package/dist/models/BasicNotification.js +20 -20
  16. package/dist/models/BasicNotification.js.map +1 -1
  17. package/dist/models/BasicNotificationAllOf.d.ts +10 -8
  18. package/dist/models/BasicNotificationAllOf.js +17 -11
  19. package/dist/models/BasicNotificationAllOf.js.map +1 -1
  20. package/dist/models/CreateNotificationSuccessResponse.d.ts +1 -3
  21. package/dist/models/CreateNotificationSuccessResponse.js +1 -7
  22. package/dist/models/CreateNotificationSuccessResponse.js.map +1 -1
  23. package/dist/models/{ExportPlayersRequestBody.d.ts → ExportSubscriptionsRequestBody.d.ts} +1 -1
  24. package/dist/models/ExportSubscriptionsRequestBody.js +34 -0
  25. package/dist/models/ExportSubscriptionsRequestBody.js.map +1 -0
  26. package/dist/models/{ExportPlayersSuccessResponse.d.ts → ExportSubscriptionsSuccessResponse.d.ts} +1 -1
  27. package/dist/models/ExportSubscriptionsSuccessResponse.js +22 -0
  28. package/dist/models/ExportSubscriptionsSuccessResponse.js.map +1 -0
  29. package/dist/models/Filter.d.ts +6 -2
  30. package/dist/models/Filter.js +24 -0
  31. package/dist/models/Filter.js.map +1 -1
  32. package/dist/models/FilterExpression.d.ts +27 -0
  33. package/dist/models/FilterExpression.js +70 -0
  34. package/dist/models/FilterExpression.js.map +1 -0
  35. package/dist/models/GenericError.d.ts +3 -2
  36. package/dist/models/GenericError.js +13 -1
  37. package/dist/models/GenericError.js.map +1 -1
  38. package/dist/models/{DeletePlayerSuccessResponse.d.ts → GenericSuccessBoolResponse.d.ts} +1 -1
  39. package/dist/models/GenericSuccessBoolResponse.js +22 -0
  40. package/dist/models/GenericSuccessBoolResponse.js.map +1 -0
  41. package/dist/models/{GetNotificationRequestBody.d.ts → GetNotificationHistoryRequestBody.d.ts} +3 -3
  42. package/dist/models/GetNotificationHistoryRequestBody.js +34 -0
  43. package/dist/models/GetNotificationHistoryRequestBody.js.map +1 -0
  44. package/dist/models/{PlayerSlice.d.ts → GetSegmentsSuccessResponse.d.ts} +3 -3
  45. package/dist/models/GetSegmentsSuccessResponse.js +40 -0
  46. package/dist/models/GetSegmentsSuccessResponse.js.map +1 -0
  47. package/dist/models/InvalidIdentifierError.d.ts +1 -1
  48. package/dist/models/InvalidIdentifierError.js +2 -2
  49. package/dist/models/InvalidIdentifierError.js.map +1 -1
  50. package/dist/models/{StringMap.d.ts → LanguageStringMap.d.ts} +1 -1
  51. package/dist/models/{StringMap.js → LanguageStringMap.js} +10 -10
  52. package/dist/models/LanguageStringMap.js.map +1 -0
  53. package/dist/models/Notification.d.ts +14 -12
  54. package/dist/models/Notification.js +20 -20
  55. package/dist/models/Notification.js.map +1 -1
  56. package/dist/models/NotificationTarget.d.ts +4 -4
  57. package/dist/models/NotificationTarget.js +3 -9
  58. package/dist/models/NotificationTarget.js.map +1 -1
  59. package/dist/models/NotificationWithMeta.d.ts +14 -12
  60. package/dist/models/NotificationWithMeta.js +20 -20
  61. package/dist/models/NotificationWithMeta.js.map +1 -1
  62. package/dist/models/ObjectSerializer.d.ts +15 -32
  63. package/dist/models/ObjectSerializer.js +50 -102
  64. package/dist/models/ObjectSerializer.js.map +1 -1
  65. package/dist/models/{InlineResponse202.d.ts → PropertiesBody.d.ts} +1 -1
  66. package/dist/models/PropertiesBody.js +22 -0
  67. package/dist/models/PropertiesBody.js.map +1 -0
  68. package/dist/models/{DeleteSegmentNotFoundResponse.d.ts → RateLimitError.d.ts} +3 -2
  69. package/dist/models/RateLimitError.js +28 -0
  70. package/dist/models/RateLimitError.js.map +1 -0
  71. package/dist/models/Segment.d.ts +2 -2
  72. package/dist/models/Segment.js +1 -1
  73. package/dist/models/Segment.js.map +1 -1
  74. package/dist/models/{CreateSubscriptionRequestBody.d.ts → SegmentData.d.ts} +8 -4
  75. package/dist/models/SegmentData.js +58 -0
  76. package/dist/models/SegmentData.js.map +1 -0
  77. package/dist/models/{SubscriptionObject.d.ts → Subscription.d.ts} +3 -3
  78. package/dist/models/{SubscriptionObject.js → Subscription.js} +11 -11
  79. package/dist/models/Subscription.js.map +1 -0
  80. package/dist/models/{CreatePlayerSuccessResponse.d.ts → SubscriptionBody.d.ts} +3 -3
  81. package/dist/models/SubscriptionBody.js +22 -0
  82. package/dist/models/SubscriptionBody.js.map +1 -0
  83. package/dist/models/{PlayerNotificationTarget.d.ts → SubscriptionNotificationTarget.d.ts} +7 -7
  84. package/dist/models/{PlayerNotificationTarget.js → SubscriptionNotificationTarget.js} +14 -20
  85. package/dist/models/SubscriptionNotificationTarget.js.map +1 -0
  86. package/dist/models/TransferSubscriptionRequestBody.d.ts +1 -1
  87. package/dist/models/TransferSubscriptionRequestBody.js +1 -1
  88. package/dist/models/TransferSubscriptionRequestBody.js.map +1 -1
  89. package/dist/models/UpdateLiveActivityRequest.d.ts +8 -3
  90. package/dist/models/UpdateLiveActivityRequest.js +33 -3
  91. package/dist/models/UpdateLiveActivityRequest.js.map +1 -1
  92. package/dist/models/UpdateLiveActivitySuccessResponse.d.ts +1 -3
  93. package/dist/models/UpdateLiveActivitySuccessResponse.js +2 -8
  94. package/dist/models/UpdateLiveActivitySuccessResponse.js.map +1 -1
  95. package/dist/models/User.d.ts +3 -5
  96. package/dist/models/User.js +2 -8
  97. package/dist/models/User.js.map +1 -1
  98. package/dist/models/{InlineResponse200.d.ts → UserIdentityBody.d.ts} +2 -2
  99. package/dist/models/UserIdentityBody.js +22 -0
  100. package/dist/models/UserIdentityBody.js.map +1 -0
  101. package/dist/models/{BeginLiveActivityRequest.d.ts → WebButton.d.ts} +5 -3
  102. package/dist/models/WebButton.js +40 -0
  103. package/dist/models/WebButton.js.map +1 -0
  104. package/dist/models/all.d.ts +15 -32
  105. package/dist/models/all.js +15 -32
  106. package/dist/models/all.js.map +1 -1
  107. package/dist/servers.js +1 -1
  108. package/dist/servers.js.map +1 -1
  109. package/dist/types/ObjectParamAPI.d.ts +52 -102
  110. package/dist/types/ObjectParamAPI.js +26 -47
  111. package/dist/types/ObjectParamAPI.js.map +1 -1
  112. package/dist/types/ObservableAPI.d.ts +25 -45
  113. package/dist/types/ObservableAPI.js +82 -250
  114. package/dist/types/ObservableAPI.js.map +1 -1
  115. package/dist/types/PromiseAPI.d.ts +25 -45
  116. package/dist/types/PromiseAPI.js +32 -60
  117. package/dist/types/PromiseAPI.js.map +1 -1
  118. package/models/App.ts +1 -1
  119. package/models/BasicNotification.ts +49 -46
  120. package/models/BasicNotificationAllOf.ts +34 -23
  121. package/models/BasicNotificationAllOfAndroidBackgroundLayout.ts +1 -1
  122. package/models/Button.ts +1 -1
  123. package/models/CreateNotificationSuccessResponse.ts +5 -13
  124. package/models/CreateSegmentConflictResponse.ts +1 -1
  125. package/models/CreateSegmentSuccessResponse.ts +1 -1
  126. package/models/CreateUserConflictResponse.ts +1 -1
  127. package/models/CreateUserConflictResponseErrorsInner.ts +1 -1
  128. package/models/CreateUserConflictResponseErrorsItemsMeta.ts +1 -1
  129. package/models/DeliveryData.ts +1 -1
  130. package/models/ExportEventsSuccessResponse.ts +1 -1
  131. package/models/{ExportPlayersRequestBody.ts → ExportSubscriptionsRequestBody.ts} +3 -3
  132. package/models/{ExportPlayersSuccessResponse.ts → ExportSubscriptionsSuccessResponse.ts} +3 -3
  133. package/models/Filter.ts +45 -5
  134. package/models/FilterExpression.ts +120 -0
  135. package/models/GenericError.ts +17 -4
  136. package/models/{DeletePlayerSuccessResponse.ts → GenericSuccessBoolResponse.ts} +3 -3
  137. package/models/{GetNotificationRequestBody.ts → GetNotificationHistoryRequestBody.ts} +6 -6
  138. package/models/{PlayerSlice.ts → GetSegmentsSuccessResponse.ts} +20 -8
  139. package/models/InvalidIdentifierError.ts +6 -6
  140. package/models/{StringMap.ts → LanguageStringMap.ts} +3 -3
  141. package/models/Notification.ts +49 -46
  142. package/models/NotificationAllOf.ts +1 -1
  143. package/models/NotificationHistorySuccessResponse.ts +1 -1
  144. package/models/NotificationSlice.ts +1 -1
  145. package/models/NotificationTarget.ts +17 -25
  146. package/models/NotificationWithMeta.ts +49 -46
  147. package/models/NotificationWithMetaAllOf.ts +1 -1
  148. package/models/ObjectSerializer.ts +57 -109
  149. package/models/Operator.ts +1 -1
  150. package/models/OutcomeData.ts +1 -1
  151. package/models/OutcomesData.ts +1 -1
  152. package/models/PlatformDeliveryData.ts +1 -1
  153. package/models/PlatformDeliveryDataEmailAllOf.ts +1 -1
  154. package/models/PlatformDeliveryDataSmsAllOf.ts +1 -1
  155. package/models/{InlineResponse202.ts → PropertiesBody.ts} +3 -3
  156. package/models/PropertiesDeltas.ts +1 -1
  157. package/models/PropertiesObject.ts +1 -1
  158. package/models/Purchase.ts +1 -1
  159. package/models/{CreatePlayerSuccessResponse.ts → RateLimitError.ts} +10 -10
  160. package/models/Segment.ts +4 -4
  161. package/models/SegmentData.ts +94 -0
  162. package/models/SegmentNotificationTarget.ts +1 -1
  163. package/models/{SubscriptionObject.ts → Subscription.ts} +6 -6
  164. package/models/{InlineResponse201.ts → SubscriptionBody.ts} +6 -6
  165. package/models/{PlayerNotificationTarget.ts → SubscriptionNotificationTarget.ts} +21 -29
  166. package/models/TransferSubscriptionRequestBody.ts +3 -3
  167. package/models/UpdateLiveActivityRequest.ts +56 -9
  168. package/models/UpdateLiveActivitySuccessResponse.ts +4 -12
  169. package/models/UpdateUserRequest.ts +1 -1
  170. package/models/User.ts +6 -14
  171. package/models/{InlineResponse200.ts → UserIdentityBody.ts} +5 -5
  172. package/models/{BeginLiveActivityRequest.ts → WebButton.ts} +23 -9
  173. package/models/all.ts +15 -32
  174. package/package.json +2 -2
  175. package/servers.ts +1 -1
  176. package/types/ObjectParamAPI.ts +161 -357
  177. package/types/ObservableAPI.ts +108 -301
  178. package/types/PromiseAPI.ts +89 -184
  179. package/dist/models/BeginLiveActivityRequest.js +0 -28
  180. package/dist/models/BeginLiveActivityRequest.js.map +0 -1
  181. package/dist/models/CancelNotificationSuccessResponse.d.ts +0 -17
  182. package/dist/models/CancelNotificationSuccessResponse.js +0 -22
  183. package/dist/models/CancelNotificationSuccessResponse.js.map +0 -1
  184. package/dist/models/CreatePlayerSuccessResponse.js +0 -28
  185. package/dist/models/CreatePlayerSuccessResponse.js.map +0 -1
  186. package/dist/models/CreateSubscriptionRequestBody.js +0 -28
  187. package/dist/models/CreateSubscriptionRequestBody.js.map +0 -1
  188. package/dist/models/DeletePlayerNotFoundResponse.d.ts +0 -17
  189. package/dist/models/DeletePlayerNotFoundResponse.js +0 -22
  190. package/dist/models/DeletePlayerNotFoundResponse.js.map +0 -1
  191. package/dist/models/DeletePlayerSuccessResponse.js +0 -22
  192. package/dist/models/DeletePlayerSuccessResponse.js.map +0 -1
  193. package/dist/models/DeleteSegmentNotFoundResponse.js +0 -22
  194. package/dist/models/DeleteSegmentNotFoundResponse.js.map +0 -1
  195. package/dist/models/DeleteSegmentSuccessResponse.d.ts +0 -17
  196. package/dist/models/DeleteSegmentSuccessResponse.js +0 -22
  197. package/dist/models/DeleteSegmentSuccessResponse.js.map +0 -1
  198. package/dist/models/ExportPlayersRequestBody.js +0 -34
  199. package/dist/models/ExportPlayersRequestBody.js.map +0 -1
  200. package/dist/models/ExportPlayersSuccessResponse.js +0 -22
  201. package/dist/models/ExportPlayersSuccessResponse.js.map +0 -1
  202. package/dist/models/FilterExpressions.d.ts +0 -23
  203. package/dist/models/FilterExpressions.js +0 -46
  204. package/dist/models/FilterExpressions.js.map +0 -1
  205. package/dist/models/GetNotificationRequestBody.js +0 -34
  206. package/dist/models/GetNotificationRequestBody.js.map +0 -1
  207. package/dist/models/InlineResponse200.js +0 -22
  208. package/dist/models/InlineResponse200.js.map +0 -1
  209. package/dist/models/InlineResponse2003.d.ts +0 -17
  210. package/dist/models/InlineResponse2003.js +0 -22
  211. package/dist/models/InlineResponse2003.js.map +0 -1
  212. package/dist/models/InlineResponse201.d.ts +0 -18
  213. package/dist/models/InlineResponse201.js +0 -22
  214. package/dist/models/InlineResponse201.js.map +0 -1
  215. package/dist/models/InlineResponse202.js +0 -22
  216. package/dist/models/InlineResponse202.js.map +0 -1
  217. package/dist/models/Notification200Errors.d.ts +0 -18
  218. package/dist/models/Notification200Errors.js +0 -28
  219. package/dist/models/Notification200Errors.js.map +0 -1
  220. package/dist/models/Player.d.ts +0 -43
  221. package/dist/models/Player.js +0 -178
  222. package/dist/models/Player.js.map +0 -1
  223. package/dist/models/PlayerNotificationTarget.js.map +0 -1
  224. package/dist/models/PlayerNotificationTargetIncludeAliases.d.ts +0 -17
  225. package/dist/models/PlayerNotificationTargetIncludeAliases.js +0 -22
  226. package/dist/models/PlayerNotificationTargetIncludeAliases.js.map +0 -1
  227. package/dist/models/PlayerSlice.js +0 -40
  228. package/dist/models/PlayerSlice.js.map +0 -1
  229. package/dist/models/StringMap.js.map +0 -1
  230. package/dist/models/SubscriptionObject.js.map +0 -1
  231. package/dist/models/UpdatePlayerSuccessResponse.d.ts +0 -17
  232. package/dist/models/UpdatePlayerSuccessResponse.js +0 -22
  233. package/dist/models/UpdatePlayerSuccessResponse.js.map +0 -1
  234. package/dist/models/UpdatePlayerTagsRequestBody.d.ts +0 -17
  235. package/dist/models/UpdatePlayerTagsRequestBody.js +0 -22
  236. package/dist/models/UpdatePlayerTagsRequestBody.js.map +0 -1
  237. package/dist/models/UpdatePlayerTagsSuccessResponse.d.ts +0 -17
  238. package/dist/models/UpdatePlayerTagsSuccessResponse.js +0 -22
  239. package/dist/models/UpdatePlayerTagsSuccessResponse.js.map +0 -1
  240. package/dist/models/UpdateSubscriptionRequestBody.d.ts +0 -18
  241. package/dist/models/UpdateSubscriptionRequestBody.js +0 -22
  242. package/dist/models/UpdateSubscriptionRequestBody.js.map +0 -1
  243. package/dist/models/UserIdentityRequestBody.d.ts +0 -19
  244. package/dist/models/UserIdentityRequestBody.js +0 -22
  245. package/dist/models/UserIdentityRequestBody.js.map +0 -1
  246. package/dist/models/UserIdentityResponse.d.ts +0 -19
  247. package/dist/models/UserIdentityResponse.js +0 -22
  248. package/dist/models/UserIdentityResponse.js.map +0 -1
  249. package/dist/models/UserSubscriptionOptions.d.ts +0 -17
  250. package/dist/models/UserSubscriptionOptions.js +0 -22
  251. package/dist/models/UserSubscriptionOptions.js.map +0 -1
  252. package/models/CancelNotificationSuccessResponse.ts +0 -31
  253. package/models/CreateSubscriptionRequestBody.ts +0 -39
  254. package/models/DeletePlayerNotFoundResponse.ts +0 -31
  255. package/models/DeleteSegmentNotFoundResponse.ts +0 -31
  256. package/models/DeleteSegmentSuccessResponse.ts +0 -31
  257. package/models/FilterExpressions.ts +0 -80
  258. package/models/InlineResponse2003.ts +0 -31
  259. package/models/Notification200Errors.ts +0 -45
  260. package/models/Player.ts +0 -291
  261. package/models/PlayerNotificationTargetIncludeAliases.ts +0 -31
  262. package/models/UpdatePlayerSuccessResponse.ts +0 -31
  263. package/models/UpdatePlayerTagsRequestBody.ts +0 -34
  264. package/models/UpdatePlayerTagsSuccessResponse.ts +0 -31
  265. package/models/UpdateSubscriptionRequestBody.ts +0 -32
  266. package/models/UserIdentityRequestBody.ts +0 -31
  267. package/models/UserIdentityResponse.ts +0 -31
  268. package/models/UserSubscriptionOptions.ts +0 -31
@@ -6,37 +6,26 @@ import { App } from '../models/App';
6
6
  import { BasicNotification } from '../models/BasicNotification';
7
7
  import { BasicNotificationAllOf } from '../models/BasicNotificationAllOf';
8
8
  import { BasicNotificationAllOfAndroidBackgroundLayout } from '../models/BasicNotificationAllOfAndroidBackgroundLayout';
9
- import { BeginLiveActivityRequest } from '../models/BeginLiveActivityRequest';
10
9
  import { Button } from '../models/Button';
11
- import { CancelNotificationSuccessResponse } from '../models/CancelNotificationSuccessResponse';
12
10
  import { CreateNotificationSuccessResponse } from '../models/CreateNotificationSuccessResponse';
13
- import { CreatePlayerSuccessResponse } from '../models/CreatePlayerSuccessResponse';
14
11
  import { CreateSegmentConflictResponse } from '../models/CreateSegmentConflictResponse';
15
12
  import { CreateSegmentSuccessResponse } from '../models/CreateSegmentSuccessResponse';
16
- import { CreateSubscriptionRequestBody } from '../models/CreateSubscriptionRequestBody';
17
13
  import { CreateUserConflictResponse } from '../models/CreateUserConflictResponse';
18
14
  import { CreateUserConflictResponseErrorsInner } from '../models/CreateUserConflictResponseErrorsInner';
19
15
  import { CreateUserConflictResponseErrorsItemsMeta } from '../models/CreateUserConflictResponseErrorsItemsMeta';
20
- import { DeletePlayerNotFoundResponse } from '../models/DeletePlayerNotFoundResponse';
21
- import { DeletePlayerSuccessResponse } from '../models/DeletePlayerSuccessResponse';
22
- import { DeleteSegmentNotFoundResponse } from '../models/DeleteSegmentNotFoundResponse';
23
- import { DeleteSegmentSuccessResponse } from '../models/DeleteSegmentSuccessResponse';
24
16
  import { DeliveryData } from '../models/DeliveryData';
25
17
  import { ExportEventsSuccessResponse } from '../models/ExportEventsSuccessResponse';
26
- import { ExportPlayersRequestBody } from '../models/ExportPlayersRequestBody';
27
- import { ExportPlayersSuccessResponse } from '../models/ExportPlayersSuccessResponse';
18
+ import { ExportSubscriptionsRequestBody } from '../models/ExportSubscriptionsRequestBody';
19
+ import { ExportSubscriptionsSuccessResponse } from '../models/ExportSubscriptionsSuccessResponse';
28
20
  import { Filter } from '../models/Filter';
29
- import { FilterExpressions } from '../models/FilterExpressions';
21
+ import { FilterExpression } from '../models/FilterExpression';
30
22
  import { GenericError } from '../models/GenericError';
31
- import { GenericErrorErrorsInner } from '../models/GenericErrorErrorsInner';
32
- import { GetNotificationRequestBody } from '../models/GetNotificationRequestBody';
33
- import { InlineResponse200 } from '../models/InlineResponse200';
34
- import { InlineResponse2003 } from '../models/InlineResponse2003';
35
- import { InlineResponse201 } from '../models/InlineResponse201';
36
- import { InlineResponse202 } from '../models/InlineResponse202';
23
+ import { GenericSuccessBoolResponse } from '../models/GenericSuccessBoolResponse';
24
+ import { GetNotificationHistoryRequestBody } from '../models/GetNotificationHistoryRequestBody';
25
+ import { GetSegmentsSuccessResponse } from '../models/GetSegmentsSuccessResponse';
37
26
  import { InvalidIdentifierError } from '../models/InvalidIdentifierError';
27
+ import { LanguageStringMap } from '../models/LanguageStringMap';
38
28
  import { Notification } from '../models/Notification';
39
- import { Notification200Errors } from '../models/Notification200Errors';
40
29
  import { NotificationAllOf } from '../models/NotificationAllOf';
41
30
  import { NotificationHistorySuccessResponse } from '../models/NotificationHistorySuccessResponse';
42
31
  import { NotificationSlice } from '../models/NotificationSlice';
@@ -49,68 +38,89 @@ import { OutcomesData } from '../models/OutcomesData';
49
38
  import { PlatformDeliveryData } from '../models/PlatformDeliveryData';
50
39
  import { PlatformDeliveryDataEmailAllOf } from '../models/PlatformDeliveryDataEmailAllOf';
51
40
  import { PlatformDeliveryDataSmsAllOf } from '../models/PlatformDeliveryDataSmsAllOf';
52
- import { Player } from '../models/Player';
53
- import { PlayerNotificationTarget } from '../models/PlayerNotificationTarget';
54
- import { PlayerNotificationTargetIncludeAliases } from '../models/PlayerNotificationTargetIncludeAliases';
55
- import { PlayerSlice } from '../models/PlayerSlice';
41
+ import { PropertiesBody } from '../models/PropertiesBody';
56
42
  import { PropertiesDeltas } from '../models/PropertiesDeltas';
57
43
  import { PropertiesObject } from '../models/PropertiesObject';
58
44
  import { Purchase } from '../models/Purchase';
59
- import { RateLimiterError } from '../models/RateLimiterError';
45
+ import { RateLimitError } from '../models/RateLimitError';
60
46
  import { Segment } from '../models/Segment';
47
+ import { SegmentData } from '../models/SegmentData';
61
48
  import { SegmentNotificationTarget } from '../models/SegmentNotificationTarget';
62
- import { StringMap } from '../models/StringMap';
63
- import { SubscriptionObject } from '../models/SubscriptionObject';
49
+ import { Subscription } from '../models/Subscription';
50
+ import { SubscriptionBody } from '../models/SubscriptionBody';
51
+ import { SubscriptionNotificationTarget } from '../models/SubscriptionNotificationTarget';
64
52
  import { TransferSubscriptionRequestBody } from '../models/TransferSubscriptionRequestBody';
65
53
  import { UpdateLiveActivityRequest } from '../models/UpdateLiveActivityRequest';
66
54
  import { UpdateLiveActivitySuccessResponse } from '../models/UpdateLiveActivitySuccessResponse';
67
- import { UpdatePlayerSuccessResponse } from '../models/UpdatePlayerSuccessResponse';
68
- import { UpdatePlayerTagsRequestBody } from '../models/UpdatePlayerTagsRequestBody';
69
- import { UpdatePlayerTagsSuccessResponse } from '../models/UpdatePlayerTagsSuccessResponse';
70
- import { UpdateSubscriptionRequestBody } from '../models/UpdateSubscriptionRequestBody';
71
55
  import { UpdateUserRequest } from '../models/UpdateUserRequest';
72
56
  import { User } from '../models/User';
73
- import { UserIdentityRequestBody } from '../models/UserIdentityRequestBody';
74
- import { UserIdentityResponse } from '../models/UserIdentityResponse';
75
- import { UserSubscriptionOptions } from '../models/UserSubscriptionOptions';
57
+ import { UserIdentityBody } from '../models/UserIdentityBody';
58
+ import { WebButton } from '../models/WebButton';
76
59
 
77
60
  import { ObservableDefaultApi } from "./ObservableAPI";
78
61
  import { DefaultApiRequestFactory, DefaultApiResponseProcessor} from "../apis/DefaultApi";
79
62
 
80
- export interface DefaultApiBeginLiveActivityRequest {
63
+ export interface DefaultApiCancelNotificationRequest {
81
64
  /**
82
- * The OneSignal App ID for your app. Available in Keys & IDs.
65
+ *
83
66
  * @type string
84
- * @memberof DefaultApibeginLiveActivity
67
+ * @memberof DefaultApicancelNotification
85
68
  */
86
69
  appId: string
87
70
  /**
88
- * Live Activity record ID
71
+ *
89
72
  * @type string
90
- * @memberof DefaultApibeginLiveActivity
73
+ * @memberof DefaultApicancelNotification
91
74
  */
92
- activityId: string
75
+ notificationId: string
76
+ }
77
+
78
+ export interface DefaultApiCreateAliasRequest {
79
+ /**
80
+ *
81
+ * @type string
82
+ * @memberof DefaultApicreateAlias
83
+ */
84
+ appId: string
85
+ /**
86
+ *
87
+ * @type string
88
+ * @memberof DefaultApicreateAlias
89
+ */
90
+ aliasLabel: string
93
91
  /**
94
92
  *
95
- * @type BeginLiveActivityRequest
96
- * @memberof DefaultApibeginLiveActivity
93
+ * @type string
94
+ * @memberof DefaultApicreateAlias
97
95
  */
98
- beginLiveActivityRequest: BeginLiveActivityRequest
96
+ aliasId: string
97
+ /**
98
+ *
99
+ * @type UserIdentityBody
100
+ * @memberof DefaultApicreateAlias
101
+ */
102
+ userIdentityBody: UserIdentityBody
99
103
  }
100
104
 
101
- export interface DefaultApiCancelNotificationRequest {
105
+ export interface DefaultApiCreateAliasBySubscriptionRequest {
102
106
  /**
103
107
  *
104
108
  * @type string
105
- * @memberof DefaultApicancelNotification
109
+ * @memberof DefaultApicreateAliasBySubscription
106
110
  */
107
111
  appId: string
108
112
  /**
109
113
  *
110
114
  * @type string
111
- * @memberof DefaultApicancelNotification
115
+ * @memberof DefaultApicreateAliasBySubscription
112
116
  */
113
- notificationId: string
117
+ subscriptionId: string
118
+ /**
119
+ *
120
+ * @type UserIdentityBody
121
+ * @memberof DefaultApicreateAliasBySubscription
122
+ */
123
+ userIdentityBody: UserIdentityBody
114
124
  }
115
125
 
116
126
  export interface DefaultApiCreateAppRequest {
@@ -131,26 +141,17 @@ export interface DefaultApiCreateNotificationRequest {
131
141
  notification: Notification
132
142
  }
133
143
 
134
- export interface DefaultApiCreatePlayerRequest {
135
- /**
136
- *
137
- * @type Player
138
- * @memberof DefaultApicreatePlayer
139
- */
140
- player: Player
141
- }
142
-
143
- export interface DefaultApiCreateSegmentsRequest {
144
+ export interface DefaultApiCreateSegmentRequest {
144
145
  /**
145
146
  * The OneSignal App ID for your app. Available in Keys & IDs.
146
147
  * @type string
147
- * @memberof DefaultApicreateSegments
148
+ * @memberof DefaultApicreateSegment
148
149
  */
149
150
  appId: string
150
151
  /**
151
152
  *
152
153
  * @type Segment
153
- * @memberof DefaultApicreateSegments
154
+ * @memberof DefaultApicreateSegment
154
155
  */
155
156
  segment?: Segment
156
157
  }
@@ -176,10 +177,10 @@ export interface DefaultApiCreateSubscriptionRequest {
176
177
  aliasId: string
177
178
  /**
178
179
  *
179
- * @type CreateSubscriptionRequestBody
180
+ * @type SubscriptionBody
180
181
  * @memberof DefaultApicreateSubscription
181
182
  */
182
- createSubscriptionRequestBody: CreateSubscriptionRequestBody
183
+ subscriptionBody: SubscriptionBody
183
184
  }
184
185
 
185
186
  export interface DefaultApiCreateUserRequest {
@@ -224,32 +225,17 @@ export interface DefaultApiDeleteAliasRequest {
224
225
  aliasLabelToDelete: string
225
226
  }
226
227
 
227
- export interface DefaultApiDeletePlayerRequest {
228
+ export interface DefaultApiDeleteSegmentRequest {
228
229
  /**
229
230
  * The OneSignal App ID for your app. Available in Keys & IDs.
230
231
  * @type string
231
- * @memberof DefaultApideletePlayer
232
- */
233
- appId: string
234
- /**
235
- * The OneSignal player_id
236
- * @type string
237
- * @memberof DefaultApideletePlayer
238
- */
239
- playerId: string
240
- }
241
-
242
- export interface DefaultApiDeleteSegmentsRequest {
243
- /**
244
- * The OneSignal App ID for your app. Available in Keys & IDs.
245
- * @type string
246
- * @memberof DefaultApideleteSegments
232
+ * @memberof DefaultApideleteSegment
247
233
  */
248
234
  appId: string
249
235
  /**
250
236
  * The segment_id can be found in the URL of the segment when viewing it in the dashboard.
251
237
  * @type string
252
- * @memberof DefaultApideleteSegments
238
+ * @memberof DefaultApideleteSegment
253
239
  */
254
240
  segmentId: string
255
241
  }
@@ -290,27 +276,6 @@ export interface DefaultApiDeleteUserRequest {
290
276
  aliasId: string
291
277
  }
292
278
 
293
- export interface DefaultApiEndLiveActivityRequest {
294
- /**
295
- * The OneSignal App ID for your app. Available in Keys & IDs.
296
- * @type string
297
- * @memberof DefaultApiendLiveActivity
298
- */
299
- appId: string
300
- /**
301
- * Live Activity record ID
302
- * @type string
303
- * @memberof DefaultApiendLiveActivity
304
- */
305
- activityId: string
306
- /**
307
- * Subscription ID
308
- * @type string
309
- * @memberof DefaultApiendLiveActivity
310
- */
311
- subscriptionId: string
312
- }
313
-
314
279
  export interface DefaultApiExportEventsRequest {
315
280
  /**
316
281
  * The ID of the notification to export events from.
@@ -326,76 +291,55 @@ export interface DefaultApiExportEventsRequest {
326
291
  appId: string
327
292
  }
328
293
 
329
- export interface DefaultApiExportPlayersRequest {
294
+ export interface DefaultApiExportSubscriptionsRequest {
330
295
  /**
331
296
  * The app ID that you want to export devices from
332
297
  * @type string
333
- * @memberof DefaultApiexportPlayers
334
- */
335
- appId: string
336
- /**
337
- *
338
- * @type ExportPlayersRequestBody
339
- * @memberof DefaultApiexportPlayers
340
- */
341
- exportPlayersRequestBody?: ExportPlayersRequestBody
342
- }
343
-
344
- export interface DefaultApiFetchAliasesRequest {
345
- /**
346
- *
347
- * @type string
348
- * @memberof DefaultApifetchAliases
298
+ * @memberof DefaultApiexportSubscriptions
349
299
  */
350
300
  appId: string
351
301
  /**
352
302
  *
353
- * @type string
354
- * @memberof DefaultApifetchAliases
303
+ * @type ExportSubscriptionsRequestBody
304
+ * @memberof DefaultApiexportSubscriptions
355
305
  */
356
- subscriptionId: string
306
+ exportSubscriptionsRequestBody?: ExportSubscriptionsRequestBody
357
307
  }
358
308
 
359
- export interface DefaultApiFetchUserRequest {
309
+ export interface DefaultApiGetAliasesRequest {
360
310
  /**
361
311
  *
362
312
  * @type string
363
- * @memberof DefaultApifetchUser
313
+ * @memberof DefaultApigetAliases
364
314
  */
365
315
  appId: string
366
316
  /**
367
317
  *
368
318
  * @type string
369
- * @memberof DefaultApifetchUser
319
+ * @memberof DefaultApigetAliases
370
320
  */
371
321
  aliasLabel: string
372
322
  /**
373
323
  *
374
324
  * @type string
375
- * @memberof DefaultApifetchUser
325
+ * @memberof DefaultApigetAliases
376
326
  */
377
327
  aliasId: string
378
328
  }
379
329
 
380
- export interface DefaultApiFetchUserIdentityRequest {
330
+ export interface DefaultApiGetAliasesBySubscriptionRequest {
381
331
  /**
382
332
  *
383
333
  * @type string
384
- * @memberof DefaultApifetchUserIdentity
334
+ * @memberof DefaultApigetAliasesBySubscription
385
335
  */
386
336
  appId: string
387
337
  /**
388
338
  *
389
339
  * @type string
390
- * @memberof DefaultApifetchUserIdentity
340
+ * @memberof DefaultApigetAliasesBySubscription
391
341
  */
392
- aliasLabel: string
393
- /**
394
- *
395
- * @type string
396
- * @memberof DefaultApifetchUserIdentity
397
- */
398
- aliasId: string
342
+ subscriptionId: string
399
343
  }
400
344
 
401
345
  export interface DefaultApiGetAppRequest {
@@ -410,21 +354,6 @@ export interface DefaultApiGetAppRequest {
410
354
  export interface DefaultApiGetAppsRequest {
411
355
  }
412
356
 
413
- export interface DefaultApiGetEligibleIamsRequest {
414
- /**
415
- *
416
- * @type string
417
- * @memberof DefaultApigetEligibleIams
418
- */
419
- appId: string
420
- /**
421
- *
422
- * @type string
423
- * @memberof DefaultApigetEligibleIams
424
- */
425
- subscriptionId: string
426
- }
427
-
428
357
  export interface DefaultApiGetNotificationRequest {
429
358
  /**
430
359
  *
@@ -449,10 +378,10 @@ export interface DefaultApiGetNotificationHistoryRequest {
449
378
  notificationId: string
450
379
  /**
451
380
  *
452
- * @type GetNotificationRequestBody
381
+ * @type GetNotificationHistoryRequestBody
453
382
  * @memberof DefaultApigetNotificationHistory
454
383
  */
455
- getNotificationRequestBody: GetNotificationRequestBody
384
+ getNotificationHistoryRequestBody: GetNotificationHistoryRequestBody
456
385
  }
457
386
 
458
387
  export interface DefaultApiGetNotificationsRequest {
@@ -521,115 +450,88 @@ export interface DefaultApiGetOutcomesRequest {
521
450
  outcomeAttribution?: string
522
451
  }
523
452
 
524
- export interface DefaultApiGetPlayerRequest {
453
+ export interface DefaultApiGetSegmentsRequest {
525
454
  /**
526
- * Your app_id for this device
527
- * @type string
528
- * @memberof DefaultApigetPlayer
529
- */
530
- appId: string
531
- /**
532
- * Player\'s OneSignal ID
533
- * @type string
534
- * @memberof DefaultApigetPlayer
535
- */
536
- playerId: string
537
- /**
538
- * Email - Only required if you have enabled Identity Verification and device_type is email (11).
539
- * @type string
540
- * @memberof DefaultApigetPlayer
541
- */
542
- emailAuthHash?: string
543
- }
544
-
545
- export interface DefaultApiGetPlayersRequest {
546
- /**
547
- * The app ID that you want to view players from
455
+ * The OneSignal App ID for your app. Available in Keys & IDs.
548
456
  * @type string
549
- * @memberof DefaultApigetPlayers
457
+ * @memberof DefaultApigetSegments
550
458
  */
551
459
  appId: string
552
460
  /**
553
- * How many devices to return. Max is 300. Default is 300
461
+ * Segments are listed in ascending order of created_at date. offset will omit that number of segments from the beginning of the list. Eg offset 5, will remove the 5 earliest created Segments.
554
462
  * @type number
555
- * @memberof DefaultApigetPlayers
463
+ * @memberof DefaultApigetSegments
556
464
  */
557
- limit?: number
465
+ offset?: number
558
466
  /**
559
- * Result offset. Default is 0. Results are sorted by id;
467
+ * The amount of Segments in the response. Maximum 300.
560
468
  * @type number
561
- * @memberof DefaultApigetPlayers
469
+ * @memberof DefaultApigetSegments
562
470
  */
563
- offset?: number
471
+ limit?: number
564
472
  }
565
473
 
566
- export interface DefaultApiIdentifyUserByAliasRequest {
474
+ export interface DefaultApiGetUserRequest {
567
475
  /**
568
476
  *
569
477
  * @type string
570
- * @memberof DefaultApiidentifyUserByAlias
478
+ * @memberof DefaultApigetUser
571
479
  */
572
480
  appId: string
573
481
  /**
574
482
  *
575
483
  * @type string
576
- * @memberof DefaultApiidentifyUserByAlias
484
+ * @memberof DefaultApigetUser
577
485
  */
578
486
  aliasLabel: string
579
487
  /**
580
488
  *
581
489
  * @type string
582
- * @memberof DefaultApiidentifyUserByAlias
490
+ * @memberof DefaultApigetUser
583
491
  */
584
492
  aliasId: string
585
- /**
586
- *
587
- * @type UserIdentityRequestBody
588
- * @memberof DefaultApiidentifyUserByAlias
589
- */
590
- userIdentityRequestBody: UserIdentityRequestBody
591
493
  }
592
494
 
593
- export interface DefaultApiIdentifyUserBySubscriptionIdRequest {
495
+ export interface DefaultApiTransferSubscriptionRequest {
594
496
  /**
595
497
  *
596
498
  * @type string
597
- * @memberof DefaultApiidentifyUserBySubscriptionId
499
+ * @memberof DefaultApitransferSubscription
598
500
  */
599
501
  appId: string
600
502
  /**
601
503
  *
602
504
  * @type string
603
- * @memberof DefaultApiidentifyUserBySubscriptionId
505
+ * @memberof DefaultApitransferSubscription
604
506
  */
605
507
  subscriptionId: string
606
508
  /**
607
509
  *
608
- * @type UserIdentityRequestBody
609
- * @memberof DefaultApiidentifyUserBySubscriptionId
510
+ * @type TransferSubscriptionRequestBody
511
+ * @memberof DefaultApitransferSubscription
610
512
  */
611
- userIdentityRequestBody: UserIdentityRequestBody
513
+ transferSubscriptionRequestBody: TransferSubscriptionRequestBody
612
514
  }
613
515
 
614
- export interface DefaultApiTransferSubscriptionRequest {
516
+ export interface DefaultApiUnsubscribeEmailWithTokenRequest {
615
517
  /**
616
- *
518
+ * The OneSignal App ID for your app. Available in Keys & IDs.
617
519
  * @type string
618
- * @memberof DefaultApitransferSubscription
520
+ * @memberof DefaultApiunsubscribeEmailWithToken
619
521
  */
620
522
  appId: string
621
523
  /**
622
- *
524
+ * The id of the message found in the creation notification POST response, View Notifications GET response, or URL within the Message Report.
623
525
  * @type string
624
- * @memberof DefaultApitransferSubscription
526
+ * @memberof DefaultApiunsubscribeEmailWithToken
625
527
  */
626
- subscriptionId: string
528
+ notificationId: string
627
529
  /**
628
- *
629
- * @type TransferSubscriptionRequestBody
630
- * @memberof DefaultApitransferSubscription
530
+ * The unsubscribe token that is generated via liquid syntax in {{subscription.unsubscribe_token}} when personalizing an email.
531
+ * @type string
532
+ * @memberof DefaultApiunsubscribeEmailWithToken
631
533
  */
632
- transferSubscriptionRequestBody: TransferSubscriptionRequestBody
534
+ token: string
633
535
  }
634
536
 
635
537
  export interface DefaultApiUpdateAppRequest {
@@ -668,42 +570,6 @@ export interface DefaultApiUpdateLiveActivityRequest {
668
570
  updateLiveActivityRequest: UpdateLiveActivityRequest
669
571
  }
670
572
 
671
- export interface DefaultApiUpdatePlayerRequest {
672
- /**
673
- * Player\'s OneSignal ID
674
- * @type string
675
- * @memberof DefaultApiupdatePlayer
676
- */
677
- playerId: string
678
- /**
679
- *
680
- * @type Player
681
- * @memberof DefaultApiupdatePlayer
682
- */
683
- player: Player
684
- }
685
-
686
- export interface DefaultApiUpdatePlayerTagsRequest {
687
- /**
688
- * The OneSignal App ID the user record is found under.
689
- * @type string
690
- * @memberof DefaultApiupdatePlayerTags
691
- */
692
- appId: string
693
- /**
694
- * The External User ID mapped to teh device record in OneSignal. Must be actively set on the device to be updated.
695
- * @type string
696
- * @memberof DefaultApiupdatePlayerTags
697
- */
698
- externalUserId: string
699
- /**
700
- *
701
- * @type UpdatePlayerTagsRequestBody
702
- * @memberof DefaultApiupdatePlayerTags
703
- */
704
- updatePlayerTagsRequestBody?: UpdatePlayerTagsRequestBody
705
- }
706
-
707
573
  export interface DefaultApiUpdateSubscriptionRequest {
708
574
  /**
709
575
  *
@@ -719,10 +585,10 @@ export interface DefaultApiUpdateSubscriptionRequest {
719
585
  subscriptionId: string
720
586
  /**
721
587
  *
722
- * @type UpdateSubscriptionRequestBody
588
+ * @type SubscriptionBody
723
589
  * @memberof DefaultApiupdateSubscription
724
590
  */
725
- updateSubscriptionRequestBody: UpdateSubscriptionRequestBody
591
+ subscriptionBody: SubscriptionBody
726
592
  }
727
593
 
728
594
  export interface DefaultApiUpdateUserRequest {
@@ -760,21 +626,28 @@ export class ObjectDefaultApi {
760
626
  }
761
627
 
762
628
  /**
763
- * Starts a Live Activity
764
- * Start Live Activity
629
+ * Used to stop a scheduled or currently outgoing notification
630
+ * Stop a scheduled or currently outgoing notification
765
631
  * @param param the request object
766
632
  */
767
- public beginLiveActivity(param: DefaultApiBeginLiveActivityRequest, options?: Configuration): Promise<void> {
768
- return this.api.beginLiveActivity(param.appId, param.activityId, param.beginLiveActivityRequest, options).toPromise();
633
+ public cancelNotification(param: DefaultApiCancelNotificationRequest, options?: Configuration): Promise<GenericSuccessBoolResponse> {
634
+ return this.api.cancelNotification(param.appId, param.notificationId, options).toPromise();
769
635
  }
770
636
 
771
637
  /**
772
- * Used to stop a scheduled or currently outgoing notification
773
- * Stop a scheduled or currently outgoing notification
638
+ * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
774
639
  * @param param the request object
775
640
  */
776
- public cancelNotification(param: DefaultApiCancelNotificationRequest, options?: Configuration): Promise<CancelNotificationSuccessResponse> {
777
- return this.api.cancelNotification(param.appId, param.notificationId, options).toPromise();
641
+ public createAlias(param: DefaultApiCreateAliasRequest, options?: Configuration): Promise<UserIdentityBody> {
642
+ return this.api.createAlias(param.appId, param.aliasLabel, param.aliasId, param.userIdentityBody, options).toPromise();
643
+ }
644
+
645
+ /**
646
+ * Upserts one or more Aliases for the User identified by :subscription_id.
647
+ * @param param the request object
648
+ */
649
+ public createAliasBySubscription(param: DefaultApiCreateAliasBySubscriptionRequest, options?: Configuration): Promise<UserIdentityBody> {
650
+ return this.api.createAliasBySubscription(param.appId, param.subscriptionId, param.userIdentityBody, options).toPromise();
778
651
  }
779
652
 
780
653
  /**
@@ -796,29 +669,20 @@ export class ObjectDefaultApi {
796
669
  }
797
670
 
798
671
  /**
799
- * Register a new device to one of your OneSignal apps &#x1F6A7; Don\'t use this This API endpoint is designed to be used from our open source Mobile and Web Push SDKs. It is not designed for developers to use it directly, unless instructed to do so by OneSignal support. If you use this method instead of our SDKs, many OneSignal features such as conversion tracking, timezone tracking, language detection, and rich-push won\'t work out of the box. It will also make it harder to identify possible setup issues. This method is used to register a new device with OneSignal. If a device is already registered with the specified identifier, then this will update the existing device record instead of creating a new one. The returned player is a player / user ID. Use the returned ID to send push notifications to this specific user later, or to include this player when sending to a set of users. &#x1F6A7; iOS Must set test_type to 1 when building your iOS app as development. Omit this field in your production app builds.
800
- * Add a device
801
- * @param param the request object
802
- */
803
- public createPlayer(param: DefaultApiCreatePlayerRequest, options?: Configuration): Promise<CreatePlayerSuccessResponse> {
804
- return this.api.createPlayer(param.player, options).toPromise();
805
- }
806
-
807
- /**
808
- * Create segments visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator\'s. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segments endpoint and re-create it with this endpoint to edit.
809
- * Create Segments
672
+ * Create a segment visible and usable in the dashboard and API - Required: OneSignal Paid Plan The Create Segment method is used when you want your server to programmatically create a segment instead of using the OneSignal Dashboard UI. Just like creating Segments from the dashboard you can pass in filters with multiple \"AND\" or \"OR\" operator\'s. &#x1F6A7; Does Not Update Segments This endpoint will only create segments, it does not edit or update currently created Segments. You will need to use the Delete Segment endpoint and re-create it with this endpoint to edit.
673
+ * Create Segment
810
674
  * @param param the request object
811
675
  */
812
- public createSegments(param: DefaultApiCreateSegmentsRequest, options?: Configuration): Promise<CreateSegmentSuccessResponse> {
813
- return this.api.createSegments(param.appId, param.segment, options).toPromise();
676
+ public createSegment(param: DefaultApiCreateSegmentRequest, options?: Configuration): Promise<CreateSegmentSuccessResponse> {
677
+ return this.api.createSegment(param.appId, param.segment, options).toPromise();
814
678
  }
815
679
 
816
680
  /**
817
681
  * Creates a new Subscription under the User provided. Useful to add email addresses and SMS numbers to the User.
818
682
  * @param param the request object
819
683
  */
820
- public createSubscription(param: DefaultApiCreateSubscriptionRequest, options?: Configuration): Promise<InlineResponse201> {
821
- return this.api.createSubscription(param.appId, param.aliasLabel, param.aliasId, param.createSubscriptionRequestBody, options).toPromise();
684
+ public createSubscription(param: DefaultApiCreateSubscriptionRequest, options?: Configuration): Promise<SubscriptionBody> {
685
+ return this.api.createSubscription(param.appId, param.aliasLabel, param.aliasId, param.subscriptionBody, options).toPromise();
822
686
  }
823
687
 
824
688
  /**
@@ -833,26 +697,17 @@ export class ObjectDefaultApi {
833
697
  * Deletes an alias by alias label
834
698
  * @param param the request object
835
699
  */
836
- public deleteAlias(param: DefaultApiDeleteAliasRequest, options?: Configuration): Promise<InlineResponse200> {
700
+ public deleteAlias(param: DefaultApiDeleteAliasRequest, options?: Configuration): Promise<UserIdentityBody> {
837
701
  return this.api.deleteAlias(param.appId, param.aliasLabel, param.aliasId, param.aliasLabelToDelete, options).toPromise();
838
702
  }
839
703
 
840
704
  /**
841
- * Delete player - Required: Used to delete a single, specific Player ID record from a specific OneSignal app.
842
- * Delete a user record
705
+ * Delete a segment (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.
706
+ * Delete Segment
843
707
  * @param param the request object
844
708
  */
845
- public deletePlayer(param: DefaultApiDeletePlayerRequest, options?: Configuration): Promise<DeletePlayerSuccessResponse> {
846
- return this.api.deletePlayer(param.appId, param.playerId, options).toPromise();
847
- }
848
-
849
- /**
850
- * 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.
851
- * Delete Segments
852
- * @param param the request object
853
- */
854
- public deleteSegments(param: DefaultApiDeleteSegmentsRequest, options?: Configuration): Promise<DeleteSegmentSuccessResponse> {
855
- return this.api.deleteSegments(param.appId, param.segmentId, options).toPromise();
709
+ public deleteSegment(param: DefaultApiDeleteSegmentRequest, options?: Configuration): Promise<GenericSuccessBoolResponse> {
710
+ return this.api.deleteSegment(param.appId, param.segmentId, options).toPromise();
856
711
  }
857
712
 
858
713
  /**
@@ -871,15 +726,6 @@ export class ObjectDefaultApi {
871
726
  return this.api.deleteUser(param.appId, param.aliasLabel, param.aliasId, options).toPromise();
872
727
  }
873
728
 
874
- /**
875
- * Stops a Live Activity
876
- * Stop Live Activity
877
- * @param param the request object
878
- */
879
- public endLiveActivity(param: DefaultApiEndLiveActivityRequest, options?: Configuration): Promise<void> {
880
- return this.api.endLiveActivity(param.appId, param.activityId, param.subscriptionId, options).toPromise();
881
- }
882
-
883
729
  /**
884
730
  * Generate a compressed CSV report of all of the events data for a notification. This will return a URL immediately upon success but it may take several minutes for the CSV to become available at that URL depending on the volume of data. Only one export can be in-progress per OneSignal account at any given time.
885
731
  * Export CSV of Events
@@ -891,35 +737,27 @@ export class ObjectDefaultApi {
891
737
 
892
738
  /**
893
739
  * 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. |
894
- * Export CSV of Players
895
- * @param param the request object
896
- */
897
- public exportPlayers(param: DefaultApiExportPlayersRequest, options?: Configuration): Promise<ExportPlayersSuccessResponse> {
898
- return this.api.exportPlayers(param.appId, param.exportPlayersRequestBody, options).toPromise();
899
- }
900
-
901
- /**
902
- * Lists all Aliases for the User identified by :subscription_id.
740
+ * Export CSV of Subscriptions
903
741
  * @param param the request object
904
742
  */
905
- public fetchAliases(param: DefaultApiFetchAliasesRequest, options?: Configuration): Promise<UserIdentityResponse> {
906
- return this.api.fetchAliases(param.appId, param.subscriptionId, options).toPromise();
743
+ public exportSubscriptions(param: DefaultApiExportSubscriptionsRequest, options?: Configuration): Promise<ExportSubscriptionsSuccessResponse> {
744
+ return this.api.exportSubscriptions(param.appId, param.exportSubscriptionsRequestBody, options).toPromise();
907
745
  }
908
746
 
909
747
  /**
910
- * Returns the User’s properties, Aliases, and Subscriptions.
748
+ * Lists all Aliases for the User identified by (:alias_label, :alias_id).
911
749
  * @param param the request object
912
750
  */
913
- public fetchUser(param: DefaultApiFetchUserRequest, options?: Configuration): Promise<User> {
914
- return this.api.fetchUser(param.appId, param.aliasLabel, param.aliasId, options).toPromise();
751
+ public getAliases(param: DefaultApiGetAliasesRequest, options?: Configuration): Promise<UserIdentityBody> {
752
+ return this.api.getAliases(param.appId, param.aliasLabel, param.aliasId, options).toPromise();
915
753
  }
916
754
 
917
755
  /**
918
- * Lists all Aliases for the User identified by (:alias_label, :alias_id).
756
+ * Lists all Aliases for the User identified by :subscription_id.
919
757
  * @param param the request object
920
758
  */
921
- public fetchUserIdentity(param: DefaultApiFetchUserIdentityRequest, options?: Configuration): Promise<InlineResponse200> {
922
- return this.api.fetchUserIdentity(param.appId, param.aliasLabel, param.aliasId, options).toPromise();
759
+ public getAliasesBySubscription(param: DefaultApiGetAliasesBySubscriptionRequest, options?: Configuration): Promise<UserIdentityBody> {
760
+ return this.api.getAliasesBySubscription(param.appId, param.subscriptionId, options).toPromise();
923
761
  }
924
762
 
925
763
  /**
@@ -940,14 +778,6 @@ export class ObjectDefaultApi {
940
778
  return this.api.getApps( options).toPromise();
941
779
  }
942
780
 
943
- /**
944
- * Manifest of In-App Messages the Subscription is eligible to display by the SDK.
945
- * @param param the request object
946
- */
947
- public getEligibleIams(param: DefaultApiGetEligibleIamsRequest, options?: Configuration): Promise<InlineResponse2003> {
948
- return this.api.getEligibleIams(param.appId, param.subscriptionId, options).toPromise();
949
- }
950
-
951
781
  /**
952
782
  * View the details of a single notification and outcomes associated with it
953
783
  * View notification
@@ -963,7 +793,7 @@ export class ObjectDefaultApi {
963
793
  * @param param the request object
964
794
  */
965
795
  public getNotificationHistory(param: DefaultApiGetNotificationHistoryRequest, options?: Configuration): Promise<NotificationHistorySuccessResponse> {
966
- return this.api.getNotificationHistory(param.notificationId, param.getNotificationRequestBody, options).toPromise();
796
+ return this.api.getNotificationHistory(param.notificationId, param.getNotificationHistoryRequestBody, options).toPromise();
967
797
  }
968
798
 
969
799
  /**
@@ -985,45 +815,37 @@ export class ObjectDefaultApi {
985
815
  }
986
816
 
987
817
  /**
988
- * View the details of an existing device in one of your OneSignal apps
989
- * View device
990
- * @param param the request object
991
- */
992
- public getPlayer(param: DefaultApiGetPlayerRequest, options?: Configuration): Promise<Player> {
993
- return this.api.getPlayer(param.appId, param.playerId, param.emailAuthHash, options).toPromise();
994
- }
995
-
996
- /**
997
- * 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.
998
- * View devices
818
+ * Returns an array of segments from an app.
819
+ * Get Segments
999
820
  * @param param the request object
1000
821
  */
1001
- public getPlayers(param: DefaultApiGetPlayersRequest, options?: Configuration): Promise<PlayerSlice> {
1002
- return this.api.getPlayers(param.appId, param.limit, param.offset, options).toPromise();
822
+ public getSegments(param: DefaultApiGetSegmentsRequest, options?: Configuration): Promise<GetSegmentsSuccessResponse> {
823
+ return this.api.getSegments(param.appId, param.offset, param.limit, options).toPromise();
1003
824
  }
1004
825
 
1005
826
  /**
1006
- * Upserts one or more Aliases to an existing User identified by (:alias_label, :alias_id).
827
+ * Returns the User’s properties, Aliases, and Subscriptions.
1007
828
  * @param param the request object
1008
829
  */
1009
- public identifyUserByAlias(param: DefaultApiIdentifyUserByAliasRequest, options?: Configuration): Promise<InlineResponse200> {
1010
- return this.api.identifyUserByAlias(param.appId, param.aliasLabel, param.aliasId, param.userIdentityRequestBody, options).toPromise();
830
+ public getUser(param: DefaultApiGetUserRequest, options?: Configuration): Promise<User> {
831
+ return this.api.getUser(param.appId, param.aliasLabel, param.aliasId, options).toPromise();
1011
832
  }
1012
833
 
1013
834
  /**
1014
- * Upserts one or more Aliases for the User identified by :subscription_id.
835
+ * Transfers this Subscription to the User identified by the identity in the payload.
1015
836
  * @param param the request object
1016
837
  */
1017
- public identifyUserBySubscriptionId(param: DefaultApiIdentifyUserBySubscriptionIdRequest, options?: Configuration): Promise<UserIdentityResponse> {
1018
- return this.api.identifyUserBySubscriptionId(param.appId, param.subscriptionId, param.userIdentityRequestBody, options).toPromise();
838
+ public transferSubscription(param: DefaultApiTransferSubscriptionRequest, options?: Configuration): Promise<UserIdentityBody> {
839
+ return this.api.transferSubscription(param.appId, param.subscriptionId, param.transferSubscriptionRequestBody, options).toPromise();
1019
840
  }
1020
841
 
1021
842
  /**
1022
- * Transfers this Subscription to the User identified by the identity in the payload.
843
+ * Unsubscribe an email with a token when using your own custom email unsubscribe landing page
844
+ * Unsubscribe with token
1023
845
  * @param param the request object
1024
846
  */
1025
- public transferSubscription(param: DefaultApiTransferSubscriptionRequest, options?: Configuration): Promise<UserIdentityResponse> {
1026
- return this.api.transferSubscription(param.appId, param.subscriptionId, param.transferSubscriptionRequestBody, options).toPromise();
847
+ public unsubscribeEmailWithToken(param: DefaultApiUnsubscribeEmailWithTokenRequest, options?: Configuration): Promise<GenericSuccessBoolResponse> {
848
+ return this.api.unsubscribeEmailWithToken(param.appId, param.notificationId, param.token, options).toPromise();
1027
849
  }
1028
850
 
1029
851
  /**
@@ -1044,37 +866,19 @@ export class ObjectDefaultApi {
1044
866
  return this.api.updateLiveActivity(param.appId, param.activityId, param.updateLiveActivityRequest, options).toPromise();
1045
867
  }
1046
868
 
1047
- /**
1048
- * Update an existing device in one of your OneSignal apps
1049
- * Edit device
1050
- * @param param the request object
1051
- */
1052
- public updatePlayer(param: DefaultApiUpdatePlayerRequest, options?: Configuration): Promise<UpdatePlayerSuccessResponse> {
1053
- return this.api.updatePlayer(param.playerId, param.player, options).toPromise();
1054
- }
1055
-
1056
- /**
1057
- * Update an existing device\'s tags in one of your OneSignal apps using the External User ID. Warning - Android SDK Data Synchronization Tags added through the Android SDK tagging methods may not update if using the API to change or update the same tag. For example, if you use SDK method sendTag(\"key\", \"value1\") then update the tag value to \"value2\" with this API endpoint. You will not be able to set the value back to \"value1\" through the SDK, you will need to change it to something different through the SDK to be reset. Recommendations if using this Endpoint on Android Mobile Apps: 1 - Do not use the same tag keys for SDK and API updates 2 - If you want to use the same key for both SDK and API updates, call the SDK getTags method first to update the device\'s tags. This is only applicable on the Android Mobile App SDKs. &#128216; Deleting Tags To delete a tag, include its key and set its value to blank. Omitting a key/value will not delete it. For example, if I wanted to delete two existing tags rank and category while simultaneously adding a new tag class, the tags JSON would look like the following: \"tags\": { \"rank\": \"\", \"category\": \"\", \"class\": \"my_new_value\" }
1058
- * Edit tags with external user id
1059
- * @param param the request object
1060
- */
1061
- public updatePlayerTags(param: DefaultApiUpdatePlayerTagsRequest, options?: Configuration): Promise<UpdatePlayerTagsSuccessResponse> {
1062
- return this.api.updatePlayerTags(param.appId, param.externalUserId, param.updatePlayerTagsRequestBody, options).toPromise();
1063
- }
1064
-
1065
869
  /**
1066
870
  * Updates an existing Subscription’s properties.
1067
871
  * @param param the request object
1068
872
  */
1069
873
  public updateSubscription(param: DefaultApiUpdateSubscriptionRequest, options?: Configuration): Promise<void> {
1070
- return this.api.updateSubscription(param.appId, param.subscriptionId, param.updateSubscriptionRequestBody, options).toPromise();
874
+ return this.api.updateSubscription(param.appId, param.subscriptionId, param.subscriptionBody, options).toPromise();
1071
875
  }
1072
876
 
1073
877
  /**
1074
878
  * Updates an existing User’s properties.
1075
879
  * @param param the request object
1076
880
  */
1077
- public updateUser(param: DefaultApiUpdateUserRequest, options?: Configuration): Promise<InlineResponse202> {
881
+ public updateUser(param: DefaultApiUpdateUserRequest, options?: Configuration): Promise<PropertiesBody> {
1078
882
  return this.api.updateUser(param.appId, param.aliasLabel, param.aliasId, param.updateUserRequest, options).toPromise();
1079
883
  }
1080
884